| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-require-effective-target section_anchors } */ |
| 3 |
/* { dg-require-effective-target vect_int } */ |
| 4 |
|
| 5 |
/* Should not increase alignment of the struct because |
| 6 |
sizeof (A.e) < sizeof(corresponding vector type). */ |
| 7 |
|
| 8 |
#define N 3 |
| 9 |
|
| 10 |
static struct A { |
| 11 |
int p1, p2; |
| 12 |
int e[N]; |
| 13 |
} a, b, c; |
| 14 |
|
| 15 |
int foo(void) |
| 16 |
{ |
| 17 |
for (int i = 0; i < N; i++) |
| 18 |
a.e[i] = b.e[i] + c.e[i]; |
| 19 |
|
| 20 |
return a.e[0]; |
| 21 |
} |
| 22 |
|
| 23 |
/* { dg-final { scan-ipa-dump-times "Increasing alignment of decl" 0 "increase_alignment" { target aarch64*-*-* } } } */ |
| 24 |
/* { dg-final { scan-ipa-dump-times "Increasing alignment of decl" 0 "increase_alignment" { target powerpc64*-*-* } } } */ |
| 25 |
/* { dg-final { scan-ipa-dump-times "Increasing alignment of decl" 0 "increase_alignment" { target arm*-*-* } } } */ |