-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[clang][alias fn attr] error: alias must point to a defined variable or function
false negative when optimizations are enabled
#89474
Comments
error: alias must point to a defined variable or function
false negative when optimizations are enablederror: alias must point to a defined variable or function
false negative when optimizations are enabled
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: #69066 |
It looks like we diagnose this in codegen: llvm-project/clang/lib/CodeGen/CodeGenModule.cpp Lines 591 to 594 in adc4f62
and: llvm-project/clang/lib/CodeGen/CodeGenModule.cpp Lines 612 to 619 in adc4f62
I think then it makes more sense now that this is optimization sensitive. |
Both of those checks should always be called:
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
The text was updated successfully, but these errors were encountered: