http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59411

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |janus at gcc dot gnu.org

--- Comment #1 from janus at gcc dot gnu.org ---
(In reply to mrestelli from comment #0)
> 
>  type(c_ptr), parameter :: p2 = pp
>                                1
> Error: non-constant initialization expression at (1)
> 
> However, as far as I can tell, the code is correct (ifort accepts it).

well, just because ifort accepts it doesn't mean that it's valid.

In fact the corresponing case with actual Fortran pointers (i.e. pointer
initialization) is only allowed since F08, cf. PR45290. 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).

Reply via email to