[Bug rtl-optimization/42084] [4.5 Regression] Wrong result with -Os -fno-delete-null-pointer-checks
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Nov 27 13:23:00 GMT 2009
------- Comment #5 from rguenth at gcc dot gnu dot org 2009-11-27 13:22 -------
int g = 0;
static int
foo(int ui1, int ui2)
{
if (ui2 == 0)
return ui1;
else
return ui1 + ui2;
}
void func_2(long long p)
{
if ((g > p) == (g <= foo(8, (&g != 0))))
g = 1;
else
g = 2;
}
extern void abort (void);
int main(void)
{
func_2(1);
if (g != 2)
abort ();
return 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42084
More information about the Gcc-bugs
mailing list