]> git.proxmox.com Git - rustc.git/blob - src/test/ui/mir/simplify-branch-same.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / mir / simplify-branch-same.rs
1 // Regression test for SimplifyBranchSame miscompilation.
2 // run-pass
3
4 macro_rules! m {
5 ($a:expr, $b:expr, $c:block) => {
6 match $a {
7 Lto::Fat | Lto::Thin => { $b; (); $c }
8 Lto::No => { $b; () }
9 }
10 }
11 }
12
13 pub enum Lto { No, Thin, Fat }
14
15 fn f(mut cookie: u32, lto: Lto) -> u32 {
16 let mut _a = false;
17 m!(lto, _a = true, {cookie = 0});
18 cookie
19 }
20
21 fn main() { assert_eq!(f(42, Lto::Thin), 0) }