From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5F5AB38555A9; Wed, 5 Apr 2023 14:39:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F5AB38555A9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680705553; bh=fvbKs+RXD4wI+0i0mV6qQNuWqWWtQxuhaeqYbP4+nJQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SOVIVvhutMAY7HooCqTno+SzhbYsAgfa0FYDMmBCibjc+Geatd6+JHZ7QnaxUvR9d ipTokOU5Mnz/KnI1H6oLjz5/CrWQAGdEwpPbtsih9XCxQtsZpYGVd37iurdhARVFb5 IAfzFfdRvq3auTKXqNejNIcdbd+T54nwYFjP3WYI= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/108959] [13 Regression] ice in modify_assignment, at ipa-param-manipulation.cc:1905 since r13-5681-ge8109bd87766be Date: Wed, 05 Apr 2023 14:39:11 +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: cvs-commit 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=3D108959 --- Comment #9 from CVS Commits --- The master branch has been updated by Martin Jambor : https://gcc.gnu.org/g:f0f372fab3e70622a4ea6fe4073991e1bb506e4e commit r13-7011-gf0f372fab3e70622a4ea6fe4073991e1bb506e4e Author: Martin Jambor Date: Wed Apr 5 16:36:49 2023 +0200 ipa: Avoid another ICE when dealing with type-incompatibilities (PR 108= 959) PR 108959 shows one more example where undefined code with type incompatible accesses to stuff passed in parameters can cause an ICE because we try to create a VIEW_CONVERT_EXPR of mismatching sizes: 1. IPA-CP tries to push one type from above, 2. IPA-SRA (correctly) decides the parameter is useless because it is only used to construct an argument to another function which does not use it and so the formal parameter should be removed, 3. but the code reconciling IPA-CP and IPA-SRA transformations still wants to perform the IPA-CP and overrides the built-in DCE of useless statements and tries to stuff constants into them instead, constants of a type with mismatching type and size. This patch avoids the situation in IPA-SRA by purging the IPA-CP results from any "aggregate" constants that are passed in parameters which are detected to be useless. It also removes IPA value range and bits information associated with removed parameters stored in the same structure so that the useless information is not streamed later on. gcc/ChangeLog: 2023-03-22 Martin Jambor PR ipa/108959 * ipa-sra.cc (zap_useless_ipcp_results): New function. (process_isra_node_results): Call it. gcc/testsuite/ChangeLog: 2023-03-17 Martin Jambor PR ipa/108959 * gcc.dg/ipa/pr108959.c: New test.=