* cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
[official-gcc.git] / gcc / testsuite / gcc.dg / pr53037-1.c
blob93af0a50cd4735bc5a111806b0892daa3e6874d3
1 /* PR c/53037. */
2 /* { dg-do compile } */
3 /* { dg-options "-O0" } */
5 typedef unsigned long long __u64
6 __attribute__((aligned(4),warn_if_not_aligned(8)));
8 struct foo1
10 int i1;
11 int i2;
12 int i3;
13 __u64 x; /* { dg-warning "'x' offset 12 in 'struct foo1' isn't aligned to 8" } */
14 }; /* { dg-warning "alignment 4 of 'struct foo1' is less than 8" } */
16 struct foo2
18 int i1;
19 int i2;
20 int i3;
21 __u64 x; /* { dg-warning "'x' offset 12 in 'struct foo2' isn't aligned to 8" } */
22 } __attribute__((aligned(8)));
24 struct foo3
26 int i1;
27 int i3;
28 __u64 x;
29 }; /* { dg-warning "alignment 4 of 'struct foo3' is less than 8" } */
31 struct foo4
33 int i1;
34 int i2;
35 __u64 x;
36 } __attribute__((aligned(8)));
38 struct foo5
40 int i1;
41 int x __attribute__((warn_if_not_aligned(16))); /* { dg-warning "'x' offset 4 in 'struct foo5' isn't aligned to 16" } */
42 }; /* { dg-warning "alignment 4 of 'struct foo5' is less than 16" } */
44 struct foo6
46 int i1;
47 int x __attribute__((warn_if_not_aligned(16))); /* { dg-warning "'x' offset 4 in 'struct foo6' isn't aligned to 16" } */
48 } __attribute__((aligned(16)));
50 struct foo7
52 int i1;
53 int i2;
54 int i3;
55 int i4;
56 int x __attribute__((warn_if_not_aligned(16)));
57 } __attribute__((aligned(16)));
59 union bar1
61 int i1;
62 __u64 x;
63 }; /* { dg-warning "alignment 4 of 'union bar1' is less than 8" } */
65 union bar2
67 int i1;
68 __u64 x;
69 } __attribute__((aligned(8)));
71 union bar3
73 int i1;
74 int x __attribute__((warn_if_not_aligned(16)));
75 }; /* { dg-warning "alignment 4 of 'union bar3' is less than 16" } */
77 union bar4
79 int i1;
80 int x __attribute__((warn_if_not_aligned(16)));
81 } __attribute__((aligned(16)));