PR tree-optimization/67955
[official-gcc.git] / gcc / testsuite / c-c++-common / vector-subscript-3.c
blob22cd089adee47736824abfda7c1d05205a236d15
1 /* Check the case when index is out of bound */
2 /* { dg-do compile } */
3 /* { dg-options "-Warray-bounds" } */
5 #define vector __attribute__((vector_size(16) ))
8 int test0(void)
10 vector int a;
11 return a[10]; /* { dg-warning "index value is out of bound" } */
14 int test1(void)
16 vector int a;
17 return a[-1]; /* { dg-warning "index value is out of bound" } */