From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E68CE3858C3A; Tue, 17 Oct 2023 06:26:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E68CE3858C3A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697523999; bh=7mpMtvg9X6xtKeb54mgCt+p1JRECbNFmyKrvo0HKuj4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=d9iOqn3ewkLw5k04ry7sPn2yoKMmx3IxSw9F8ColMRYDCYYHuRpmmMA8G3/iDLnJC ADLqu57TKFyHzdp1T7w8bD60247bYOeFh+60uoCSF4h6pULLpRQiXC77dYtsRmgRyU sTt6WAKHW82N+UVfTEhnS50Sib9Me06XKkZsWNHc= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/111818] [11/12/13/14 Regression] ICE with __builtin_memcpy with volatile and constants Date: Tue, 17 Oct 2023 06:26:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.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: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 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=3D111818 --- Comment #3 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:ce55521bcd149fdc431f1d78e706b66d470210ae commit r14-4678-gce55521bcd149fdc431f1d78e706b66d470210ae Author: Richard Biener Date: Mon Oct 16 12:50:46 2023 +0200 middle-end/111818 - failed DECL_NOT_GIMPLE_REG_P setting of volatile The following addresses a missed DECL_NOT_GIMPLE_REG_P setting of a volatile declared parameter which causes inlining to substitute a constant parameter into a context where its address is required. The main issue is in update_address_taken which clears DECL_NOT_GIMPLE_REG_P from the parameter but fails to rewrite it because is_gimple_reg returns false for volatiles. The following changes maybe_optimize_var to make the 1:1 correspondence between clearing DECL_NOT_GIMPLE_REG_P of a register typed decl and actually rewriting it to SSA. PR middle-end/111818 * tree-ssa.cc (maybe_optimize_var): When clearing DECL_NOT_GIMPLE_REG_P always rewrite into SSA. * gcc.dg/torture/pr111818.c: New testcase.=