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

Mikael Morin <mikael at gcc dot gnu.org> changed:

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

--- Comment #21 from Mikael Morin <mikael at gcc dot gnu.org> ---
(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.

Reply via email to