This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

egcs-20000511 i686-pc-linux-gnu g77 ICE with -ffast-math


The attached simplified version of saxpy.f from LAPACK-3.0 fails when 
compiled with today's snapshot, but works fine with gcc-2.95.2.  The bug 
appears to be triggered by the comparison against 0. which is done only to 
speed up that special case.

g77 version 2.96 20000511 (experimental) (from FSF-g77 version 0.5.25 
20000511 (experimental))
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.96/specs
gcc version 2.96 20000511 (experimental)
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.96/f771 test.f -quiet -dumpbase 
test.f -march=pentiumpro -O -version -fversion -ffast-math -o - |
 as -V -Qy -o test.o -
GNU F77 version 2.96 20000511 (experimental) (i686-pc-linux-gnu) compiled by 
GNU C version 2.96 20000511 (experimental).
GNU Fortran Front End version 0.5.25 20000511 (experimental)
test.f: In subroutine `saxpy':
test.f:20: Internal compiler error in `gen_reg_rtx', at emit-rtl.c:538
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
GNU assembler version 2.9.1 (i386-linux), using BFD version 2.9.1.0.21

Tim
tprince@computer.org
      subroutine saxpy(n,sa,sx,incx,sy,incy)
C
C     constant times a vector plus a vector.
C     uses unrolled loop for increments equal to one.
C     jack dongarra, linpack, 3/11/78.
C     modified 12/3/93, array(1) declarations changed to array(*)
C
      real sx(*),sy(*),sa
      integer i,incx,incy,ix,iy,m,mp1,n
C
C  -ffast-math ICE provoked by this conditional
      if(sa /= 0.0)then
C
C        code for both increments equal to 1
C
	      do i= 1,n
		sy(i)= sy(i)+sa*sx(i)
		enddo
	endif
      return
      end

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]