From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DE69A3858D37; Fri, 28 Apr 2023 09:49:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE69A3858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682675366; bh=Zt6L9y/+z661sFwUQWKfL6OK5ZXTEp3j/QeR8cPpG54=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bDqIfzt6tT7t+PcwajnUp4XYtjIn4Lk265zuGumhfTKgQ8GmqZtfujj2hpDomSH5g 9jVJgMghFqlYRdmao1BRAX+ERtBuK2QK5iIawotQrAuBLfB4Gm6tk8z/0W4wqZ4Q2I /aYGqQhZT9fu7EZdA+yCXK2q2GyBg9O1ItJA+CF4= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/109644] Missing GIMPLE IL verification Date: Fri, 28 Apr 2023 09:49:21 +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: 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: --- 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=3D109644 --- Comment #2 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:6e6f86f22873aab7059e083fd0c9905bd58e5efa commit r14-324-g6e6f86f22873aab7059e083fd0c9905bd58e5efa Author: Richard Biener Date: Mon Apr 24 13:20:25 2023 +0200 tree-optimization/109644 - missing IL checking We fail to verify the constraints under which we allow handled components to wrap registers. The gcc.dg/pr70022.c testcase shows that we happily end up with _2 =3D VIEW_CONVERT_EXPR(v_1(D)) as produced by SSA rewrite and update_address_taken. But the intent was that we wrap registers with at most a single level of handled components and specifically only allow __real, __imag, BIT_FIELD_REF and VIEW_CONVERT_EXPR on them, but not ARRAY_REF or COMPONENT_REF. The following makes IL verification stricter which catches the problem. PR tree-optimization/109644 * tree-cfg.cc (verify_types_in_gimple_reference): Check register constraints on the outermost VIEW_CONVERT_EXPR only. Do not allow register or invariant bases on multi-level or possibly variable index handled components.=