re PR c++/40975 (ICE in copy_tree_r on array new)
authorJason Merrill <jason@redhat.com>
Thu, 28 Apr 2011 01:53:34 +0000 (21:53 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 28 Apr 2011 01:53:34 +0000 (21:53 -0400)
commitc12ff9d8f0f20cd2de63de6f14b9f0330e7ceb66
tree7fc7f017ff214e07e3790efe9c01bfe2b4b52bdb
parentfbaf0d0c082815cf67d958b7c9f596b1f814eca0
re PR c++/40975 (ICE in copy_tree_r on array new)

PR c++/40975
* cp-tree.def (VEC_INIT_EXPR): Add third operand.
* cp-tree.h (VEC_INIT_EXPR_NELTS): New.
* cp-gimplify.c (cp_gimplify_expr) [VEC_INIT_EXPR]: Handle it.
* tree.c (build_vec_init_expr): Handle getting pointer/nelts.
(build_vec_init_elt): Don't expect an array type.
(build_array_copy): Adjust.
* init.c (perform_member_init): Adjust.
(build_new_1): Use build_vec_init_expr.

From-SVN: r173056
13 files changed:
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-common.h
gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c
gcc/cp/cp-tree.def
gcc/cp/cp-tree.h
gcc/cp/init.c
gcc/cp/method.c
gcc/cp/tree.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/initlist49.C [new file with mode: 0644]
gcc/testsuite/g++.dg/init/new30.C [new file with mode: 0644]