gcc/testsuite/gcc.dg/vect/pr81136.c
raw| 1 | /* { dg-do compile } */ |
| 2 | |
| 3 | #include "tree-vect.h" |
| 4 | |
| 5 | #if VECTOR_BITS > 256 |
| 6 | #define ALIGNMENT (VECTOR_BITS / 8) |
| 7 | #else |
| 8 | #define ALIGNMENT 32 |
| 9 | #endif |
| 10 | |
| 11 | struct __attribute__((aligned (ALIGNMENT))) |
| 12 | { |
| 13 | char misaligner; |
| 14 | int foo[100]; |
| 15 | int bar[100]; |
| 16 | } *a; |
| 17 | |
| 18 | void |
| 19 | fn1 (int n) |
| 20 | { |
| 21 | int *b = a->foo; |
| 22 | for (int i = 0; i < n; i++) |
| 23 | a->bar[i] = b[i]; |
| 24 | } |
| 25 | |
| 26 | /* { dg-final { scan-tree-dump-not "Unknown misalignment" "vect" } } */ |