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]
Other format: [Raw text]

[Bug fortran/19551] New: LAPACK routine claic1.f bug


I have a reduced test case for LAPACK CLS Drivers testsuite failures with 
gfortran.  See PR 5900 for background.  The following assumes some knowledge 
of the LAPACK testsuite

Step 1 was to reduce the ctest.in input file for the xlintstc test routine 
(below).

I then identified a point where the g77-3.4 and gfortran results diverged.  
The problem is in routine CLAIC1, which is called by CGELSX and CGELSY, and 
occurs at line 285 of claic1.f, which is

    TMP = SQRT( SINE*CONJG( SINE )+COSINE*CONJG( COSINE ) )

The reduced testcase below:
 o passes with g77-3.4 on cygwin and irix
 o fails with gfortran-20050120 on cygwin

################ test case ##########
      program claic1_bug
      real  x, correct
      parameter(correct=2.30457878)
      call  claic1(x)
      if ( abs(x-correct) .gt. 1.0e-4 ) then
         write(6,*) 'x = ', x,' expected ',correct
         call abort
      end if
      end

      subroutine claic1( tmp )
      implicit none
      real      tmp
      complex   cosine, sine
      sine = cmplx(0.2331063,-0.488660812)
      cosine = cmplx(2.2400794,0.)
      tmp = sqrt( sine*conjg( sine )+cosine*conjg( cosine ) )
      end

############## reduced input file for xlintstc ###################
Data file for testing COMPLEX LAPACK linear equation routines
1                      Number of values of M
3                      Values of M (row dimension)
1                      Number of values of N
3                      Values of N (column dimension)
1                      Number of values of NRHS
1                      Values of NRHS (number of right hand sides)
1                      Number of values of NB
1                      Values of NB (the blocksize)
1                      Values of NX (crossover point)
30.0                   Threshold value of test ratio
T                      Put T to test the LAPACK routines
T                      Put T to test the driver routines
F                      Put T to test the error exits
CLS    1               List types on next line if 0 < NTYPES <  6
1
CEQ

-- 
           Summary: LAPACK routine claic1.f bug
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: billingd at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin
OtherBugsDependingO 5900
             nThis:


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19551


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