[Bug fortran/105012] [12/13 Regression] wrf from SPECCPU2017 ICEs during LTO linking since r12-7692-g8db155ddf8cec9
anlauf at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Aug 25 19:57:16 GMT 2022
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...
More information about the Gcc-bugs
mailing list