http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54667
--- Comment #10 from janus at gcc dot gnu.org 2012-09-22 19:02:03 UTC --- (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 ...