[Bug tree-optimization/37102] [4.3/4.4 Regression] possible integer codegen bug

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Aug 13 09:55:00 GMT 2008



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-08-13 09:54 -------
Testcase failing with -O3 but not with -O3 -fno-unswitch-loops:

extern void abort (void);

unsigned int g_24;
unsigned int g_37 = 1;
unsigned int g_225 = 0;

void __attribute__((noinline)) foo (int x)
{
  if (x != 5)
    abort ();
}

int main ()
{
  unsigned int l_289;
  for (l_289 = 1; l_289 < 5; l_289 += 1) {
      if (g_225) {
          g_24 = g_37;
      }
  }
  g_24 = g_37;
  unsigned int context = g_24 << 1;
  do {
      if (context)
        context = (context << 1) ^ 1;
  } while (0);
  foo (context);
  return 0;
}


-- 


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



More information about the Gcc-bugs mailing list