init.c (expand_vec_init): The initialization of each array element is a full-expression.
authorJason Merrill <jason@yorick.cygnus.com>
Tue, 5 May 1998 23:54:18 +0000 (23:54 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 5 May 1998 23:54:18 +0000 (19:54 -0400)
* init.c (expand_vec_init): The initialization of each array
element is a full-expression.

From-SVN: r19557

gcc/cp/ChangeLog
gcc/cp/init.c

index eb5c2619da90097a64a59c2f8839ee2aaa7d732b..6b34102006d91aa686a9dcda9c0bb36891588bc4 100644 (file)
@@ -1,3 +1,8 @@
+Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * init.c (expand_vec_init): The initialization of each array
+       element is a full-expression.
+
 Tue May  5 18:24:13 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
 
        * method.c: Add a call to build_type_variant to get the right type.
index a783fe5c00d4c045c577f5604a3505b460dd3891..d95de78206ac1f41651ca7931e621178971fd24b 100644 (file)
@@ -2860,6 +2860,9 @@ expand_vec_init (decl, base, maxindex, init, from_array)
        expand_eh_region_start ();
       expand_start_loop_continue_elsewhere (1);
 
+      /* The initialization of each array element is a full-expression.  */
+      expand_start_target_temps ();
+
       if (from_array)
        {
          tree to = build1 (INDIRECT_REF, type, base);
@@ -2895,6 +2898,10 @@ expand_vec_init (decl, base, maxindex, init, from_array)
       if (base2)
        expand_assignment (base2,
                           build (PLUS_EXPR, build_pointer_type (type), base2, size), 0, 0);
+
+      /* Cleanup any temporaries needed for the initial value.  */
+      expand_end_target_temps ();
+
       expand_loop_continue_here ();
       expand_exit_loop_if_false (0, build (NE_EXPR, boolean_type_node,
                                           build (PREDECREMENT_EXPR, ptrdiff_type_node, iterator, integer_one_node), minus_one));