aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorOlivier Hainque <hainque@act-europe.fr>2003-04-19 00:11:57 +0200
committerRichard Kenner <kenner@gcc.gnu.org>2003-04-18 18:11:57 -0400
commite59baa1f83fd053979c637f12f89cdf04d1d5ed5 (patch)
tree6969ca4ed91ad3bb2b2cec1840cf3c2ba1608f4b /gcc
parent8dcea3f35aa46a95aef9b4841b686744214f5690 (diff)
downloadgcc-e59baa1f83fd053979c637f12f89cdf04d1d5ed5.zip
gcc-e59baa1f83fd053979c637f12f89cdf04d1d5ed5.tar.gz
gcc-e59baa1f83fd053979c637f12f89cdf04d1d5ed5.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/integrate.c8
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b21d812..0a9d5e2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2003-04-18 Olivier Hainque <hainque@act-europe.fr>
+
+ * 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.
+
2003-04-18 Vincent Celier <celier@gnat.com>
* dwarf2out.c (loc_descriptor_from_tree): Treat all *_MOD_EXPR
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