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/56488] [4.7 Regression] wrong code for loop at -O3


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-03-01
                 CC|                            |jakub at gcc dot gnu.org
   Target Milestone|---                         |4.7.3
            Summary|wrong code for loop at -O3  |[4.7 Regression] wrong code
                   |                            |for loop at -O3
     Ever Confirmed|0                           |1

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-01 07:59:16 UTC ---
Seems to have started with
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181172
and fixed by http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190614

Slightly cleaned up testcase:
int a, c, d = 1;
struct S { int s; } b, f;
short e;

void
foo (int x)
{
  int g[] = { };
  for (e = 0; e != 1; e = e + 5)
    {
      int *h[1] = { &g[0] };
      if (!x)
return;
      f = b;
    }
}

int
main ()
{
  int i, j;
  for (i = 0; i < 6; i++)
    for (j = 8; j; j--)
      a = 0;
  foo (d);
  while (c)
    ;
  return 0;
}


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