This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/28873] New: Cannot resolve subroutine calls when modules are used in different scopes
- From: "drewmccormack at mac dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Aug 2006 14:45:49 -0000
- Subject: [Bug fortran/28873] New: Cannot resolve subroutine calls when modules are used in different scopes
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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