| Issue |
52954
|
| Summary |
Compiler crash in front-end
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
havedifficultyinfindingnames
|
With compile options: "clang++ main.cpp -o main -Ofast -std=c++2b -s -march=native -fno-rtti -fno-exceptions -fuse-ld=lld -Wall",
the compiler crashes when failing to the assertion:"lib/CodeGen/CGExpr.cpp:2765: clang::CodeGen::LValue clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(const clang::DeclRefExpr*): Assertion `(ND->isUsed(false) || !isa<VarDecl>(ND) || E->isNonOdrUse() || !E->getLocation().isValid()) && "Should not use decl without marking it used!"' failed.".
The program can be compiled correctly on the latest gcc-12 with similar compile options(except for -fuse-ld), and it reports no warnings.
[main-129347.cpp.txt](https://github.com/llvm/llvm-project/files/7799118/main-129347.cpp.txt)
[backtrace.txt](https://github.com/llvm/llvm-project/files/7799120/backtrace.txt)
[main-129347.sh.txt](https://github.com/llvm/llvm-project/files/7799121/main-129347.sh.txt)
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs