mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Fix #69841 by updating LLVM submodule. Includes regression test for issue 69841.
This commit is contained in:
parent
9a12971da5
commit
0c4ad1fda6
@ -1 +1 @@
|
||||
Subproject commit 992e608cfc5d1c126a23c640222fd396a3bdeb9f
|
||||
Subproject commit 130721d6f4e6cba3b910ccdf5e0aa62b9dffc95f
|
30
src/test/ui/issues/issue-69841.rs
Normal file
30
src/test/ui/issues/issue-69841.rs
Normal file
@ -0,0 +1,30 @@
|
||||
// This is a regression test for issue rust-lang/rust#69841, which exposed an
|
||||
// LLVM bug which needed a fix to be backported.
|
||||
|
||||
// run-pass
|
||||
|
||||
fn main() {
|
||||
let buffer = [49u8, 10];
|
||||
let mut a : u64 = 0;
|
||||
'read: loop {
|
||||
for c in &buffer {
|
||||
match c {
|
||||
48..=57 => {
|
||||
a*= 10;
|
||||
a+= *c as u64 - 48;
|
||||
}
|
||||
10 => {
|
||||
break 'read;
|
||||
}
|
||||
_ => {
|
||||
unsafe { std::hint::unreachable_unchecked() };
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if a == 1 {
|
||||
println!("What did you expect?");
|
||||
} else {
|
||||
panic!("this should be unreachable.");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user