diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-18 22:11:57 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-18 22:11:57 +0000 |
commit | 762b92520efc5f7acffde22d3c14923423761333 (patch) | |
tree | 6969ca4ed91ad3bb2b2cec1840cf3c2ba1608f4b /gcc/integrate.c | |
parent | d7f71e5a5adfe2ee310a78d7c1ed176efc55b28b (diff) | |
download | gcc-762b92520efc5f7acffde22d3c14923423761333.tar.gz |
* integrate.c (expand_inline_function): Ensure non-const actuals
don't end up const in the caller's flow after conversion to possibly
const formal type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65794 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/integrate.c')
-rw-r--r-- | gcc/integrate.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c index 7a1865881c6..60fa2acd13a 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -810,6 +810,14 @@ expand_inline_function (fndecl, parms, target, ignore, type, else arg_vals[i] = 0; + /* If the formal type was const but the actual was not, we might + end up here with an rtx wrongly tagged unchanging in the caller's + context. Fix that. */ + if (arg_vals[i] != 0 + && (GET_CODE (arg_vals[i]) == REG || GET_CODE (arg_vals[i]) == MEM) + && ! TREE_READONLY (TREE_VALUE (actual))) + RTX_UNCHANGING_P (arg_vals[i]) = 0; + if (arg_vals[i] != 0 && (! TREE_READONLY (formal) /* If the parameter is not read-only, copy our argument through |