diff mbox

C++ PATCH for c++/48531 (ICE with value-initialization of array)

Message ID 4DAB8B01.2030109@redhat.com
State New
Headers show

Commit Message

Jason Merrill April 18, 2011, 12:51 a.m. UTC
And a minor change I noticed while looking at this area.
commit bd069335f569a8c148aec0daf81b3e3a57f31ad4
Author: Jason Merrill <jason@redhat.com>
Date:   Sat Apr 16 17:31:36 2011 -0700

    	* tree.c (get_target_expr): Handle VEC_INIT_EXPR.
diff mbox

Patch

diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index ad004bb..25f2c32 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -605,6 +605,8 @@  get_target_expr (tree init)
 {
   if (TREE_CODE (init) == AGGR_INIT_EXPR)
     return build_target_expr (AGGR_INIT_EXPR_SLOT (init), init);
+  else if (TREE_CODE (init) == VEC_INIT_EXPR)
+    return build_target_expr (VEC_INIT_EXPR_SLOT (init), init);
   else
     return build_target_expr_with_type (init, TREE_TYPE (init));
 }