[Bug tree-optimization/18241] [4.0 Regression] linux kernel loop gets miscompiled
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Jan 3 22:41:00 GMT 2005
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-03 22:41 -------
Here is the most reduced testcase:
void abort (void);
int f(int i1243)
{
int i[2], *i1 = i;
i[0] = 1;
volatile int *i2 = i1;
i2[1] = 1;
i1243 = 0;
return i2[1]+i2[0];
}
int main(void)
{
if( f(100) != 2)
abort ();
return 0;
}
Notice we remove i[0] = 1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18241
More information about the Gcc-bugs
mailing list