import statement question
Christopher D. Rickett
crickett@lanl.gov
Wed Feb 21 05:00:00 GMT 2007
hi all,
is the following code valid:
module test_import
implicit none
type :: my_type
integer :: data
end type my_type
interface
integer function func1(param)
import :: my_type
type(my_type) :: param
end function func1
integer function func2(param)
import :: my_type
type(my_type), value :: param
end function func2
end interface
end module test_import
gfortran reports the following error:
test_import.f03:9.33:
integer function func1(param)
1
test_import.f03:4.17:
type :: my_type
2
Error: The type my_type cannot be host associated at (1) because it is
blocked by an incompatible object of the same name at (2)
if i remove either of the functions, the code compiles fine. i'm using
the gfortran from the fortran-experiments branch.
thanks.
Chris
More information about the Fortran
mailing list