This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH for c++/48531 (ICE with value-initialization of array)
- From: Jason Merrill <jason at redhat dot com>
- To: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 17 Apr 2011 17:51:13 -0700
- Subject: Re: C++ PATCH for c++/48531 (ICE with value-initialization of array)
- References: <4DAB8AB0.70300@redhat.com>
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 --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));
}