Hi Both,
> while I only had a minor question regarding gfc_is_ptr_fcn(),
> can you still try to enlighten me why that second part
> was necessary? (I believed it to be redundant and may have
> overlooked the obvious.)
Blast! I forgot about checking that. Lurking in the back of my mind
and going back to the first days of OOP in gfortran is a distinction
between a class entity with the pointer attribute and one whose data
component has the class_pointer attribute. I'll check it out and do
whatever is needed.
> > + else if (context && gfc_is_ptr_fcn (assoc->target))
> > + {
> > + if (!gfc_notify_std (GFC_STD_F2018, "%qs at %L associated to "
> > + "pointer function target being used in a "
> > + "variable definition context (%s)", name,
> > + &e->where, context))
>
> I'm curious why you decided to put context in braces and not simply use
> quotes as per %qs?
That's the way it's done in the preceding errors. I had to keep the
context in context, so to speak.
> > +/* Build the associate name */
> > +static int
> > +build_associate_name (const char *name, gfc_expr **e1, gfc_expr **e2)
> > +{
>
> > + return 1;
>
> > + return 0;
> > +}
>
> I've gone through the frontend recently and changed several such
> boolean functions to use bool where appropriate. May i ask folks to use
> narrower types in new code, please?
> Iff later in the pipeline it is considered appropriate or benefical to
> promote types, these will eventually be promoted.
>
> > diff --git a/gcc/fortran/trans-decl.cc b/gcc/fortran/trans-decl.cc
> > index e6a4337c0d2..18589e17843 100644
> > --- a/gcc/fortran/trans-decl.cc
> > +++ b/gcc/fortran/trans-decl.cc
>
> > @@ -1906,6 +1915,7 @@ gfc_get_symbol_decl (gfc_symbol * sym)
> > gcc_assert (!sym->value || sym->value->expr_type == EXPR_NULL);
> > }
> >
> > +
>
'twas accidental. There had previously been another version of the fix
that I commented out and the extra line crept in when I deleted it.
Thanks for the spot.
>
> Please kindly excuse my comment and, again, thanks!
>
> > gfc_finish_var_decl (decl, sym);
> >
> > if (sym->ts.type == BT_CHARACTER)
Regards
Paul