1 /* PR tree-optimization/87072 - g++6.2.0 false warning: array subscript 2 is above array bounds, with misleading line number 3 { dg-do compile } 4 { dg-options "-O3 -Wall" } */ 5 6 int a[10]; 7 f(unsigned n)8void f (unsigned n) 9 { 10 for (unsigned j = 0; j < n; j++) { 11 for (unsigned k = 0; k < j; k++) 12 a[j] += k; /* { dg-bogus "\\\[-Warray-bounds]" } */ 13 a[j] += j; 14 } 15 } 16