diff options
Diffstat (limited to 'gcc/testsuite/rust/compile/struct_align2.rs')
-rw-r--r-- | gcc/testsuite/rust/compile/struct_align2.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/struct_align2.rs b/gcc/testsuite/rust/compile/struct_align2.rs new file mode 100644 index 0000000..ac49064 --- /dev/null +++ b/gcc/testsuite/rust/compile/struct_align2.rs @@ -0,0 +1,18 @@ + +fn main () { + + #[repr(align(8))] + struct Baz { + x: u16, + y: u32, + }; + + #[repr(align(4))] + struct Qux (u8, i16); + + let b = Baz { x: 5, y: 1984 }; + // { dg-warning "unused name" "" { target *-*-* } .-1 } + + let c = Qux (1, 2); + // { dg-warning "unused name" "" { target *-*-* } .-1 } +} |