diff options
author | Jason Merrill <jason@redhat.com> | 2016-04-15 00:02:49 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2016-04-15 00:02:49 -0400 |
commit | 8e718ecbb0ded9686113e64c9241c083b7afc620 (patch) | |
tree | c022add6edc574e3112a7cae9d0a261c7de1c0c1 /gcc/cp/typeck2.c | |
parent | 26144dde3b68a331a8db86a9c8eaaa63d572bce9 (diff) | |
download | gcc-8e718ecbb0ded9686113e64c9241c083b7afc620.zip gcc-8e718ecbb0ded9686113e64c9241c083b7afc620.tar.gz gcc-8e718ecbb0ded9686113e64c9241c083b7afc620.tar.bz2 |
re PR c++/70494 (Internal Compiler Error: Capturing an array of vectors in a lambda)
PR c++/70494
* decl.c (cxx_maybe_build_cleanup): Handle non-decls.
* typeck2.c (split_nonconstant_init_1): Use it.
From-SVN: r235003
Diffstat (limited to 'gcc/cp/typeck2.c')
-rw-r--r-- | gcc/cp/typeck2.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index b921689..e59ad51 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -688,14 +688,9 @@ split_nonconstant_init_1 (tree dest, tree init) code = build_stmt (input_location, EXPR_STMT, code); code = maybe_cleanup_point_expr_void (code); add_stmt (code); - if (type_build_dtor_call (inner_type)) - { - code = (build_special_member_call - (sub, complete_dtor_identifier, NULL, inner_type, - LOOKUP_NORMAL, tf_warning_or_error)); - if (!TYPE_HAS_TRIVIAL_DESTRUCTOR (inner_type)) - finish_eh_cleanup (code); - } + if (tree cleanup + = cxx_maybe_build_cleanup (sub, tf_warning_or_error)) + finish_eh_cleanup (cleanup); } num_split_elts++; |