PR c++/52320 - EH cleanups for partially constructed arrays.
authorJason Merrill <jason@redhat.com>
Thu, 19 Dec 2019 14:07:22 +0000 (09:07 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 19 Dec 2019 14:07:22 +0000 (09:07 -0500)
commit26a68e922133b84155aaf38562e231a4a1989aa7
tree7ab2277480be4ca955d0292b5d6c13a5cb8ead2d
parent942d334ec3fdf360dfedc0f97d1b4747a1f56f08
PR c++/52320 - EH cleanups for partially constructed arrays.

This testcase wasn't fixed by the 66139 patch; split_nonconstant_init_1 was
failing to add a cleanup for an array member of a class (e.g. e1) that will
run if initializing a later member (e.g. e2) throws.

* typeck2.c (split_nonconstant_init_1): Add nested parm.
Add cleanup for whole array if true.

From-SVN: r279577
gcc/cp/ChangeLog
gcc/cp/typeck2.c
gcc/testsuite/g++.dg/eh/aggregate1.C [new file with mode: 0644]