[Bug tree-optimization/53265] Warn when undefined behavior implies smaller iteration count

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Mar 12 12:41:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53265

--- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-12 12:40:54 UTC ---
On:
int a[18];

void
foo (void)
{
  int i;
  for (i = 16; i < 32; i++)
    a[i] = 26;
}
distilled from unwind-dw2.c, I'm just surprised that at -O2
the http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53265#c15
debugging hack reports that we are in some cases increasing the number of
iterations from 2 to 16, but later on from 1 to 15?  Have we peeled one
iteration or what happened?



More information about the Gcc-bugs mailing list