This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/41497] apparent integer wrong code bug
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Sep 2009 07:23:13 -0000
- Subject: [Bug c/41497] apparent integer wrong code bug
- References: <bug-41497-12544@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from jakub at gcc dot gnu dot org 2009-09-29 07:23 -------
Fails on x86_64-linux too, the bug first appears in sccp.
extern void abort (void);
static unsigned short
bar (unsigned short x, unsigned short y)
{
return x + y;
}
unsigned int a;
unsigned char b, c;
void
foo (void)
{
for (b = 0; b <= 0; b = 1)
for (a = -13; a == 0; a = bar (a, 0))
c = 1;
}
int
main ()
{
foo ();
if (a != -13)
abort ();
return 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41497