Skip to content

Conversation

@ilovepi
Copy link
Contributor

@ilovepi ilovepi commented May 21, 2025

Reverts #138122

The patch causes a regression and prevents compiling valid C++ code.
The code was accepted by earlier versions of clang and GCC.
See #140773 for details.

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" labels May 21, 2025
@llvmbot
Copy link
Member

llvmbot commented May 21, 2025

@llvm/pr-subscribers-clang

Author: Paul Kirth (ilovepi)

Changes

Reverts llvm/llvm-project#138122

The patch causes a regression and prevents compiling valid C++ code.
The code was accepted by earlier versions of clang and GCC.
See #140773 for details.


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

4 Files Affected:

  • (modified) clang/docs/ReleaseNotes.rst (-1)
  • (modified) clang/lib/Sema/SemaTemplateInstantiateDecl.cpp (+3-3)
  • (modified) clang/test/CodeGenCXX/cxx1z-inline-variables.cpp (-14)
  • (modified) clang/test/SemaTemplate/cxx17-inline-variables.cpp (-12)
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 648b32c659b4f..941b9ab45cf1c 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -743,7 +743,6 @@ Bug Fixes to C++ Support
   in a ``constexpr`` function. (#GH131432)
 - Fixed an incorrect TreeTransform for calls to ``consteval`` functions if a conversion template is present. (#GH137885)
 - Clang now emits a warning when class template argument deduction for alias templates is used in C++17. (#GH133806)
-- Fix missed initializer instantiation bug for variable templates. (#GH138122)
 - Fix a crash when checking the template template parameters of a dependent lambda appearing in an alias declaration.
   (#GH136432), (#GH137014), (#GH138018)
 - Fixed an assertion when trying to constant-fold various builtins when the argument
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index d1f313e9cb487..7fbda2a804d75 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -6032,11 +6032,11 @@ void Sema::BuildVariableInstantiation(
   Context.setStaticLocalNumber(NewVar, Context.getStaticLocalNumber(OldVar));
 
   // Figure out whether to eagerly instantiate the initializer.
-  if (NewVar->getType()->isUndeducedType()) {
+  if (InstantiatingVarTemplate || InstantiatingVarTemplatePartialSpec) {
+    // We're producing a template. Don't instantiate the initializer yet.
+  } else if (NewVar->getType()->isUndeducedType()) {
     // We need the type to complete the declaration of the variable.
     InstantiateVariableInitializer(NewVar, OldVar, TemplateArgs);
-  } else if (InstantiatingVarTemplate || InstantiatingVarTemplatePartialSpec) {
-    // We're producing a template. Don't instantiate the initializer yet.
   } else if (InstantiatingSpecFromTemplate ||
              (OldVar->isInline() && OldVar->isThisDeclarationADefinition() &&
               !NewVar->isThisDeclarationADefinition())) {
diff --git a/clang/test/CodeGenCXX/cxx1z-inline-variables.cpp b/clang/test/CodeGenCXX/cxx1z-inline-variables.cpp
index 1cb30b178e06f..812e438f30c9a 100644
--- a/clang/test/CodeGenCXX/cxx1z-inline-variables.cpp
+++ b/clang/test/CodeGenCXX/cxx1z-inline-variables.cpp
@@ -1,19 +1,5 @@
 // RUN: %clang_cc1 -std=c++1z %s -emit-llvm -o - -triple x86_64-linux-gnu | FileCheck %s
 
-template <typename T> struct InlineAuto {
-  template <typename G> inline static auto var = 5;
-};
-int inlineauto = InlineAuto<int>::var<int>;
-// CHECK: @_ZN10InlineAutoIiE3varIiEE = {{.*}}i32 5{{.*}}comdat
-//
-template <typename> struct PartialInlineAuto {
-  template <typename, typename> inline static auto var = 6;
-  template <typename T> inline static auto var<int, T> = 7;
-};
-
-int partialinlineauto = PartialInlineAuto<int>::var<int, int>;
-// CHECK: @_ZN17PartialInlineAutoIiE3varIiiEE = {{.*}}i32 7{{.*}}comdat
-
 struct Q {
   // CHECK: @_ZN1Q1kE = linkonce_odr constant i32 5, comdat
   static constexpr int k = 5;
diff --git a/clang/test/SemaTemplate/cxx17-inline-variables.cpp b/clang/test/SemaTemplate/cxx17-inline-variables.cpp
index 06f1ec17fb7a8..7fc0aa8eeeb0c 100644
--- a/clang/test/SemaTemplate/cxx17-inline-variables.cpp
+++ b/clang/test/SemaTemplate/cxx17-inline-variables.cpp
@@ -27,15 +27,3 @@ template <typename T> constexpr int A<T>::n = sizeof(A) + sizeof(T);
 template <typename T> inline constexpr int A<T>::m = sizeof(A) + sizeof(T);
 static_assert(A<int>().f() == 5);
 static_assert(A<int>().g() == 5);
-
-template <typename T> struct InlineAuto {
-  template <typename G> inline static auto var = 5;
-};
-
-template <typename> struct PartialInlineAuto {
-  template <typename, typename> inline static auto var = 6;
-  template <typename T> inline static auto var<int, T> = 7;
-};
-
-int inlineauto = InlineAuto<int>::var<int>;
-int partialinlineauto = PartialInlineAuto<int>::var<int, int>;

Copy link
Collaborator

@shafik shafik left a comment

Choose a reason for hiding this comment

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

Before we go straight to reverting I would appreciate a more detailed explanation of why we believe the code is correct. Although ideally a reduced reproducer would be ideal.

@ilovepi
Copy link
Contributor Author

ilovepi commented May 21, 2025

Well, its not the easiest case to reduce, since there's lots of ways the two errors in question could happen. That code has been accepted by both GCC and clang for some time though, so at the very least we need guidance on what is wrong with it.

From what I've been able to tell, instantiation now happens earlier and deduction fails, despite there being a valid deduction guide. @frobtech is more familar w/ this code though and can provide more insight.

Copy link
Contributor

@zyn0217 zyn0217 left a comment

Choose a reason for hiding this comment

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

I'll approve it, because I have a similar experience that swapping the deferred instantiation and immediate instantiation order caused a very subtle failure of return type deduction.

However, just as what @AaronBallman suggested, please hold off landing for some time to see if a reduced example could help us pinpoint the underlying issue.

@ilovepi
Copy link
Contributor Author

ilovepi commented May 22, 2025

I've updated #140773 with a reproducer.

@zyn0217
Copy link
Contributor

zyn0217 commented May 22, 2025

I'll go ahead and merge this: the eager instantiation of member templates - even it is still dependent - doesnt look right to me

In the meantime, I'll look into the case and see if I can figure out a solution

@zyn0217 zyn0217 merged commit f0ddadf into main May 22, 2025
15 checks passed
@zyn0217 zyn0217 deleted the revert-138122-clang-bugfix-135032 branch May 22, 2025 03:01
@llvm-ci
Copy link
Collaborator

llvm-ci commented May 22, 2025

LLVM Buildbot has detected a new failure on builder ppc64le-lld-multistage-test running on ppc64le-lld-multistage-test while building clang at step 7 "test-build-stage1-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-stage1-unified-tree-check-all) failure: test (failure)
******************** TEST 'lld :: COFF/lto-cache-errors.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/bin/opt -module-hash -module-summary /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/lld/test/COFF/lto-cache-errors.ll -o /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o # RUN: at line 5
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/bin/opt -module-hash -module-summary /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/lld/test/COFF/lto-cache-errors.ll -o /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/bin/opt -module-hash -module-summary /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/lld/test/COFF/Inputs/lto-cache.ll -o /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o # RUN: at line 6
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/bin/opt -module-hash -module-summary /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/lld/test/COFF/Inputs/lto-cache.ll -o /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o
rm -Rf /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache && mkdir /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache # RUN: at line 7
+ rm -Rf /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
+ mkdir /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
chmod 444 /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache # RUN: at line 8
+ chmod 444 /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
not /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/bin/lld-link /lldltocache:/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache/nonexistant/ /out:/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp3 /entry:main /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o 2>&1 | /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/lld/test/COFF/lto-cache-errors.ll # RUN: at line 11
+ not /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/bin/lld-link /lldltocache:/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache/nonexistant/ /out:/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp3 /entry:main /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/lld/test/COFF/lto-cache-errors.ll

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented May 22, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-key-instructions running on sie-linux-worker5 while building clang at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lld :: COFF/lto-cache-errors.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/buildbot/buildbot-root/llvm-ki/build/bin/opt -module-hash -module-summary /home/buildbot/buildbot-root/llvm-ki/llvm-project/lld/test/COFF/lto-cache-errors.ll -o /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o # RUN: at line 5
+ /home/buildbot/buildbot-root/llvm-ki/build/bin/opt -module-hash -module-summary /home/buildbot/buildbot-root/llvm-ki/llvm-project/lld/test/COFF/lto-cache-errors.ll -o /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o
/home/buildbot/buildbot-root/llvm-ki/build/bin/opt -module-hash -module-summary /home/buildbot/buildbot-root/llvm-ki/llvm-project/lld/test/COFF/Inputs/lto-cache.ll -o /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o # RUN: at line 6
+ /home/buildbot/buildbot-root/llvm-ki/build/bin/opt -module-hash -module-summary /home/buildbot/buildbot-root/llvm-ki/llvm-project/lld/test/COFF/Inputs/lto-cache.ll -o /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o
rm -Rf /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache && mkdir /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache # RUN: at line 7
+ rm -Rf /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
+ mkdir /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
chmod 444 /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache # RUN: at line 8
+ chmod 444 /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
not /home/buildbot/buildbot-root/llvm-ki/build/bin/lld-link /lldltocache:/home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache/nonexistant/ /out:/home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp3 /entry:main /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o 2>&1 | /home/buildbot/buildbot-root/llvm-ki/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-ki/llvm-project/lld/test/COFF/lto-cache-errors.ll # RUN: at line 11
+ not /home/buildbot/buildbot-root/llvm-ki/build/bin/lld-link /lldltocache:/home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache/nonexistant/ /out:/home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp3 /entry:main /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o
+ /home/buildbot/buildbot-root/llvm-ki/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-ki/llvm-project/lld/test/COFF/lto-cache-errors.ll

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented May 22, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-bootstrap-asan running on sanitizer-buildbot2 while building clang at step 2 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86635 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.
FAIL: lld :: COFF/lto-cache-errors.ll (83847 of 86635)
******************** TEST 'lld :: COFF/lto-cache-errors.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -module-hash -module-summary /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/COFF/lto-cache-errors.ll -o /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o # RUN: at line 5
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -module-hash -module-summary /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/COFF/lto-cache-errors.ll -o /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o
/home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -module-hash -module-summary /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/COFF/Inputs/lto-cache.ll -o /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o # RUN: at line 6
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -module-hash -module-summary /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/COFF/Inputs/lto-cache.ll -o /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o
rm -Rf /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache && mkdir /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache # RUN: at line 7
+ rm -Rf /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
+ mkdir /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
chmod 444 /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache # RUN: at line 8
+ chmod 444 /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
not /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/lld-link /lldltocache:/home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache/nonexistant/ /out:/home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp3 /entry:main /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o 2>&1 | /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/COFF/lto-cache-errors.ll # RUN: at line 11
+ not /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/lld-link /lldltocache:/home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache/nonexistant/ /out:/home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp3 /entry:main /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/COFF/lto-cache-errors.ll

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
Slowest Tests:
--------------------------------------------------------------------------
29.28s: LLVM :: CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
23.48s: LLVM :: tools/llvm-reduce/parallel-workitem-kill.ll
22.50s: Clang :: CodeGen/AArch64/sve-intrinsics/acle_sve_reinterpret.c
21.15s: Clang :: CodeGen/AArch64/sve-intrinsics/acle_sve_reinterpret-bfloat.c
17.94s: Clang :: Driver/fsanitize.c
15.14s: LLVM :: CodeGen/AMDGPU/memintrinsic-unroll.ll
14.51s: Clang :: Analysis/a_flaky_crash.cpp
14.28s: Clang :: Analysis/runtime-regression.c
14.09s: Clang :: Preprocessor/riscv-target-features.c
13.53s: LLVM :: CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
13.26s: LLVM :: CodeGen/AMDGPU/sched-group-barrier-pipeline-solver.mir
11.05s: Clang :: Analysis/PR24184.cpp
10.89s: LLVM :: CodeGen/AMDGPU/atomic_optimizations_global_pointer.ll
10.71s: Clang :: Driver/arm-cortex-cpus-2.c
Step 14 (stage3/asan check) failure: stage3/asan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86635 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.
FAIL: lld :: COFF/lto-cache-errors.ll (83847 of 86635)
******************** TEST 'lld :: COFF/lto-cache-errors.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -module-hash -module-summary /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/COFF/lto-cache-errors.ll -o /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o # RUN: at line 5
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -module-hash -module-summary /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/COFF/lto-cache-errors.ll -o /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o
/home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -module-hash -module-summary /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/COFF/Inputs/lto-cache.ll -o /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o # RUN: at line 6
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -module-hash -module-summary /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/COFF/Inputs/lto-cache.ll -o /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o
rm -Rf /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache && mkdir /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache # RUN: at line 7
+ rm -Rf /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
+ mkdir /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
chmod 444 /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache # RUN: at line 8
+ chmod 444 /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
not /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/lld-link /lldltocache:/home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache/nonexistant/ /out:/home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp3 /entry:main /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o 2>&1 | /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/COFF/lto-cache-errors.ll # RUN: at line 11
+ not /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/lld-link /lldltocache:/home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache/nonexistant/ /out:/home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp3 /entry:main /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/COFF/lto-cache-errors.ll

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
Slowest Tests:
--------------------------------------------------------------------------
29.28s: LLVM :: CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
23.48s: LLVM :: tools/llvm-reduce/parallel-workitem-kill.ll
22.50s: Clang :: CodeGen/AArch64/sve-intrinsics/acle_sve_reinterpret.c
21.15s: Clang :: CodeGen/AArch64/sve-intrinsics/acle_sve_reinterpret-bfloat.c
17.94s: Clang :: Driver/fsanitize.c
15.14s: LLVM :: CodeGen/AMDGPU/memintrinsic-unroll.ll
14.51s: Clang :: Analysis/a_flaky_crash.cpp
14.28s: Clang :: Analysis/runtime-regression.c
14.09s: Clang :: Preprocessor/riscv-target-features.c
13.53s: LLVM :: CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
13.26s: LLVM :: CodeGen/AMDGPU/sched-group-barrier-pipeline-solver.mir
11.05s: Clang :: Analysis/PR24184.cpp
10.89s: LLVM :: CodeGen/AMDGPU/atomic_optimizations_global_pointer.ll
10.71s: Clang :: Driver/arm-cortex-cpus-2.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants