This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/50438] New: proc pointer to subroutine in structure constructors
- From: "dfranke at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 16 Sep 2011 20:16:31 +0000
- Subject: [Bug fortran/50438] New: proc pointer to subroutine in structure constructors
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50438
Bug #: 50438
Summary: proc pointer to subroutine in structure constructors
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dfranke@gcc.gnu.org
CC: janus@gcc.gnu.org
[http://gcc.gnu.org/ml/fortran/2011-09/msg00080.html]
The example below should be valid but is currently rejected:
$ cat procpointer.f90
IMPLICIT NONE
TYPE :: a
PROCEDURE(proc), POINTER, NOPASS :: p
END TYPE
ABSTRACT INTERFACE
SUBROUTINE proc
END SUBROUTINE
END INTERFACE
TYPE(a), PARAMETER :: aa = a(aproc) ! <---
CONTAINS
SUBROUTINE aproc
END SUBROUTINE
END
$ gfortran-svn -Wall -W -fimplicit-none procpointer.f90
TYPE(a), PARAMETER :: aa = a(aproc) ! <---
1
Error: Symbol 'aproc' at (1) has no IMPLICIT type
$ gfortran-svn -v
gcc version 4.7.0 20110915 (experimental) (GCC)