2 /* { dg-do compile } */
3 /* { dg-options "-O0" } */
4 /* { dg-skip-if "" { avr-*-* } } */
6 typedef unsigned long long __u64
7 __attribute__((aligned(4),warn_if_not_aligned(8)));
14 __u64 x
; /* { dg-warning "'x' offset 12 in 'struct foo1' isn't aligned to 8" } */
15 }; /* { dg-warning "alignment 4 of 'struct foo1' is less than 8" } */
22 __u64 x
; /* { dg-warning "'x' offset 12 in 'struct foo2' isn't aligned to 8" } */
23 } __attribute__((aligned(8)));
30 }; /* { dg-warning "alignment 4 of 'struct foo3' is less than 8" } */
37 } __attribute__((aligned(8)));
42 int x
__attribute__((warn_if_not_aligned(16))); /* { dg-warning "'x' offset 4 in 'struct foo5' isn't aligned to 16" } */
43 }; /* { dg-warning "alignment 4 of 'struct foo5' is less than 16" } */
48 int x
__attribute__((warn_if_not_aligned(16))); /* { dg-warning "'x' offset 4 in 'struct foo6' isn't aligned to 16" } */
49 } __attribute__((aligned(16)));
57 int x
__attribute__((warn_if_not_aligned(16)));
58 } __attribute__((aligned(16)));
64 }; /* { dg-warning "alignment 4 of 'union bar1' is less than 8" } */
70 } __attribute__((aligned(8)));
75 int x
__attribute__((warn_if_not_aligned(16)));
76 }; /* { dg-warning "alignment 4 of 'union bar3' is less than 16" } */
81 int x
__attribute__((warn_if_not_aligned(16)));
82 } __attribute__((aligned(16)));