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]

Re: g77 snapshot LAPACK testsuite failure - irix 6.5


Billinghurst, David (RTD) wrote:

> >  Here is a simple test case.

[ Note: column 1 is supposed to be here: ]
          V
>         #################### 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

Fails identically on i686-pc-linux-gnu and succeeds on same platform
using gcc/g77-2.95.2.

Thanks for the simple test program !

-- 
Toon Moene (toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
GNU Fortran: http://gcc.gnu.org/onlinedocs/g77_news.html

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