blob: b3ad3625206c59bddedcd801204642df5f693ef0 [file] [log] [blame]
/* PR tree-optimization/87072 - g++6.2.0 false warning: array subscript
is above array bounds, with misleading line number
{ dg-do compile }
{ dg-options "-O3 -Wall" } */
int a[10];
void f (unsigned n)
{
for (unsigned j = 0; j < n; j++) {
for (unsigned k = 0; k < j; k++)
a[j] += k; /* { dg-bogus "\\\[-Warray-bounds]" } */
a[j] += j;
}
}