Debian Codegraph @

gcc/testsuite/gcc.dg/pr111683-1.c

raw
1 /* PR middle-end/111683 */
2 /* { dg-do run } */
3 /* { dg-options "-O2" } */
4
5 long long b[6] = { 3, 4, 5, 6, 7, 8 }, c[16];
6 long long d[9] = { 3, 7, 12, 18, 22, 26, 21, 15, 8 };
7 typedef long long U __attribute__ ((vector_size(16), may_alias, aligned(1)));
8 typedef long long V __attribute__ ((vector_size(16), may_alias));
9
10 int
11 main ()
12 {
13 for (int f = 0; f < 6; f++)
14 {
15 *(U *) &c[f] = *(U *) &c[f] + (V) { b[f], b[f] };
16 *(U *) &c[f + 2] = *(U *) &c[f + 2] + (V) { b[f], b[f] };
17 }
18 for (int f = 0; f < 9; f++)
19 if (c[f] != d[f])
20 __builtin_abort ();
21 return 0;
22 }