public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-104717-4-dXXh5V95sm@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-104717-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104717

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #3)
> The mismatch seems to be:
> ...
> (gdb) call debug_generic_expr (name.typed.type)
> integer(kind=4)[0:D.4266] *
> (gdb) call debug_generic_expr (name.ssa_name.var.typed.type)
> integer(kind=4)[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 = (tree_node *) 0x7ffff673abd0
New value = (tree_node *) 0x7ffff635d9d8
...
with:
...
(gdb) call debug_generic_expr ((tree_node *) 0x7ffff673abd0)
integer(kind=4)[0:D.4266] *
(gdb) call debug_generic_expr ((tree_node *) 0x7ffff635d9d8)
integer(kind=4)[0:D.4433] *
...

Backtrace:
...
(gdb) bt
#0  copy_tree_body_r (tp=0x7ffff634e3d8, walk_subtrees=0x7fffffffd04c,
data=0x7fffffffd390)
    at /home/vries/oacc/trunk/source-gcc/gcc/tree-inline.cc:1418
#1  0x00000000011d4664 in walk_tree_1 (tp=0x7ffff634e3d8,
tp@entry=0x7fffffffd098, 
    func=func@entry=0xf18070 <copy_tree_body_r(tree_node**, int*, void*)>, 
    data=data@entry=0x7fffffffd390, pset=pset@entry=0x0, lh=lh@entry=0x0)
    at /home/vries/oacc/trunk/source-gcc/gcc/tree.cc:11070
#2  0x0000000000f13ac4 in remap_decls (decls=<optimized out>, 
    nonlocalized_list=nonlocalized_list@entry=0x7ffff6342688,
id=id@entry=0x7fffffffd390)
    at /home/vries/oacc/trunk/source-gcc/gcc/tree-inline.cc:791
#3  0x0000000000f15f10 in remap_block (block=block@entry=0x7fffffffd128, 
    id=id@entry=0x7fffffffd390) at
/home/vries/oacc/trunk/source-gcc/gcc/tree-inline.cc:822
#4  0x0000000000f16096 in remap_blocks (block=block@entry=0x7ffff6342060, 
    id=id@entry=0x7fffffffd390) at
/home/vries/oacc/trunk/source-gcc/gcc/tree-inline.cc:841
#5  0x0000000000f160c3 in remap_blocks (block=<optimized out>,
id=id@entry=0x7fffffffd390)
    at /home/vries/oacc/trunk/source-gcc/gcc/tree-inline.cc:844
#6  0x0000000000f21622 in expand_call_inline (bb=<optimized out>,
bb@entry=0x7ffff6358a28, 
    stmt=0x7ffff635b990, id=id@entry=0x7fffffffd390,
to_purge=to_purge@entry=0x7fffffffd370)
    at /home/vries/oacc/trunk/source-gcc/gcc/tree-inline.cc:5033
#7  0x0000000000f22aea in gimple_expand_calls_inline (to_purge=0x7fffffffd370, 
    id=0x7fffffffd390, bb=0x7ffff6358a28)
    at /home/vries/oacc/trunk/source-gcc/gcc/tree-inline.cc:5320
--Type <RET> for more, q to quit, c to continue without paging--
#8  optimize_inline_calls (fn=0x7ffff673b100)
    at /home/vries/oacc/trunk/source-gcc/gcc/tree-inline.cc:5492
#9  0x0000000000beaa7c in inline_transform (node=<optimized out>)
    at /home/vries/oacc/trunk/source-gcc/gcc/ipa-inline-transform.cc:790
#10 0x0000000000d7f761 in execute_one_ipa_transform_pass (do_not_collect=true, 
    ipa_pass=0x2f52700, node=0x7ffff6343330)
    at /home/vries/oacc/trunk/source-gcc/gcc/passes.cc:2335
#11 execute_all_ipa_transforms (do_not_collect=do_not_collect@entry=true)
    at /home/vries/oacc/trunk/source-gcc/gcc/passes.cc:2398
#12 0x000000000094f301 in cgraph_node::get_body
(this=this@entry=0x7ffff6343330)
    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=<optimized out>)
    at /home/vries/oacc/trunk/source-gcc/gcc/tree-ssa-structalias.cc:8744
#15 0x0000000000d7fb91 in execute_one_pass (pass=pass@entry=0x2f52b90)
    at /home/vries/oacc/trunk/source-gcc/gcc/passes.cc:2643
#16 0x0000000000d816b2 in execute_ipa_pass_list (pass=0x2f52b90)
    at /home/vries/oacc/trunk/source-gcc/gcc/passes.cc:3083
#17 0x000000000095e0cb in symbol_table::compile
(this=this@entry=0x7ffff6547000)
    at /home/vries/oacc/trunk/source-gcc/gcc/cgraphunit.cc:2311
--Type <RET> for more, q to quit, c to continue without paging--
#18 0x0000000000962130 in symbol_table::compile (this=0x7ffff6547000)
    at /home/vries/oacc/trunk/source-gcc/gcc/cgraphunit.cc:2532
#19 symbol_table::finalize_compilation_unit (this=0x7ffff6547000)
    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=false)
    at /home/vries/oacc/trunk/source-gcc/gcc/toplev.cc:2168
#22 toplev::main (this=this@entry=0x7fffffffd86e, argc=<optimized out>,
argc@entry=18, 
    argv=<optimized out>, argv@entry=0x7fffffffd978)
    at /home/vries/oacc/trunk/source-gcc/gcc/toplev.cc:2320
#23 0x00000000006ff20b in main (argc=18, argv=0x7fffffffd978)
    at /home/vries/oacc/trunk/source-gcc/gcc/main.cc:39
...

I guess we're seeing the effect of:
...
      if (TREE_CODE (*tp) != OMP_CLAUSE)
        TREE_TYPE (*tp) = remap_type (TREE_TYPE (*tp), id);
...

  parent reply	other threads:[~2022-03-01 11:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28 12:32 [Bug tree-optimization/104717] New: " asolokha at gmx dot com
2022-02-28 13:09 ` [Bug tree-optimization/104717] [9/10/11/12 Regression] " jakub at gcc dot gnu.org
2022-02-28 13:47 ` tschwinge at gcc dot gnu.org
2022-03-01  8:02 ` rguenth at gcc dot gnu.org
2022-03-01  8:38 ` vries at gcc dot gnu.org
2022-03-01 11:01 ` vries at gcc dot gnu.org [this message]
2022-03-01 13:39 ` vries at gcc dot gnu.org
2022-03-01 15:28 ` vries at gcc dot gnu.org
2022-03-07 16:30 ` jakub at gcc dot gnu.org
2022-04-20 11:02 ` [Bug fortran/104717] " jakub at gcc dot gnu.org
2022-04-25 21:14 ` cvs-commit at gcc dot gnu.org
2022-04-28 13:21 ` [Bug fortran/104717] [9/10/11 " cvs-commit at gcc dot gnu.org
2022-05-27  9:47 ` [Bug fortran/104717] [10/11 " rguenth at gcc dot gnu.org
2022-06-28 10:48 ` jakub at gcc dot gnu.org
2023-07-07 10:42 ` [Bug fortran/104717] [11 " rguenth at gcc dot gnu.org
2024-04-25  6:24 ` pault at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-104717-4-dXXh5V95sm@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).