The following program might be invalid as all compilers I tried (gfortran, g95,
ifort, NAG f95, ifort) reject it with:
IMPORT-name must be the name of an entity in the host scoping unit
Error: 't' name in IMPORT statement does not exist in a host program unit
Error: Cannot IMPORT 't' from host scoping unit at (1) - does not exist.
Cannot IMPORT T from host M - it does not exist
But I could not find anything in the standard which prohibits it (PLEASE
CHECK).
This is especially useful if one wants to use
PROCEDURE(name_of_module_procedure) :: dummy_var_in_interface
Example:
module m
implicit none
interface
subroutine ddd(b)
import :: t
type(t) :: b
end subroutine
end interface
type t
integer :: x
end type t
end module m
--
Summary: Cannot IMPORT symbols later defined in the module
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=33180