https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105012

--- Comment #23 from anlauf at gcc dot gnu.org ---
(In reply to Mikael Morin from comment #21)
> (In reply to anlauf from comment #18)
> > Tentative patch, regtests cleanly but otherwise untested:
> > 
> > diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc
> > index 850007fd2e1..0a1520e95ba 100644
> > --- a/gcc/fortran/trans-expr.cc
> > +++ b/gcc/fortran/trans-expr.cc
> > @@ -6503,8 +6503,19 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol *
> > sym,
> >                   else
> >                     {
> >                       bool add_clobber;
> > -                     add_clobber = fsym && fsym->attr.intent == INTENT_OUT
> > -                       && !fsym->attr.allocatable && !fsym->attr.pointer
> > +                     gfc_symbol *dsym = fsym;
> > +                     gfc_dummy_arg *dummy;
> > +
> > +                     /* Use associated dummy as fallback for formal
> > +                        argument if there is no explicit interface.  */
> > (...)
> 
> Note that if there is no explicit interface, I expect associated_dummy to be
> NULL, and as a result dsym and fsym to always actually be the same thing.

No, they're not, when the procedures are in the same file.
At least that's what gdb tells me...

Reply via email to