From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3C1553858D33; Mon, 23 Jan 2023 13:01:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C1553858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674478879; bh=MU31wmiS807fK5PepztbfoDxS9xh69AhHNJ0nlrXZSE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=txj2jZTvOXLDwoaGa0Hf6haXsSWRVoIKxS3XX6MD22p5Nc3j9Oe0z4vMcup0p/pFA 8vehYdgNdPwEXqChEhSzQLgey86fUGTU5bVq+v39OrKDELQNEui4jrCE6UqgRYbDn+ EPS5ohC7lGBEiaAlQntfSlc+hk/A/6VeSwZwsm4w= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108496] [13 Regression] NRV ICE since r13-4469 Date: Mon, 23 Jan 2023 13:01:18 +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: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords 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=3D108496 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-valid-code --- Comment #1 from Richard Biener --- Confirmed. With -O0 we ICE like > ./cc1plus -quiet t.ii=20=20=20 during RTL pass: expand t.ii: In function 'S foo(S) [with int =3D 0; =3D long int]': t.ii:10:10: internal compiler error: in make_decl_rtl, at varasm.cc:1439 10 | return s; | ^ 0x1eaa4a7 make_decl_rtl(tree_node*) /home/rguenther/src/trunk/gcc/varasm.cc:1438 0x14421f3 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /home/rguenther/src/trunk/gcc/expr.cc:10870 0x1439718 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modif= ier, rtx_def**, bool) /home/rguenther/src/trunk/gcc/expr.cc:9004 0x1414a44 expand_expr /home/rguenther/src/trunk/gcc/expr.h:310 0x142c41f expand_assignment(tree_node*, tree_node*, bool) /home/rguenther/src/trunk/gcc/expr.cc:5987 it looks like there's a stray RESULT_DECL w/o DECL_CONTEXT in this function allocated by 0x0000000000de99c0 in grokdeclarator (declarator=3D0x4870c40, declspecs=3D0x7fffffffda30, decl_context=3DNORMAL, initialized=3D0, attrlist=3D0x7fffffffdaa0) at /home/rguenther/src/trunk/gcc/cp/decl.cc:14782 14782 tree resdecl =3D build_decl (loc, RESULT_DECL, 0, resty= pe); Value returned is $9 =3D (tree_node *) 0x7ffff642a0f0 (gdb) l 14777 /* If we saw a return type, record its location. */ 14778 location_t loc =3D declspecs->locations[ds_type_spec]; 14779 if (loc !=3D UNKNOWN_LOCATION) 14780 { 14781 tree restype =3D TREE_TYPE (TREE_TYPE (decl)); 14782 tree resdecl =3D build_decl (loc, RESULT_DECL, 0, resty= pe); 14783 DECL_ARTIFICIAL (resdecl) =3D 1; 14784 DECL_IGNORED_P (resdecl) =3D 1; 14785 DECL_RESULT (decl) =3D resdecl;=