Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Compilation error when compiling a c++ project. It can be compiled with g++ without problem. #43576

Open Quuxplusone opened 4 years ago

Quuxplusone commented 4 years ago
Bugzilla Link PR44606
Status NEW
Importance P enhancement
Reported by Kai Bao (paeanball@gmail.com)
Reported on 2020-01-21 05:38:17 -0800
Last modified on 2020-01-21 05:42:01 -0800
Version 9.0
Hardware PC Linux
CC blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
Fixed by commit(s)
Attachments RawRecord-c12a26.tar.gz (511579 bytes, application/gzip)
Blocks
Blocked by
See also
The preprocessed source is attached. And script is (I could not attach multiple
file, so I paste content here.)

 "/usr/lib/llvm-9/bin/clang" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-emit-obj" "-disable-free" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "RawRecord.cpp" "-mrelocation-model" "static" "-mthread-model" "posix" "-fmath-errno" "-masm-verbose" "-mconstructor-aliases" "-munwind-tables" "-fuse-init-array" "-target-cpu" "x86-64" "-dwarf-column-info" "-debug-info-kind=limited" "-dwarf-version=4" "-debugger-tuning=gdb" "-momit-leaf-frame-pointer" "-coverage-notes-file" "/home/kaib/OPM-master-test/debug/opm-common-build/CMakeFiles/genkw.dir/src/opm/parser/eclipse/Parser/raw/RawRecord.cpp.gcno" "-D" "HAVE_CONFIG_H=1" "-D" "SILENCE_EXTERNAL_WARNINGS" "-D" "DEBUG" "-O2" "-Wall" "-Wextra" "-Wformat-nonliteral" "-Wcast-align" "-Wpointer-arith" "-Wmissing-declarations" "-Wcast-qual" "-Wshadow" "-Wwrite-strings" "-Wchar-subscripts" "-Wredundant-decls" "-pedantic" "-std=c++14" "-fdeprecated-macro" "-ferror-limit" "19" "-fmessage-length" "0" "-fopenmp" "-pthread" "-fobjc-runtime=gcc" "-fcxx-exceptions" "-fexceptions" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-vectorize-loops" "-vectorize-slp" "-faddrsig" "-x" "c++" "RawRecord-c12a26.cpp"

The following is the error message and the platform is ubuntu 19.10 .

/usr/bin/clang++  -DHAVE_CONFIG_H=1 -DSILENCE_EXTERNAL_WARNINGS -
I/home/kaib/OPM-master-test/debug/opm-common-build -I/home/kaib/OPM-master-
test/debug/opm-common/external/cjson -I/home/kaib/OPM-master-test/debug/opm-
common-build/include -I/home/kaib/OPM-master-test/debug/opm-common  -pipe -
std=c++14 -pedantic -Wall -Wextra -Wformat-nonliteral -Wcast-align -Wpointer-
arith -Wmissing-declarations -Wcast-qual -Wshadow -Wwrite-strings -Wchar-
subscripts -Wredundant-decls -fopenmp=libomp -pthread -O2 -g -DDEBUG   -
std=c++14 -o
CMakeFiles/genkw.dir/src/opm/parser/eclipse/Parser/raw/RawRecord.cpp.o -c
/home/kaib/OPM-master-test/debug/opm-common/src/opm/parser/eclipse/Parser/raw/RawRecord.cpp
Stack dump:
0.  Program arguments: /usr/lib/llvm-9/bin/clang -cc1 -triple x86_64-pc-linux-
gnu -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-
file-name RawRecord.cpp -mrelocation-model static -mthread-model posix -fmath-
errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -
target-cpu x86-64 -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -
debugger-tuning=gdb -momit-leaf-frame-pointer -coverage-notes-file
/home/kaib/OPM-master-test/debug/opm-common-
build/CMakeFiles/genkw.dir/src/opm/parser/eclipse/Parser/raw/RawRecord.cpp.gcno
-resource-dir /usr/lib/llvm-9/lib/clang/9.0.0 -D HAVE_CONFIG_H=1 -D
SILENCE_EXTERNAL_WARNINGS -I /home/kaib/OPM-master-test/debug/opm-common-build -
I /home/kaib/OPM-master-test/debug/opm-common/external/cjson -I /home/kaib/OPM-
master-test/debug/opm-common-build/include -I /home/kaib/OPM-master-
test/debug/opm-common -D DEBUG -internal-isystem /usr/bin/../lib/gcc/x86_64-
linux-gnu/9/../../../../include/c++/9 -internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-
gnu/c++/9 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-
gnu/9/../../../../include/x86_64-linux-gnu/c++/9 -internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/backward -
internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-
9/lib/clang/9.0.0/include -internal-externc-isystem /usr/include/x86_64-linux-
gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -
O2 -Wall -Wextra -Wformat-nonliteral -Wcast-align -Wpointer-arith -Wmissing-
declarations -Wcast-qual -Wshadow -Wwrite-strings -Wchar-subscripts -Wredundant-
decls -pedantic -std=c++14 -fdeprecated-macro -fdebug-compilation-dir
/home/kaib/OPM-master-test/debug/opm-common-build -ferror-limit 19 -fmessage-
length 0 -fopenmp -pthread -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -
fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -
faddrsig -o
CMakeFiles/genkw.dir/src/opm/parser/eclipse/Parser/raw/RawRecord.cpp.o -x c++
/home/kaib/OPM-master-test/debug/opm-common/src/opm/parser/eclipse/Parser/raw/RawRecord.cpp
1.  <eof> parser at end of file
2.  Per-file LLVM IR generation
3.  /home/kaib/OPM-master-test/debug/opm-
common/src/opm/parser/eclipse/Parser/raw/RawConsts.hpp:67:28: Generating code
for declaration 'Opm::RawConsts::is_separator::operator()'
 #0 0x00007f51464c256f llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/lib/x86_64-linux-gnu/libLLVM-9.so.1+0xa4256f)
 #1 0x00007f51464c0980 llvm::sys::RunSignalHandlers() (/lib/x86_64-linux-gnu/libLLVM-9.so.1+0xa40980)
 #2 0x00007f51464c2971 (/lib/x86_64-linux-gnu/libLLVM-9.so.1+0xa42971)
 #3 0x00007f514c097540 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x15540)
 #4 0x00007f51465fe462 llvm::PointerType::get(llvm::Type*, unsigned int) (/lib/x86_64-linux-gnu/libLLVM-9.so.1+0xb7e462)
 #5 0x00007f514ae453fa (/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x11c63fa)
 #6 0x00007f514ae4534c (/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x11c634c)
 #7 0x00007f514aec302a (/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x124402a)
 #8 0x00007f514af4473c clang::CodeGen::CodeGenFunction::EmitCheckedInBoundsGEP(llvm::Value*, llvm::ArrayRef<llvm::Value*>, bool, bool, clang::SourceLocation, llvm::Twine const&) (/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x12c573c)
 #9 0x00007f514af153eb (/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x12963eb)
#10 0x00007f514af08435
clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(clang::ArraySubscriptExpr
const*, bool) (/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x1289435)
#11 0x00007f514aeffab6 clang::CodeGen::CodeGenFunction::EmitLValue(clang::Expr
const*) (/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x1280ab6)
#12 0x00007f514af06eea
clang::CodeGen::CodeGenFunction::EmitCheckedLValue(clang::Expr const*,
clang::CodeGen::CodeGenFunction::TypeCheckKind) (/lib/x86_64-linux-gnu/libclang-
cpp.so.9+0x1287eea)
#13 0x00007f514af4561a (/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x12c661a)
#14 0x00007f514af4f85b (/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x12d085b)
#15 0x00007f514af3df4f
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool)
(/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x12bef4f)
#16 0x00007f514b0245ab
clang::CodeGen::CodeGenFunction::EmitReturnStmt(clang::ReturnStmt const&)
(/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x13a55ab)
#17 0x00007f514b021d57 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*, llvm::ArrayRef<clang::Attr const*>) (/lib/x86_64-linux-gnu/libclang-
cpp.so.9+0x13a2d57)
#18 0x00007f514b02ac7c
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot) (/lib/x86_64-linux-gnu/libclang-
cpp.so.9+0x13abc7c)
#19 0x00007f514b065732
clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*)
(/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x13e6732)
#20 0x00007f514b065f5f
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/lib/x86_64-linux-
gnu/libclang-cpp.so.9+0x13e6f5f)
#21 0x00007f514b07d068
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl,
llvm::GlobalValue*) (/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x13fe068)
#22 0x00007f514b0776bd
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) (/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x13f86bd)
#23 0x00007f514b06e7d3 clang::CodeGen::CodeGenModule::EmitDeferred()
(/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x13ef7d3)
#24 0x00007f514b06e768 clang::CodeGen::CodeGenModule::EmitDeferred()
(/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x13ef768)
#25 0x00007f514b06e768 clang::CodeGen::CodeGenModule::EmitDeferred()
(/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x13ef768)
#26 0x00007f514b06e768 clang::CodeGen::CodeGenModule::EmitDeferred()
(/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x13ef768)
#27 0x00007f514b06e768 clang::CodeGen::CodeGenModule::EmitDeferred()
(/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x13ef768)
#28 0x00007f514b06e768 clang::CodeGen::CodeGenModule::EmitDeferred()
(/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x13ef768)
#29 0x00007f514b06db07 clang::CodeGen::CodeGenModule::Release() (/lib/x86_64-
linux-gnu/libclang-cpp.so.9+0x13eeb07)
#30 0x00007f514b0e8004 (/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x1469004)
#31 0x00007f514b05e406 (/lib/x86_64-linux-gnu/libclang-cpp.so.9+0x13df406)
#32 0x00007f514a3c7d13 clang::ParseAST(clang::Sema&, bool, bool) (/lib/x86_64-
linux-gnu/libclang-cpp.so.9+0x748d13)
#33 0x00007f514b62d228 clang::FrontendAction::Execute() (/lib/x86_64-linux-
gnu/libclang-cpp.so.9+0x19ae228)
#34 0x00007f514b5ecde0
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/lib/x86_64-
linux-gnu/libclang-cpp.so.9+0x196dde0)
#35 0x00007f514b68fbf0
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/lib/x86_64-linux-
gnu/libclang-cpp.so.9+0x1a10bf0)
#36 0x000000000049941b cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/lib/llvm-9/bin/clang+0x49941b)
#37 0x0000000000497741 main (/usr/lib/llvm-9/bin/clang+0x497741)
#38 0x00007f514555d1e3 __libc_start_main /build/glibc-4WA41p/glibc-
2.30/csu/../csu/libc-start.c:342:3
#39 0x0000000000494bbe _start (/usr/lib/llvm-9/bin/clang+0x494bbe)
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 9.0.0-2 (tags/RELEASE_900/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang: 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: 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/RawRecord-c12a26.cpp
clang: note: diagnostic msg: /tmp/RawRecord-c12a26.sh
clang: note: diagnostic msg:
Quuxplusone commented 4 years ago

Attached RawRecord-c12a26.tar.gz (511579 bytes, application/gzip): Preprocessed source and run script