This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/29868] New: Incorrect code generated for comparison
- From: "michael dot chapman at cortus dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Nov 2006 11:22:55 -0000
- Subject: [Bug c/29868] New: Incorrect code generated for comparison
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Incorrect code is generated for the following program which I believe should
finish with "return 0" and not abort.
This was compiled with
gcc test.c
(no options).
I believe this bug is also present in gcc 4.0.3
int f(int x) __attribute__((noinline));
int f(int x)
{
if (x < 0)
abort();
}
int main(void)
{
int x;
for (x = 0; x < 0x7fffffff; x += 0x10000001)
f(x);
return 0;
}
--
Summary: Incorrect code generated for comparison
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: michael dot chapman at cortus dot com
GCC host triplet: i386-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29868