PR tree-optimization/84740
[official-gcc.git] / gcc / testsuite / gcc.dg / pr83844.c
blob0d26b555669fba0a5e320592d06211d3db280d52
1 /* PR c/83844 */
2 /* { dg-do compile { target int32plus } } */
3 /* { dg-options "-O0 -Wall" } */
4 /* { dg-require-effective-target alloca } */
6 typedef unsigned long long __u64 __attribute__((aligned(4),warn_if_not_aligned(8)));
7 void bar (void *, void *, void *);
9 void
10 foo (int n)
12 struct A
14 int i1;
15 int i2;
16 int i3[n];
17 __u64 x; /* { dg-warning "in 'struct A' may not be aligned to 8" } */
18 } __attribute__((aligned (8)));
19 struct B
21 int i1;
22 int i2;
23 long long i3[n];
24 __u64 x;
25 } __attribute__((aligned (8)));
26 struct C
28 int i1;
29 int i2;
30 int i3[2 * n];
31 __u64 x;
32 } __attribute__((aligned (8)));
33 struct A a;
34 struct B b;
35 struct C c;
36 bar (&a, &b, &c);