[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#130394: [ARM] gcc misunhandle % with unsigned long operands



Package: gcc
Version: 1:2.95.2-13.1
Severity: normal

Hello,
The following program is miscompiled by gcc on debussy.debian.org :

---
typedef unsigned long ulong;
main()
{
        ulong x=3221225472UL;
        ulong y=2UL;
        printf("x%y=%lu\n",(ulong)(x%y));
}
---

./a.out
x%y=1073741824
instead of 
x%y=0

Please read the thread at
<http://lists.debian.org/debian-arm/2001/debian-arm-200105/msg00055.html>
for more information.

Since the pari-gp package make extensive use of unsigned long ops,
it cause serious runtime bugs.

Thanks for your attention,

Bill. <ballombe@debian.org>


-- System Information
(please see debussy.debian.org and rameau.debian.org, they are down currently
so I cant say much. I have previously  try to report it in debussy/unstable
chroot but the email never get out of it.)



Reply to: