summaryrefslogtreecommitdiff
path: root/gcc/ipa-param-manipulation.h
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2019-09-24 13:20:57 +0200
committerMartin Jambor <jamborm@gcc.gnu.org>2019-09-24 13:20:57 +0200
commit231f75463c25e2a27c21c19f31bfbda421e12f49 (patch)
tree200b65b22f3b2a15b3d24ad3c3b159e334152e4d /gcc/ipa-param-manipulation.h
parent5a4d0da4f5840b9829316e93710b4bd4269b9366 (diff)
[PR 91831] Copy PARM_DECLs of artificial thunks
Hi, I am quite surprised I did not catch this before but the new ipa-param-manipulation does not copy PARM_DECLs when creating artificial thinks (I think it originally did but then I somehow removed during one cleanups). Fixed by adding the capability at the natural place. It is triggered whenever context of the PARM_DECL that is just taken from the original function does not match the target fndecl rather than by some constructor parameter because in such situation it is always the correct thing to do. Bootstrapped and tested on x86_64-linux. OK for trunk? Thanks, Martin 2019-09-24 Martin Jambor <mjambor@suse.cz> PR ipa/91831 * ipa-param-manipulation.c (carry_over_param): Make a method of ipa_param_body_adjustments, remove now unnecessary argument. Also copy in case of a context mismatch. (ipa_param_body_adjustments::common_initialization): Adjust call to carry_over_param. * ipa-param-manipulation.h (class ipa_param_body_adjustments): Add private method carry_over_param. testsuite/ * g++.dg/ipa/pr91831.C: New test. From-SVN: r276094
Diffstat (limited to 'gcc/ipa-param-manipulation.h')
-rw-r--r--gcc/ipa-param-manipulation.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ipa-param-manipulation.h b/gcc/ipa-param-manipulation.h
index 34477da51b7..8e9554563e4 100644
--- a/gcc/ipa-param-manipulation.h
+++ b/gcc/ipa-param-manipulation.h
@@ -370,6 +370,7 @@ public:
private:
void common_initialization (tree old_fndecl, tree *vars,
vec<ipa_replace_map *, va_gc> *tree_map);
+ tree carry_over_param (tree t);
unsigned get_base_index (ipa_adjusted_param *apm);
ipa_param_body_replacement *lookup_replacement_1 (tree base,
unsigned unit_offset);