From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CBD933858D33; Tue, 7 Feb 2023 19:59:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CBD933858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675799959; bh=/tLmky9NxPyahdkX2cRWK/sBj+uPoQRam8BB/t4Rk5A=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FtPKJx7EbcNuerKom3F+0wrbLyPbDO+3kuWGMkrczFI+sgtMf87mihvOoB6rtooHY AO18wEGtkSMvTc/YnAtukVSQKtiCFrZdlpavSVr65Nou0U3swKB7hT/223fHloB6C7 I9cnG569NjMAqCmGmAzQsPT6Cz12Ahc6eapMSvuM= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108684] [12/13 Regression] ICE: verify_ssa failed Date: Tue, 07 Feb 2023 19:59:19 +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, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: cc 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 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #9 from Jakub Jelinek --- (In reply to Andrew Pinski from comment #8) > I think simple_dce_from_worklist is incorrect of removing this inline-asm= in > the first place. > Take: > ``` > static int t; >=20 > int f (int *a) > { > int t1; > asm (" " : "=3Dr" (t1) : : "memory"); > t =3D t1; > return *a; > } > ``` > The inline-asm could have written to *a but now it has been removed. I think that is how inline asm always behaved. If it is not ok to be DCEd = when the result is dead, one needs to use volatile keyword.=