From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DF6CE3858D3C; Mon, 2 May 2022 09:34:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF6CE3858D3C From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/105415] [9/10/11/12/13 Regression] '-fcompare-debug' failure w/ -O2 -ftree-parallelize-loops=2 since r7-4900-g59ec925b1199f9 Date: Mon, 02 May 2022 09:34:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: compare-debug-failure X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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, 02 May 2022 09:34:01 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105415 --- Comment #6 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:02f03c5c826d0cb7c32398af0c4282921e6e072a commit r13-68-g02f03c5c826d0cb7c32398af0c4282921e6e072a Author: Jakub Jelinek Date: Mon May 2 11:30:58 2022 +0200 expand: Throw away non-external decls without varpool nodes [PR105415] The following testcase fails -fcompare-debug on aarch64-linux. The pro= blem is that for the n variable we create a varpool node, then remove it aga= in because the var isn't really used, but it keeps being referenced in deb= ug stmts/insns with -g. Later during sched1 pass we ask whether the n var can be modified through some store to an anchored variable and with -g we create a new varpool node for it again just so that we can find its ultimate alias target. Even later on we create some cgraph node for the loop parallelization, but as there has been an extra varpool node creat= ion in between, we get higher node->order with -g than without. The patch fixes that by throwing variables without varpool nodes away during expansion time, they are very unlikely to actually end up with useful debug info anyway. I've bootstrapped/regtested the following on x86_64-linux and i686-linu= x, then bootstrapped with the patch reverted, reapplied the patch and did = make cc1plus in stage3. The debug section sizes are identical, .debug_info = and .debug_loc is identical too, so I think we don't lose any debug info through it. So at least on cc1plus it makes no difference. 2022-05-02 Jakub Jelinek PR debug/105415 * cfgexpand.cc (expand_debug_expr): Don't make_decl_rtl_for_deb= ug if there is no symtab node for the VAR_DECL. * gcc.dg/pr105415.c: New test.=