[Bug fortran/31540] New: [Regression 4.2, 4.3] character((constant expression)) for external function

burnus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Apr 11 18:38:00 GMT 2007


As reported by Mike Kumbera in
http://gcc.gnu.org/ml/fortran/2007-04/msg00116.html

gfortran 4.2 and 4.3 chokes on:
  external pfname
  character ((136)) pfname
with the the error message:
  Automatic character length function 'pfname' at (1) must have an explicit
interface

Using "character(136) pfname" works.

This works with gfortran 4.1.2 and g77 and with all other compilers tested.

Example by Mike Kumbera:
----------------------------
        subroutine pfb()
        implicit none
        external pfname
!       Fails on gfortran 4.3 & 4.2 with 
!       Error: Automatic character length function 'pfname' at (1) must have an
explicit interface
        character ((136)) pfname
!       character ((129+7)) pfname

!       Works for both 4.2 and 4.3
!       character (136) pfname
        return
        end


-- 
           Summary: [Regression 4.2, 4.3] character((constant expression))
                    for external function
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list