llvm / llvm-project

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

[Clang][OpenMP] clang trunk crashes with OpenMP task directive #74412

Open rkchang opened 10 months ago

rkchang commented 10 months ago

Reduced test case:

# 1 "<built-in>"
# 1 "hello.c"
char a;
void foo() {
  int b;
#pragma omp task
  (char(*)[b]) a;
}

https://godbolt.org/z/Mh3qzzq4r Program arguments: -c -fopenmp -emit-llvm -Xclang -disable-llvm-passes

Crash reproducer:

# Crash reproducer for clang version 18.0.0 (git@github.com:llvm/llvm-project.git 8628ca29aa4714f99e865c99b9d510ad14897fdc)
# Driver args: "-c" "-fopenmp" "-emit-llvm" "-Xclang" "-disable-llvm-passes" "hello.c"
# Original command:  "/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang-18" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-llvm-bc" "-emit-llvm-uselists" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "hello.c" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=all" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "x86-64" "-tune-cpu" "generic" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/home/rkchang/dev/omp" "-fcoverage-compilation-dir=/home/rkchang/dev/omp" "-resource-dir" "/home/rkchang/dev/omp/compilers/llvm-project/build/lib/clang/18" "-internal-isystem" "/home/rkchang/dev/omp/compilers/llvm-project/build/lib/clang/18/include" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/usr/lib/gcc/x86_64-linux-gnu/12/../../../../x86_64-linux-gnu/include" "-internal-externc-isystem" "/usr/include/x86_64-linux-gnu" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-ferror-limit" "19" "-fopenmp" "-fgnuc-version=4.2.1" "-fcolor-diagnostics" "-disable-llvm-passes" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "hello.bc" "-x" "c" "hello.c"
 "/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang-18" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-llvm-bc" "-emit-llvm-uselists" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "hello.c" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=all" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "x86-64" "-tune-cpu" "generic" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/home/rkchang/dev/omp" "-fcoverage-compilation-dir=/home/rkchang/dev/omp" "-ferror-limit" "19" "-fopenmp" "-fgnuc-version=4.2.1" "-fcolor-diagnostics" "-disable-llvm-passes" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-x" "c" "hello-76ba63.c"

Stack trace:

hello.c:5:3: warning: cast to 'char (*)[b]' from smaller integer type 'char' [-Wint-to-pointer-cast]
    5 |   (char(*)[b]) a;
      |   ^~~~~~~~~~~~~~
hello.c:5:3: warning: expression result unused [-Wunused-value]
    5 |   (char(*)[b]) a;
      |   ^            ~
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: /home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang -c -fopenmp -emit-llvm -Xclang -disable-llvm-passes hello.c
1.      <eof> parser at end of file
2.      Per-file LLVM IR generation
3.      hello.c:2:6: Generating code for declaration 'foo'
 #0 0x000055e30a314200 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x418e200)
 #1 0x000055e30a31160f llvm::sys::RunSignalHandlers() (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x418b60f)
 #2 0x000055e30a256238 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007f73b1842520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x000055e30a568de4 clang::Decl::getDeclContext() CGDebugInfo.cpp:0:0
 #5 0x000055e30a6b6c77 clang::CodeGen::CodeGenFunction::EmitLValueForLambdaField(clang::FieldDecl const*, llvm::Value*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4530c77)
 #6 0x000055e30a6c518a clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(clang::DeclRefExpr const*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x453f18a)
 #7 0x000055e30a6c195e clang::CodeGen::CodeGenFunction::EmitLValueHelper(clang::Expr const*, clang::CodeGen::KnownNonNull_t) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x453b95e)
 #8 0x000055e30a6cbff0 clang::CodeGen::CodeGenFunction::EmitCheckedLValue(clang::Expr const*, clang::CodeGen::CodeGenFunction::TypeCheckKind) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4545ff0)
 #9 0x000055e30a719d83 (anonymous namespace)::ScalarExprEmitter::EmitLoadOfLValue(clang::Expr const*) CGExprScalar.cpp:0:0
#10 0x000055e30a71666b (anonymous namespace)::ScalarExprEmitter::Visit(clang::Expr*) CGExprScalar.cpp:0:0
#11 0x000055e30a71a82b (anonymous namespace)::ScalarExprEmitter::VisitCastExpr(clang::CastExpr*) CGExprScalar.cpp:0:0
#12 0x000055e30a71975d clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x459375d)
#13 0x000055e30a67a0a8 clang::CodeGen::CodeGenFunction::EmitVariablyModifiedType(clang::QualType) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x44f40a8)
#14 0x000055e30a6a4b48 clang::CodeGen::CodeGenModule::EmitExplicitCastExprType(clang::ExplicitCastExpr const*, clang::CodeGen::CodeGenFunction*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x451eb48)
#15 0x000055e30a71c72c (anonymous namespace)::ScalarExprEmitter::VisitExplicitCastExpr(clang::ExplicitCastExpr*) CGExprScalar.cpp:0:0
#16 0x000055e30a71975d clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x459375d)
#17 0x000055e30a6aa616 clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, clang::CodeGen::AggValueSlot, bool) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4524616)
#18 0x000055e30a6cd39b clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x454739b)
#19 0x000055e30a698fdc clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4512fdc)
#20 0x000055e30a9fd04d clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&) const (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x487704d)
#21 0x000055e30aa9ef98 clang::CodeGen::CodeGenFunction::EmitOMPTaskBasedDirective(clang::OMPExecutableDirective const&, llvm::omp::Directive, clang::CodeGen::RegionCodeGenTy const&, llvm::function_ref<void (clang::CodeGen::CodeGenFunction&, llvm::Function*, clang::CodeGen::OMPTaskDataTy const&)> const&, clang::CodeGen::OMPTaskDataTy&)::'lambda'(clang::CodeGen::CodeGenFunction&, clang::CodeGen::PrePostActionTy&)::operator()(clang::CodeGen::CodeGenFunction&, clang::CodeGen::PrePostActionTy&) const CGStmtOpenMP.cpp:0:0
#22 0x000055e30a9fd00e clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&) const (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x487700e)
#23 0x000055e30a9fd14c (anonymous namespace)::CGOpenMPRegionInfo::EmitBody(clang::CodeGen::CodeGenFunction&, clang::Stmt const*) CGOpenMPRuntime.cpp:0:0
#24 0x000055e30a698338 clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(clang::CapturedStmt const&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4512338)
#25 0x000055e30aa33cc9 clang::CodeGen::CGOpenMPRuntime::emitTaskOutlinedFunction(clang::OMPExecutableDirective const&, clang::VarDecl const*, clang::VarDecl const*, clang::VarDecl const*, llvm::omp::Directive, clang::CodeGen::RegionCodeGenTy const&, bool, unsigned int&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x48adcc9)
#26 0x000055e30aa9bc2d clang::CodeGen::CodeGenFunction::EmitOMPTaskBasedDirective(clang::OMPExecutableDirective const&, llvm::omp::Directive, clang::CodeGen::RegionCodeGenTy const&, llvm::function_ref<void (clang::CodeGen::CodeGenFunction&, llvm::Function*, clang::CodeGen::OMPTaskDataTy const&)> const&, clang::CodeGen::OMPTaskDataTy&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4915c2d)
#27 0x000055e30aa9ccc4 clang::CodeGen::CodeGenFunction::EmitOMPTaskDirective(clang::OMPTaskDirective const&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4916cc4)
#28 0x000055e30a6a0054 clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x451a054)
#29 0x000055e30a66e3e7 clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x44e83e7)
#30 0x000055e30a681d34 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x44fbd34)
#31 0x000055e30a628a89 clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x44a2a89)
#32 0x000055e30a622ab5 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x449cab5)
#33 0x000055e30a62df0b clang::CodeGen::CodeGenModule::EmitDeferred() (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x44a7f0b)
#34 0x000055e30a630774 clang::CodeGen::CodeGenModule::Release() (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x44aa774)
#35 0x000055e30ac8dee2 (anonymous namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&) ModuleBuilder.cpp:0:0
#36 0x000055e30ac8c845 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4b06845)
#37 0x000055e30cb109b9 clang::ParseAST(clang::Sema&, bool, bool) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x698a9b9)
#38 0x000055e30b06d6c9 clang::FrontendAction::Execute() (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4ee76c9)
#39 0x000055e30afe5405 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4e5f405)
#40 0x000055e30b147e75 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4fc1e75)
#41 0x000055e308d7bce9 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x2bf5ce9)
#42 0x000055e308d73563 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#43 0x000055e30ae26e2d void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#44 0x000055e30a256700 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x40d0700)
#45 0x000055e30ae276ae clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0
#46 0x000055e30ade88aa clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4c628aa)
#47 0x000055e30ade937d clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4c6337d)
#48 0x000055e30adf4be4 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4c6ebe4)
#49 0x000055e308d78aa0 clang_main(int, char**, llvm::ToolContext const&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x2bf2aa0)
#50 0x000055e308d89033 main (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x2c03033)
#51 0x00007f73b1829d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#52 0x00007f73b1829e40 call_init ./csu/../csu/libc-start.c:128:20
#53 0x00007f73b1829e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#54 0x000055e308d721a5 _start (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x2bec1a5)
clang: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 18.0.0 (git@github.com:llvm/llvm-project.git 8628ca29aa4714f99e865c99b9d510ad14897fdc)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/rkchang/dev/omp/compilers/llvm-project/build/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/hello-76ba63.c
clang: note: diagnostic msg: /tmp/hello-76ba63.sh
clang: note: diagnostic msg: 

********************
llvmbot commented 10 months ago

@llvm/issue-subscribers-clang-codegen

Author: Raymond Chang (rkchang)

Reduced test case: ``` # 1 "<built-in>" # 1 "hello.c" char a; void foo() { int b; #pragma omp task (char(*)[b]) a; } ``` https://godbolt.org/z/Mh3qzzq4r Program arguments: `-c -fopenmp -emit-llvm -Xclang -disable-llvm-passes` Crash reproducer: ``` # Crash reproducer for clang version 18.0.0 (git@github.com:llvm/llvm-project.git 8628ca29aa4714f99e865c99b9d510ad14897fdc) # Driver args: "-c" "-fopenmp" "-emit-llvm" "-Xclang" "-disable-llvm-passes" "hello.c" # Original command: "/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang-18" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-llvm-bc" "-emit-llvm-uselists" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "hello.c" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=all" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "x86-64" "-tune-cpu" "generic" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/home/rkchang/dev/omp" "-fcoverage-compilation-dir=/home/rkchang/dev/omp" "-resource-dir" "/home/rkchang/dev/omp/compilers/llvm-project/build/lib/clang/18" "-internal-isystem" "/home/rkchang/dev/omp/compilers/llvm-project/build/lib/clang/18/include" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/usr/lib/gcc/x86_64-linux-gnu/12/../../../../x86_64-linux-gnu/include" "-internal-externc-isystem" "/usr/include/x86_64-linux-gnu" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-ferror-limit" "19" "-fopenmp" "-fgnuc-version=4.2.1" "-fcolor-diagnostics" "-disable-llvm-passes" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "hello.bc" "-x" "c" "hello.c" "/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang-18" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-llvm-bc" "-emit-llvm-uselists" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "hello.c" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=all" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "x86-64" "-tune-cpu" "generic" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/home/rkchang/dev/omp" "-fcoverage-compilation-dir=/home/rkchang/dev/omp" "-ferror-limit" "19" "-fopenmp" "-fgnuc-version=4.2.1" "-fcolor-diagnostics" "-disable-llvm-passes" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-x" "c" "hello-76ba63.c" ``` Stack trace: ``` hello.c:5:3: warning: cast to 'char (*)[b]' from smaller integer type 'char' [-Wint-to-pointer-cast] 5 | (char(*)[b]) a; | ^~~~~~~~~~~~~~ hello.c:5:3: warning: expression result unused [-Wunused-value] 5 | (char(*)[b]) a; | ^ ~ 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: /home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang -c -fopenmp -emit-llvm -Xclang -disable-llvm-passes hello.c 1. <eof> parser at end of file 2. Per-file LLVM IR generation 3. hello.c:2:6: Generating code for declaration 'foo' #0 0x000055e30a314200 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x418e200) #1 0x000055e30a31160f llvm::sys::RunSignalHandlers() (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x418b60f) #2 0x000055e30a256238 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0 #3 0x00007f73b1842520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520) #4 0x000055e30a568de4 clang::Decl::getDeclContext() CGDebugInfo.cpp:0:0 #5 0x000055e30a6b6c77 clang::CodeGen::CodeGenFunction::EmitLValueForLambdaField(clang::FieldDecl const*, llvm::Value*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4530c77) #6 0x000055e30a6c518a clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(clang::DeclRefExpr const*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x453f18a) #7 0x000055e30a6c195e clang::CodeGen::CodeGenFunction::EmitLValueHelper(clang::Expr const*, clang::CodeGen::KnownNonNull_t) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x453b95e) #8 0x000055e30a6cbff0 clang::CodeGen::CodeGenFunction::EmitCheckedLValue(clang::Expr const*, clang::CodeGen::CodeGenFunction::TypeCheckKind) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4545ff0) #9 0x000055e30a719d83 (anonymous namespace)::ScalarExprEmitter::EmitLoadOfLValue(clang::Expr const*) CGExprScalar.cpp:0:0 #10 0x000055e30a71666b (anonymous namespace)::ScalarExprEmitter::Visit(clang::Expr*) CGExprScalar.cpp:0:0 #11 0x000055e30a71a82b (anonymous namespace)::ScalarExprEmitter::VisitCastExpr(clang::CastExpr*) CGExprScalar.cpp:0:0 #12 0x000055e30a71975d clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x459375d) #13 0x000055e30a67a0a8 clang::CodeGen::CodeGenFunction::EmitVariablyModifiedType(clang::QualType) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x44f40a8) #14 0x000055e30a6a4b48 clang::CodeGen::CodeGenModule::EmitExplicitCastExprType(clang::ExplicitCastExpr const*, clang::CodeGen::CodeGenFunction*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x451eb48) #15 0x000055e30a71c72c (anonymous namespace)::ScalarExprEmitter::VisitExplicitCastExpr(clang::ExplicitCastExpr*) CGExprScalar.cpp:0:0 #16 0x000055e30a71975d clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x459375d) #17 0x000055e30a6aa616 clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, clang::CodeGen::AggValueSlot, bool) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4524616) #18 0x000055e30a6cd39b clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x454739b) #19 0x000055e30a698fdc clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4512fdc) #20 0x000055e30a9fd04d clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&) const (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x487704d) #21 0x000055e30aa9ef98 clang::CodeGen::CodeGenFunction::EmitOMPTaskBasedDirective(clang::OMPExecutableDirective const&, llvm::omp::Directive, clang::CodeGen::RegionCodeGenTy const&, llvm::function_ref<void (clang::CodeGen::CodeGenFunction&, llvm::Function*, clang::CodeGen::OMPTaskDataTy const&)> const&, clang::CodeGen::OMPTaskDataTy&)::'lambda'(clang::CodeGen::CodeGenFunction&, clang::CodeGen::PrePostActionTy&)::operator()(clang::CodeGen::CodeGenFunction&, clang::CodeGen::PrePostActionTy&) const CGStmtOpenMP.cpp:0:0 #22 0x000055e30a9fd00e clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&) const (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x487700e) #23 0x000055e30a9fd14c (anonymous namespace)::CGOpenMPRegionInfo::EmitBody(clang::CodeGen::CodeGenFunction&, clang::Stmt const*) CGOpenMPRuntime.cpp:0:0 #24 0x000055e30a698338 clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(clang::CapturedStmt const&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4512338) #25 0x000055e30aa33cc9 clang::CodeGen::CGOpenMPRuntime::emitTaskOutlinedFunction(clang::OMPExecutableDirective const&, clang::VarDecl const*, clang::VarDecl const*, clang::VarDecl const*, llvm::omp::Directive, clang::CodeGen::RegionCodeGenTy const&, bool, unsigned int&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x48adcc9) #26 0x000055e30aa9bc2d clang::CodeGen::CodeGenFunction::EmitOMPTaskBasedDirective(clang::OMPExecutableDirective const&, llvm::omp::Directive, clang::CodeGen::RegionCodeGenTy const&, llvm::function_ref<void (clang::CodeGen::CodeGenFunction&, llvm::Function*, clang::CodeGen::OMPTaskDataTy const&)> const&, clang::CodeGen::OMPTaskDataTy&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4915c2d) #27 0x000055e30aa9ccc4 clang::CodeGen::CodeGenFunction::EmitOMPTaskDirective(clang::OMPTaskDirective const&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4916cc4) #28 0x000055e30a6a0054 clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x451a054) #29 0x000055e30a66e3e7 clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x44e83e7) #30 0x000055e30a681d34 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x44fbd34) #31 0x000055e30a628a89 clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x44a2a89) #32 0x000055e30a622ab5 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x449cab5) #33 0x000055e30a62df0b clang::CodeGen::CodeGenModule::EmitDeferred() (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x44a7f0b) #34 0x000055e30a630774 clang::CodeGen::CodeGenModule::Release() (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x44aa774) #35 0x000055e30ac8dee2 (anonymous namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&) ModuleBuilder.cpp:0:0 #36 0x000055e30ac8c845 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4b06845) #37 0x000055e30cb109b9 clang::ParseAST(clang::Sema&, bool, bool) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x698a9b9) #38 0x000055e30b06d6c9 clang::FrontendAction::Execute() (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4ee76c9) #39 0x000055e30afe5405 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4e5f405) #40 0x000055e30b147e75 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4fc1e75) #41 0x000055e308d7bce9 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x2bf5ce9) #42 0x000055e308d73563 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0 #43 0x000055e30ae26e2d void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0 #44 0x000055e30a256700 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x40d0700) #45 0x000055e30ae276ae clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0 #46 0x000055e30ade88aa clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4c628aa) #47 0x000055e30ade937d clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4c6337d) #48 0x000055e30adf4be4 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4c6ebe4) #49 0x000055e308d78aa0 clang_main(int, char**, llvm::ToolContext const&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x2bf2aa0) #50 0x000055e308d89033 main (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x2c03033) #51 0x00007f73b1829d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16 #52 0x00007f73b1829e40 call_init ./csu/../csu/libc-start.c:128:20 #53 0x00007f73b1829e40 __libc_start_main ./csu/../csu/libc-start.c:379:5 #54 0x000055e308d721a5 _start (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x2bec1a5) clang: error: clang frontend command failed with exit code 139 (use -v to see invocation) clang version 18.0.0 (git@github.com:llvm/llvm-project.git 8628ca29aa4714f99e865c99b9d510ad14897fdc) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/rkchang/dev/omp/compilers/llvm-project/build/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/hello-76ba63.c clang: note: diagnostic msg: /tmp/hello-76ba63.sh clang: note: diagnostic msg: ******************** ```
llvmbot commented 10 months ago

@llvm/issue-subscribers-openmp

Author: Raymond Chang (rkchang)

Reduced test case: ``` # 1 "<built-in>" # 1 "hello.c" char a; void foo() { int b; #pragma omp task (char(*)[b]) a; } ``` https://godbolt.org/z/Mh3qzzq4r Program arguments: `-c -fopenmp -emit-llvm -Xclang -disable-llvm-passes` Crash reproducer: ``` # Crash reproducer for clang version 18.0.0 (git@github.com:llvm/llvm-project.git 8628ca29aa4714f99e865c99b9d510ad14897fdc) # Driver args: "-c" "-fopenmp" "-emit-llvm" "-Xclang" "-disable-llvm-passes" "hello.c" # Original command: "/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang-18" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-llvm-bc" "-emit-llvm-uselists" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "hello.c" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=all" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "x86-64" "-tune-cpu" "generic" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/home/rkchang/dev/omp" "-fcoverage-compilation-dir=/home/rkchang/dev/omp" "-resource-dir" "/home/rkchang/dev/omp/compilers/llvm-project/build/lib/clang/18" "-internal-isystem" "/home/rkchang/dev/omp/compilers/llvm-project/build/lib/clang/18/include" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/usr/lib/gcc/x86_64-linux-gnu/12/../../../../x86_64-linux-gnu/include" "-internal-externc-isystem" "/usr/include/x86_64-linux-gnu" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-ferror-limit" "19" "-fopenmp" "-fgnuc-version=4.2.1" "-fcolor-diagnostics" "-disable-llvm-passes" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "hello.bc" "-x" "c" "hello.c" "/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang-18" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-llvm-bc" "-emit-llvm-uselists" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "hello.c" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=all" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "x86-64" "-tune-cpu" "generic" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/home/rkchang/dev/omp" "-fcoverage-compilation-dir=/home/rkchang/dev/omp" "-ferror-limit" "19" "-fopenmp" "-fgnuc-version=4.2.1" "-fcolor-diagnostics" "-disable-llvm-passes" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-x" "c" "hello-76ba63.c" ``` Stack trace: ``` hello.c:5:3: warning: cast to 'char (*)[b]' from smaller integer type 'char' [-Wint-to-pointer-cast] 5 | (char(*)[b]) a; | ^~~~~~~~~~~~~~ hello.c:5:3: warning: expression result unused [-Wunused-value] 5 | (char(*)[b]) a; | ^ ~ 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: /home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang -c -fopenmp -emit-llvm -Xclang -disable-llvm-passes hello.c 1. <eof> parser at end of file 2. Per-file LLVM IR generation 3. hello.c:2:6: Generating code for declaration 'foo' #0 0x000055e30a314200 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x418e200) #1 0x000055e30a31160f llvm::sys::RunSignalHandlers() (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x418b60f) #2 0x000055e30a256238 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0 #3 0x00007f73b1842520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520) #4 0x000055e30a568de4 clang::Decl::getDeclContext() CGDebugInfo.cpp:0:0 #5 0x000055e30a6b6c77 clang::CodeGen::CodeGenFunction::EmitLValueForLambdaField(clang::FieldDecl const*, llvm::Value*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4530c77) #6 0x000055e30a6c518a clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(clang::DeclRefExpr const*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x453f18a) #7 0x000055e30a6c195e clang::CodeGen::CodeGenFunction::EmitLValueHelper(clang::Expr const*, clang::CodeGen::KnownNonNull_t) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x453b95e) #8 0x000055e30a6cbff0 clang::CodeGen::CodeGenFunction::EmitCheckedLValue(clang::Expr const*, clang::CodeGen::CodeGenFunction::TypeCheckKind) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4545ff0) #9 0x000055e30a719d83 (anonymous namespace)::ScalarExprEmitter::EmitLoadOfLValue(clang::Expr const*) CGExprScalar.cpp:0:0 #10 0x000055e30a71666b (anonymous namespace)::ScalarExprEmitter::Visit(clang::Expr*) CGExprScalar.cpp:0:0 #11 0x000055e30a71a82b (anonymous namespace)::ScalarExprEmitter::VisitCastExpr(clang::CastExpr*) CGExprScalar.cpp:0:0 #12 0x000055e30a71975d clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x459375d) #13 0x000055e30a67a0a8 clang::CodeGen::CodeGenFunction::EmitVariablyModifiedType(clang::QualType) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x44f40a8) #14 0x000055e30a6a4b48 clang::CodeGen::CodeGenModule::EmitExplicitCastExprType(clang::ExplicitCastExpr const*, clang::CodeGen::CodeGenFunction*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x451eb48) #15 0x000055e30a71c72c (anonymous namespace)::ScalarExprEmitter::VisitExplicitCastExpr(clang::ExplicitCastExpr*) CGExprScalar.cpp:0:0 #16 0x000055e30a71975d clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x459375d) #17 0x000055e30a6aa616 clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, clang::CodeGen::AggValueSlot, bool) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4524616) #18 0x000055e30a6cd39b clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x454739b) #19 0x000055e30a698fdc clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4512fdc) #20 0x000055e30a9fd04d clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&) const (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x487704d) #21 0x000055e30aa9ef98 clang::CodeGen::CodeGenFunction::EmitOMPTaskBasedDirective(clang::OMPExecutableDirective const&, llvm::omp::Directive, clang::CodeGen::RegionCodeGenTy const&, llvm::function_ref<void (clang::CodeGen::CodeGenFunction&, llvm::Function*, clang::CodeGen::OMPTaskDataTy const&)> const&, clang::CodeGen::OMPTaskDataTy&)::'lambda'(clang::CodeGen::CodeGenFunction&, clang::CodeGen::PrePostActionTy&)::operator()(clang::CodeGen::CodeGenFunction&, clang::CodeGen::PrePostActionTy&) const CGStmtOpenMP.cpp:0:0 #22 0x000055e30a9fd00e clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&) const (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x487700e) #23 0x000055e30a9fd14c (anonymous namespace)::CGOpenMPRegionInfo::EmitBody(clang::CodeGen::CodeGenFunction&, clang::Stmt const*) CGOpenMPRuntime.cpp:0:0 #24 0x000055e30a698338 clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(clang::CapturedStmt const&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4512338) #25 0x000055e30aa33cc9 clang::CodeGen::CGOpenMPRuntime::emitTaskOutlinedFunction(clang::OMPExecutableDirective const&, clang::VarDecl const*, clang::VarDecl const*, clang::VarDecl const*, llvm::omp::Directive, clang::CodeGen::RegionCodeGenTy const&, bool, unsigned int&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x48adcc9) #26 0x000055e30aa9bc2d clang::CodeGen::CodeGenFunction::EmitOMPTaskBasedDirective(clang::OMPExecutableDirective const&, llvm::omp::Directive, clang::CodeGen::RegionCodeGenTy const&, llvm::function_ref<void (clang::CodeGen::CodeGenFunction&, llvm::Function*, clang::CodeGen::OMPTaskDataTy const&)> const&, clang::CodeGen::OMPTaskDataTy&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4915c2d) #27 0x000055e30aa9ccc4 clang::CodeGen::CodeGenFunction::EmitOMPTaskDirective(clang::OMPTaskDirective const&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4916cc4) #28 0x000055e30a6a0054 clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x451a054) #29 0x000055e30a66e3e7 clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x44e83e7) #30 0x000055e30a681d34 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x44fbd34) #31 0x000055e30a628a89 clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x44a2a89) #32 0x000055e30a622ab5 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x449cab5) #33 0x000055e30a62df0b clang::CodeGen::CodeGenModule::EmitDeferred() (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x44a7f0b) #34 0x000055e30a630774 clang::CodeGen::CodeGenModule::Release() (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x44aa774) #35 0x000055e30ac8dee2 (anonymous namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&) ModuleBuilder.cpp:0:0 #36 0x000055e30ac8c845 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4b06845) #37 0x000055e30cb109b9 clang::ParseAST(clang::Sema&, bool, bool) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x698a9b9) #38 0x000055e30b06d6c9 clang::FrontendAction::Execute() (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4ee76c9) #39 0x000055e30afe5405 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4e5f405) #40 0x000055e30b147e75 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4fc1e75) #41 0x000055e308d7bce9 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x2bf5ce9) #42 0x000055e308d73563 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0 #43 0x000055e30ae26e2d void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0 #44 0x000055e30a256700 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x40d0700) #45 0x000055e30ae276ae clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0 #46 0x000055e30ade88aa clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4c628aa) #47 0x000055e30ade937d clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4c6337d) #48 0x000055e30adf4be4 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x4c6ebe4) #49 0x000055e308d78aa0 clang_main(int, char**, llvm::ToolContext const&) (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x2bf2aa0) #50 0x000055e308d89033 main (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x2c03033) #51 0x00007f73b1829d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16 #52 0x00007f73b1829e40 call_init ./csu/../csu/libc-start.c:128:20 #53 0x00007f73b1829e40 __libc_start_main ./csu/../csu/libc-start.c:379:5 #54 0x000055e308d721a5 _start (/home/rkchang/dev/omp/compilers/llvm-project/build/bin/clang+0x2bec1a5) clang: error: clang frontend command failed with exit code 139 (use -v to see invocation) clang version 18.0.0 (git@github.com:llvm/llvm-project.git 8628ca29aa4714f99e865c99b9d510ad14897fdc) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/rkchang/dev/omp/compilers/llvm-project/build/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/hello-76ba63.c clang: note: diagnostic msg: /tmp/hello-76ba63.sh clang: note: diagnostic msg: ******************** ```