Merge branches/gcc-4_8-branch rev 216856
[official-gcc.git] / gcc-4_8-branch / gcc / testsuite / gcc.dg / vect / pr63341-2.c
blob4e7d2bb1f5a1697eb8fe9fffc80b2cca8cd8c20e
1 /* PR tree-optimization/63341 */
2 /* { dg-do run } */
4 #include "tree-vect.h"
6 typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
7 struct S { char e __attribute__((aligned (64))); U s[32]; };
8 struct S t = {0, {{0x5010}, {0x5111}, {0x5212}, {0x5313}, {0x5414}, {0x5515}, {0x5616}, {0x5717},
9 {0x5818}, {0x5919}, {0x5a1a}, {0x5b1b}, {0x5c1c}, {0x5d1d}, {0x5e1e}, {0x5f1f},
10 {0x6020}, {0x6121}, {0x6222}, {0x6323}, {0x6424}, {0x6525}, {0x6626}, {0x6727},
11 {0x6828}, {0x6929}, {0x6a2a}, {0x6b2b}, {0x6c2c}, {0x6d2d}, {0x6e2e}, {0x6f2f}}};
12 unsigned short d[32] = { 1 };
14 __attribute__((noinline, noclone)) void
15 foo ()
17 int i;
18 for (i = 0; i < 32; i++)
19 d[i] = t.s[i].s + 4;
20 for (i = 0; i < 32; i++)
21 if (d[i] != t.s[i].s + 4)
22 abort ();
23 else
24 asm volatile ("" : : : "memory");
27 int
28 main ()
30 check_vect ();
31 foo ();
32 return 0;
35 /* { dg-final { cleanup-tree-dump "vect" } } */