-
-
Save zhuowei/597b77698634aac9b302d43b5c464838 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/Documents/buildLLVM$ bin/clang -std=c++17 -target wasm32-unknown-unknown-wasm -c ~/Documents/ReproSectionSymbol/test.cpp | |
clang-9: /home/zhuowei/Documents/llvm-project/llvm/lib/MC/MCContext.cpp:201: llvm::MCSymbol* llvm::MCContext::createSymbol(llvm::StringRef, bool, bool): Assertion `IsTemporary && "Cannot rename non-temporary symbols"' failed. | |
Stack dump: | |
0. Program arguments: /home/zhuowei/Documents/buildLLVM/bin/clang-9 -cc1 -triple wasm32-unknown-unknown-wasm -emit-obj -mrelax-all -disable-free -main-file-name test.cpp -mrelocation-model static -mthread-model posix -masm-verbose -mconstructor-aliases -fuse-init-array -target-cpu generic -fvisibility hidden -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -coverage-notes-file /home/zhuowei/Documents/buildLLVM/test.gcno -resource-dir /home/zhuowei/Documents/buildLLVM/lib/clang/9.0.0 -internal-isystem /include/c++/v1 -internal-isystem /include -std=c++17 -fdeprecated-macro -fdebug-compilation-dir /home/zhuowei/Documents/buildLLVM -ferror-limit 19 -fmessage-length 183 -fobjc-runtime=gnustep -fcxx-exceptions -fexceptions -fno-common -fdiagnostics-show-option -fcolor-diagnostics -o test.o -x c++ /home/zhuowei/Documents/ReproSectionSymbol/test.cpp | |
1. <eof> parser at end of file | |
2. Code generation | |
#0 0x000055dbad22f06a llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/zhuowei/Documents/llvm-project/llvm/lib/Support/Unix/Signals.inc:498:0 | |
#1 0x000055dbad22d0c4 llvm::sys::RunSignalHandlers() /home/zhuowei/Documents/llvm-project/llvm/lib/Support/Signals.cpp:68:0 | |
#2 0x000055dbad22d202 SignalHandler(int) /home/zhuowei/Documents/llvm-project/llvm/lib/Support/Unix/Signals.inc:357:0 | |
#3 0x00007f448ad30890 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12890) | |
#4 0x00007f44899e1e97 raise /build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0 | |
#5 0x00007f44899e3801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0 | |
#6 0x00007f44899d339a __assert_fail_base /build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0 | |
#7 0x00007f44899d3412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412) | |
#8 0x000055dbacf3496d llvm::MCContext::createSymbol(llvm::StringRef, bool, bool) /home/zhuowei/Documents/llvm-project/llvm/lib/MC/MCContext.cpp:201:0 | |
#9 0x000055dbacf35e60 llvm::isa_impl_cl<llvm::MCSymbolWasm, llvm::MCSymbol const*>::doit(llvm::MCSymbol const*) /home/zhuowei/Documents/llvm-project/llvm/include/llvm/Support/Casting.h:105:0 | |
#10 0x000055dbacf35e60 llvm::isa_impl_wrap<llvm::MCSymbolWasm, llvm::MCSymbol const*, llvm::MCSymbol const*>::doit(llvm::MCSymbol const* const&) /home/zhuowei/Documents/llvm-project/llvm/include/llvm/Support/Casting.h:132:0 | |
#11 0x000055dbacf35e60 llvm::isa_impl_wrap<llvm::MCSymbolWasm, llvm::MCSymbol* const, llvm::MCSymbol const*>::doit(llvm::MCSymbol* const&) /home/zhuowei/Documents/llvm-project/llvm/include/llvm/Support/Casting.h:124:0 | |
#12 0x000055dbacf35e60 bool llvm::isa<llvm::MCSymbolWasm, llvm::MCSymbol*>(llvm::MCSymbol* const&) /home/zhuowei/Documents/llvm-project/llvm/include/llvm/Support/Casting.h:143:0 | |
#13 0x000055dbacf35e60 llvm::cast_retty<llvm::MCSymbolWasm, llvm::MCSymbol*>::ret_type llvm::cast<llvm::MCSymbolWasm, llvm::MCSymbol>(llvm::MCSymbol*) /home/zhuowei/Documents/llvm-project/llvm/include/llvm/Support/Casting.h:264:0 | |
#14 0x000055dbacf35e60 llvm::MCContext::getWasmSection(llvm::Twine const&, llvm::SectionKind, llvm::MCSymbolWasm const*, unsigned int, char const*) /home/zhuowei/Documents/llvm-project/llvm/lib/MC/MCContext.cpp:523:0 | |
#15 0x000055dbacf360a9 llvm::MCContext::getWasmSection(llvm::Twine const&, llvm::SectionKind, llvm::Twine const&, unsigned int, char const*) /home/zhuowei/Documents/llvm-project/llvm/lib/MC/MCContext.cpp:504:0 | |
#16 0x000055dbaca643c9 llvm::TargetLoweringObjectFileWasm::getExplicitSectionGlobal(llvm::GlobalObject const*, llvm::SectionKind, llvm::TargetMachine const&) const /home/zhuowei/Documents/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:1701:0 | |
#17 0x000055dbadfc8a81 llvm::TargetLoweringObjectFile::SectionForGlobal(llvm::GlobalObject const*, llvm::SectionKind, llvm::TargetMachine const&) const /home/zhuowei/Documents/llvm-project/llvm/lib/Target/TargetLoweringObjectFile.cpp:267:0 | |
#18 0x000055dbada615ed llvm::AsmPrinter::EmitGlobalVariable(llvm::GlobalVariable const*) /home/zhuowei/Documents/llvm-project/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:523:0 | |
#19 0x000055dbada5e87a llvm::ilist_node_impl<llvm::ilist_detail::node_options<llvm::GlobalVariable, true, false, void> >::getNext() /home/zhuowei/Documents/llvm-project/llvm/include/llvm/ADT/ilist_node.h:66:0 | |
#20 0x000055dbada5e87a llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::GlobalVariable, true, false, void>, false, false>::operator++() /home/zhuowei/Documents/llvm-project/llvm/include/llvm/ADT/ilist_iterator.h:158:0 | |
#21 0x000055dbada5e87a llvm::AsmPrinter::doFinalization(llvm::Module&) /home/zhuowei/Documents/llvm-project/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1389:0 | |
#22 0x000055dbacd371b5 llvm::FPPassManager::doFinalization(llvm::Module&) /home/zhuowei/Documents/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1706:0 | |
#23 0x000055dbacd418fb runOnModule /home/zhuowei/Documents/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1784:0 | |
#24 0x000055dbacd418fb llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/zhuowei/Documents/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1868:0 | |
#25 0x000055dbad417a79 llvm::PrettyStackTraceString::~PrettyStackTraceString() /home/zhuowei/Documents/llvm-project/llvm/include/llvm/Support/PrettyStackTrace.h:51:0 | |
#26 0x000055dbad417a79 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/zhuowei/Documents/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:880:0 | |
#27 0x000055dbad4195a5 std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >::~unique_ptr() /usr/include/c++/7/bits/unique_ptr.h:267:0 | |
#28 0x000055dbad4195a5 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/zhuowei/Documents/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1431:0 | |
#29 0x000055dbadd6b8a0 std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >::~unique_ptr() /usr/include/c++/7/bits/unique_ptr.h:267:0 | |
#30 0x000055dbadd6b8a0 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /home/zhuowei/Documents/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:300:0 | |
#31 0x000055dbae66fbf9 clang::ParseAST(clang::Sema&, bool, bool) /home/zhuowei/Documents/llvm-project/clang/lib/Parse/ParseAST.cpp:171:0 | |
#32 0x000055dbadd6a698 clang::CodeGenAction::ExecuteAction() /home/zhuowei/Documents/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:1057:0 | |
#33 0x000055dbad8906d6 clang::FrontendAction::Execute() /home/zhuowei/Documents/llvm-project/clang/lib/Frontend/FrontendAction.cpp:934:0 | |
#34 0x000055dbad856b36 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/zhuowei/Documents/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:951:0 | |
#35 0x000055dbad92d7ef clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/zhuowei/Documents/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:272:0 | |
#36 0x000055dbac63c0c0 llvm::TimeTraceScope::~TimeTraceScope() /home/zhuowei/Documents/llvm-project/llvm/include/llvm/Support/TimeProfiler.h:63:0 | |
#37 0x000055dbac63c0c0 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/zhuowei/Documents/llvm-project/clang/tools/driver/cc1_main.cpp:224:0 | |
#38 0x000055dbac5e18a1 ExecuteCC1Tool /home/zhuowei/Documents/llvm-project/clang/tools/driver/driver.cpp:309:0 | |
#39 0x000055dbac5e18a1 main /home/zhuowei/Documents/llvm-project/clang/tools/driver/driver.cpp:381:0 | |
#40 0x00007f44899c4b97 __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0 | |
#41 0x000055dbac63850a _start (/home/zhuowei/Documents/buildLLVM/bin/clang-9+0x9fc50a) | |
clang-9: error: unable to execute command: Aborted (core dumped) | |
clang-9: error: clang frontend command failed due to signal (use -v to see invocation) | |
clang version 9.0.0 (https://github.com/llvm/llvm-project.git 06bfe353febb3da09b43c740cda396b4ef84edef) | |
Target: wasm32-unknown-unknown-wasm | |
Thread model: posix | |
InstalledDir: /home/zhuowei/Documents/buildLLVM/bin | |
clang-9: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. | |
clang-9: note: diagnostic msg: | |
******************** | |
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: | |
Preprocessed source(s) and associated run script(s) are located at: | |
clang-9: note: diagnostic msg: /tmp/test-04731c.cpp | |
clang-9: note: diagnostic msg: /tmp/test-04731c.sh | |
clang-9: note: diagnostic msg: | |
******************** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct elem { | |
char name[8]; | |
char type; | |
}; | |
__attribute__((section("swift5_typeref"))) | |
inline const struct elem Val1 = {.name = {'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a'}, .type = 0}; | |
__attribute__((section("swift5_typeref"))) | |
inline const struct elem Val2 = {.name = {'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b'}, .type = 0}; | |
extern bool potato(); | |
const struct elem* canThisWork() { | |
return potato()? &Val1: &Val2; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment