https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103766
--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> --- This is yet another stupid early exit in the propagation code (next stage1 i guess I will want to go through them and make it more systematic - those originate from quite early versions of modref when it was easier to rule out cases where propagation is no longer useful) I would welcome a testuite friendly version of the fortran testcase diff --git a/gcc/ipa-modref.c b/gcc/ipa-modref.c index d3590f0b62b..7152d66c251 100644 --- a/gcc/ipa-modref.c +++ b/gcc/ipa-modref.c @@ -5020,8 +5020,14 @@ modref_merge_call_site_flags (escape_summary *sum, bool ignore_stores = ignore_stores_p (caller, callee_ecf_flags); /* If we have no useful info to propagate. */ - if ((!cur_summary || !cur_summary->arg_flags.length ()) - && (!cur_summary_lto || !cur_summary_lto->arg_flags.length ())) + if ((!cur_summary + || (!cur_summary->arg_flags.length () + && !cur_summary->static_chain_flags + && !cur_summary->retslot_flags)) + && (!cur_summary_lto + || (!cur_summary_lto->arg_flags.length () + && !cur_summary_lto->static_chain_flags + && !cur_summary_lto->retslot_flags))) return false; FOR_EACH_VEC_ELT (sum->esc, i, ee)