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: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 22 Sep 2012 18:38:42 +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 #9 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-09-22 18:38:42 UTC ---
(In reply to comment #7)
> The only other compiler I have access to is ifort 11.1 (which also accepts it),
> so that doesn't add much unfortunately.
As do crayftn and PGI, however, it is a constraint (i.e. the compiler does not
have to diagnose it) but required that the user does. 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.)