This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/38290] procedure pointer assignment checking
- 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: 6 Dec 2008 13:57:28 -0000
- Subject: [Bug fortran/38290] procedure pointer assignment checking
- References: <bug-38290-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from janus at gcc dot gnu dot org 2008-12-06 13:57 -------
Created an attachment (id=16841)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16841&action=view)
patch v1
Here is a draft patch which correctly copies the typespec and formal args for a
PROCEDURE statement with INTRINSIC interface. It also makes
gfc_compare_interfaces work with intrinsics and re-enables the interface check
for procedure pointer assignments.
Stuff like the following should work now:
procedure(iabs),pointer::p1
procedure(f), pointer::p2
! valid
p1 => iabs
p2 => iabs
p1 => f
p2 => f
p2 => p1
p1 => p2
! invalid
p1 => abs
p2 => abs
contains
integer function f(x)
integer :: x
f = 317
end function
end
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38290