This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/54667] [OOP] gimplification failure with c_f_pointer
- From: "abensonca at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 22 Sep 2012 19:39:17 +0000
- Subject: [Bug fortran/54667] [OOP] gimplification failure with c_f_pointer
- Auto-submitted: auto-generated
- References: <bug-54667-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54667
--- Comment #11 from Andrew Benson <abensonca at gmail dot com> 2012-09-22 19:39:17 UTC ---
(In reply to comment #10)
> (In reply to comment #9)
> > From Fortran 2008 15.2.3.6 and 15.2.3.3:
> >
> > CPTR shall be a scalar of type C PTR. It is an INTENT (IN) argument. Its value
> > shall be
> > * the C address of an interoperable data entity, or
> > * the result of a reference to C LOC with a noninteroperable argument.
> >
> > And CLASS is not interoperable, while C_LOC has
> >
> > [...] It shall either be a variable with interoperable type and kind type
> > parameters, or be a scalar, nonpolymorphic variable with no length type
> > parameters."
> >
> > (Note in TS29113, the "scalar, " has been deleted.)
>
> So, in conclusion, I hope you agree that polymorphic arguments should be
> rejected for both C_LOC and C_F_POINTER. For C_LOC we do it already, and for
> C_F_POINTER my patch in comment 5 is supposed to do it ...
Yes - I definitely agree on this point.