Debian Codegraph @

gcc/testsuite/rust/compile/torture/ifunaryexpr.rs

raw
1 extern "C"
2 {
3 pub fn abort ();
4 }
5
6 struct B { b: bool }
7
8 pub fn main ()
9 {
10 let n = 1;
11 if 0 > -n { } else { unsafe { abort (); } }
12
13 let b = true;
14 if !b { unsafe { abort (); } }
15 if !!b { } else { unsafe { abort (); } }
16
17 let bb = B { b: false };
18
19 if !bb.b && !b { unsafe { abort (); } }
20
21 if (B { b: true }).b { } else { unsafe { abort (); } }
22 }