https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64498
Bug ID: 64498 Summary: [5 Regression] Cannot build Firefox with LTO: ICE in substitute_and_fold_dom_walker::before_dom_children Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: markus at trippelsdorf dot net Hello. With gcc version 5.0.0 20150105 (experimental) (GCC) and latest master branch of Firefox, compiled with -O2 and -flto, I see following problem in a ltrans: /home/marxin/Programming/gecko-dev/js/src/builtin/Intl.cpp: In function ‘NewUDateFormat’: /home/marxin/Programming/gecko-dev/js/src/builtin/Intl.cpp:1840:0: internal compiler error: Segmentation fault NewUDateFormat(JSContext *cx, HandleObject dateTimeFormat) ^ 0x8de73f crash_signal ../../gcc/toplev.c:359 0x98feab gimple_code ../../gcc/gimple.h:1545 0x98feab gimple_nop_p ../../gcc/gimple.h:5589 0x98feab get_default_value ../../gcc/tree-ssa-ccp.c:291 0x98feab get_value ../../gcc/tree-ssa-ccp.c:365 0x98feab get_constant_value ../../gcc/tree-ssa-ccp.c:384 0xa0556d replace_uses_in ../../gcc/tree-ssa-propagate.c:948 0xa0556d substitute_and_fold_dom_walker::before_dom_children(basic_block_def*) ../../gcc/tree-ssa-propagate.c:1151 0xdf4022 dom_walker::walk(basic_block_def*) ../../gcc/domwalk.c:188 0xa05030 substitute_and_fold(tree_node* (*)(tree_node*), bool (*)(gimple_stmt_iterator*), bool) ../../gcc/tree-ssa-propagate.c:1230 0x990cb0 ccp_finalize ../../gcc/tree-ssa-ccp.c:934 0x990cb0 do_ssa_ccp ../../gcc/tree-ssa-ccp.c:2374 0x990cb0 execute ../../gcc/tree-ssa-ccp.c:2406 Where: #0 0x0000000000bb4950 in gimple_code (g=0x0) at ../../gcc/gimple.h:1545 #1 0x0000000000bb52cc in gimple_nop_p (g=0x0) at ../../gcc/gimple.h:5589 #2 0x0000000000bb6350 in get_default_value (var=0x7fffe5d24870) at ../../gcc/tree-ssa-ccp.c:291 #3 0x0000000000bb6620 in get_value (var=0x7fffe5d24870) at ../../gcc/tree-ssa-ccp.c:365 #4 0x0000000000bb66b7 in get_constant_value (var=0x7fffe5d24870) at ../../gcc/tree-ssa-ccp.c:384 #5 0x0000000000c48d5e in replace_uses_in (stmt=0x7fffe5d116c0, get_value=0xbb666e <get_constant_value(tree)>) at ../../gcc/tree-ssa-propagate.c:948 #6 0x0000000000c49484 in substitute_and_fold_dom_walker::before_dom_children (this=0x7fffffffd430, bb=0x7fffe5d02750) at ../../gcc/tree-ssa-propagate.c:1151 #7 0x000000000108d113 in dom_walker::walk (this=0x7fffffffd430, bb=0x7fffe5d02750) at ../../gcc/domwalk.c:188 #8 0x0000000000c4975a in substitute_and_fold (get_value_fn=0xbb666e <get_constant_value(tree)>, fold_fn=0xbbc57c <ccp_fold_stmt(gimple_stmt_iterator*)>, do_dce=true) at ../../gcc/tree-ssa-propagate.c:1230 #9 0x0000000000bb7c20 in ccp_finalize () at ../../gcc/tree-ssa-ccp.c:934 #10 0x0000000000bbd0a2 in do_ssa_ccp () at ../../gcc/tree-ssa-ccp.c:2374 #11 0x0000000000bbd155 in (anonymous namespace)::pass_ccp::execute (this=0x1b68c40) at ../../gcc/tree-ssa-ccp.c:2406 #12 0x0000000000a1bbb2 in execute_one_pass (pass=0x1b68c40) at ../../gcc/passes.c:2311 #13 0x0000000000a1bdec in execute_pass_list_1 (pass=0x1b68c40) at ../../gcc/passes.c:2363 #14 0x0000000000a1be1d in execute_pass_list_1 (pass=0x1b67ec0) at ../../gcc/passes.c:2364 #15 0x0000000000a1be5a in execute_pass_list (fn=0x7fffe6a37c78, pass=0x1b67e00) at ../../gcc/passes.c:2374 #16 0x0000000000745a2c in cgraph_node::expand (this=0x7ffff6a64930) at ../../gcc/cgraphunit.c:1798 #17 0x0000000000745ecb in expand_all_functions () at ../../gcc/cgraphunit.c:1934 #18 0x0000000000746938 in symbol_table::compile (this=0x7ffff6c3a000) at ../../gcc/cgraphunit.c:2284 #19 0x00000000006b154c in lto_main () at ../../gcc/lto/lto.c:3446 #20 0x0000000000ac3b8c in compile_file () at ../../gcc/toplev.c:570 #21 0x0000000000ac5f48 in do_compile () at ../../gcc/toplev.c:2018 #22 0x0000000000ac6152 in toplev::main (this=0x7fffffffd7cf, argc=36, argv=0x7fffffffd8c8) at ../../gcc/toplev.c:2115 #23 0x000000000067afc9 in main (argc=36, argv=0x7fffffffd8c8) at ../../gcc/main.c:38 in #2: (gdb) call debug_tree(var) <ssa_name 0x7fffe5d24870 nothrowdef_stmt version 578 in-free-list> in #5: (gdb) call debug_gimple_stmt(stmt) # DEBUG code => _578 Unfortunately, problem is in a LTRANS and it's hard to reduce a testcase. Was there any recent change in CCP? If needed, I can provide dumps. Thanks, Martin