PR tree-optimization/83369 - Missing diagnostics during inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / Warray-bounds-12.c
blobef26c6596bf575efbca0cce3654cd941bfc7a1b8
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -Warray-bounds" } */
3 /* { dg-additional-options "-mssse3" { target x86_64-*-* i?86-*-* } } */
5 void foo(short a[], short m)
7 int i, j;
8 int f1[10];
9 short nc;
11 nc = m + 1;
12 if (nc > 3)
14 for (i = 0; i <= nc; i++)
16 f1[i] = f1[i] + 1;
20 for (i = 0, j = m; i < nc; i++, j--)
22 a[i] = f1[i]; /* { dg-bogus "above array bounds" } */
23 a[j] = i;
25 return;