Skip to content

[clang] Add tests for CWG issues about friend declaration matching #106117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 2, 2024

Conversation

Endilll
Copy link
Contributor

@Endilll Endilll commented Aug 26, 2024

This patch covers CWG issues regarding declaration matching when friend declarations are involved: CWG138, CWG386, CWG1477, and CWG1900. Atypical for our CWG tests, the ones in this patch are quite extensively commented in-line, explaining the mechanics. PR description focuses on high-level concerns and references.

CWG138 "Friend declaration name lookup"

P1787R6:

CWG138 is resolved according to N1229, except that using-directives that nominate nested namespaces are considered.

I find it hard to pin down the scope of this issue, so I'm relying on three examples from the filing to define it. Because of that, it's also hard to pinpoint exact wording changes that resolve it. Relevant references are: [dcl.meaning.general]/2, [namespace.udecl]/10, [dcl.type.elab]/3, [basic.lookup.elab]/1.

CWG386 "Friend declaration of name brought in by using-declaration"

P1787R6:

CWG386, CWG1839, CWG1818, CWG2058, CWG1900, and Richard’s observation in “are non-type names ignored in a class-head-name or enum-head-name?” are resolved by describing the limited lookup that occurs for a declarator-id, including the changes in Richard’s proposed resolution for CWG1839 (which also resolves CWG1818 and what of CWG2058 was not resolved along with CWG2059) and rejecting the example from CWG1477.

Wording ([dcl.meaning.general]/2):

— If the id-expression E in the declarator-id of the declarator is a qualified-id or a template-id:
     — [...]
     — The declarator shall correspond to one or more declarations found by the lookup; they shall all have the same target scope, and the target scope of the declarator is that scope.

This issue focuses on interaction of friend declarations with template-id and qualified-id with using-declarations. The short answer is that terminal name in such declarations undergo lookup, and using-declarations do what they usually do helping that lookup. Target scope of such friend declaration is the target scope of lookup result, so no conflicts arise with the using-declarations.

CWG1477 "Definition of a friend outside its namespace"

P1787R6:

[...] and rejecting the example from CWG1477.

Wording ([dcl.meaning.general]/3.4):

Otherwise, the terminal name of the declarator-id is not looked up.
If it is a qualified name, the declarator shall correspond to one or more declarations nominable in S; all the declarations shall have the same target scope and the target scope of the declarator is that scope.

This issue focuses on befriending a function in one scope, then defining it from other scope using qualified-id. Contrary to what P1787R6 says in prose, this example is accepted by the wording in that paper. In the wording quote above, note the absence of a statement like "terminal name of the declarator-id is not bound", contrary to similar statements made before that in [dcl.meaning.general] about friend declarations and template-ids.

There's also a note in [basic.scope.scope] that supports the rejection, but it's considered incorrect and expected to be removed in the future. This is tracked in cplusplus/draft#7238.

CWG1900 "Do friend declarations count as “previous declarations”?"

P1787R6:

CWG386, CWG1839, CWG1818, CWG2058, CWG1900, and Richard’s observation in “are non-type names ignored in a class-head-name or enum-head-name?” are resolved by describing the limited lookup that occurs for a declarator-id, including the changes in Richard’s proposed resolution for CWG1839 (which also resolves CWG1818 and what of CWG2058 was not resolved along with CWG2059) and rejecting the example from CWG1477.

Wording ([dcl.meaning.general]/2.3):

The declaration's target scope is the innermost enclosing namespace scope; if the declaration is contained by a block scope, the declaration shall correspond to a reachable ([module.reach]) declaration that inhabits the innermost block scope.

Wording ([basic.scope.scope]/7):

A declaration is nominable in a class, class template, or namespace E at a point P if it precedes P, it does not inhabit a block scope, and its target scope is the scope associated with E or, if E is a namespace, any element of the inline namespace set of E ([namespace.def]).

Wording ([dcl.meaning.general]/3.4):

If it is a qualified name, the declarator shall correspond to one or more declarations nominable in S; [...]

In the new wording it's clear that while friend declarations of functions do not bind names, declaration is still introduced, and is nominable, making it eligible for a later definition by qualified-id.

@Endilll Endilll added the c++ label Aug 26, 2024
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Aug 26, 2024
@llvmbot
Copy link
Member

llvmbot commented Aug 26, 2024

@llvm/pr-subscribers-clang

Author: Vlad Serebrennikov (Endilll)

Changes

This patch covers CWG issues regarding declaration matching when friend declarations are involved: CWG138, CWG386, and CWG1477. Atypical for our CWG tests, the ones in this patch are quite extensively commented in-line, explaining the mechanics. PR description focuses on high-level concerns and references.

CWG138 "Friend declaration name lookup"

P1787R6:
> CWG138 is resolved according to N1229, except that using-directives that nominate nested namespaces are considered.

I find it hard to pin down the scope of this issue, so I'm relying on three examples from the filing to define it. Because of that, it's also hard to pinpoint exact wording changes that resolve it. Relevant references are: [dcl.meaning.general]/2, [[namespace.udecl]/10](https://eel.is/c++draft/namespace.udecl#10), [[dcl.type.elab]/3](https://eel.is/c++draft/dcl.type.elab#3), [[basic.lookup.elab]/1](https://eel.is/c++draft/basic.lookup.elab#1).

CWG386 "Friend declaration of name brought in by using-declaration"

P1787R6:
> CWG386, CWG1839, CWG1818, CWG2058, CWG1900, and Richard’s observation in “are non-type names ignored in a class-head-name or enum-head-name?” are resolved by describing the limited lookup that occurs for a declarator-id, including the changes in Richard’s proposed resolution for CWG1839 (which also resolves CWG1818 and what of CWG2058 was not resolved along with CWG2059) and rejecting the example from CWG1477.

Wording ([dcl.meaning.general]/2):
> — If the id-expression E in the declarator-id of the declarator is a qualified-id or a template-id:
>      — [...]
>      — The declarator shall correspond to one or more declarations found by the lookup; they shall all have the same target scope, and the target scope of the declarator is that scope.

This issue focuses on interaction of friend declarations with template-id and qualified-id with using-declarations. The short answer is that terminal name in such declarations undergo lookup, and using-declarations do what they usually do helping that lookup. Target scope of such friend declaration is the target scope of lookup result, so no conflicts arise with the using-declarations.

CWG1477 "Definition of a friend outside its namespace"

P1787R6:
> [...] and rejecting the example from CWG1477.

Wording ([dcl.meaning.general]/3.4):
> Otherwise, the terminal name of the declarator-id is not looked up.
If it is a qualified name, the declarator shall correspond to one or more declarations nominable in S; all the declarations shall have the same target scope and the target scope of the declarator is that scope.

This issue focuses on befriending a function in one scope, then defining it from other scope using qualified-id. Contrary to what P1787R6 says in prose, this example is accepted by the wording in that paper. In the wording quote above, note the absence of a statement like "terminal name of the declarator-id is not bound", contrary to similar statements made before that in [dcl.meaning.general] about friend declarations and template-ids.

There's also a note in [basic.scope.scope] that supports the rejection, but it's considered incorrect and expected to be removed in the future. This is tracked in cplusplus/draft#7238.


There's also a relevant CWG1900, but I'm not sure what to do about it. Call it a pure wording change? Input is appreciated.


Full diff: https://github.com/llvm/llvm-project/pull/106117.diff

3 Files Affected:

  • (modified) clang/test/CXX/drs/cwg14xx.cpp (+19)
  • (modified) clang/test/CXX/drs/cwg1xx.cpp (+74)
  • (modified) clang/test/CXX/drs/cwg3xx.cpp (+69)
diff --git a/clang/test/CXX/drs/cwg14xx.cpp b/clang/test/CXX/drs/cwg14xx.cpp
index a23ac744436331..1240c416451b8f 100644
--- a/clang/test/CXX/drs/cwg14xx.cpp
+++ b/clang/test/CXX/drs/cwg14xx.cpp
@@ -603,6 +603,25 @@ namespace cwg1467 {  // cwg1467: 3.7 c++11
 #endif
 } // cwg1467
 
+namespace cwg1477 { // cwg1477: 2.7
+namespace N {
+struct A {
+  // Name "f" is not bound in N,
+  // so single searches of 'f' in N won't find it,
+  // but the targets scope of this declaration is N,
+  // making it nominable in N.
+  friend int f();
+};
+}
+// Corresponds to the friend declaration,
+// because it's nominable in N,
+// and binds name 'f' in N.
+int N::f() { return 0; }
+// Name 'f' is bound in N,
+// so the search performed by qualified lookup finds it.
+int i = N::f();
+} // namespace cwg1477
+
 namespace cwg1479 { // cwg1479: 3.1
 #if __cplusplus >= 201103L
   int operator"" _a(const char*, std::size_t = 0);
diff --git a/clang/test/CXX/drs/cwg1xx.cpp b/clang/test/CXX/drs/cwg1xx.cpp
index e7dddd1ea9278f..d6ee0844458b1d 100644
--- a/clang/test/CXX/drs/cwg1xx.cpp
+++ b/clang/test/CXX/drs/cwg1xx.cpp
@@ -568,6 +568,80 @@ namespace cwg137 { // cwg137: yes
   const volatile int *cvqcv = static_cast<const volatile int*>(cvp);
 }
 
+namespace cwg138 { // cwg138: partial
+namespace example1 {
+void foo(); // #cwg138-ex1-foo
+namespace A {
+  using example1::foo; // #cwg138-ex1-using
+  class X {
+    static const int i = 10;
+    // This friend declaration is using neither qualified-id nor template-id,
+    // so name 'foo' is not looked up, which means the using-declaration has no effect.
+    // Target scope of this declaration is A, so this is grating friendship to
+    // (hypothetical) A::foo instead of 'example1::foo' using declaration refers to.
+    // A::foo corresponds to example1::foo named by the using declaration,
+    // and since A::foo is a different entity, they potentially conflict.
+    // FIXME: This is ill-formed, but not for the reason diagnostic says.
+    friend void foo();
+    // expected-error@-1 {{cannot befriend target of using declaration}}
+    //   expected-note@#cwg138-ex1-foo {{target of using declaration}}
+    //   expected-note@#cwg138-ex1-using {{using declaration}}
+  };
+}
+} // namespace example1
+
+namespace example2 {
+void f();
+void g();
+class B {
+  void g();
+};
+class A : public B {
+  static const int i = 10;
+  void f();
+  // Both friend declaration are not using qualified-ids or template-ids,
+  // so 'f' and 'g' are not looked up, which means that presence of A::f
+  // and base B have no effect.
+  // Both target scope of namespace 'example2', and grant friendship to
+  // example2::f and example2::g respectively.
+  friend void f();
+  friend void g();
+};
+void f() {
+  int i2 = A::i;
+}
+void g() {
+  int i3 = A::i;
+}
+} // namespace example2
+
+namespace example3 {
+struct Base {
+private:
+  static const int i = 10; // #cwg138-ex3-Base-i
+  
+public:
+  struct Data;
+  // Elaborated type specifier is not the sole constituent of declaration,
+  // so 'Data' undergoes unqualified type-only lookup, which finds Base::Data.
+  friend class Data;
+
+  struct Data {
+    void f() {
+      int i2 = Base::i;
+    }
+  };
+};
+struct Data {
+  void f() {  
+    int i2 = Base::i;
+    // expected-error@-1 {{'i' is a private member of 'cwg138::example3::Base'}}
+    //   expected-note@#cwg138-ex3-Base-i {{declared private here}}
+  }
+};
+} // namespace example3
+} // namespace cwg138
+
 namespace cwg139 { // cwg139: yes
   namespace example1 {
     typedef int f; // #cwg139-typedef-f
diff --git a/clang/test/CXX/drs/cwg3xx.cpp b/clang/test/CXX/drs/cwg3xx.cpp
index a10ed95941ba4a..44bf974ef66649 100644
--- a/clang/test/CXX/drs/cwg3xx.cpp
+++ b/clang/test/CXX/drs/cwg3xx.cpp
@@ -1369,6 +1369,75 @@ namespace cwg385 { // cwg385: 2.8
   //   expected-note@#cwg385-n {{member is declared here}}
 }
 
+namespace cwg386 { // cwg386: no
+namespace example1 {
+namespace N1 {
+// Binds name 'f' in N1. Target scope is N1.
+template<typename T> void f( T* x ) {
+  // ... other stuff ...
+  delete x;
+}
+}
+
+namespace N2 {
+// Bind name 'f' in N2. When a single search find this declaration,
+// it's replaced with N1::f declaration.
+using N1::f;
+
+// `f<int>` is not a qualified-id, so its target scope is N2.
+// `f<int>` is a template-id, so 'f' undergoes (unqualified) lookup.
+// Search performed by unqualified lookup finds N1::f via using-declaration,
+// but this result is not considered, because it's not nominable in N2,
+// which is because its target scope is N1.
+// So unqualified lookup doesn't find anything, making this declaration ill-formed.
+template<> void f<int>( int* );
+// expected-error@-1 {{no function template matches function template specialization 'f'}}
+
+class Test {
+  ~Test() { }
+  // `f<>` is a template-id and not a template declaration,
+  // so its terminal name 'f' undergoes (unqualified) lookup.
+  // Search in N2 performed by unqualified lookup finds
+  // (single) N1::f declaration via using-declaration.
+  // N1::f is replaced with N1::f<> specialization after deduction,
+  // and this is the result of the unqualified lookup.
+  // This friend declaration correspond to the result of the lookup.
+  // All lookup results target the same scope, which is N1,
+  // so target scope of this friend declaration is also N1.
+  // FIXME: This is well-formed.
+  friend void f<>( Test* x );
+  // expected-error@-1 {{no function template matches function template specialization 'f'}}
+};
+}
+} // namespace example1
+
+namespace example2 {
+namespace N1 {
+// Binds name 'f' in N1. Target scope is N1.
+void f(); // #cwg386-ex2-N1-f
+}
+
+namespace N2 {
+// Bind name 'f' in N2. When a single search finds this declaration,
+// it's replaced with N1::f declaration.
+using N1::f; // #cwg386-ex2-using
+class A {
+  // `N2::f` is a qualified-id, so its terminal name 'f' undergoes (qualified) lookup.
+  // Search in N2 performed by qualified lookup finds N1::f via using-declaration,
+  // which is the (only) result of qualified lookup.
+  // This friend declaration corresponds to the result of the lookup.
+  // All lookup results target the same scope, which is N1,
+  // so target scope of this friend declaration is also N1.
+  // FIXME: This is well-formed.
+  friend void N2::f();
+  // expected-error@-1 {{cannot befriend target of using declaration}}
+  //   expected-note@#cwg386-ex2-N1-f {{target of using declaration}}
+  //   expected-note@#cwg386-ex2-using {{using declaration}}
+};
+}
+} // namespace example2
+} // namespace cwg386
+
 namespace cwg387 { // cwg387: 2.8
   namespace old {
     template<typename T> class number {

@cor3ntin
Copy link
Contributor

cor3ntin commented Aug 26, 2024

I think both CWG1900 and CW1477 can be marked as implemented with such a test

namespace N {
struct A {
    friend int f();
};
}
int N::f() { return 0; }
int N::g() { return 0; } 
// expected-error@-1 {{out-of-line definition of 'g' does not match any declaration in namespace 'N'}}

Resolved by https://eel.is/c++draft/dcl.meaning#general-3.4.sentence-2 added by p1787r6

// so target scope of this friend declaration is also N1.
// FIXME: This is well-formed.
friend void f<>( Test* x );
// expected-error@-1 {{no function template matches function template specialization 'f'}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interestingly, it's confused by the namespaces - or more likely, the using declarations
https://compiler-explorer.com/z/oP6Er4e4j

Comment on lines +586 to +588
// expected-error@-1 {{cannot befriend target of using declaration}}
// expected-note@#cwg138-ex1-foo {{target of using declaration}}
// expected-note@#cwg138-ex1-using {{using declaration}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to try to fix this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has that good first issue feel, so I'll refrain for now. But I'll get to all name lookup issues when I'm done with writing tests for P1787R6.

Copy link
Contributor

@cor3ntin cor3ntin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please wait a couple of days in case @hubert-reinterpretcast @shafik @AaronBallman have more feedback

@Endilll
Copy link
Contributor Author

Endilll commented Sep 2, 2024

@cor3ntin Can you take another look? I added CWG1900 section to the PR description. Nothing has changes for other Core issues.

@Endilll Endilll merged commit 4a505e1 into llvm:main Sep 2, 2024
8 checks passed
@Endilll Endilll deleted the decl-matching-friends branch September 2, 2024 14:20
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 2, 2024

LLVM Buildbot has detected a new failure on builder clang-hip-vega20 running on hip-vega20-0 while building clang at step 3 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/4752

Here is the relevant piece of the build log for the reference
Step 3 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/hip-build.sh --jobs=' (failure)
...
[38/40] : && /buildbot/hip-vega20-0/clang-hip-vega20/llvm/bin/clang++ -O3 -DNDEBUG  External/HIP/CMakeFiles/memmove-hip-6.0.2.dir/memmove.hip.o -o External/HIP/memmove-hip-6.0.2  --rocm-path=/buildbot/Externals/hip/rocm-6.0.2 --hip-link -rtlib=compiler-rt -unwindlib=libgcc -frtlib-add-rpath && cd /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP && /usr/local/bin/cmake -E create_symlink /buildbot/llvm-test-suite/External/HIP/memmove.reference_output /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP/memmove.reference_output-hip-6.0.2
[39/40] /buildbot/hip-vega20-0/clang-hip-vega20/llvm/bin/clang++ -DNDEBUG  -O3 -DNDEBUG   -w -Werror=date-time --rocm-path=/buildbot/Externals/hip/rocm-6.0.2 --offload-arch=gfx908 --offload-arch=gfx90a --offload-arch=gfx1030 --offload-arch=gfx1100 -xhip -mfma -MD -MT External/HIP/CMakeFiles/TheNextWeek-hip-6.0.2.dir/workload/ray-tracing/TheNextWeek/main.cc.o -MF External/HIP/CMakeFiles/TheNextWeek-hip-6.0.2.dir/workload/ray-tracing/TheNextWeek/main.cc.o.d -o External/HIP/CMakeFiles/TheNextWeek-hip-6.0.2.dir/workload/ray-tracing/TheNextWeek/main.cc.o -c /buildbot/llvm-test-suite/External/HIP/workload/ray-tracing/TheNextWeek/main.cc
[40/40] : && /buildbot/hip-vega20-0/clang-hip-vega20/llvm/bin/clang++ -O3 -DNDEBUG  External/HIP/CMakeFiles/TheNextWeek-hip-6.0.2.dir/workload/ray-tracing/TheNextWeek/main.cc.o -o External/HIP/TheNextWeek-hip-6.0.2  --rocm-path=/buildbot/Externals/hip/rocm-6.0.2 --hip-link -rtlib=compiler-rt -unwindlib=libgcc -frtlib-add-rpath && cd /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP && /usr/local/bin/cmake -E create_symlink /buildbot/llvm-test-suite/External/HIP/TheNextWeek.reference_output /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP/TheNextWeek.reference_output-hip-6.0.2
+ build_step 'Testing HIP test-suite'
+ echo '@@@BUILD_STEP Testing HIP test-suite@@@'
@@@BUILD_STEP Testing HIP test-suite@@@
+ ninja -v check-hip-simple
[0/1] cd /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP && /buildbot/hip-vega20-0/clang-hip-vega20/llvm/bin/llvm-lit -sv empty-hip-6.0.2.test with-fopenmp-hip-6.0.2.test saxpy-hip-6.0.2.test memmove-hip-6.0.2.test InOneWeekend-hip-6.0.2.test TheNextWeek-hip-6.0.2.test blender.test
-- Testing: 7 tests, 7 workers --
Testing:  0.. 10.. 20.. 30.. 40
FAIL: test-suite :: External/HIP/InOneWeekend-hip-6.0.2.test (4 of 7)
******************** TEST 'test-suite :: External/HIP/InOneWeekend-hip-6.0.2.test' FAILED ********************

/buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/tools/timeit-target --timeout 7200 --limit-core 0 --limit-cpu 7200 --limit-file-size 209715200 --limit-rss-size 838860800 --append-exitstatus --redirect-output /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP/Output/InOneWeekend-hip-6.0.2.test.out --redirect-input /dev/null --summary /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP/Output/InOneWeekend-hip-6.0.2.test.time /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP/InOneWeekend-hip-6.0.2
cd /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP ; /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/tools/fpcmp-target /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP/Output/InOneWeekend-hip-6.0.2.test.out InOneWeekend.reference_output-hip-6.0.2

+ cd /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP
+ /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/tools/fpcmp-target /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP/Output/InOneWeekend-hip-6.0.2.test.out InOneWeekend.reference_output-hip-6.0.2
/buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/tools/fpcmp-target: Comparison failed, textual difference between 'M' and 'i'

********************
/usr/bin/strip: /bin/bash.stripped: Bad file descriptor
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
********************
Failed Tests (1):
  test-suite :: External/HIP/InOneWeekend-hip-6.0.2.test


Testing Time: 342.36s

Total Discovered Tests: 7
  Passed: 6 (85.71%)
  Failed: 1 (14.29%)
FAILED: External/HIP/CMakeFiles/check-hip-simple-hip-6.0.2 
cd /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP && /buildbot/hip-vega20-0/clang-hip-vega20/llvm/bin/llvm-lit -sv empty-hip-6.0.2.test with-fopenmp-hip-6.0.2.test saxpy-hip-6.0.2.test memmove-hip-6.0.2.test InOneWeekend-hip-6.0.2.test TheNextWeek-hip-6.0.2.test blender.test
ninja: build stopped: subcommand failed.
Step 12 (Testing HIP test-suite) failure: Testing HIP test-suite (failure)
@@@BUILD_STEP Testing HIP test-suite@@@
+ ninja -v check-hip-simple
[0/1] cd /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP && /buildbot/hip-vega20-0/clang-hip-vega20/llvm/bin/llvm-lit -sv empty-hip-6.0.2.test with-fopenmp-hip-6.0.2.test saxpy-hip-6.0.2.test memmove-hip-6.0.2.test InOneWeekend-hip-6.0.2.test TheNextWeek-hip-6.0.2.test blender.test
-- Testing: 7 tests, 7 workers --
Testing:  0.. 10.. 20.. 30.. 40
FAIL: test-suite :: External/HIP/InOneWeekend-hip-6.0.2.test (4 of 7)
******************** TEST 'test-suite :: External/HIP/InOneWeekend-hip-6.0.2.test' FAILED ********************

/buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/tools/timeit-target --timeout 7200 --limit-core 0 --limit-cpu 7200 --limit-file-size 209715200 --limit-rss-size 838860800 --append-exitstatus --redirect-output /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP/Output/InOneWeekend-hip-6.0.2.test.out --redirect-input /dev/null --summary /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP/Output/InOneWeekend-hip-6.0.2.test.time /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP/InOneWeekend-hip-6.0.2
cd /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP ; /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/tools/fpcmp-target /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP/Output/InOneWeekend-hip-6.0.2.test.out InOneWeekend.reference_output-hip-6.0.2

+ cd /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP
+ /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/tools/fpcmp-target /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP/Output/InOneWeekend-hip-6.0.2.test.out InOneWeekend.reference_output-hip-6.0.2
/buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/tools/fpcmp-target: Comparison failed, textual difference between 'M' and 'i'

********************
/usr/bin/strip: /bin/bash.stripped: Bad file descriptor
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
********************
Failed Tests (1):
  test-suite :: External/HIP/InOneWeekend-hip-6.0.2.test


Testing Time: 342.36s

Total Discovered Tests: 7
  Passed: 6 (85.71%)
  Failed: 1 (14.29%)
FAILED: External/HIP/CMakeFiles/check-hip-simple-hip-6.0.2 
cd /buildbot/hip-vega20-0/clang-hip-vega20/test-suite-build/External/HIP && /buildbot/hip-vega20-0/clang-hip-vega20/llvm/bin/llvm-lit -sv empty-hip-6.0.2.test with-fopenmp-hip-6.0.2.test saxpy-hip-6.0.2.test memmove-hip-6.0.2.test InOneWeekend-hip-6.0.2.test TheNextWeek-hip-6.0.2.test blender.test
ninja: build stopped: subcommand failed.
program finished with exit code 1
elapsedTime=455.011363

@Endilll
Copy link
Contributor Author

Endilll commented Sep 2, 2024

The failure is unrelated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants