Mail Archives: djgpp/1992/08/11/19:03:10
Greetings
When the following program is compiled without optimization, no errors
are reported (and the resulting program runs well); but, if one of the
options "-O" or "-O2" is used, GCC (cc1, in fact) crashes, saying
Exception 117 at eip=b2565
This does not happen when the instruction "dd &= 0x7FFFFFFFFFFFFFFFLL"
is removed.
Is it possible that this is a DJGPP-specific error, or should I report
this to the mailing list concerned with GCC bugs?
---------------------------------------------------------------------
#include <stdio.h>
long long int aa,bb,dd;
long int i,j;
void
main ()
{
scanf ("%li %li", &i, &j);
aa = (long long int) i;
bb = (long long int) j;
dd = aa*bb;
dd &= 0x7FFFFFFFFFFFFFFFLL; /* <--- This reveals a bug with -O */
i = *(long int *) ⅆ
j = *(((long int *) &dd)+1);
printf ("%li %li\n", i, j);
}
---------------------------------------------------------------------
I am using DJGPP 1.07 on a 486, under MS-DOS 5.00.
Jos\'e Esteves
Acknowledge-To: <FESTEVES AT PTEARN>
- Raw text -