(expand_expr, case CONSTRUCTOR): If TREE_READONLY, set
authorRichard Kenner <kenner@gcc.gnu.org>
Sun, 10 Dec 1995 13:46:44 +0000 (08:46 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Sun, 10 Dec 1995 13:46:44 +0000 (08:46 -0500)
RTX_UNCHANGING_P in TARGET.

From-SVN: r10696

gcc/expr.c

index 795ec85..7af6750 100644 (file)
@@ -4539,6 +4539,13 @@ expand_expr (exp, target, tmode, modifier)
                    MEM_IN_STRUCT_P (target) = 1;
                }
            }
+
+         if (TREE_READONLY (exp))
+           {
+             target = copy_rtx (target);
+             RTX_UNCHANGING_P (target) = 1;
+           }
+
          store_constructor (exp, target);
          return target;
        }