-
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
noalias on a Box doesn't seem to have an impact when compiling without -C panic=abort
#95323
Comments
Possibly related: #46515 |
Cannot reproduce with nightly rust: https://godbolt.org/z/M5vvsbGnK |
Cc @Nilstrieb |
This always worked with |
I think LLVM inlined the function anyways and that's why it's not reproducible anymore (even with Edit: It's obviously not inlined for codegen as the assembly shows the call, but there seems to be some smarter analysis going on. |
@Nilstrieb Yes, LLVM infers that the return value is noalias in this case (noinline does not affect IPO inference passes). |
I tried this code:
I expect the assert_eq! to be compiled away. However, this only happens with
-C panic=abort
.I'm using rustc 1.61.0-nightly (c84f39e 2022-03-20)
The text was updated successfully, but these errors were encountered: