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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ICE in                      |[8/9 regression] ICE in
                   |speculative_call_info, at   |speculative_call_info, at
                   |cgraph.c:1142               |cgraph.c:1142

--- Comment #7 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
The problem triggered by the testcase is fixed on trunk, but affect 8 and 9
branches.  It is fixed by:
Index: cgraph.c
===================================================================
--- cgraph.c    (revision 279307)
+++ cgraph.c    (working copy)
@@ -788,9 +788,9 @@ cgraph_edge::set_call_stmt (gcall *new_s
       ipa_ref *ref;

       speculative_call_info (direct, indirect, ref);
+      ref->stmt = new_stmt;
       direct->set_call_stmt (new_stmt, false);
       indirect->set_call_stmt (new_stmt, false);
-      ref->stmt = new_stmt;
       return;
     }


resolving indirect call may lead to removing speculation if stmt is now direct
which means that ref->stmt assignment goes to wrong memory location.

I will look into reproducing the Firefox issue which seems independent and
related to the recent changes.

Reply via email to