This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/54667] [OOP] gimplification failure with c_f_pointer


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]