diff options
author | Jason Merrill <jason@redhat.com> | 2011-04-27 21:53:34 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-04-27 21:53:34 -0400 |
commit | c12ff9d8f0f20cd2de63de6f14b9f0330e7ceb66 (patch) | |
tree | 7fc7f017ff214e07e3790efe9c01bfe2b4b52bdb /gcc/cp/method.c | |
parent | fbaf0d0c082815cf67d958b7c9f596b1f814eca0 (diff) | |
download | gcc-c12ff9d8f0f20cd2de63de6f14b9f0330e7ceb66.zip gcc-c12ff9d8f0f20cd2de63de6f14b9f0330e7ceb66.tar.gz gcc-c12ff9d8f0f20cd2de63de6f14b9f0330e7ceb66.tar.bz2 |
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
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r-- | gcc/cp/method.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 6b26806..8b1b4dc 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -843,10 +843,16 @@ locate_fn_flags (tree type, tree name, tree argtype, int flags, /* Locate the dtor of TYPE. */ tree +get_dtor_sfinae (tree type, tsubst_flags_t complain) +{ + return locate_fn_flags (type, complete_dtor_identifier, NULL_TREE, + LOOKUP_NORMAL, complain); +} + +tree get_dtor (tree type) { - tree fn = locate_fn_flags (type, complete_dtor_identifier, NULL_TREE, - LOOKUP_NORMAL, tf_warning_or_error); + tree fn = get_dtor_sfinae (type, tf_warning_or_error); if (fn == error_mark_node) return NULL_TREE; return fn; |