gfortran reports the following error:
call create()
1
Error: Generic subroutine 'create' at (1) is not an intrinsic subroutine
when trying to compile the following code:
module A
private
interface create
module procedure create1
end interface
public :: create
contains
subroutine create1
end subroutine
end module
module B
private
interface create
module procedure create1
end interface
public :: create
contains
subroutine create1(a)
integer a
end subroutine
end module
module C
use A
private
contains
subroutine useCreate
use B
call create()
end subroutine
end module
The call to the overloaded routine 'create' should be resolved to create1 in
module A, but an error results. This error only occurs when module B is used in
the subroutine, and module A is used at the top level of module C. If you move
the 'use B' statement to the top level of module C, it resolves fine.
--
Summary: Cannot resolve subroutine calls when modules are used in
different scopes
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: drewmccormack at mac dot com
GCC build triplet: gcc version 4.2.0 20060805 (experimental)
GCC target triplet: powerpc-apple-darwin8.7.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28873