aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/struct_align2.rs
blob: ac490643a360a2278089af4068f11d5fc90f90f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 }
}