public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/29992]  New: INTERFACE equivalent to MODULE PROCEDURE?!
@ 2006-11-27  9:27 franke dot daniel at gmail dot com
  2006-11-27  9:28 ` [Bug fortran/29992] " franke dot daniel at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: franke dot daniel at gmail dot com @ 2006-11-27  9:27 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-01-10 18:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-27  9:27 [Bug fortran/29992] New: INTERFACE equivalent to MODULE PROCEDURE?! franke dot daniel at gmail dot com
2006-11-27  9:28 ` [Bug fortran/29992] " franke dot daniel at gmail dot com
2006-11-27 13:03 ` burnus at gcc dot gnu dot org
2006-12-14 21:41 ` pault at gcc dot gnu dot org
2006-12-16  1:40 ` patchapp at dberlin dot org
2006-12-20 10:58 ` pault at gcc dot gnu dot org
2006-12-20 13:48 ` pault at gcc dot gnu dot org
2006-12-31 15:01 ` [Bug fortran/29992] [4.2 and 4.1 only] " pault at gcc dot gnu dot org
2006-12-31 15:17 ` [Bug fortran/29992] [4.1 " pault at gcc dot gnu dot org
2007-01-10 18:58 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).