From: Martin Jambor Date: Fri, 20 Jun 2014 09:54:39 +0000 (+0200) Subject: re PR ipa/61211 (ICE: verify_cgraph_node failed: edge points to wrong declaration... X-Git-Tag: releases/gcc-5.1.0~6758 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=803d0ab0e8ca92a0dcfa721771854c49ec3c1256;p=thirdparty%2Fgcc.git re PR ipa/61211 (ICE: verify_cgraph_node failed: edge points to wrong declaration with -O3 -fno-inline) 2014-06-20 Martin Jambor PR ipa/61211 * cgraph.c (clone_of_p): Allow skipped_branch to deal with expanded clones. From-SVN: r211844 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7387708ebf4b..6b66a35f957b 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 610bf6717c15..afd41b71798e 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;