LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / pr53037-1.c
blobce0715c32e4475679bf25538c87531c7facd0ee1
1 /* PR c/53037. */
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)));
9 struct foo1
11 int i1;
12 int i2;
13 int i3;
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" } */
17 struct foo2
19 int i1;
20 int i2;
21 int i3;
22 __u64 x; /* { dg-warning "'x' offset 12 in 'struct foo2' isn't aligned to 8" } */
23 } __attribute__((aligned(8)));
25 struct foo3
27 int i1;
28 int i3;
29 __u64 x;
30 }; /* { dg-warning "alignment 4 of 'struct foo3' is less than 8" } */
32 struct foo4
34 int i1;
35 int i2;
36 __u64 x;
37 } __attribute__((aligned(8)));
39 struct foo5
41 int i1;
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" } */
45 struct foo6
47 int i1;
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)));
51 struct foo7
53 int i1;
54 int i2;
55 int i3;
56 int i4;
57 int x __attribute__((warn_if_not_aligned(16)));
58 } __attribute__((aligned(16)));
60 union bar1
62 int i1;
63 __u64 x;
64 }; /* { dg-warning "alignment 4 of 'union bar1' is less than 8" } */
66 union bar2
68 int i1;
69 __u64 x;
70 } __attribute__((aligned(8)));
72 union bar3
74 int i1;
75 int x __attribute__((warn_if_not_aligned(16)));
76 }; /* { dg-warning "alignment 4 of 'union bar3' is less than 16" } */
78 union bar4
80 int i1;
81 int x __attribute__((warn_if_not_aligned(16)));
82 } __attribute__((aligned(16)));