This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/33434] [4.3 Regression] -fipa-cp miscompilation
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Oct 2007 00:05:28 -0000
- Subject: [Bug tree-optimization/33434] [4.3 Regression] -fipa-cp miscompilation
- References: <bug-33434-7958@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from pinskia at gcc dot gnu dot org 2007-10-20 00:05 -------
(In reply to comment #3)
> A regression hunt on powerpc-linux identified this patch:
HEHEHEHEHEHEHE. Seriously this is funny.
Anyways try changing the code to be (which will not invoke my removal of the
"optimization"):
/* { dg-do run } */
/* { dg-options "-O3 -fipa-cp" } */
int k;
void f1 (int a, int b)
{
if (a)
{
int c = b--;
while (c)
k = 1;
}
else
if (b != 1)
__builtin_abort ();
}
int main (void)
{
f1 (1, 1);
if (k != 1)
__builtin_abort ();
return 0;
}
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |janis at gcc dot gnu dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-10-20 00:05:28
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33434