aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/expr.c10
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fecac21..0234146 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2003-04-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * expr.c (store_constructor): Set RTX_UNCHANGING_P if readonly_field_p
+ before clearing.
+
2003-04-21 Mark Mitchell <mark@codesourcery.com>
* config/i386/winnt.c (i386_pe_mark_dllimport): Make the new RTL
diff --git a/gcc/expr.c b/gcc/expr.c
index abf0875..f87f9c9 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -4899,7 +4899,15 @@ store_constructor (exp, target, cleared, size)
|| ((HOST_WIDE_INT) GET_MODE_SIZE (GET_MODE (target))
== size)))
{
- clear_storage (target, GEN_INT (size));
+ rtx xtarget = target;
+
+ if (readonly_fields_p (type))
+ {
+ xtarget = copy_rtx (xtarget);
+ RTX_UNCHANGING_P (xtarget) = 1;
+ }
+
+ clear_storage (xtarget, GEN_INT (size));
cleared = 1;
}