public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/59411] New: Problem with TYPE(C_PTR) constant initialization
@ 2013-12-06 16:39 mrestelli at gmail dot com
  2013-12-07 16:29 ` [Bug fortran/59411] " janus at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: mrestelli at gmail dot com @ 2013-12-06 16:39 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59411
           Summary: Problem with TYPE(C_PTR) constant initialization
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mrestelli at gmail dot com

Hi all,
   the attached code does not compile:

gfortran -c cst.f90 
cst.f90:6.31:

 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).


gfortran --version
GNU Fortran (GCC) 4.9.0 20130813 (experimental)



module m
 use iso_c_binding
 implicit none

 type(c_ptr), parameter :: pp = c_null_ptr ! this works
 type(c_ptr), parameter :: p2 = pp         ! this doesn't work

end module m


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-12-18 12:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-06 16:39 [Bug fortran/59411] New: Problem with TYPE(C_PTR) constant initialization mrestelli at gmail dot com
2013-12-07 16:29 ` [Bug fortran/59411] " janus at gcc dot gnu.org
2013-12-07 16:37 ` janus at gcc dot gnu.org
2013-12-07 17:12 ` janus at gcc dot gnu.org
2013-12-09  8:09 ` mrestelli at gmail dot com
2013-12-09  9:58 ` janus at gcc dot gnu.org
2013-12-18 12:32 ` [Bug fortran/59411] [F03] " dominiq at lps dot ens.fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).