brooks@MADDOG.LLNL.GOV (Eugene Brooks) (03/11/89)
The following C program failes when compiled with gcc -O on the Alliant. The version was 1.34 and no modifications were made with the release. Removing the -O option produces good code. Further attempts to simplify the automatic declarations cause the code to generate a bad operand of a type reported with another bug hitter.
brooks@MADDOG.LLNL.GOV (Eugene Brooks) (03/11/89)
Gee, it must be getting late! I forgot the but hitter program. gcc -O on this source file, for GCC 1.34 on the Alliant, will fail the floating point test and print the FAILED message. Further attemst to isolate the bug turn it into a "Invalid operand" producer, reported in an earlier bug message. /*--------------------------------------------------------------------*/ main() /***** BEGINNING OF MAIN. *****/ { char c = 'Y', cc = '\131', *ccc = "Y", cccc = 1*2 / 2 + 2 - 1; char ctemp, bn='\n', br='\r', bt='\t', bb='\b', bf='\f', bbs='\\', bq='\''; int ioct=0131, ihex=0x59, idec=17711, itemp; float z=17711.6, zz=.177116e5, ztemp; double zd=17711.6, zzd=.177116e5, zzzd; short int s=89; long int l=17711L,ll; foo(); /*--------------------------------------------------------------------*/ zzzd = zd / c; if (zzzd <= 199 || zzzd >= 200) { printf("Expected value between 199 and 200, got %f\n",zzzd); printf("BUT THE TEST FAILED\n"); } else { printf("PASSED\n"); } } /******** END OF MAIN. ********/ /*--------------------------------------------------------------------*/ /*<<<<<FUNCTIONS GO HERE<<<<<<*/ foo() { }