summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1998-05-05 23:54:18 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1998-05-05 23:54:18 +0000
commitede3024b162fedb09465b293c3ba3a1e75254740 (patch)
treee2cf380d5c76f06511c24bbb377d937c75317669 /gcc
parent84d5a010df5b88b6e2d8c78233320d278958334e (diff)
downloadgcc-ede3024b162fedb09465b293c3ba3a1e75254740.tar.gz
* init.c (expand_vec_init): The initialization of each array
element is a full-expression. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19557 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/init.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index eb5c2619da9..6b34102006d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index a783fe5c00d..d95de78206a 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -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));