From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F1BF33858C83; Tue, 18 Oct 2022 12:44:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F1BF33858C83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666097056; bh=s+QEw2+ms7YTPe/f9aRynKp9TJoQeduPKFWk14AOpUA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NLNCy/MIE90oJSGwkBncDiWDa0UYzYeacwu7uhVLzLiOzWXOqdSgfaBoXDcV0pLiJ WWYTQVPjvuund5IhYSN4UlmEFjuB2fN4SXFu63LW4D97VdNFLMYBeC78y+WuHH42tW KnY7LO9nSRW3Ok6SYLyppMk93vdli3vLjBFKBHT4= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107303] [13 Regression] ICE: in gimplify_var_or_parm_decl, at gimplify.cc:3060 with nested __builtin_shufflevector() since r13-2978-g43faf3e5445b5717 Date: Tue, 18 Oct 2022 12:44:16 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 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=3D107303 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- So, cp_build_modify_expr calls stabilize_expr on UNARY_PLUS_EXPR of a TARGET_EXPR. stabilize_expr wraps it into (another) TARGET_EXPR, puts the TARGET_EXPR as= an initialization statement and returns the TARGET_EXPR_SLOT. With the TARGET_EXPR_SLOT being used in places other than the TARGET_EXPR_{SLOT,INITIAL} the r13-2978 change doesn't look correct, because it replaces the outer TARGET_EXPR with the inner one, but the slot of the o= uter might be used elsewhere. Now, maybe with the nested TARGET_EXPR case we never use the inner TARGET_EXPR's slot outside of the outer TARGET_EXPR, if that is the case, perhaps we could still do the optimization, but keep the outer TARGET_EXPR rather than inner, strip the inner TARGET_EXPR from outer TARGET_EXPR's initializer and replace all occurrences of the inner slot with the outer sl= ot?=