This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/48095] [OOP] Invalid assignment to procedure pointer component not rejected
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 12 Mar 2011 17:46:46 +0000
- Subject: [Bug fortran/48095] [OOP] Invalid assignment to procedure pointer component not rejected
- Auto-submitted: auto-generated
- References: <bug-48095-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48095
--- Comment #1 from janus at gcc dot gnu.org 2011-03-12 17:46:44 UTC ---
(In reply to comment #0)
> I think it is invalid, because the PPC 'get_special_area' is declared to expect
> a CLASS argument, but then the procedure it points to has a TYPE argument.
>
> One should check the standard on this.
The relevant F08 quote is:
"7.2.2.4 Procedure pointer assignment"
[...]
"If the pointer object has an explicit interface, its characteristics shall be
the same as the pointer target except that the pointer target may be pure even
if the pointer object is not pure and the pointer target may be an elemental
intrinsic procedure even if the pointer object is not elemental."
cf. also PR 46990 comment 6.