This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33228] New: Accepts use-associated functions in MODULE PROCEDURE
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Aug 2007 14:16:36 -0000
- Subject: [Bug fortran/33228] New: Accepts use-associated functions in MODULE PROCEDURE
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
module m
USE MOD, only: foo1
interface generic_intrf
module procedure foo1
end interface
is accepted although "bar" is not a host-associated procedure, but a
use-associated procedure.
(Using "PROCEDURE foo1" instead of "MODULE PROCEDURE foo1" allows
use-associated procedures.)
NAG f95 correctly diagnoses:
Error: a.f90, line 13: FOO1 is not a module procedure
Full example, from:
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/4d51d6ca89f7d4f8/
MODULE a
USE iso_c_binding
INTERFACE
SUBROUTINE foo1(a) BIND(C,name="a_c_routine")
IMPORT C_INT
INTEGER(C_INT) ::a
END SUBROUTINE
END INTERFACE
END MODULE
MODULE b
USE a,ONLY : foo1
INTERFACE foo
MODULE procedure foo1,foo2,foo3
END INTERFACE
CONTAINS
SUBROUTINE foo2(a)
DOUBLE PRECISION ::a
END SUBROUTINE
SUBROUTINE foo3(a)
CHARACTER ::a
END SUBROUTINE
END MODULE
--
Summary: Accepts use-associated functions in MODULE PROCEDURE
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: accepts-invalid
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=33228