From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1B6F43844046; Tue, 28 Jul 2020 13:06:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1B6F43844046 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1595941609; bh=UDh0aI+O6Iw0nbeFRfuurfPv16FFY/1KR2jqtWHcXaY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KYuK90ekLdhtX4vQ/Vkc5rwv658qks9835xrGgdsRmamjiC3stOpRCNItqDj7le7+ 7uBdcJc9EpzB+ybwn3bM3Qx30a/1QFSWOGXGomQwmisKXlzQVtkdw1v5F0yFWc8gyv nSuF7xFn7kQ7TzoPnhaIKF34jbMzc3bkn2jZkANw= From: "ibuclaw at gdcproject dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/96347] note: non-delegitimized UNSPEC UNSPEC_TP (19) found in variable location Date: Tue, 28 Jul 2020 13:06:49 +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: 9.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ibuclaw at gdcproject dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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 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: Tue, 28 Jul 2020 13:06:49 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96347 --- Comment #2 from Iain Buclaw --- Possibly some useful information for context. At expand_expr_real_1 (expr.c:10567) there is the following expression. --- MEM [(struct Darray *)&testYearsBC + 8B] --- Lowered to RTL as --- (plus:DI (unspec:DI [ (const_int 0 [0]) ] UNSPEC_TP) (const:DI (plus:DI (unspec:DI [ (symbol_ref:DI ("testYearsBC") [flags 0x2a] ) ] UNSPEC_NTPOFF) (const_int 8 [0x8])))) --- At break_out_memory_refs (explow.c:277) the rhs of the plus expression is forced into a register. --- (insn 18 17 0 (set (reg:DI 89) (const:DI (plus:DI (unspec:DI [ (symbol_ref:DI ("testYearsBC") [flags 0x2a] ) ] UNSPEC_NTPOFF) (const_int 8 [0x8])))) -1 (nil)) (mem/f/c:DI (plus:DI (unspec:DI [ (const_int 0 [0]) ] UNSPEC_TP) (reg:DI 89)) [1 MEM [(struct Darray *)&testYearsBC + 8B]+0 = S8 A64]) --- And it is the second insn that reaches const_ok_for_output_1() at mem_loc_descriptor (dwarf2out.c:15748) --- (note 133 132 163 3 (var_location year (mem:SI (mem/f/c:DI (plus:DI (unspec= :DI [ (const_int 0 [0]) ] UNSPEC_TP) (reg/f:DI 6 bp [90])) [1 MEM [(struct Darray *)&testYea= rsBC + 8B]+0 S8 A64]) [6 *rs$pt r_5+0 S4 A32])) NOTE_INSN_VAR_LOCATION) ---=