From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 72FE1385840A; Mon, 7 Feb 2022 09:17:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 72FE1385840A From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/104407] [10/11/12 Regression] '-fcompare-debug' failure (length) w/ -std=c++17 -O1 Date: Mon, 07 Feb 2022 09:17:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: compare-debug-failure 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: 10.4 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Feb 2022 09:17:48 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104407 --- Comment #4 from Jakub Jelinek --- DECL_RTL is set in the -g case prematurely during: #0 set_decl_rtl (t=3D, x=3D0x7fffea3b9bb8) at ../../gcc/emit-rtl.cc:1440 #1 0x0000000001bdc0a5 in make_decl_rtl (decl=3D= ) at ../../gcc/varasm.cc:1633 #2 0x000000000120cb23 in expand_expr_real_1 (exp=3D, target=3D0x0, tmode=3DE_DImode, modifier=3DEXPAND_INITIALIZER, alt_rtl=3D0x= 0, inner_reference_p=3Dfalse) at ../../gcc/expr.cc:10551 #3 0x0000000001204aaf in expand_expr_real (exp=3D, target=3D0x0, tmode=3DE_DImode, modifier=3DEXPAND_INITIALIZER, alt_rtl=3D0x= 0, inner_reference_p=3Dfalse) at ../../gcc/expr.cc:8736 #4 0x00000000011e20e8 in expand_expr (exp=3D, target=3D0x0, mode=3DE_DImode, modifier=3DEXPAND_INITIALIZER) at ../../gcc/= expr.h:301 #5 0x0000000001203a46 in expand_expr_addr_expr_1 (exp=3D, target=3D0x0, tmode=3DDImode, modifier=3DEXPAND_INITIALIZER, as=3D0 '\0= 00') at ../../gcc/expr.cc:8427 #6 0x0000000001204402 in expand_expr_addr_expr (exp=3D, target=3D0x0, tmode=3DE_DImode, modifier=3DEXPAND_INITIALI= ZER) at ../../gcc/expr.cc:8548 #7 0x0000000001212ed7 in expand_expr_real_1 (exp=3D, target=3D0x0, tmode=3DE_VOIDmode, modifier=3DEXPAND_INITIALIZER, alt_rtl=3D= 0x0, inner_reference_p=3Dfalse) at ../../gcc/expr.cc:11767 #8 0x0000000001204aaf in expand_expr_real (exp=3D, target=3D0x0, tmode=3DE_VOIDmode, modifier=3DEXPAND_INITIALIZER, alt_rtl=3D= 0x0, inner_reference_p=3Dfalse) at ../../gcc/expr.cc:8736 #9 0x000000000112950c in expand_expr (exp=3D, target=3D0x0, mode=3DE_VOIDmode, modifier=3DEXPAND_INITIALIZER) at ../../gcc/expr.h:301 #10 0x00000000011595e0 in rtl_for_decl_init (init=3D, type=3D) at ../../gcc/dwarf2out.cc:20488 #11 0x000000000115ab99 in tree_add_const_value_attribute (die=3D>, t=3D) at ../../gcc/dwarf2out.cc:20915 Unfortunately it is deep in the expansion code, so we can't easily make it = if (!early_dwarf) don't SET_DECL_RTL, because we don't really know that this is from early dwarf.=