llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.69k stars 11.87k forks source link

LLVM bootstrap fails building stage2 on 32-bit PowerPC #72279

Closed glaubitz closed 5 months ago

glaubitz commented 11 months ago

Since LLVM 17, the bootstrap fails building stage2 on 32-bit PowerPC with:

[50/7756] "/<<PKGBUILDDIR>>/build-llvm/./bin/clang++" -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I"/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins/lib/Support" -I"/<<PKGBUILDDIR>>/llvm/lib/Support" -I"/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins/include" -I"/<<PKGBUILDDIR>>/llvm/include" -fstack-protector-strong -Wformat -Werror=format-security -Wno-unused-command-line-argument -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -ffile-prefix-map=/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins=build-llvm/tools/clang/stage2-bins -ffile-prefix-map=/<<PKGBUILDDIR>>/= -no-canonical-prefixes -Werror=global-constructors -O2 -DNDEBUG -g1 -std=c++17  -fno-exceptions -funwind-tables -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o -c '/<<PKGBUILDDIR>>/llvm/lib/Support/DebugCounter.cpp'
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o 
"/<<PKGBUILDDIR>>/build-llvm/./bin/clang++" -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I"/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins/lib/Support" -I"/<<PKGBUILDDIR>>/llvm/lib/Support" -I"/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins/include" -I"/<<PKGBUILDDIR>>/llvm/include" -fstack-protector-strong -Wformat -Werror=format-security -Wno-unused-command-line-argument -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -ffile-prefix-map=/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins=build-llvm/tools/clang/stage2-bins -ffile-prefix-map=/<<PKGBUILDDIR>>/= -no-canonical-prefixes -Werror=global-constructors -O2 -DNDEBUG -g1 -std=c++17  -fno-exceptions -funwind-tables -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o -c '/<<PKGBUILDDIR>>/llvm/lib/Support/DebugCounter.cpp'
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.  Program arguments: /<<PKGBUILDDIR>>/build-llvm/./bin/clang++ -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins/lib/Support -I/<<PKGBUILDDIR>>/llvm/lib/Support -I/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins/include -I/<<PKGBUILDDIR>>/llvm/include -fstack-protector-strong -Wformat -Werror=format-security -Wno-unused-command-line-argument -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -ffile-prefix-map=/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins=build-llvm/tools/clang/stage2-bins -ffile-prefix-map=/<<PKGBUILDDIR>>/= -no-canonical-prefixes -Werror=global-constructors -O2 -DNDEBUG -g1 -std=c++17 -fno-exceptions -funwind-tables -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o -c /<<PKGBUILDDIR>>/llvm/lib/Support/DebugCounter.cpp
1.  <eof> parser at end of file
2.  Per-file LLVM IR generation
3.  /usr/lib/gcc/powerpc-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:1567:7: Generating code for declaration 'std::basic_string<char>::assign'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  clang++           0x01fab7dc
1  clang++           0x01fa90fc
2  clang++           0x01ecb808
3  linux-vdso32.so.1 0xf7a103f4 __kernel_sigtramp32 + 0
4  clang++           0x02397554
5  clang++           0x02397660
6  clang++           0x02397660
7  clang++           0x02397660
8  clang++           0x02397660
9  clang++           0x02397660
10 clang++           0x02397660
11 clang++           0x023238d4
12 clang++           0x02324288
13 clang++           0x02395fb8
14 clang++           0x023af0e4
15 clang++           0x02411ad0
16 clang++           0x0240cce8
17 clang++           0x02417ff8
18 clang++           0x02418010
19 clang++           0x02418010
20 clang++           0x02418010
21 clang++           0x02418010
22 clang++           0x02418010
23 clang++           0x02418010
24 clang++           0x02418010
25 clang++           0x02418010
26 clang++           0x02418010
27 clang++           0x02418010
28 clang++           0x02419454
29 clang++           0x0346c10c
30 clang++           0x03468f14
31 clang++           0x047b2730
32 clang++           0x02c14bf8
33 clang++           0x0346a024
34 clang++           0x02c1b2b4
35 clang++           0x02b9e11c
36 clang++           0x02cfccf4
37 clang++           0x00c86c10
38 clang++           0x00c7ec34
39 clang++           0x029b0adc
40 clang++           0x01ecbfd8
41 clang++           0x029b14d4
42 clang++           0x0296ec40
43 clang++           0x0296f858
44 clang++           0x02985e48
45 clang++           0x00c83e04
46 clang++           0x00bea2c8
47 libc.so.6         0xf77c9f60
48 libc.so.6         0xf77ca1a0 __libc_start_main + 480
clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation)
Debian clang version 18.0.0
Target: powerpc-unknown-linux-gnu
Thread model: posix
InstalledDir: /<<PKGBUILDDIR>>/build-llvm/./bin
clang++: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: /tmp/DebugCounter-f935f6.cpp
clang++: note: diagnostic msg: /tmp/DebugCounter-f935f6.sh
clang++: note: diagnostic msg: 

********************
(...)
FAILED: tools/clang/stage2-stamps/stage2-build /<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-stamps/stage2-build 
cd "/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins" && /usr/bin/cmake --build "/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins/" --config Release && /usr/bin/cmake -E touch "/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-stamps/stage2-build"
ninja: build stopped: subcommand failed.

Full build log: https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-snapshot&arch=powerpc&ver=1%3A18%7E%2B%2B20231102103655%2B18839aec4ed1-1%7Eexp1&stamp=1698940233&raw=0

llvmbot commented 11 months ago

@llvm/issue-subscribers-backend-powerpc

Author: John Paul Adrian Glaubitz (glaubitz)

Since LLVM 17, the bootstrap fails building stage2 on 32-bit PowerPC with: ``` [50/7756] "/<<PKGBUILDDIR>>/build-llvm/./bin/clang++" -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I"/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins/lib/Support" -I"/<<PKGBUILDDIR>>/llvm/lib/Support" -I"/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins/include" -I"/<<PKGBUILDDIR>>/llvm/include" -fstack-protector-strong -Wformat -Werror=format-security -Wno-unused-command-line-argument -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -ffile-prefix-map=/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins=build-llvm/tools/clang/stage2-bins -ffile-prefix-map=/<<PKGBUILDDIR>>/= -no-canonical-prefixes -Werror=global-constructors -O2 -DNDEBUG -g1 -std=c++17 -fno-exceptions -funwind-tables -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o -c '/<<PKGBUILDDIR>>/llvm/lib/Support/DebugCounter.cpp' FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o "/<<PKGBUILDDIR>>/build-llvm/./bin/clang++" -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I"/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins/lib/Support" -I"/<<PKGBUILDDIR>>/llvm/lib/Support" -I"/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins/include" -I"/<<PKGBUILDDIR>>/llvm/include" -fstack-protector-strong -Wformat -Werror=format-security -Wno-unused-command-line-argument -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -ffile-prefix-map=/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins=build-llvm/tools/clang/stage2-bins -ffile-prefix-map=/<<PKGBUILDDIR>>/= -no-canonical-prefixes -Werror=global-constructors -O2 -DNDEBUG -g1 -std=c++17 -fno-exceptions -funwind-tables -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o -c '/<<PKGBUILDDIR>>/llvm/lib/Support/DebugCounter.cpp' PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: /<<PKGBUILDDIR>>/build-llvm/./bin/clang++ -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins/lib/Support -I/<<PKGBUILDDIR>>/llvm/lib/Support -I/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins/include -I/<<PKGBUILDDIR>>/llvm/include -fstack-protector-strong -Wformat -Werror=format-security -Wno-unused-command-line-argument -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -ffile-prefix-map=/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins=build-llvm/tools/clang/stage2-bins -ffile-prefix-map=/<<PKGBUILDDIR>>/= -no-canonical-prefixes -Werror=global-constructors -O2 -DNDEBUG -g1 -std=c++17 -fno-exceptions -funwind-tables -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o -c /<<PKGBUILDDIR>>/llvm/lib/Support/DebugCounter.cpp 1. <eof> parser at end of file 2. Per-file LLVM IR generation 3. /usr/lib/gcc/powerpc-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:1567:7: Generating code for declaration 'std::basic_string<char>::assign' Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it): 0 clang++ 0x01fab7dc 1 clang++ 0x01fa90fc 2 clang++ 0x01ecb808 3 linux-vdso32.so.1 0xf7a103f4 __kernel_sigtramp32 + 0 4 clang++ 0x02397554 5 clang++ 0x02397660 6 clang++ 0x02397660 7 clang++ 0x02397660 8 clang++ 0x02397660 9 clang++ 0x02397660 10 clang++ 0x02397660 11 clang++ 0x023238d4 12 clang++ 0x02324288 13 clang++ 0x02395fb8 14 clang++ 0x023af0e4 15 clang++ 0x02411ad0 16 clang++ 0x0240cce8 17 clang++ 0x02417ff8 18 clang++ 0x02418010 19 clang++ 0x02418010 20 clang++ 0x02418010 21 clang++ 0x02418010 22 clang++ 0x02418010 23 clang++ 0x02418010 24 clang++ 0x02418010 25 clang++ 0x02418010 26 clang++ 0x02418010 27 clang++ 0x02418010 28 clang++ 0x02419454 29 clang++ 0x0346c10c 30 clang++ 0x03468f14 31 clang++ 0x047b2730 32 clang++ 0x02c14bf8 33 clang++ 0x0346a024 34 clang++ 0x02c1b2b4 35 clang++ 0x02b9e11c 36 clang++ 0x02cfccf4 37 clang++ 0x00c86c10 38 clang++ 0x00c7ec34 39 clang++ 0x029b0adc 40 clang++ 0x01ecbfd8 41 clang++ 0x029b14d4 42 clang++ 0x0296ec40 43 clang++ 0x0296f858 44 clang++ 0x02985e48 45 clang++ 0x00c83e04 46 clang++ 0x00bea2c8 47 libc.so.6 0xf77c9f60 48 libc.so.6 0xf77ca1a0 __libc_start_main + 480 clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation) Debian clang version 18.0.0 Target: powerpc-unknown-linux-gnu Thread model: posix InstalledDir: /<<PKGBUILDDIR>>/build-llvm/./bin clang++: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang++: note: diagnostic msg: /tmp/DebugCounter-f935f6.cpp clang++: note: diagnostic msg: /tmp/DebugCounter-f935f6.sh clang++: note: diagnostic msg: ******************** (...) FAILED: tools/clang/stage2-stamps/stage2-build /<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-stamps/stage2-build cd "/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins" && /usr/bin/cmake --build "/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins/" --config Release && /usr/bin/cmake -E touch "/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-stamps/stage2-build" ninja: build stopped: subcommand failed. ``` Full build log: https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-snapshot&arch=powerpc&ver=1%3A18%7E%2B%2B20231102103655%2B18839aec4ed1-1%7Eexp1&stamp=1698940233&raw=0
glaubitz commented 11 months ago

This regression was introduced by the following commit:

bc73ef0031b50f7443615fef614fb4ecaaa4bd11 is the first bad commit
commit bc73ef0031b50f7443615fef614fb4ecaaa4bd11
Author: Richard Smith <richard@metafoo.co.uk>
Date:   Thu Mar 30 14:21:31 2023 -0700

    PR60985: Fix merging of lambda closure types across modules.

    Previously, distinct lambdas would get merged, and multiple definitions
    of the same lambda would not get merged, because we attempted to
    identify lambdas by their ordinal position within their lexical
    DeclContext. This failed for lambdas within namespace-scope variables
    and within variable templates, where the lexical position in the context
    containing the variable didn't uniquely identify the lambda.

    In this patch, we instead identify lambda closure types by index within
    their context declaration, which does uniquely identify them in a way
    that's consistent across modules.

    This change causes a deserialization cycle between the type of a
    variable with deduced type and a lambda appearing as the initializer of
    the variable -- reading the variable's type requires reading and merging
    the lambda, and reading the lambda requires reading and merging the
    variable. This is addressed by deferring loading the deduced type of a
    variable until after we finish recursive deserialization.

    This also exposes a pre-existing subtle issue where loading a
    variable declaration would trigger immediate loading of its initializer,
    which could recursively refer back to properties of the variable. This
    particularly causes problems if the initializer contains a
    lambda-expression, but can be problematic in general. That is addressed
    by switching to lazily loading the initializers of variables rather than
    always loading them with the variable declaration. As well as fixing a
    deserialization cycle, that should improve laziness of deserialization
    in general.

    LambdaDefinitionData had 63 spare bits in it, presumably caused by an
    off-by-one-error in some previous change. This change claims 32 of those bits
    as a counter for the lambda within its context. We could probably move the
    numbering to separate storage, like we do for the device-side mangling number,
    to optimize the likely-common case where all three numbers (host-side mangling
    number, device-side mangling number, and index within the context declaration)
    are zero, but that's not done in this change.

    Fixes #60985.

    Reviewed By: #clang-language-wg, aaron.ballman

    Differential Revision: https://reviews.llvm.org/D145737

 clang/docs/ReleaseNotes.rst                        |   2 +
 clang/include/clang/AST/Decl.h                     |   2 +-
 clang/include/clang/AST/DeclCXX.h                  |  39 +++--
 clang/include/clang/AST/ExternalASTSource.h        |  10 +-
 clang/include/clang/AST/MangleNumberingContext.h   |   8 +
 clang/include/clang/AST/Stmt.h                     |  25 +++
 clang/include/clang/Sema/ExternalSemaSource.h      |   5 +
 .../clang/Sema/MultiplexExternalSemaSource.h       |   3 +
 clang/include/clang/Sema/Sema.h                    |   7 +-
 clang/include/clang/Serialization/ASTReader.h      |  19 ++-
 clang/lib/AST/ASTContext.cpp                       |   9 ++
 clang/lib/AST/ASTImporter.cpp                      |   9 +-
 clang/lib/AST/Decl.cpp                             |  11 +-
 clang/lib/AST/DeclCXX.cpp                          |  11 +-
 clang/lib/AST/ODRDiagsEmitter.cpp                  |   1 +
 clang/lib/Sema/MultiplexExternalSemaSource.cpp     |   6 +
 clang/lib/Sema/SemaExprCXX.cpp                     |  10 +-
 clang/lib/Sema/SemaLambda.cpp                      |  39 ++---
 clang/lib/Sema/TreeTransform.h                     |  15 +-
 clang/lib/Serialization/ASTReader.cpp              |  50 ++++--
 clang/lib/Serialization/ASTReaderDecl.cpp          | 175 +++++++++++++++------
 clang/lib/Serialization/ASTReaderStmt.cpp          |   8 +-
 clang/lib/Serialization/ASTWriter.cpp              |  48 +++---
 clang/lib/Serialization/ASTWriterDecl.cpp          |  71 ++++++---
 clang/lib/Serialization/ASTWriterStmt.cpp          |   8 +-
 clang/test/Modules/lambda-in-variable.cpp          | 120 ++++++++++++++
 .../parallel_master_taskloop_simd_codegen.cpp      | 130 +++++++--------
 27 files changed, 593 insertions(+), 248 deletions(-)
 create mode 100644 clang/test/Modules/lambda-in-variable.cpp

CC @zygoloid

brad0 commented 11 months ago

Has anything been done about this?

glaubitz commented 11 months ago

Has anything been done about this?

Not that I know of.

glaubitz commented 9 months ago

Retested today and used LLVM 16 as the bootstrap compiler. Cannot reproduce the issue at the moment.

There seem to be some issues with gcc.

glaubitz commented 9 months ago

OK, this is definitely not reproducable when using LLVM as the bootstrap compiler. So, I assume this is a GCC bug then.

I will file a bug report in the GCC bug tracker.

chenzheng1030 commented 7 months ago

If this is not a LLVM issue, should we close this issue? @glaubitz

chenzheng1030 commented 5 months ago

Feel free to reopen if this should not be closed. As I see from previous comments, this is a GCC's bug instead of LLVM's

glaubitz commented 5 months ago

I have reported it to GCC [1], but I have not found the time yet to perform more debugging.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113341

thesamesam commented 1 week ago

See https://github.com/llvm/llvm-project/issues/111993 and https://github.com/llvm/llvm-project/pull/111995.