PR tree-optimization/86401
[official-gcc.git] / gcc / testsuite / c-c++-common / vector-subscript-7.c
blob8e8fa0c1bdc5e312dd8869e186ffccb6e7a68f34
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-fre1" } */
4 typedef int v4si __attribute__ ((vector_size (16)));
6 int
7 main (int argc, char** argv)
9 int i = 2;
10 int j = ((v4si){0, 1, 2, 3})[i];
11 return ((v4si){1, 2, 42, 0})[j];
14 /* { dg-final { scan-tree-dump "return 42;" "fre1" } } */