expr.c (store_constructor): If a field is non addressable and the target is a MEM...
authorGraham Stott <grahams@redhat.com>
Thu, 23 Nov 2000 20:15:36 +0000 (20:15 +0000)
committerGraham Stott <grahams@gcc.gnu.org>
Thu, 23 Nov 2000 20:15:36 +0000 (20:15 +0000)
* expr.c (store_constructor): If a field is non addressable and
the target is a MEM use MEM_ALIAS_SET otherwise use get_alias_set.

From-SVN: r37700

gcc/ChangeLog
gcc/expr.c

index b8eb3705398d2ec0fcc302a0e6b0a3b55f6cf1af..df496a0fe73f5aaf4ffd011ac07d105c74b33e86 100644 (file)
@@ -1,3 +1,8 @@
+2000-11-23  Graham Stott  <grahams@redhat.com>
+
+       * expr.c (store_constructor): If a field is non addressable and
+       the target is a MEM use MEM_ALIAS_SET otherwise use get_alias_set.
+
 2000-11-23  Bernd Schmidt  <bernds@redhat.co.uk>
 
        * flow.c (print_rtl_and_abort): New function.
index e9cd6eb9002f021fd9a4a730aef0115562cf1ff6..cbe46dd955802739ab4711d511de210aaaba842e 100644 (file)
@@ -4408,7 +4408,8 @@ store_constructor (exp, target, align, cleared, size)
 #endif
          store_constructor_field (to_rtx, bitsize, bitpos, mode,
                                   TREE_VALUE (elt), type, align, cleared,
-                                  DECL_NONADDRESSABLE_P (field)
+                                  (DECL_NONADDRESSABLE_P (field)
+                                  && GET_CODE (to_rtx) == MEM)
                                   ? MEM_ALIAS_SET (to_rtx)
                                   : get_alias_set (TREE_TYPE (field)));
        }