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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-11-26
                 CC|                            |hubicka at gcc dot gnu.org,
                   |                            |jamborm at gcc dot gnu.org

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
All right, I can reproduce it on gcc112 compile farm machine with:
../configure  --prefix=/home/marxin/bin/gcc --disable-bootstrap
--enable-languages=c,c++,lto,fortran,go --disable-libsanitizer
--with-cpu=power9

...

/home/marxin/Programming/gcc/objdir/./gcc/go1
../../../libgo/go/net/addrselect.go ../../../libgo/go/net/cgo_linux.go
../../../libgo/go/net/cgo_resnew.go ../../../libgo/go/net/cgo_socknew.go
../../../libgo/go/net/cgo_unix.go ../../../libgo/go/net/conf.go
../../../libgo/go/net/dial.go ../../../libgo/go/net/dnsclient.go
../../../libgo/go/net/dnsclient_unix.go ../../../libgo/go/net/dnsconfig_unix.go
../../../libgo/go/net/error_posix.go ../../../libgo/go/net/error_unix.go
../../../libgo/go/net/fd_posix.go ../../../libgo/go/net/fd_unix.go
../../../libgo/go/net/file.go ../../../libgo/go/net/file_unix.go
../../../libgo/go/net/hook.go ../../../libgo/go/net/hook_unix.go
../../../libgo/go/net/hosts.go ../../../libgo/go/net/interface.go
../../../libgo/go/net/interface_linux.go ../../../libgo/go/net/ip.go
../../../libgo/go/net/iprawsock.go ../../../libgo/go/net/iprawsock_posix.go
../../../libgo/go/net/ipsock.go ../../../libgo/go/net/ipsock_posix.go
../../../libgo/go/net/lookup.go ../../../libgo/go/net/lookup_unix.go
../../../libgo/go/net/mac.go ../../../libgo/go/net/net.go
../../../libgo/go/net/nss.go ../../../libgo/go/net/parse.go
../../../libgo/go/net/pipe.go ../../../libgo/go/net/port.go
../../../libgo/go/net/port_unix.go ../../../libgo/go/net/rawconn.go
../../../libgo/go/net/sendfile_glibc.go ../../../libgo/go/net/sock_cloexec.go
../../../libgo/go/net/sock_linux.go ../../../libgo/go/net/sock_posix.go
../../../libgo/go/net/sockaddr_posix.go ../../../libgo/go/net/sockopt_linux.go
../../../libgo/go/net/sockopt_posix.go ../../../libgo/go/net/sockoptip_linux.go
../../../libgo/go/net/sockoptip_posix.go ../../../libgo/go/net/splice_linux.go
../../../libgo/go/net/tcpsock.go ../../../libgo/go/net/tcpsock_posix.go
../../../libgo/go/net/tcpsockopt_posix.go
../../../libgo/go/net/tcpsockopt_unix.go ../../../libgo/go/net/udpsock.go
../../../libgo/go/net/udpsock_posix.go ../../../libgo/go/net/unixsock.go
../../../libgo/go/net/unixsock_posix.go
../../../libgo/go/net/unixsock_readmsg_cmsg_cloexec.go
../../../libgo/go/net/writev_unix.go -quiet -dumpdir .libs/ -dumpbase net.go
-dumpbase-ext .go -mcpu=power9 -g -O2 -fgo-pkgpath=net -fPIC -I .
-L/home/marxin/Programming/gcc/objdir/./gcc -L/lib/../lib64 -L/usr/lib/../lib64
-o /tmp/cc0Ftahz.s

we remove a BB here:

#0  gimple_set_bb (stmt=0x3fffb01a2be0, bb=0x0) at ../../gcc/gimple.c:1772
#1  0x00000000107209b0 in gsi_remove (i=0x3fffffffd7c8,
remove_permanently=<optimized out>) at ../../gcc/gimple-iterator.c:569
#2  0x0000000010bddd3c in remove_bb (bb=0x3fffb0de2698) at
../../gcc/tree-cfg.c:2338
#3  0x00000000104aa8a0 in delete_basic_block (bb=<optimized out>) at
../../gcc/cfghooks.c:616
#4  0x0000000010c087f4 in cleanup_control_flow_pre () at
../../gcc/tree-cfgcleanup.c:979
#5  0x0000000010c0b090 in cleanup_tree_cfg_noloop (ssa_update_flags=0) at
../../gcc/tree-cfgcleanup.c:1073
#6  cleanup_tree_cfg (ssa_update_flags=<optimized out>) at
../../gcc/tree-cfgcleanup.c:1183
#7  0x0000000010a52108 in execute_function_todo (fn=0x3fffb0020180,
data=<optimized out>) at ../../gcc/passes.c:2008
#8  0x0000000010a52ea4 in do_per_function (callback=<optimized out>,
data=<optimized out>) at ../../gcc/passes.c:1687
#9  0x0000000010a53124 in execute_todo (flags=32) at ../../gcc/passes.c:2096
#10 0x0000000010a5692c in execute_one_ipa_transform_pass
(do_not_collect=<optimized out>, ipa_pass=0x1247cce0, node=<optimized out>) at
../../gcc/passes.c:2293
#11 execute_all_ipa_transforms (do_not_collect=<optimized out>) at
../../gcc/passes.c:2338
#12 0x000000001050c048 in cgraph_node::expand (this=0x3fffb062f570) at
../../gcc/cgraphunit.c:1827
#13 0x000000001050e050 in expand_all_functions () at
../../gcc/cgraphunit.c:1998
#14 symbol_table::compile (this=0x3fffaf0d0000) at ../../gcc/cgraphunit.c:2348
#15 0x0000000010511e0c in symbol_table::finalize_compilation_unit
(this=0x3fffaf0d0000) at ../../gcc/cgraphunit.c:2529
#16 0x0000000010b8c348 in compile_file () at ../../gcc/toplev.c:479
#17 0x00000000102c2234 in do_compile (no_backend=false) at
../../gcc/toplev.c:2156
#18 toplev::main (this=0x3fffffffe0b0, argc=76, argv=0x3fffffffe4d8) at
../../gcc/toplev.c:2308
#19 0x00000000102c4aa8 in main (argc=<optimized out>, argv=0x3fffffffe4d8) at
../../gcc/main.c:39

(gdb) p *current_pass
$11 = {<pass_data> = {type = IPA_PASS, name = 0x1203ee00 "cp", optinfo_flags =
OPTGROUP_NONE, tv_id = TV_IPA_CONSTANT_PROP, properties_required = 0,
properties_provided = 0, properties_destroyed = 0, todo_flags_start = 524288,
todo_flags_finish = 384}, 
  _vptr.opt_pass = 0x122fcd80 <vtable for (anonymous
namespace)::pass_ipa_cp+16>, sub = 0x0, next = 0x1247cd90, static_pass_number =
84, m_ctxt = 0x124336c0}

and later we crash here:

(gdb) p *current_pass
$12 = {<pass_data> = {type = IPA_PASS, name = 0x12037058 "inline",
optinfo_flags = OPTGROUP_INLINE, tv_id = TV_IPA_INLINING, properties_required =
0, properties_provided = 0, properties_destroyed = 0, todo_flags_start =
524288, todo_flags_finish = 128}, 
  _vptr.opt_pass = 0x122fce40 <vtable for (anonymous
namespace)::pass_ipa_inline+16>, sub = 0x0, next = 0x1247d050,
static_pass_number = 88, m_ctxt = 0x124336c0}

(gdb) bt
#0  0x00000000104f6904 in cgraph_node::verify_node (this=0x3fffb062f570) at
../../gcc/cgraph.c:3582
#1  0x00000000104dfc94 in symtab_node::verify (this=<optimized out>) at
../../gcc/symtab.c:1358
#2  0x0000000010c6576c in optimize_inline_calls (fn=0x3fffb084ad00) at
../../gcc/tree-inline.c:5500
#3  0x000000001085a660 in inline_transform (node=0x3fffb062f570) at
../../gcc/ipa-inline-transform.c:790
#4  0x0000000010a56920 in execute_one_ipa_transform_pass
(do_not_collect=<optimized out>, ipa_pass=0x1247cfa0, node=<optimized out>) at
../../gcc/passes.c:2290
#5  execute_all_ipa_transforms (do_not_collect=<optimized out>) at
../../gcc/passes.c:2338
#6  0x000000001050c048 in cgraph_node::expand (this=0x3fffb062f570) at
../../gcc/cgraphunit.c:1827
#7  0x000000001050e050 in expand_all_functions () at
../../gcc/cgraphunit.c:1998
#8  symbol_table::compile (this=0x3fffaf0d0000) at ../../gcc/cgraphunit.c:2348
#9  0x0000000010511e0c in symbol_table::finalize_compilation_unit
(this=0x3fffaf0d0000) at ../../gcc/cgraphunit.c:2529
#10 0x0000000010b8c348 in compile_file () at ../../gcc/toplev.c:479
#11 0x00000000102c2234 in do_compile (no_backend=false) at
../../gcc/toplev.c:2156
#12 toplev::main (this=0x3fffffffe0b0, argc=76, argv=0x3fffffffe4d8) at
../../gcc/toplev.c:2308
#13 0x00000000102c4aa8 in main (argc=<optimized out>, argv=0x3fffffffe4d8) at
../../gcc/main.c:39

because:

(gdb) p e->call_stmt->bb
$14 = (basic_block) 0x0

The edge is:

(gdb) p e->caller->debug()
net.ubtoa.constprop.0.isra.0/6250 (net.ubtoa.constprop.isra) @0x3fffb062f570
  Type: function definition analyzed
  Visibility: artificial
  References: 
  Referring: 
  Availability: local
  Function flags: count:1073741824 (estimated locally) body local
  Called by: net.IP.String/4510 (936945 (estimated locally),0.10 per call) (can
throw external) net.IP.String/4510 (937695 (estimated locally),0.10 per call)
(can throw external) net.IP.String/4510 (938446 (estimated locally),0.10 per
call) (can throw external) net.IP.String/4510 (939197 (estimated locally),0.10
per call) (can throw external) 
  Calls: runtime.goPanicIndex/5425 (107202 (estimated locally),0.00 per call)
(can throw external) runtime.goPanicIndex/5425 (214533 (estimated locally),0.00
per call) (can throw external) runtime.goPanicIndex/5425 (214705 (estimated
locally),0.00 per call) (can throw external) runtime.goPanicIndex/5425 (214533
(estimated locally),0.00 per call) (can throw external)
runtime.goPanicIndex/5425 (214705 (estimated locally),0.00 per call) (can throw
external) runtime.goPanicIndex/5425 (429410 (estimated locally),0.00 per call)
(can throw external) 
$16 = void
(gdb) p e->callee->debug()
runtime.goPanicIndex/5425 (runtime.goPanicIndex) @0x3fffb00a6e80
  Type: function
  Visibility: semantic_interposition external public
  References: 
  Referring: 
  Availability: not_available
  Function flags:
  Called by: net.ipVersion/6311 (38042 (estimated locally),0.00 per call) (can
throw external) net.ipVersion/6309 (111103 (estimated locally),0.00 per call)
(can throw external) net.cgoNameinfoPTR.isra.0/6268 (375809 (estimated
locally),0.00 per call) (can throw external) net.addrTable.isra.0/6261 (94953
(estimated locally),0.00 per call) (can throw external) net.newAddr.isra.0/6260
(21687 (estimated locally),0.00 per call) net.newAddr.isra.0/6260 (21678
(estimated locally),0.00 per call) net.newAddr.isra.0/6260 (21670 (estimated
locally),0.00 per call) net.newAddr.isra.0/6260 (21661 (estimated locally),0.00
per call) net.joinIPv4Group.isra.0/6256 (24487 (estimated locally),0.00 per
call) (can throw external) net.joinIPv4Group.isra.0/6256 (24478 (estimated
locally),0.00 per call) (can throw external) net.joinIPv4Group.isra.0/6256
(24468 (estimated locally),0.00 per call) (can throw external)
net.joinIPv4Group.isra.0/6256 (24458 (estimated locally),0.00 per call) (can
throw external) net.ubtoa.constprop.0.isra.0/6250 (107202 (estimated
locally),0.00 per call) (can throw external) net.ubtoa.constprop.0.isra.0/6250
(214533 (estimated locally),0.00 per call) (can throw external)
net.ubtoa.constprop.0.isra.0/6250 (214705 (estimated locally),0.00 per call)
(can throw external) net.ubtoa.constprop.0.isra.0/6250 (214533 (estimated
locally),0.00 per call) (can throw external) net.ubtoa.constprop.0.isra.0/6250
(214705 (estimated locally),0.00 per call) (can throw external)
net.ubtoa.constprop.0.isra.0/6250 (429410 (estimated locally),0.00 per call)
(can throw external) net.goDebugString.constprop.0/6244 (1870724 (estimated
locally),0.00 per call) net.goDebugString.constprop.0/6244 (1868852 (estimated
locally),0.00 per call) net.goDebugString.constprop.0/6244 (4666755 (estimated
locally),0.00 per call) net.newRequest.constprop.0/6240 (8410 (estimated
locally),0.00 per call) (can throw external) net.newRequest.constprop.0/6240
(8407 (estimated locally),0.00 per call) (can throw external)
net.Resolver.internetAddrList/4571 (90079 (estimated locally),0.00 per call)
(can throw external) net.conf.hostLookupOrder/4354 (9581 (estimated
locally),0.00 per call) net.avoidDNS/4410 (89987 (estimated locally),0.00 per
call) (can throw external) net.SplitHostPort/4567 (73295 (estimated
locally),0.00 per call) (can throw external) net.SplitHostPort/4567 (365115
(estimated locally),0.00 per call) (can throw external) net.dnsReadConfig/4425
(417518 (estimated locally),0.00 per call) net.dnsReadConfig/4425 (417685
(estimated locally),0.00 per call) net.dnsReadConfig/4425 (12306 (estimated
locally),0.00 per call) net.last/4693 (413776 (estimated locally),0.01 per
call) (can throw external) net.parseProcNetIGMP6/4491 (45876535 (estimated
locally),0.18 per call) net.parseProcNetIGMP/4490 (14569609 (estimated
locally),0.11 per call) net.parseProcNetIGMP/4490 (281432 (estimated
locally),0.00 per call) net.readServices/4727 (78210 (estimated locally),0.00
per call) net.maxListenerBacklog/4742 (61029 (estimated locally),0.00 per call)
net.splitAtBytes/4686 (9447 (estimated locally),0.00 per call) (can throw
external) net.splitAtBytes/4686 (247778 (estimated locally),0.01 per call) (can
throw external) net.byMaskLength.Less/4321 (857447 (estimated locally),0.00 per
call) (can throw external) net.byMaskLength.Less/4321 (858477 (estimated
locally),0.00 per call) (can throw external) net.IP.String/4510 (17212
(estimated locally),0.00 per call) (can throw external) net.IP.String/4510
(34446 (estimated locally),0.00 per call) (can throw external)
net.IP.String/4510 (839701 (estimated locally),0.09 per call) (can throw
external) net.IP.String/4510 (287762 (estimated locally),0.03 per call) (can
throw external) net.IP.String/4510 (750 (estimated locally),0.00 per call) (can
throw external) net.IP.String/4510 (751 (estimated locally),0.00 per call) (can
throw external) net.IP.String/4510 (751 (estimated locally),0.00 per call) (can
throw external) net.hexString/4511 (413611 (estimated locally),0.01 per call)
(can throw external) net.hexString/4511 (413776 (estimated locally),0.01 per
call) (can throw external) net.IPNet.Contains/4521 (413776 (estimated
locally),0.00 per call) (can throw external) net.IP.DefaultMask/4506 (351659
(estimated locally),0.00 per call) (can throw external) net.classifyScope/4324
(52371 (estimated locally),0.00 per call) (can throw external)
net.classifyScope/4324 (80603 (estimated locally),0.00 per call) (can throw
external) net.classifyScope/4324 (24504 (estimated locally),0.00 per call) (can
throw external) net.IP.IsLinkLocalUnicast/4501 (64399 (estimated locally),0.00
per call) (can throw external) net.IP.IsLinkLocalUnicast/4501 (150203
(estimated locally),0.00 per call) (can throw external)
net.IP.IsLinkLocalUnicast/4501 (300527 (estimated locally),0.00 per call) (can
throw external) net.IP.IsLinkLocalMulticast/4500 (64399 (estimated
locally),0.00 per call) (can throw external) net.IP.IsLinkLocalMulticast/4500
(198241 (estimated locally),0.00 per call) (can throw external)
net.IP.IsLinkLocalMulticast/4500 (102138 (estimated locally),0.00 per call)
(can throw external) net.IP.IsLinkLocalMulticast/4500 (300527 (estimated
locally),0.00 per call) (can throw external) net.IP.IsMulticast/4498 (300527
(estimated locally),0.00 per call) (can throw external) net.IP.IsPrivate/4497
(99125 (estimated locally),0.00 per call) (can throw external)
net.IP.IsPrivate/4497 (67411 (estimated locally),0.00 per call) (can throw
external) net.IP.IsPrivate/4497 (300527 (estimated locally),0.00 per call) (can
throw external) net.IP.IsLoopback/4496 (354493 (estimated locally),0.00 per
call) (can throw external) net.reverseaddr/4384 (417714 (estimated
locally),0.00 per call) (can throw external) net.reverseaddr/4384 (115821
(estimated locally),0.00 per call) (can throw external) net.reverseaddr/4384
(115867 (estimated locally),0.00 per call) (can throw external)
net.reverseaddr/4384 (115913 (estimated locally),0.00 per call) (can throw
external) net.reverseaddr/4384 (115960 (estimated locally),0.00 per call) (can
throw external) net.byRFC6724.Less/4317 (427781 (estimated locally),0.00 per
call) (can throw external) net.byRFC6724.Less/4317 (427952 (estimated
locally),0.00 per call) (can throw external) net.byRFC6724.Less/4317 (428124
(estimated locally),0.00 per call) (can throw external) net.byRFC6724.Less/4317
(428295 (estimated locally),0.00 per call) (can throw external)
net.byRFC6724.Less/4317 (428466 (estimated locally),0.00 per call) (can throw
external) net.byRFC6724.Less/4317 (428638 (estimated locally),0.00 per call)
(can throw external) net.byRFC6724.Less/4317 (857790 (estimated locally),0.00
per call) (can throw external) net.byRFC6724.Less/4317 (858477 (estimated
locally),0.00 per call) (can throw external) net.commonPrefixLen/4325 (420047
(estimated locally),0.00 per call) (can throw external) net.IP.To4/4504 (84778
(estimated locally),0.00 per call) (can throw external) net.IP.To4/4504 (169624
(estimated locally),0.00 per call) (can throw external) net.byPref.sort/4396
(839926 (estimated locally),0.03 per call) (can throw external)
net.byPriorityWeight.sort/4392 (420906 (estimated locally),0.02 per call) (can
throw external) net.byPriorityWeight.shuffleByWeight/4391 (30854 (estimated
locally),0.01 per call) (can throw external) net.bytePtrToString/4329 (10737416
(estimated locally),0.21 per call) (can throw external)
syscall.StringBytePtr/5093 (28826 (estimated locally),0.00 per call) (can throw
external) net.kernelVersion/4740 (54537 (estimated locally),0.00 per call) (can
throw external) net.interfaceTable/4483 (113931 (estimated locally),0.00 per
call) (can throw external) net.parsePort/4726 (3241008 (estimated locally),0.00
per call) (can throw external) net.parsePort/4726 (283464 (estimated
locally),0.00 per call) (can throw external) net.favoriteAddrFamily/4575
(858820 (estimated locally),0.00 per call) (can throw external)
net.ipVersion/4580 (332 (estimated locally),0.00 per call) (can throw external) 
  Calls:

Reply via email to