From 821fafedb525c066a5de5ebf6bcd6c4673671b8a Mon Sep 17 00:00:00 2001 From: ienkovich Date: Wed, 13 Jul 2016 12:19:44 +0000 Subject: gcc/ Backport from mainline r238086. 2016-07-07 Ilya Enkovich PR ipa/71624 * ipa-inline-analysis.c (compute_inline_parameters): Set local.can_change_signature to false for intrumentation thunk callees. gcc/testsuite/ Backport from mainline r238086. 2016-07-07 Ilya Enkovich PR ipa/71624 * g++.dg/pr71624.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@238295 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ipa-inline-analysis.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gcc/ipa-inline-analysis.c') diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index 824e5a99203..04b4549533a 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -2977,6 +2977,18 @@ compute_inline_parameters (struct cgraph_node *node, bool early) node->local.can_change_signature = !e; } } + + /* Functions called by instrumentation thunk can't change signature + because instrumentation thunk modification is not supported. */ + if (node->local.can_change_signature) + for (e = node->callers; e; e = e->next_caller) + if (e->caller->thunk.thunk_p + && e->caller->thunk.add_pointer_bounds_args) + { + node->local.can_change_signature = false; + break; + } + estimate_function_body_sizes (node, early); for (e = node->callees; e; e = e->next_callee) -- cgit v1.2.1