This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: new gcc bug
- From: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
- To: Paul dot Zimmermann at loria dot fr (Paul Zimmermann)
- Cc: gcc-bugs at gcc dot gnu dot org, Vincent dot Lefevre at loria dot fr, tege at swox dot com
- Date: 23 Jun 2003 18:09:23 +0200
- Subject: Re: new gcc bug
- References: <200306231408.QAA07441@leibniz.loria.fr>
Paul.Zimmermann@loria.fr (Paul Zimmermann) writes:
int main() {
unsigned long c = 70423129, q;
q = (~((unsigned long) 0)) / c;
printf ("q=%lu\n", q);
}
> gcc version 3.2 20020329 (experimental)
> Given output:
> bash-2.04$ ./a.out
> q=4243519447
>
> Expected output:
> bash-2.04$ cc bug.c; ./a.out
> q=60
I cannot reproduce this on ia64-linux with gcc 3.2.3 (or any other
release). Note that the correct result is 261941557207, not 60, since
long has 64 bit on ia64.
Please try to reproduce this bug with our current release (3.3). If it
is still there, please enter it into our database at
http://gcc.gnu.org/bugzilla/.
Falk