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

--- Comment #15 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Sorry for the breakage.  The problem is that in
ipa_param_body_adjustments::m_replacements, items pertaining to the
same base original parameter are no longer necessarily adjacent, which
is assumed in ipa_param_body_adjustments::modify_call_stmt.

So the following is a stupid quick fix:

diff --git a/gcc/ipa-param-manipulation.cc b/gcc/ipa-param-manipulation.cc
index a0e4098a3f1..974b0c5eb9f 100644
--- a/gcc/ipa-param-manipulation.cc
+++ b/gcc/ipa-param-manipulation.cc
@@ -2127,7 +2127,7 @@ ipa_param_body_adjustments::modify_call_stmt (gcall
**stmt_p,
          for (; j < repl_list_len; j++)
            { 
              if (m_replacements[j].base != base)
-               break;
+               continue;
              if (m_replacements[j].unit_offset < agg_arg_offset)
                continue;
              pass_through_split_map pt_map;


But I'll try to sort m_replacements instead so that we don't do too
many of these linear searches.

Reply via email to