https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93321
Bug ID: 93321 Summary: Unlimited recursion in prepare_block_for_update Product: gcc Version: 10.0 Status: UNCONFIRMED Keywords: compile-time-hog Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- g++-10.0.0-alpha20200110 snapshot (r280115) and g++ 9.2.0 ICE due to stack exhaustion when compiling gcc/testsuite/g++.old-deja/g++.other/inline20.C w/ -O1 -fno-early-inlining --param max-inline-recursive-depth=9 --param uninlined-function-insns=500000: % ulimit -s 8192 % g++-10.0.0-alpha20200110 -O1 -fno-early-inlining --param max-inline-recursive-depth=9 --param uninlined-function-insns=500000 -c gcc/testsuite/g++.old-deja/g++.other/inline20.C -wrapper gdb,--args <…> Program received signal SIGSEGV, Segmentation fault. 0x0000000000ac006d in bitmap_set_bit (head=0x2d067d0, bit=403896) at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/bitmap.c:950 950 /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/bitmap.c: No such file or directory. (gdb) where #0 0x0000000000ac006d in bitmap_set_bit (head=0x2d067d0, bit=403896) at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/bitmap.c:950 #1 0x0000000000febf9e in mark_block_for_update (bb=0x7fffdd733888) at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/tree-into-ssa.c:449 #2 prepare_block_for_update (bb=0x7fffdd733888, insert_phi_p=true) at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/tree-into-ssa.c:2619 #3 0x0000000000fec4e7 in prepare_block_for_update (bb=0x7ffff53a74e0, insert_phi_p=true) at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/tree-into-ssa.c:2701 <…> #279589 0x0000000000fec4e7 in prepare_block_for_update (bb=0x7ffff77f1270, insert_phi_p=true) at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/tree-into-ssa.c:2701 #279590 0x0000000000fee92c in update_ssa (update_flags=update_flags@entry=2048) at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/tree-into-ssa.c:3395 #279591 0x0000000000fac8c0 in cleanup_tree_cfg_noloop (ssa_update_flags=2048) at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/tree-cfgcleanup.c:1060 #279592 0x0000000000face6c in cleanup_tree_cfg (ssa_update_flags=<optimized out>) at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/tree-cfgcleanup.c:1165 #279593 0x0000000000e92576 in execute_function_todo (fn=0x7ffff79562c0, data=<optimized out>) at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/passes.c:1949 #279594 0x0000000000e931c8 in do_per_function (data=0x208a20, callback=0xe9235c <execute_function_todo(function*, void*)>) at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/passes.c:1638 #279595 execute_todo (flags=2132512) at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/passes.c:2037 #279596 0x0000000000e95124 in execute_one_ipa_transform_pass (do_not_collect=false, ipa_pass=0x2631d00, node=0x7ffff79595a0) at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/passes.c:2234 #279597 execute_all_ipa_transforms (do_not_collect=do_not_collect@entry=false) at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/passes.c:2270 #279598 0x0000000000b37193 in cgraph_node::expand (this=0x7ffff79595a0) at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/cgraphunit.c:2276 #279599 0x0000000000b382bf in expand_all_functions () at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/cgraphunit.c:2454 #279600 symbol_table::compile (this=0x7ffff77e9100) at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/cgraphunit.c:2804 #279601 0x0000000000b3a46c in symbol_table::compile (this=0x7ffff77e9100) at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/cgraphunit.c:2984 #279602 symbol_table::finalize_compilation_unit (this=0x7ffff77e9100) at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/cgraphunit.c:2984 #279603 0x0000000000f60061 in compile_file () at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/toplev.c:483 #279604 0x0000000000832615 in do_compile () at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/toplev.c:2269 #279605 toplev::main (this=this@entry=0x7fffffffd516, argc=<optimized out>, argc@entry=17, argv=<optimized out>, argv@entry=0x7fffffffd618) at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/toplev.c:2408 #279606 0x00000000008351fe in main (argc=17, argv=0x7fffffffd618) at /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200110/work/gcc-10-20200110/gcc/main.c:39 (not sure if the parameters are valid, though.)