Date: Mon, 10 Aug 92 18:36:33 PRT From: "Jose M. Cerqueira Esteves" Subject: Yet another bug with long long ints... To: djgpp AT sun DOT soe DOT clarkson DOT edu 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 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: