BUG: g77 -O -march=pentiumpro, once again
Toon Moene
toon@moene.indiv.nluug.nl
Fri Feb 20 05:20:00 GMT 1998
> I can provide a much smaller test programm for the bug,
> Jason found: (it's from slaein.f) gcc -O
> -march=pentiumpro -c h.f
SUBROUTINE SLAEIN(N,VR, VI,EPS3)
IMPLICIT NONE
INTEGER N
REAL VR(*),VI(*),EPS3,ROOTN,NORM,NRMSML,REC
REAL SNRM2,SLAPY2
EXTERNAL SNRM2,SLAPY2
NORM = SLAPY2( SNRM2( N, VR, 1 ), SNRM2( N, VI, 1 ) )
REC = ( EPS3*ROOTN ) / MAX( NORM, NRMSML )
CALL SSCAL( N, REC, VR, 1 )
RETURN
END
If the error doesn't occur with just the -O flag it might be
related to the handling of conditional moves (isn't it so that
-march=pentiumpro enables their use ?)
Note that there is a MAX function in the code (4th line from below)
that might lead g77/gcc into generating a (floating point)
conditional move.
However, I don't have access to a Pentium Pro (or Pentium II, they
are architecturally the same) to test this - Craig, how's your Dell
?
Cheers,
Toon.
More information about the Gcc-bugs
mailing list