Hi,

there is a problem with the scope of (at least) "implicit none"
in gfortran.  It falsely extends into interface definitions.
The following is a minimal legal example related to a discussion
I started on comp.lang.fortran today:

program gfcbug25
  implicit none
  interface
     subroutine foo (i)
     end subroutine foo
  end interface
end program gfcbug25

gfortran fails to compile this legal and correct code with
this error message:

% gfortran gfcbug25.f90
 In file gfcbug25.f90:4

     subroutine foo (i)
                     1
Error: Symbol 'i' at (1) has no IMPLICIT type
 In file gfcbug25.f90:4

     subroutine foo (i)
                     1
Error: Symbol 'i' at (1) has no IMPLICIT type


Note that "implicit none" must not extend into the interface,
thus the code is legal!

Cheers,
-ha

-- 
           Summary: fortran: scoping of implicit none & interfaces
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: anlauf at hep dot tu-darmstadt dot de
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


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

Reply via email to