[Bug tree-optimization/34099] [4.3 Regression] optimizer problem

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Nov 15 17:10:00 GMT 2007



------- Comment #12 from rguenth at gcc dot gnu dot org  2007-11-15 17:10 -------
Trivial testcase we get wrong with the current scheme:

int foo (int b, int c)
{
  int x;
  if (b)
    return x & c;
  else
    return 1;
}
extern void abort (void);
int main()
{
  if (foo(1, 0) != 0)
    abort ();
  return 0;
}

because we say that x & c is UNDEFINED (and so ignore its value in the
otherwise CONSTANT PHI).


-- 


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



More information about the Gcc-bugs mailing list