-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Description
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
:
fn main() {
for _ in 0..5 {
while { break; } { println!("never"); }
println!("?");
}
}
Metadata
Metadata
Assignees
Labels
I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.