From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D71583858404; Fri, 10 Dec 2021 12:04:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D71583858404 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/103601] [12 Regression] ICE in insert_kill, at ipa-modref-tree.c:84 since r12-5244-g64f3e71c302b4a13 Date: Fri, 10 Dec 2021 12:04:15 +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: 12.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: roger at nextmovesoftware dot com X-Bugzilla-Target-Milestone: 12.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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Dec 2021 12:04:15 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103601 --- Comment #6 from CVS Commits --- The master branch has been updated by Roger Sayle : https://gcc.gnu.org/g:2a1c3b69c015ea49e4c7c08291efd8f7e28e1193 commit r12-5891-g2a1c3b69c015ea49e4c7c08291efd8f7e28e1193 Author: Roger Sayle Date: Fri Dec 10 12:02:04 2021 +0000 PR ipa/103601: ICE compiling CSiBE in ipa-modref's insert_kill. This patch fixes PR ipa/103061 which is P1 regression that shows up as an ICE in ipa-modref-tree.c's insert_kill when compiling the CSiBE benchmark. I believe the underlying cause is that the new kill tracking functionality wasn't anticipating memory accesses that are zero bits wide!?. The failing source code (test case) contains the unusual lines: typedef struct { } spinlock_t; and q->lock =3D (spinlock_t) { }; Making spinlock_t larger, or removing the assignment work around the is= sue. The one line patch below to useful_for_kill_p teaches IPA that a memory write is only useful as a "kill" if it is more than zero bits wide. In theory, the existing known_size_p (size) test is now redundant, as poly_int64 currently uses the value -1 for unknown size values, but the proposed change makes the semantics clear, and defends against possible future changes in representation. 2021-12-10 Roger Sayle gcc/ChangeLog PR ipa/103601 * ipa-modref-tree.h (useful_for_kill_p): Zero width accesses ar= en't useful for kill tracking. gcc/testsuite/ChangeLog PR ipa/103601 * gcc.dg/ipa/pr103601.c: New test case.=