The following code (cut down from BLAS routine dspr.f)
causes an internal compiler error as shown.

      SUBROUTINE DSPR  ( N, X, INCX, AP )
*     .. Scalar Arguments ..
      INTEGER            INCX, N
*     .. Array Arguments ..
      DOUBLE PRECISION   AP( * ), X( * )
*     .. Local Scalars ..
      INTEGER            IX, J, JX, K
*     .. Executable Statements ..
      JX = 1
      IF( INCX.NE.1 )THEN
         DO 80, J = 1, N
            IX = JX
            DO 70, K = 1, N
               AP( K ) = X( IX )
               IX = IX + INCX
  70        CONTINUE
            JX = JX + INCX
  80     CONTINUE
      END IF
      RETURN
      END

when compiled with optimization level -O2 or higher.
This is on a 64-bit AMD64 machine running SuSE Linux 9.3 Professional.

% gfortran --version
GNU Fortran 95 (GCC 4.1.0 20050706 (experimental))
Copyright (C) 2005 Free Software Foundation, Inc.

% gfortran -O2 -c bug.f
bug.f: In function ‘dspr’:
bug.f:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

-- 
           Summary: Internal compiler error compiling BLAS routine dspr.f
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mick at nag dot co dot uk
                CC: gcc-bugs at gcc dot gnu dot org


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

Reply via email to