Debian Codegraph @

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

raw
1 pub fn main() {
2 struct O(i32);
3 struct T(i32, i32);
4 struct M(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32);
5
6 // tuples
7 let z = ();
8 let o = (0,);
9 let f = o.0;
10 // { dg-warning "unused name" "" { target *-*-* } .-1 }
11
12 let t = (0, 1);
13 let s = t.1;
14 // { dg-warning "unused name" "" { target *-*-* } .-1 }
15
16 let m = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
17 let l = m.10;
18 // { dg-warning "unused name" "" { target *-*-* } .-1 }
19
20 // tuple structs
21 let so = O(0);
22 let sf = so.0;
23 // { dg-warning "unused name" "" { target *-*-* } .-1 }
24
25 let st = T(0, 1);
26 let fs = st.1;
27 // { dg-warning "unused name" "" { target *-*-* } .-1 }
28
29 let sm = M(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
30 let sl = sm.10;
31 // { dg-warning "unused name" "" { target *-*-* } .-1 }
32
33 z
34 }