https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79956
--- Comment #5 from rguenther at suse dot de <rguenther at suse dot de> --- On Wed, 8 Mar 2017, trippels at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79956 > > --- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- > Testcase that only warns with -O3 It also warns with -O1 and -Os (but not -O2). At -O2 the function is optimized to just fn1 () { int n; int d[1]; <bb 2> [0.01%]: c = 1; <bb 3> [100.00%]: goto <bb 3>; [100.00%] } at -O3 we have peeled one iteration and are left with fn1 () { int n; int d[1]; int b.1_1; int _2; <bb 2> [0.01%]: n_4 = a; c = 1; _2 = d[0]; b.1_1 = b; goto <bb 4>; [100.00%] ... (similar to above) Note the testcase doesnt' capture the specific case of a bogus warning as it is in parity_l8.