From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D474F3857C4D; Thu, 28 Apr 2022 09:57:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D474F3857C4D From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/105415] [9/10/11/12 Regression] '-fcompare-debug' failure w/ -O2 -ftree-parallelize-loops=2 since r7-4900-g59ec925b1199f9 Date: Thu, 28 Apr 2022 09:57:39 +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: 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: 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 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: Thu, 28 Apr 2022 09:57:39 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105415 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek --- What I see is that for the n variable we create a varpool_node during the FE finish_decl, then during symbol_table::remove_unreachable_nodes it is remov= ed, but with -g (and only with that, not with -g0) we create yet another varpool_node for the same variable during sched1 pass because we have: (debug_insn 7 6 8 3 (var_location:SI D#1 (mem/c:SI (symbol_ref:DI ("n") [fl= ags 0x82] ) [1 n+0 S4 A32])) "pr105415.c":11:9 -1 (nil)) as the only reference to n and in: #0 varpool_node::get_create (decl=3D) at ../../gcc/varpool.cc:153 #1 0x0000000000c7cfb9 in symtab_node::get_create (node=3D) at ../../gcc/cgraph.h:3362 #2 0x0000000000c77730 in compare_base_symbol_refs (x_base=3D0x7fffea2c8a78, y_base=3D0x7fffea2c8a28, distance=3D0x0) at ../../gcc/alias.cc:2223 #3 0x0000000000c77b67 in base_alias_check (x=3D0x7fffea2cc1e0, x_base=3D0x7fffea2c8a28, y=3D0x7fffea2c8a78, y_base=3D0x7fffea2c8a78, x_mode=3DE_SImode, y_mode=3DE_SImode) at ../../gcc/alias.cc:2309 #4 0x0000000000c7b066 in write_dependence_p (mem=3D0x7fffea2cc000, x=3D0x7fffea2c5a38, x_mode=3DE_VOIDmode, x_addr=3D0x7fffea2cc1e0, mem_canonicalized=3Dfalse, x_canonicalized=3Dfalse,=20 writep=3Dfalse) at ../../gcc/alias.cc:3156 #5 0x0000000000c7b285 in anti_dependence (mem=3D0x7fffea2cc000, x=3D0x7fffea2c5a38) at ../../gcc/alias.cc:3183 #6 0x0000000002652e29 in sched_analyze_1 (deps=3D0x7fffffffd240, x=3D0x7fffea2c5ca8, insn=3D0x7fffea3efac0) at ../../gcc/sched-deps.cc:2501 #7 0x000000000265407c in sched_analyze_insn (deps=3D0x7fffffffd240, x=3D0x7fffea2c5ca8, insn=3D0x7fffea3efac0) at ../../gcc/sched-deps.cc:2931 #8 0x0000000002656c52 in deps_analyze_insn (deps=3D0x7fffffffd240, insn=3D0x7fffea3efac0) at ../../gcc/sched-deps.cc:3683 #9 0x000000000265723d in sched_analyze (deps=3D0x7fffffffd240, head=3D0x7fffea3ef880, tail=3D0x7fffea3efac0) at ../../gcc/sched-deps.cc:38= 29 #10 0x0000000001375306 in compute_block_dependences (bb=3D0) at ../../gcc/sched-rgn.cc:2733 #11 0x0000000001377154 in sched_rgn_compute_dependencies (rgn=3D1) at ../../gcc/sched-rgn.cc:3360 #12 0x000000000137677c in schedule_region (rgn=3D1) at ../../gcc/sched-rgn.cc:3113 #13 0x000000000137797f in schedule_insns () at ../../gcc/sched-rgn.cc:3518 #14 0x0000000001378224 in rest_of_handle_sched () at ../../gcc/sched-rgn.cc:3722 create the varpool node again. Which shifts the node->order of later creat= ed cgraph or varpool nodes.=