This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/53045] Missing loop termination


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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-20 09:23:09 UTC ---
struct { double d[1]; } foo0, foo1, foo2, foo3, foo4, foo5, foo6, foo7;

int main ()
{
  struct { double d; } bar[8]
    = { 48.394, 39.3, -397.9, 3484.9, -8.394, -93.3, 7.9, 84.94 };
  int i;

  for (i = 0; i < 8; i++)
    foo0.d[i] = bar[i].d;

  return 0;
}

This is invalid source - foo0.d[1] is an out-of-bound access.  Number of
iteration analysis correctly concludes that i is in the range of [0, 0]
and optimizes away the loop exit test.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]