PR c++/93033 - incorrect tree node sharing with array init.
authorJason Merrill <jason@redhat.com>
Fri, 3 Jan 2020 22:10:56 +0000 (17:10 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 3 Jan 2020 22:10:56 +0000 (17:10 -0500)
commit8b5d34fc0687dcf53c80c7fa2baa285ebf753708
treedf4d4e3be118895b7402e47c1672c49f6a4402b5
parent657fea973b000000350c99de9e67bff0438d1503
PR c++/93033 - incorrect tree node sharing with array init.

The split_nonconstant_init piece is the only one necessary to fix the
testcase, but it occurred to me that we might as well not split when
-fno-exceptions.

* typeck2.c (split_nonconstant_init): Unshare non-decl.
* cp-gimplify.c (cp_gimplify_init_expr): Only split if -fexceptions.

From-SVN: r279871
gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c
gcc/cp/typeck2.c
gcc/testsuite/g++.dg/cpp0x/initlist-array9.C [new file with mode: 0644]