-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Bad behaviour with break in while-loop condition #21751
Comments
Seems like this may have been fixed? Marking as needs-test. |
This SIGILLs for me at |
indeed, removing the E-needstest label. |
Interestingly, adding explicit labels to both of the loops and then making the I wonder if this means that this is some sort of |
Removing the wrapping braces around |
Still an issue. |
The original example does not work fine -- the
|
I'm going to close this issue in favor of #37576 which includes more examples and the official decision (that this code ought to be an error -- |
If you put a
break
in the condition of a while-loop, the compiler code seems to exhibit undefined behaviour.For example, in
play.rust-lang.org
, this SIGILL-s when-O0
and prints 5 blank lines when-O2
:The text was updated successfully, but these errors were encountered: