Auto merge of #70582 - pnkfelix:update-llvm-to-fix-69841, r=cuviper

Fix #69841 by updating LLVM submodule.

Fix #69841 by updating LLVM submodule.

Includes regression test for issue 69841.
This commit is contained in:
bors 2020-04-03 07:26:00 +00:00
commit 424c793925
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.");
}
}