This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/12654] New: Incorrect comparison code generated for Alpha
- From: "tg at swox dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Oct 2003 02:08:03 -0000
- Subject: [Bug c/12654] New: Incorrect comparison code generated for Alpha
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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);
}