https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65278
Aldy Hernandez <aldyh at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |WAITING CC| |dje at gcc dot gnu.org, | |hubicka at gcc dot gnu.org --- Comment #7 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- I take it back, this is entirely reproducible from a cross build, but to powerpc64-linux-gnu. This is an unrecognizable insn in the PPC backend: (call_insn/j 5 4 6 (parallel [ (call (mem:SI (symbol_ref/i:DI ("_ZNK17TwoTreeLikelihood5m_fn1ERKiS1_") [flags 0x1] <function_decl 0x3fffababc138 m_fn1>) [0 S4 A8]) (const_int 0 [0])) (use (const_int 0 [0])) (use (reg:SI 65 lr)) (simple_return) ]) a.cc:8 -1 (nil) (nil)) Presumably this wants to match the following, but the symbol_ref is not in the current file (current_file_function_operand predicate)??: (define_insn "*sibcall_local64" [(call (mem:SI (match_operand:DI 0 "current_file_function_operand" "s,s")) (match_operand 1 "" "g,g")) (use (match_operand:SI 2 "immediate_operand" "O,n")) (use (reg:SI LR_REGNO)) (simple_return)] "TARGET_64BIT && (INTVAL (operands[2]) & CALL_LONG) == 0" This started happening with Honza's patch (below). The offending insn gets created in rs6000_output_mi_thunk, but without the patch there are no thunks, so this function doesn't even get called. Perhaps either Honza or David can comment on what needs to happen here, whether the icf code needs to be tweaked, or a non-local insn needs to be added to the ppc backend. commit ce7711dff63867c071494efec46da4f8b973f27d Author: hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Fri Feb 27 02:06:48 2015 +0000 PR bootstrap/65150 * ipa-icf.c (symbol_compare_collection::symbol_compare_colleciton): Use address_matters_p. (redirect_all_callers, set_addressable): New functions. (sem_function::merge): Reorganize and fix merging issues. (sem_variable::merge): Likewise. (sem_variable::compare_sections): Remove. * common.opt (fmerge-all-constants, fmerge-constants): Remove Optimization flag. * symtab.c (symtab_node::resolve_alias): When alias has aliases, redirect them. (symtab_node::make_decl_local): Set ADDRESSABLE bit when decl is used. (address_matters_1): New function. (symtab_node::address_matters_p): New function. * cgraph.c (cgraph_edge::verify_corresponds_to_fndecl): Fix check for merged flag. * cgraph.h (address_matters_p): Declare. (symtab_node::address_taken_from_non_vtable_p): Remove. (symtab_node::address_can_be_compared_p): New method. (ipa_ref::address_matters_p): Move here from ipa-ref.c; simplify. * ipa-visibility.c (symtab_node::address_taken_from_non_vtable_p): Remove. (comdat_can_be_unshared_p_1) Use address_matters_p. (update_vtable_references): Fix formating. * ipa-ref.c (ipa_ref::address_matters_p): Move inline. * cgraphunit.c (cgraph_node::create_wrapper): Drop UNINLINABLE flag. * cgraphclones.c: Preserve merged and icf_merged flags. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221040 138bc75d-0d04-0410-96