Comment 11 for bug 1286343

Revision history for this message
In , Jakub-gcc (jakub-gcc) wrote :

The slsr issue is just a pilot error, I've mistakenly used ~ r205NNN compiler in that case, so it looks like an already fixed issue.

Anyway, the ICE on ppc64 with the reduced testcase started with r208184 (thus I wonder about the 4.8 regression status), the problem is that
getMeanVal function (method?) calls
_ZThn8_NK4mrpt5utils16CPosePDFGaussian7getMeanERNS_5poses7CPose2DE
thunk that has NULL node->callee (without -fPIC it ICEs in one spot, with -fPIC in another one).

node->callees is set to non-NULL in:
#0 cgraph_create_edge (caller=<cgraph_node* 0x7ffff0f32148 "_ZThn8_NK4mrpt5utils16CPosePDFGaussian7getMeanERNS_5poses7CPose2DE">,
    callee=<cgraph_node* 0x7ffff0f32000 "*.LTHUNK0">, call_stmt=<gimple 0x0>, count=0, freq=1000) at ../../gcc/cgraph.c:927
#1 0x00000000008ffe81 in analyze_function (
    node=<cgraph_node* 0x7ffff0f32148 "_ZThn8_NK4mrpt5utils16CPosePDFGaussian7getMeanERNS_5poses7CPose2DE">) at ../../gcc/cgraphunit.c:611
#2 0x00000000009010b4 in analyze_functions () at ../../gcc/cgraphunit.c:1017
#3 0x0000000000904979 in finalize_compilation_unit () at ../../gcc/cgraphunit.c:2320
#4 0x000000000068b61d in cp_write_global_declarations () at ../../gcc/cp/decl2.c:4612
#5 0x0000000000d0ee72 in compile_file () at ../../gcc/toplev.c:562
#6 0x0000000000d11015 in do_compile () at ../../gcc/toplev.c:1914
#7 0x0000000000d11180 in toplev_main (argc=8, argv=0x7fffffffe358) at ../../gcc/toplev.c:1990
#8 0x00000000012c0464 in main (argc=8, argv=0x7fffffffe358) at ../../gcc/main.c:36

and cleared again in:
#0 cgraph_node_remove_callees (node=<cgraph_node* 0x7ffff0f32148 "_ZThn8_NK4mrpt5utils16CPosePDFGaussian7getMeanERNS_5poses7CPose2DE">)
    at ../../gcc/cgraph.c:1617
#1 0x0000000000b2dc63 in symtab_remove_unreachable_nodes (before_inlining_p=false, file=0x0) at ../../gcc/ipa.c:493
#2 0x000000000124c93f in ipa_inline () at ../../gcc/ipa-inline.c:2060
#3 0x000000000124d385 in (anonymous namespace)::pass_ipa_inline::execute (this=0x1c73710) at ../../gcc/ipa-inline.c:2412
#4 0x0000000000c299d6 in execute_one_pass (pass=<opt_pass* 0x1c73710 "inline"(53)>) at ../../gcc/passes.c:2229
#5 0x0000000000c2a71b in execute_ipa_pass_list (pass=<opt_pass* 0x1c73710 "inline"(53)>) at ../../gcc/passes.c:2607
#6 0x00000000009042ad in ipa_passes () at ../../gcc/cgraphunit.c:2084
#7 0x000000000090455e in compile () at ../../gcc/cgraphunit.c:2174
#8 0x0000000000904988 in finalize_compilation_unit () at ../../gcc/cgraphunit.c:2329
#9 0x000000000068b61d in cp_write_global_declarations () at ../../gcc/cp/decl2.c:4612
#10 0x0000000000d0ee72 in compile_file () at ../../gcc/toplev.c:562
#11 0x0000000000d11015 in do_compile () at ../../gcc/toplev.c:1914
#12 0x0000000000d11180 in toplev_main (argc=8, argv=0x7fffffffe358) at ../../gcc/toplev.c:1990
#13 0x00000000012c0464 in main (argc=8, argv=0x7fffffffe358) at ../../gcc/main.c:36

At that point the thunk apparently has no callers. But somewhat later it gains one:
#0 cgraph_set_edge_callee (e=0x7fffef50a8f0,
    n=<cgraph_node* 0x7ffff0f32148 "_ZThn8_NK4mrpt5utils16CPosePDFGaussian7getMeanERNS_5poses7CPose2DE">) at ../../gcc/cgraph.c:1080
#1 0x00000000008f74a8 in cgraph_make_edge_direct (edge=0x7fffef50a8f0,
    callee=<cgraph_node* 0x7ffff0f32148 "_ZThn8_NK4mrpt5utils16CPosePDFGaussian7getMeanERNS_5poses7CPose2DE">) at ../../gcc/cgraph.c:1313
#2 0x0000000000b1f7ae in ipa_make_edge_direct_to_target (ie=0x7fffef50a8f0,
    target=<function_decl 0x7ffff0fc5a00 _ZThn8_NK4mrpt5utils16CPosePDFGaussian7getMeanERNS_5poses7CPose2DE>) at ../../gcc/ipa-prop.c:2551
#3 0x0000000000b20091 in try_make_edge_direct_virtual_call (ie=0x7fffef50a8f0, jfunc=0x7ffff085b078, new_root_info=0x1e4cce0)
    at ../../gcc/ipa-prop.c:2799
#4 0x0000000000b201e2 in update_indirect_edges_after_inlining (cs=0x7fffef9baf08, node=<cgraph_node* 0x7ffff0ad58f8 "getMeanVal">, new_edges=0x0)
    at ../../gcc/ipa-prop.c:2852
#5 0x0000000000b20476 in propagate_info_to_inlined_callees (cs=0x7fffef9baf08, node=<cgraph_node* 0x7ffff0ad58f8 "getMeanVal">, new_edges=0x0)
    at ../../gcc/ipa-prop.c:2924
#6 0x0000000000b20c3d in ipa_propagate_indirect_call_infos (cs=0x7fffef9baf08, new_edges=0x0) at ../../gcc/ipa-prop.c:3086
#7 0x000000000124e183 in inline_call (e=0x7fffef9baf08, update_original=true, new_edges=0x0, overall_size=0x0, update_overall_summary=true)
    at ../../gcc/ipa-inline-transform.c:277
#8 0x000000000124c6da in inline_to_all_callers (node=<cgraph_node* 0x7ffff0ad58f8 "getMeanVal">, data=0x7fffffffe024)
    at ../../gcc/ipa-inline.c:1987
#9 0x00000000008f9a18 in cgraph_for_node_and_aliases (node=<cgraph_node* 0x7ffff0ad58f8 "getMeanVal">, callback=
    0x124c5f5 <inline_to_all_callers(cgraph_node*, void*)>, data=0x7fffffffe024, include_overwritable=true) at ../../gcc/cgraph.c:2212
#10 0x000000000124cacc in ipa_inline () at ../../gcc/ipa-inline.c:2118
#11 0x000000000124d385 in (anonymous namespace)::pass_ipa_inline::execute (this=0x1c73710) at ../../gcc/ipa-inline.c:2412
#12 0x0000000000c299d6 in execute_one_pass (pass=<opt_pass* 0x1c73710 "inline"(53)>) at ../../gcc/passes.c:2229
#13 0x0000000000c2a71b in execute_ipa_pass_list (pass=<opt_pass* 0x1c73710 "inline"(53)>) at ../../gcc/passes.c:2607
#14 0x00000000009042ad in ipa_passes () at ../../gcc/cgraphunit.c:2084
#15 0x000000000090455e in compile () at ../../gcc/cgraphunit.c:2174
#16 0x0000000000904988 in finalize_compilation_unit () at ../../gcc/cgraphunit.c:2329
#17 0x000000000068b61d in cp_write_global_declarations () at ../../gcc/cp/decl2.c:4612
#18 0x0000000000d0ee72 in compile_file () at ../../gcc/toplev.c:562
#19 0x0000000000d11015 in do_compile () at ../../gcc/toplev.c:1914
#20 0x0000000000d11180 in toplev_main (argc=8, argv=0x7fffffffe358) at ../../gcc/toplev.c:1990
#21 0x00000000012c0464 in main (argc=8, argv=0x7fffffffe358) at ../../gcc/main.c:36