Open nickdesaulniers opened 5 months ago
Worth noting this crashes on asserts build: https://godbolt.org/z/basjzojxE
Alias must point to a definition
ptr @_Z3foov
Alias must point to a definition
ptr @_Z4foo2v
fatal error: error in backend: Broken module found, compilation aborted!
Look related maybe duplicate: https://github.com/llvm/llvm-project/issues/69066
It looks like we diagnose this in codegen:
and:
I think then it makes more sense now that this is optimization sensitive.
CC @AaronBallman @erichkeane
Both of those checks should always be called: https://github.com/llvm/llvm-project/blob/dc20a0ea1fd04a2ef95eb5c73e9f88357fc5f694/clang/lib/CodeGen/CodeGenModule.cpp#L832 calls checkAliases()
which has no optimization-specific logic. So perhaps optimizations are removing some aliases from the list?
https://godbolt.org/z/TrGeazYc5
we only observe these diagnostics at
-O0
, not-O2
.via #60481