From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A508C385840A; Tue, 1 Mar 2022 11:01:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A508C385840A From: "vries at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/104717] [9/10/11/12 Regression] ICE: verify_ssa failed (Error: type mismatch between an SSA_NAME and its symbol) Date: Tue, 01 Mar 2022 11:01:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: openacc X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.5 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, 01 Mar 2022 11:01:19 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104717 --- Comment #4 from Tom de Vries --- (In reply to Tom de Vries from comment #3) > The mismatch seems to be: > ... > (gdb) call debug_generic_expr (name.typed.type) > integer(kind=3D4)[0:D.4266] * > (gdb) call debug_generic_expr (name.ssa_name.var.typed.type) > integer(kind=3D4)[0:D.4433] * > ... Setting a breakpoint at: ... Breakpoint 4, ipa_pta_execute () at /home/vries/oacc/trunk/source-gcc/gcc/tree-ssa-structalias.cc:8322 8322 gcc_assert (!node->clone_of); ... and doing: ... (gdb) watch -l node->decl.function_decl.f.gimple_df->ssa_names.m_vecdata[21].ssa_name.var.= typed.type ... the second time we hit the breakpoint for foo.0._omp_fn.0, I hit the moment that the type changes: ... (gdb) c Continuing. Hardware watchpoint 5: -location node->decl.function_decl.f.gimple_df->ssa_names.m_vecdata[21].ssa_name.var.= typed.type Old value =3D (tree_node *) 0x7ffff673abd0 New value =3D (tree_node *) 0x7ffff635d9d8 ... with: ... (gdb) call debug_generic_expr ((tree_node *) 0x7ffff673abd0) integer(kind=3D4)[0:D.4266] * (gdb) call debug_generic_expr ((tree_node *) 0x7ffff635d9d8) integer(kind=3D4)[0:D.4433] * ... Backtrace: ... (gdb) bt #0 copy_tree_body_r (tp=3D0x7ffff634e3d8, walk_subtrees=3D0x7fffffffd04c, data=3D0x7fffffffd390) at /home/vries/oacc/trunk/source-gcc/gcc/tree-inline.cc:1418 #1 0x00000000011d4664 in walk_tree_1 (tp=3D0x7ffff634e3d8, tp@entry=3D0x7fffffffd098,=20 func=3Dfunc@entry=3D0xf18070 ,=20 data=3Ddata@entry=3D0x7fffffffd390, pset=3Dpset@entry=3D0x0, lh=3Dlh@en= try=3D0x0) at /home/vries/oacc/trunk/source-gcc/gcc/tree.cc:11070 #2 0x0000000000f13ac4 in remap_decls (decls=3D,=20 nonlocalized_list=3Dnonlocalized_list@entry=3D0x7ffff6342688, id=3Did@entry=3D0x7fffffffd390) at /home/vries/oacc/trunk/source-gcc/gcc/tree-inline.cc:791 #3 0x0000000000f15f10 in remap_block (block=3Dblock@entry=3D0x7fffffffd128= ,=20 id=3Did@entry=3D0x7fffffffd390) at /home/vries/oacc/trunk/source-gcc/gcc/tree-inline.cc:822 #4 0x0000000000f16096 in remap_blocks (block=3Dblock@entry=3D0x7ffff634206= 0,=20 id=3Did@entry=3D0x7fffffffd390) at /home/vries/oacc/trunk/source-gcc/gcc/tree-inline.cc:841 #5 0x0000000000f160c3 in remap_blocks (block=3D, id=3Did@entry=3D0x7fffffffd390) at /home/vries/oacc/trunk/source-gcc/gcc/tree-inline.cc:844 #6 0x0000000000f21622 in expand_call_inline (bb=3D, bb@entry=3D0x7ffff6358a28,=20 stmt=3D0x7ffff635b990, id=3Did@entry=3D0x7fffffffd390, to_purge=3Dto_purge@entry=3D0x7fffffffd370) at /home/vries/oacc/trunk/source-gcc/gcc/tree-inline.cc:5033 #7 0x0000000000f22aea in gimple_expand_calls_inline (to_purge=3D0x7fffffff= d370,=20 id=3D0x7fffffffd390, bb=3D0x7ffff6358a28) at /home/vries/oacc/trunk/source-gcc/gcc/tree-inline.cc:5320 --Type for more, q to quit, c to continue without paging-- #8 optimize_inline_calls (fn=3D0x7ffff673b100) at /home/vries/oacc/trunk/source-gcc/gcc/tree-inline.cc:5492 #9 0x0000000000beaa7c in inline_transform (node=3D) at /home/vries/oacc/trunk/source-gcc/gcc/ipa-inline-transform.cc:790 #10 0x0000000000d7f761 in execute_one_ipa_transform_pass (do_not_collect=3D= true,=20 ipa_pass=3D0x2f52700, node=3D0x7ffff6343330) at /home/vries/oacc/trunk/source-gcc/gcc/passes.cc:2335 #11 execute_all_ipa_transforms (do_not_collect=3Ddo_not_collect@entry=3Dtru= e) at /home/vries/oacc/trunk/source-gcc/gcc/passes.cc:2398 #12 0x000000000094f301 in cgraph_node::get_body (this=3Dthis@entry=3D0x7ffff6343330) at /home/vries/oacc/trunk/source-gcc/gcc/cgraph.cc:4044 #13 0x00000000010ed712 in ipa_pta_execute () at /home/vries/oacc/trunk/source-gcc/gcc/tree-ssa-structalias.cc:8320 #14 (anonymous namespace)::pass_ipa_pta::execute (this=3D) at /home/vries/oacc/trunk/source-gcc/gcc/tree-ssa-structalias.cc:8744 #15 0x0000000000d7fb91 in execute_one_pass (pass=3Dpass@entry=3D0x2f52b90) at /home/vries/oacc/trunk/source-gcc/gcc/passes.cc:2643 #16 0x0000000000d816b2 in execute_ipa_pass_list (pass=3D0x2f52b90) at /home/vries/oacc/trunk/source-gcc/gcc/passes.cc:3083 #17 0x000000000095e0cb in symbol_table::compile (this=3Dthis@entry=3D0x7ffff6547000) at /home/vries/oacc/trunk/source-gcc/gcc/cgraphunit.cc:2311 --Type for more, q to quit, c to continue without paging-- #18 0x0000000000962130 in symbol_table::compile (this=3D0x7ffff6547000) at /home/vries/oacc/trunk/source-gcc/gcc/cgraphunit.cc:2532 #19 symbol_table::finalize_compilation_unit (this=3D0x7ffff6547000) at /home/vries/oacc/trunk/source-gcc/gcc/cgraphunit.cc:2529 #20 0x0000000000e7b44e in compile_file () at /home/vries/oacc/trunk/source-gcc/gcc/toplev.cc:479 #21 0x00000000006fcd1f in do_compile (no_backend=3Dfalse) at /home/vries/oacc/trunk/source-gcc/gcc/toplev.cc:2168 #22 toplev::main (this=3Dthis@entry=3D0x7fffffffd86e, argc=3D, argc@entry=3D18,=20 argv=3D, argv@entry=3D0x7fffffffd978) at /home/vries/oacc/trunk/source-gcc/gcc/toplev.cc:2320 #23 0x00000000006ff20b in main (argc=3D18, argv=3D0x7fffffffd978) at /home/vries/oacc/trunk/source-gcc/gcc/main.cc:39 ... I guess we're seeing the effect of: ... if (TREE_CODE (*tp) !=3D OMP_CLAUSE) TREE_TYPE (*tp) =3D remap_type (TREE_TYPE (*tp), id); ...=