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

--- Comment #4 from mrestelli <mrestelli at gmail dot com> ---
(In reply to janus from comment #1)
> (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.

Janus, yes, of course you are right, what I wanted to say was that the
code seems fine according to my understanding of what "should happen",
and for what is worth also ifort is happy with it. But I see that my
sentence was not clear.

Thank you for checking the relevant text in the standard, and also for
the nice example

type(t), parameter :: pp = suitable_initialization_expr_for_type_t
type(t), parameter :: p2 = pp

I would assume that, provided the first assignment is correct, the
second one is always correct, whatever the definition of type(t). Am I
right?

Marco

Reply via email to