diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7387708ebf4..6b66a35f957 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-06-20 Martin Jambor + + PR ipa/61211 + * cgraph.c (clone_of_p): Allow skipped_branch to deal with + expanded clones. + 2014-06-20 Kyrylo Tkachov * config/aarch64/iterators.md (VCOND): Handle SI and HI modes. diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 610bf6717c1..afd41b71798 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -2563,11 +2563,16 @@ clone_of_p (struct cgraph_node *node, struct cgraph_node *node2) skipped_thunk = true; } - if (skipped_thunk - && (!node2->clone_of - || !node2->clone.args_to_skip - || !bitmap_bit_p (node2->clone.args_to_skip, 0))) - return false; + if (skipped_thunk) + { + if (!node2->clone.args_to_skip + || !bitmap_bit_p (node2->clone.args_to_skip, 0)) + return false; + if (node2->former_clone_of == node->decl) + return true; + else if (!node2->clone_of) + return false; + } while (node != node2 && node2) node2 = node2->clone_of;