This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/34099] [4.3 Regression] optimizer problem
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Nov 2007 17:10:20 -0000
- Subject: [Bug tree-optimization/34099] [4.3 Regression] optimizer problem
- References: <bug-34099-3137@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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