Internal compiler error

The following simple program generates an internal compiler error with version 4 and 5 of pgf90, but seems to be compilable with other compilers.

MODULE m1
 IMPLICIT NONE
 INTEGER, PRIVATE :: lcm
!
CONTAINS
!
SUBROUTINE s1 ()
 lcm=25
END SUBROUTINE s1
!
SUBROUTINE s2 ()
 CHARACTER(LEN=lcm) :: cout
 CALL s3 ()
!
CONTAINS
!
 SUBROUTINE s3 ()
     WRITE (cout,FMT=*) 2.0
 END SUBROUTINE s3
END SUBROUTINE s2
END MODULE m1

Hi SJM,

Fortran 95 support was not added until the 5.2 release of the compilers. For prior releases, you must use Fortran 90 syntax to specifiy character array lengths. Note that this code does compile fine with release 5.2 and later.

  • Mat