[Bug c/12654] New: Incorrect comparison code generated for Alpha
tg at swox dot com
gcc-bugzilla@gcc.gnu.org
Fri Oct 17 02:08:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12654
Summary: Incorrect comparison code generated for Alpha
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tg at swox dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: alpha-unknown-freebsd4.5
GCC host triplet: alpha-unknown-freebsd4.5
GCC target triplet: alpha-unknown-freebsd4.5
No particular compiler options are needed. Somebody hacking gcc these days
have some serious problems with understanding two's complement arithmetic...!
Test case:
foo (long x)
{
if (x >= 1024)
abort ();
}
main ()
{
foo (~((unsigned long) (~0L) >> 1));
foo (~((unsigned long) (~0L) >> 1) + 10000);
exit (0);
}
More information about the Gcc-bugs
mailing list