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/34099] [4.3 Regression] optimizer problem



------- 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


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