This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/39998] New: Procedure Pointer Assignments: Statement Functions & Internal Functions
- From: "janus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 May 2009 21:43:21 -0000
- Subject: [Bug fortran/39998] New: Procedure Pointer Assignments: Statement Functions & Internal Functions
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
According to the following passage of the Fortran 2003 standard, statement
functions and internal functions are forbidden in procedure pointer
assignments:
C727 (R742) A procedure-name shall be the name of an external, module, or dummy
procedure, a specific intrinsic function listed in 13.6 and not marked with a
bullet (â?¢), or a procedure pointer.
Test cases:
f(x) = x**2
procedure(), pointer :: p
p => f
print *, p(4.0)
end
**********
procedure(), pointer :: p
p => sub
contains
subroutine sub
end subroutine sub
end
**********
Internal functions, however, are valid in Fortran 2008.
Thanks to Tobias for reporting this.
--
Summary: Procedure Pointer Assignments: Statement Functions &
Internal Functions
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: janus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39998