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/59411] Problem with TYPE(C_PTR) constant initialization


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


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