This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/59411] Problem with TYPE(C_PTR) constant initialization
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 07 Dec 2013 16:37:17 +0000
- Subject: [Bug fortran/59411] Problem with TYPE(C_PTR) constant initialization
- Auto-submitted: auto-generated
- References: <bug-59411-4 at http dot gcc dot gnu dot org/bugzilla/>
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