From e59baa1f83fd053979c637f12f89cdf04d1d5ed5 Mon Sep 17 00:00:00 2001 From: Olivier Hainque Date: Sat, 19 Apr 2003 00:11:57 +0200 Subject: integrate.c (expand_inline_function): Ensure non-const actuals don't end up const in the caller's flow after... * 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. From-SVN: r65794 --- gcc/integrate.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gcc/integrate.c') diff --git a/gcc/integrate.c b/gcc/integrate.c index 7a18658..60fa2ac 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 -- cgit v1.1