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