From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DA1223858C50; Wed, 4 Jan 2023 13:41:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA1223858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1672839702; bh=dEvAUc0wv696E8umrrUxIpy89CaUSVAvYFAPHUe5BKk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AMaY8ZhSvQJAl7JpWMWdmbdbJnujI9KkSP0CrDyuZjWvRG3Qr+KScpa1hELXonEtP 8thU/dxYJb+C72woKOW3miZW1Ae83RyVIo/0CebDO20RhQQIwymtHT8QrKOY6td3gt SotFiB3DR6CgvXavAMhIa7BNCOqKbzHGqmX7HoIU= From: "jamborm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/108110] [13 Regression] ice in modify_call, at ipa-param-manipulation.cc:700 with -std=c++14 -O3 -march=znver3 since r13-4685-g4834e9360f7bf4 Date: Wed, 04 Jan 2023 13:41:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jamborm at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jamborm at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108110 --- Comment #15 from Martin Jambor --- 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++) {=20 if (m_replacements[j].base !=3D 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.=