[Bug fortran/59411] Problem with TYPE(C_PTR) constant initialization
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Dec 7 16:37:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59411
--- Comment #2 from janus at gcc dot gnu.org ---
(In reply to janus from comment #1)
> One should check the
> Fortran standard for restrictions in the case of C_PTRs (which, strictly
> speaking, are no actual pointers in the Fortran sense).
Since C_PTR is a derived type in the Fortran sense, I don't see why any
restrictions on pointer init should apply.
Unless there are any special restrictions for C_PTR, the code should be valid,
just as the corresponding code with any other derived type:
module m
implicit none
type :: t
end type
type(t), parameter :: pp = t()
type(t), parameter :: p2 = pp
end module m
More information about the Gcc-bugs
mailing list