summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroaki Etoh <etoh@cvs.openbsd.org>2003-10-07 01:20:27 +0000
committerHiroaki Etoh <etoh@cvs.openbsd.org>2003-10-07 01:20:27 +0000
commit6db7ba32cea7f7b1f32c1a9f51896acc445a4d97 (patch)
treeae14fa5b0ae1d5ce56f8035291c79779f5f6b15f
parent4ada4f1a9af9c58a224afa1673f94fec75f54337 (diff)
copy_args_for_protection: fix the problem that move_arg_location may corrupt the contents of DECL_RTL (parms).
ok pvalchev@
-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);