clang codegen crash with address-of-label in illegal locations #8396
Labels
bugzilla
Issues migrated from bugzilla
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
crash-on-invalid
worksforme
Resolved as "works for me"
Extended Description
Testcase 1:
void* a = &&N;
Crashes with:
clang: CGExprConstant.cpp:787: llvm::Constant*::ConstExprEmitter::EmitLValue(clang::Expr*): Assertion `CGF && "Invalid address of label expression outside function."' failed.
Testcase 2 (C++):
int f(void* = &&N);
void g() { f(); }
Crashes with:
Referring to a basic block in another function!
indirectbr i8* undef, [label %N]
Broken module found, compilation aborted!
These constructs should get rejected before codegen.
The text was updated successfully, but these errors were encountered: