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]

Re: new gcc bug


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


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