summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/egcs/gcc/protector.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gnu/egcs/gcc/protector.c b/gnu/egcs/gcc/protector.c
index 14fa5ad2dfd..ac4e780613c 100644
--- a/gnu/egcs/gcc/protector.c
+++ b/gnu/egcs/gcc/protector.c
@@ -1041,6 +1041,10 @@ copy_args_for_protection (void)
MEM_IN_STRUCT_P (temp_rtx) = AGGREGATE_TYPE_P (TREE_TYPE (parms));
MEM_ALIAS_SET (temp_rtx) = get_alias_set (parms);
+ /* move_arg_location may change the contents of
+ DECL_RTL (parms). to avoid this, copies the contents */
+ DECL_RTL (parms) = copy_rtx (DECL_RTL (parms));
+
/* generate codes for copying the content */
store_expr (parms, temp_rtx, 0);