g77 snapshot LAPACK testsuite failure - irix 6.5

Billinghurst, David (RTD) David.Billinghurst@riotinto.com.au
Tue Feb 22 22:13:00 GMT 2000


> -----Original Message-----
> From:	Billinghurst, David (RTD) [SMTP:David.Billinghurst@riotinto.com.au]
> Sent:	Friday, 18 February 2000 17:25
> To:	'gcc-bugs@gcc.gnu.org'
> Subject:	g77 snapshot LAPACK testsuite failure - irix 6.5
> 
> I have been seeing mysterious failures in the LAPACK-3.0 testsuite failure
> 
> using g77 snapshots on irix6.5.since late October or early November.
> 
> g77 from the 19991004 snapshot was the first (and last) snapshot to pass 
> the LAPACK-3.0 testsuite.  The next couple of snapshots wouldn't build on 
> irix, and all subsequent ones have failed
> 
> I have been able to narrow the problem down to one or two fortran files.
> A binary search on the input files usually finds one or two that, 
> when compiled with g77 from 2.95.2, eliminate the errors.
> Unfortunately:
> *	it isn't always the same file - varies from snapshot to snapshot
> *	if I try to produce a test case the problem evaporates
> I suspect that the routines are clobbering a register, the stack or memory
> used elsewhere.
> 
> Anyway, the attached file from LAPACK 3.0:
> *	is correct with 2.95.2 with -O0, -O1, -O2, -O3 and -O3
> -funroll-loops
> *	is wrong with egcs-20000214 with all of the above flags
> 
> +++++++++++++++++++++++++++++++++++++++++
> (Mr) David Billinghurst
> Comalco Research Centre
> PO Box 316, Thomastown, Vic, Australia, 3074
> Phone:	+61 3 9469 0642
> FAX:	+61 3 9462 2700
> Email:	David.Billinghurst@riotinto.com.au
> 
> 
>   [Billinghurst, David (RTD)]  Here is a simple test case.
	#################### labug4.f #########################
	        program labug4

	*  This program gives the wrong answer on mips-sgi-irix6.5
	*  when compiled with g77 from egcs-20000221
	*  Get w(37) = 37.0 when it should be 41.0
	*
	*  Works with 
	*    - g77 from gcc-2.95.2
	*    - Irix MipsPro Fortran 77 7.2.1
	*
	*  Derived from LAPACK 3.0 test suite failure.
	*
	*  David Billinghurst, (David.Billinghurst@riotinto.com.au)
	*  23 February 2000
	* 
	      implicit none
	      integer n, i
	      parameter( n = 20 )
	      real w(4*n)

	      do i = 1, 4*N
	         w(i) = i
	      end do
	      CALL SLASQx( N, W ) 
	      if ( abs((w(37)-41.0)) .gt. 1.0e-6 ) then
	         write(6,*) 'W(37) = ', W(37), ' but should be 41.0'
	         call abort()
	      end if
	      end

	      SUBROUTINE SLASQx( N, Z )
	      INTEGER            N
	      REAL               Z( 4*N )
	      INTEGER            I0, I4, IPN4, K
	      REAL               TEMP
	      I0 = 1
	      IPN4 = 4*( 1+N )
	      DO 40 I4 = 4*I0, 2*( I0+N-1 ), 4
	         TEMP = Z( I4-3 )
	         Z( I4-3 ) = Z( IPN4-I4-3 )
	         Z( IPN4-I4-3 ) = TEMP
	         TEMP = Z( I4-1 )
	         Z( I4-1 ) = Z( IPN4-I4-5 )
	         Z( IPN4-I4-5 ) = TEMP
	   40 CONTINUE
	      RETURN
	      END
>    


More information about the Gcc-bugs mailing list