https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91831

--- Comment #3 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Author: jamborm
Date: Tue Sep 24 11:20:57 2019
New Revision: 276094

URL: https://gcc.gnu.org/viewcvs?rev=276094&root=gcc&view=rev
Log:
[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  <mjam...@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.


Added:
    trunk/gcc/testsuite/g++.dg/ipa/pr91831.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa-param-manipulation.c
    trunk/gcc/ipa-param-manipulation.h
    trunk/gcc/testsuite/ChangeLog

Reply via email to