gcs bug - probably now fixed

Jeffrey A Law law@cygnus.com
Tue Dec 22 11:36:00 GMT 1998


  In message < Pine.LNX.4.04.9812221553250.8488-100000@bkmpc.bnsc.rl.ac.uk >you w
rite:
  > 
  > One of my colleagues has isolated a problem with egcs 1.0.3a (as supplied
  > with Redhat Linux 5.2) to the following trivial C segment
  > 
  > #include <stdio.h>
  > #include <math.h>
  > 
  > main(){ 
  >    double *fred[2];
  >    printf( "%g\n", pow( 1.0, 1.0 ) );
  > }
  > 
  > Problem. When compiled with any optimization (-O or higher, pow is
  > inlined) produces incorrect code and segment faults.
  > 
  > / GNU C version egcs-2.90.29 980515 (egcs-1.0.3 release) (i386-redhat-linux
  > ) compiled by GNU C version egcs-2.90.29 980515 (egcs-1.0.3 release).
  > / options passed:  -O2
  > / options enabled:  -fdefer-pop -fcse-follow-jumps -fcse-skip-blocks
  > / -fexpensive-optimizations -fthread-jumps -fstrength-reduce -fpeephole
  > / -fforce-mem -ffunction-cse -finline -fkeep-static-consts -fcaller-saves
  > / -fpcc-struct-return -frerun-cse-after-loop -frerun-loop-opt
  > / -fschedule-insns2 -fcommon -fverbose-asm -fgnu-linker -fregmove
  > / -falias-check -fargument-alias -m80387 -mhard-float -mno-soft-float
  > / -mieee-fp -mfp-ret-in-387 -mschedule-prologue -mcpu=i386 -march=pentium
  > 
  > This does APPEAR to fixed at egcs version 1.1b but I could not find a
  > specific reference in the ChangeLog and thought you should be aware of it!
This was fixed in egcs-1.1.

Sat Jun 27 16:45:42 1998  Jeffrey A Law  (law@cygnus.com)

        * flow.c (count_reg_sets): New function.
        (count_reg_sets_1, count_ref_references): Likewise.
        (recompute_reg_usage): Likewise.
        * rtl.h (recompute_reg_usage): Add prototype.
        * toplev.c (rest_of_compilation): Call recompute_reg_usage just
        before local register allocation.


jeff



More information about the Gcc-bugs mailing list