This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/12654] New: Incorrect comparison code generated for Alpha


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);
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]