https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91131

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Index: gcc/gimplify.c
===================================================================
--- gcc/gimplify.c      (revision 273355)
+++ gcc/gimplify.c      (working copy)
@@ -5005,7 +5004,7 @@ gimplify_init_constructor (tree *expr_p,
           one field to assign, initialize the target from a temporary.  */
        if (TREE_THIS_VOLATILE (object)
            && !TREE_ADDRESSABLE (type)
-           && num_nonzero_elements > 0
+           && (num_nonzero_elements > 0 || !cleared)
            && vec_safe_length (elts) > 1)
          {
            tree temp = create_tmp_var (TYPE_MAIN_VARIANT (type));


note your use of packed might end up doing more than one store depending
on the architecture.

Reply via email to