From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2143738582AB; Fri, 10 Feb 2023 01:47:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2143738582AB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675993675; bh=vRMIskV6i3OvrBS8PmYGA03ozOTNaG/lGKLjcbvjugQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tu+Jb8GmHcsywWRt6c5DvnZT2egmQRSb0MhUFQJYyTSVyWE0LfUbz8MRes7Ws/4ct HivyVcw+AUAlDXQbstzDHLjCGS8bRqIghP0x9A3tDpJzhYEwp47aBKTVH5nvbjJW05 S6lB7kM4qSjLpBQZwg8CBXw9GjlR7km8YZD9Akwc= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108684] [12/13 Regression] ICE: verify_ssa failed Date: Fri, 10 Feb 2023 01:47:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code, inline-asm, patch, wrong-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: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 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=3D108684 --- Comment #13 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:6a5cb782d1486b378d70857c8efae558da0eb2cc commit r13-5768-g6a5cb782d1486b378d70857c8efae558da0eb2cc Author: Andrew Pinski Date: Tue Feb 7 23:09:40 2023 +0000 tree-optimization: [PR108684] ICE in verify_ssa due to simple_dce_from_worklist In simple_dce_from_worklist, we were removing an inline-asm which had a vdef. We should not be removing inline-asm which have a vdef as this code does not check to the store. This fixes that oversight. This was a latent bug exposed recently by both VRP and removal of stores to static starting to use simple_dce_from_worklist. Committed as approved. Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/108684 gcc/ChangeLog: * tree-ssa-dce.cc (simple_dce_from_worklist): Check all ssa names and not just non-vdef ones before accepting the inline-asm. Call unlink_stmt_vdef on the statement before removing it. gcc/testsuite/ChangeLog: * gcc.c-torture/compile/dce-inline-asm-1.c: New test. * gcc.c-torture/compile/dce-inline-asm-2.c: New test. * gcc.dg/tree-ssa/pr108684-1.c: New test. co-authored-by: Andrew Macleod =