This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/43360] possible wrong code bug
- From: "mikpe at it dot uu dot se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Mar 2010 09:08:46 -0000
- Subject: [Bug c/43360] possible wrong code bug
- References: <bug-43360-12544@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from mikpe at it dot uu dot se 2010-03-14 09:08 -------
Confirmed current 4.4 is affected too, -01 works -O2 fails. Reduced test case:
int l_5_5_2 = 4;
int g_3[1][1];
void func_1 (void)
{
for (g_3[0][0] = 1; g_3[0][0] < 8; g_3[0][0] += 7) {
int *l_6 = &g_3[0][0];
*l_6 = l_5_5_2;
}
}
int main (void)
{
func_1 ();
if (g_3[0][0] != 11)
__builtin_abort ();
return 0;
}
--
mikpe at it dot uu dot se changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikpe at it dot uu dot se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43360