Fix #69841 by updating LLVM submodule. Includes regression test for issue 69841.

This commit is contained in:
Felix S. Klock II 2020-03-30 14:10:39 -04:00
parent 9a12971da5
commit 0c4ad1fda6
2 changed files with 31 additions and 1 deletions

@ -1 +1 @@
Subproject commit 992e608cfc5d1c126a23c640222fd396a3bdeb9f
Subproject commit 130721d6f4e6cba3b910ccdf5e0aa62b9dffc95f

View 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.");
}
}