Debian Codegraph @

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

raw
1 // { dg-additional-options "-fdump-tree-gimple -frust-crate=example" }
2
3 struct Foo {
4 a: u16,
5 // { dg-warning "field is never read" "" { target *-*-* } .-1 }
6 b: u8,
7 // { dg-warning "field is never read" "" { target *-*-* } .-1 }
8 }
9
10 fn main() {
11 let my_foo = Foo { a: 1, b: 2 };
12 // { dg-warning "unused name" "" { target *-*-* } .-1 }
13 // { dg-final { scan-tree-dump-times {(?n)const struct example::Foo my_foo;$} 1 gimple } }
14 }