From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C35563858CDA; Tue, 27 Jun 2023 16:28:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C35563858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687883298; bh=N+YaE459Q/fHh932jt2QCwJIBxnHJCXf0is6U9hoV1g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UEsczJwdh1v0Nzkpf4ix0j/XrLsA9nh1eYVO1YLP3z/vBMi2+mlr8o6uKfsaPhMFl rVEk97vqRe6QAXKTRQX4XGVrVAW3KLuKPj2HmR0sGMiFk/H/TfAur7in55dzYxIlET 8YZSSN9ztHDAG/Pe3pfqLr+CY5F4d/R3LHIukVAo= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110420] [12/13/14 Regression] internal compiler error: in gimple_redirect_edge_and_branch due to simple_dce_from_worklist removing `asm goto` Date: Tue, 27 Jun 2023 16:28:18 +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: 14.0 X-Bugzilla-Keywords: ice-on-valid-code, inline-asm, patch X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.2 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=3D110420 --- Comment #8 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:478840a2ca491fbff44371caee4983d1e7b7b7cf commit r14-2133-g478840a2ca491fbff44371caee4983d1e7b7b7cf Author: Andrew Pinski Date: Mon Jun 26 17:14:06 2023 -0700 Mark asm goto with outputs as volatile The manual references asm goto as being implicitly volatile already and that was done when asm goto could not have outputs. When outputs were added to `asm goto`, only asm goto without outputs were still being marked as volatile. Now some parts of GCC decide, removing the `asm got= o` is ok if the output is not used, though not updating the CFG (this happ= ens on both the RTL level and the gimple level). Since the biggest user of = `asm goto` is the Linux kernel and they expect them to be volatile (they use them = to copy to/from userspace), we should just mark the inline-asm as volatile. OK? Bootstrapped and tested on x86_64-linux-gnu. PR middle-end/110420 PR middle-end/103979 PR middle-end/98619 gcc/ChangeLog: * gimplify.cc (gimplify_asm_expr): Mark asm with labels as volatile. gcc/testsuite/ChangeLog: * gcc.c-torture/compile/asmgoto-6.c: New test.=