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

--- Comment #11 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Thanks for reducing the testcase.
I found the reason for build difference.  There is misplaced code clearing
to_info_lto. 

hubicka@lomikamen-jh:/aux/hubicka/trunk-git/build4/gcc$ cat ~/fix
diff --git a/gcc/ipa-modref.c b/gcc/ipa-modref.c
index a70575bc807..1241e567266 100644
--- a/gcc/ipa-modref.c
+++ b/gcc/ipa-modref.c
@@ -5123,6 +5150,7 @@ ipa_merge_modref_summary_after_inlining (cgraph_edge
*edge)
            fprintf (dump_file, "Removed mod-ref summary for %s\n",
                     to->dump_name ());
          summaries_lto->remove (to);
+         to_info_lto = NULL;
        }
       else if (to_info_lto && dump_file)
        {
@@ -5130,7 +5158,6 @@ ipa_merge_modref_summary_after_inlining (cgraph_edge
*edge)
            fprintf (dump_file, "Updated mod-ref summary for %s\n",
                     to->dump_name ());
          to_info_lto->dump (dump_file);
-         to_info_lto = NULL;
        }
       if (callee_info_lto)
        summaries_lto->remove (edge->callee);

Reply via email to