llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Assertion `MaybeODRUseExprs.empty() && "Leftover expressions for odr-use checking"' failed.

Open keveman opened this issue 7 years ago • 3 comments

Bugzilla Link 42467
Version trunk
OS All
Attachments Test case crashing clang frontend
CC @DougGregor,@zygoloid

Extended Description

clang crashes with that assertion failing. llvm/llvm-project#12953 and llvm/llvm-project#14358 seem like possible duplicates, but my test case was different enough, that I feel this maybe a different bug causing the same assertion failure.

clang cloned from https://github.com/llvm/llvm-project Latest commit 42e13c83284e94607b3a5751598f2c1661447356 Wed Jun 26 15:11:31 2019

clang -c 119.cc -O0 -emit-llvm -save-temps clang-9: /cb/home/manjunath/ws/llvm-project/clang/lib/Sema/SemaDecl.cpp:13564: clang::Decl* clang::Sema::ActOnFinishFunctionBody(clang::Decl*, clang::Stmt*, bool): Assertion `MaybeODRUseExprs.empty() && "Leftover expressions for odr-use checking"' failed. Stack dump: 0. Program arguments: /spare/manjunath-build-llvm/bin/clang-9 -cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -emit-llvm-uselists -save-temps=cwd -disable-free -main-file-name 119.cc -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -coverage-notes-file /cb/home/manjunath/ws/test/cerebras/119.gcno -resource-dir /spare/manjunath-build-llvm/lib/clang/9.0.0 -O0 -fdeprecated-macro -fdebug-compilation-dir /cb/home/manjunath/ws/test/cerebras -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -disable-llvm-passes -faddrsig -o 119.tmp.bc -x c++-cpp-output 119.ii

keveman avatar Jul 01 '19 15:07 keveman

mentioned in issue llvm/llvm-bugzilla-archive#42829

miyuki avatar Nov 27 '21 02:11 miyuki

Appears to be fixed in Clang 15: https://godbolt.org/z/Y5cfTYeM7

Endilll avatar Aug 06 '23 09:08 Endilll

@llvm/issue-subscribers-clang-frontend

llvmbot avatar Aug 06 '23 09:08 llvmbot