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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
-fno-devirtualize also makes it go away.
Without that, the __builtin_unreachable() call in question is created in:
#0  0x00007ffff7ad4424 in __memset_avx2_unaligned_erms () from /lib64/libc.so.6
#1  0x0000000000fee86e in ggc_internal_alloc (size=144, f=0x0, s=0, n=1) at
../../gcc/ggc-page.cc:1400
#2  0x00000000012bf869 in ggc_internal_cleared_alloc (size=144, f=0x0, s=0,
n=1) at ../../gcc/ggc-common.cc:114
#3  0x0000000000c9f446 in ggc_internal_cleared_alloc (s=144) at
../../gcc/ggc.h:147
#4  0x00000000012d69e5 in ggc_alloc_cleared_gimple_statement_stat (s=144) at
../../gcc/ggc.h:329
#5  0x00000000012cc892 in gimple_alloc (code=GIMPLE_CALL, num_ops=5) at
../../gcc/gimple.cc:156
#6  0x00000000012d00ae in gimple_copy (stmt=<gimple_call 0x7fffe888af30>) at
../../gcc/gimple.cc:1913
#7  0x000000000183e098 in remap_gimple_stmt (stmt=<gimple_call 0x7fffe888af30>,
id=0x7fffffffd1e0) at ../../gcc/tree-inline.cc:1862
#8  0x000000000183e996 in copy_bb (id=0x7fffffffd1e0, bb=<basic_block
0x7fffe74a6548 (5)>, num=..., den=...) at ../../gcc/tree-inline.cc:2051
#9  0x0000000001841ee7 in copy_cfg_body (id=0x7fffffffd1e0,
entry_block_map=<basic_block 0x7fffe6c40af8 (21)>, exit_block_map=<basic_block
0x7fffe71bd548 (212)>, 
    new_entry=<basic_block 0x0>) at ../../gcc/tree-inline.cc:3085
#10 0x0000000001842b2a in copy_body (id=0x7fffffffd1e0,
entry_block_map=<basic_block 0x7fffe6c40af8 (21)>, exit_block_map=<basic_block
0x7fffe71bd548 (212)>, 
    new_entry=<basic_block 0x0>) at ../../gcc/tree-inline.cc:3338
#11 0x0000000001847993 in expand_call_inline (bb=<basic_block 0x7fffe6c40af8
(21)>, stmt=<gimple_call 0x7fffe83ea870>, id=0x7fffffffd1e0,
to_purge=0x7fffffffd1c0)
    at ../../gcc/tree-inline.cc:5123
when copying the
  OBJ_TYPE_REF(_9;(struct Writable)writable_7(D)->10B) (writable_7(D), 0);
call (line 1345 in repro.cpp) and later on this one is replaced by
__builtin_unreachable:
#0  gimple_call_set_fndecl (gs=0x7fffe8621090, decl=<function_decl
0x7fffea34ec00 __builtin_unreachable>) at ../../gcc/gimple.h:3198
#1  0x00000000010b7521 in cgraph_edge::redirect_call_stmt_to_callee (
    e=<cgraph_edge* 0x7fffe74a6750 (<cgraph_node * 0x7fffe7ae6000
"local_concurrency"/1538> -> <cgraph_node * 0x7fffe737faa0
"__builtin_unreachable"/2408>)>)
    at ../../gcc/cgraph.cc:1555
#2  0x0000000001841af2 in redirect_all_calls (id=0x7fffffffd1e0,
bb=<basic_block 0x7fffe74a68f0 (220)>) at ../../gcc/tree-inline.cc:3002
#3  0x00000000018423c7 in copy_cfg_body (id=0x7fffffffd1e0,
entry_block_map=<basic_block 0x7fffe6c40af8 (21)>, exit_block_map=<basic_block
0x7fffe71bd548 (212)>, 
    new_entry=<basic_block 0x0>) at ../../gcc/tree-inline.cc:3173
#4  0x0000000001842b2a in copy_body (id=0x7fffffffd1e0,
entry_block_map=<basic_block 0x7fffe6c40af8 (21)>, exit_block_map=<basic_block
0x7fffe71bd548 (212)>, 
    new_entry=<basic_block 0x0>) at ../../gcc/tree-inline.cc:3338
#5  0x0000000001847993 in expand_call_inline (bb=<basic_block 0x7fffe6c40af8
(21)>, stmt=<gimple_call 0x7fffe83ea870>, id=0x7fffffffd1e0,
to_purge=0x7fffffffd1c0)
    at ../../gcc/tree-inline.cc:5123
#6  0x000000000184874c in gimple_expand_calls_inline (bb=<basic_block
0x7fffe6c40af8 (21)>, id=0x7fffffffd1e0, to_purge=0x7fffffffd1c0) at
../../gcc/tree-inline.cc:5318
#7  0x0000000001848f1c in optimize_inline_calls (fn=<function_decl
0x7fffe7adca00 local_concurrency>) at ../../gcc/tree-inline.cc:5490
#8  0x000000000141b1ee in inline_transform (node=<cgraph_node * 0x7fffe7ae6000
"local_concurrency"/1538>) at ../../gcc/ipa-inline-transform.cc:790

Reply via email to