This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29992] New: INTERFACE equivalent to MODULE PROCEDURE?!
- From: "franke dot daniel at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Nov 2006 09:27:14 -0000
- Subject: [Bug fortran/29992] New: INTERFACE equivalent to MODULE PROCEDURE?!
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code is accepted by gfortran while ifort rejects it with error
messages as quoted below.
$> cat foo.f90
MODULE class_foo_type
TYPE :: foo
INTEGER :: dummy
END TYPE
END MODULE
MODULE class_foo
USE class_foo_type, ONLY: foo
INTERFACE foo_init
MODULE PROCEDURE foo_init_default
END INTERFACE
INTERFACE
SUBROUTINE foo_init_default(this)
USE class_foo_type, ONLY: foo
TYPE(foo), INTENT(out) :: this
END SUBROUTINE
END INTERFACE
END MODULE
$> gfortran-4.3 -g -Wall -pedantic -std=f95 -c foo.f90 && echo "ok"
ok
$> gfortran-4.3 -v
version 4.3.0 20061116 (experimental)
$> ifort -g -warn all -c foo.f90
fortcom: Error: foo.f90, line 15: The procedure name of the INTERFACE block
conflicts with a name in the encompassing scoping unit. [FOO_INIT_DEFAULT]
SUBROUTINE foo_init_default(this)
-------------^
fortcom: Error: foo.f90, line 11: Unresolved MODULE PROCEDURE specification
name. [FOO_INIT_DEFAULT]
MODULE PROCEDURE foo_init_default
-------------------^
compilation aborted for foo.f90 (code 1)
The following is accepted likewise:
--
Summary: INTERFACE equivalent to MODULE PROCEDURE?!
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: franke dot daniel at gmail dot com
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29992