Issue |
129904
|
Summary |
clang frontend failed at clang::ASTContext::forEachMultiversionedFunctionVersion()
|
Labels |
|
Assignees |
|
Reporter |
bi6c
|
Compiler Explorer: https://godbolt.org/z/qPxYh9Td4
```console
<source>:10:58: error: parameter 'b' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
10 | int __attribute__((target_clones("default,avx"))) foo(a, b)
| ^
11 | struct foo a;
12 | {
<source>:10:51: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C23 [-Wdeprecated-non-prototype]
10 | int __attribute__((target_clones("default,avx"))) foo(a, b)
| ^
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: /opt/compiler-explorer/clang-assertions-trunk/bin/clang -gdwarf-4 -g -o /app/output.s -mllvm --x86-asm-syntax=intel -fno-verbose-asm -S --gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics -fno-crash-diagnostics <source>
1. <eof> parser at end of file
2. Per-file LLVM IR generation
#0 0x0000000003e62338 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3e62338)
#1 0x0000000003e5fff4 llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3e5fff4)
#2 0x0000000003dac928 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
#3 0x0000762533c42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x000000000735a4ce clang::ASTContext::forEachMultiversionedFunctionVersion(clang::FunctionDecl const*, llvm::function_ref<void (clang::FunctionDecl*)>) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x735a4ce)
#5 0x000000000442bd2d clang::CodeGen::CodeGenModule::emitMultiVersionFunctions() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x442bd2d)
#6 0x000000000442dff8 clang::CodeGen::CodeGenModule::Release() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x442dff8)
#7 0x000000000482760e (anonymous namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&) ModuleBuilder.cpp:0:0
#8 0x0000000004823f75 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4823f75)
#9 0x000000000641621c clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x641621c)
#10 0x0000000004824728 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4824728)
#11 0x0000000004aec505 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4aec505)
#12 0x0000000004a6fcde clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4a6fcde)
#13 0x0000000004bdad8e clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4bdad8e)
#14 0x0000000000d4f5cf cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xd4f5cf)
#15 0x0000000000d46eea ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#16 0x000000000486c659 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
#17 0x0000000003dacdd4 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3dacdd4)
#18 0x000000000486cc4f 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
#19 0x000000000482f86d clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x482f86d)
#20 0x00000000048308ee clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x48308ee)
#21 0x0000000004838885 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4838885)
#22 0x0000000000d4c3c3 clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xd4c3c3)
#23 0x0000000000c13ae4 main (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xc13ae4)
#24 0x0000762533c29d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#25 0x0000762533c29e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#26 0x0000000000d46995 _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xd46995)
clang: error: clang frontend command failed with exit code 139 (use -v to see invocation)
Compiler returned: 139
```
Code:
```c
#define int unsigned
struct foo {
int aa : 1;
int a : 9;
int c : 16;
int d : 6;
};
int __attribute__((target_clones("default,avx"))) foo(a, b)
struct foo a;
{
return a.d == 0;
}
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs