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:18:51 -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 #5 from pinskia at gcc dot gnu dot org 2007-10-20 00:18 -------
Try this one:
/* { dg-do run } */
/* { dg-options "-O3 -fipa-cp" } */
int k;
void f1 (int a, int b)
{
if (a)
{
int c;
goto d;
do {
k = 1;
d:
c = b--;
}while (c);
}
else
if (b != 1)
__builtin_abort ();
}
int main (void)
{
f1 (1, 1);
if (k != 1)
__builtin_abort ();
return 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33434