From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9B3153858C50; Thu, 9 Feb 2023 14:22:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9B3153858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675952563; bh=+CXdo5tiuh9M3Q1xWUOqqrXkKEjb0+Hg4OKYgca/oDg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UZhscS5ktQQHJiP15e3rIGNKpdb4IJ1qzaO4IMOWy2fVIHqctAnXZWLLCqYwNjUxP IeAmABz5HaSALwCEssAnbW3NpnlJY1G8DRzLi5/lYTW9PKqFeSTZSxBZRXa6ecZxX7 doYDkKU4LwadYqmpYDE/AIptDaO1gnXQOk9JsHaE= From: "jamborm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/108679] [13 Regression] ice in modify_call, at ipa-param-manipulation.cc:656 since r13-4685-g4834e9360f7bf42f Date: Thu, 09 Feb 2023 14:22:42 +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=3D108679 --- Comment #3 from Martin Jambor --- What happens is that ipa_param_body_adjustments::modify_call_stmt is confused by the IPA-CP produced scalar constant where it expects a structure containing just one field of the corresponding type. It is easy to avoid the situation altogether with just the following but it means that the caller (in the example func_6) will not entirely lose the parameter even though we know its contents at compile time and could re-construct it for the purposes of the call (of func_12). But the behavior is not worse than GCC 12 and before, so the patch is probably the right thing to do in stage 4. diff --git a/gcc/ipa-sra.cc b/gcc/ipa-sra.cc index 7a2b4dc8608..822fd6262d6 100644 --- a/gcc/ipa-sra.cc +++ b/gcc/ipa-sra.cc @@ -3989,7 +3989,7 @@ push_param_adjustments_for_index (isra_func_summary *= ifs, unsigned base_index, { ipa_argagg_value_list avl (ipcp_ts); tree value =3D avl.get_value (base_index, pa->unit_offset); - if (value) + if (value && !AGGREGATE_TYPE_P (pa->type)) { if (dump_file) fprintf (dump_file, " - omitting component at byte "=