aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-inline-transform.c
diff options
context:
space:
mode:
authorIlya Enkovich <ilya.enkovich@intel.com>2016-07-13 11:02:15 +0000
committerIlya Enkovich <ienkovich@gcc.gnu.org>2016-07-13 11:02:15 +0000
commitc7ed8938d6a62e532c89c25f54851b8c4fef1d88 (patch)
tree98e7d146f2b355e33ae56af0b7681f075865f375 /gcc/ipa-inline-transform.c
parent5ce15300a0ef85a37fb9d90299ab73b994b67fca (diff)
downloadgcc-c7ed8938d6a62e532c89c25f54851b8c4fef1d88.zip
gcc-c7ed8938d6a62e532c89c25f54851b8c4fef1d88.tar.gz
gcc-c7ed8938d6a62e532c89c25f54851b8c4fef1d88.tar.bz2
re PR ipa/71633 ([CHKP] internal compiler error: in inline_call)
gcc/ PR ipa/71633 * ipa-inline-transform.c (inline_call): Support instrumented thunks. gcc/testsuite/ PR ipa/71633 * g++.dg/pr71633.C: New test. From-SVN: r238290
Diffstat (limited to 'gcc/ipa-inline-transform.c')
-rw-r--r--gcc/ipa-inline-transform.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c
index 9ac1efc..98c7f96 100644
--- a/gcc/ipa-inline-transform.c
+++ b/gcc/ipa-inline-transform.c
@@ -319,10 +319,14 @@ inline_call (struct cgraph_edge *e, bool update_original,
to = to->global.inlined_to;
if (to->thunk.thunk_p)
{
+ struct cgraph_node *target = to->callees->callee;
if (in_lto_p)
to->get_untransformed_body ();
to->expand_thunk (false, true);
- e = to->callees;
+ /* When thunk is instrumented we may have multiple callees. */
+ for (e = to->callees; e && e->callee != target; e = e->next_callee)
+ ;
+ gcc_assert (e);
}