PR c++/85552 - wrong instantiation of dtor for DMI.
authorJason Merrill <jason@redhat.com>
Fri, 14 Jun 2019 13:22:33 +0000 (09:22 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 14 Jun 2019 13:22:33 +0000 (09:22 -0400)
commit8a26547b39e2e6ddc8097969c0a2c18f65afda6c
tree87ddd732969e6b4939b31e88abc78bb954b1b796
parente748435795f8c6f3b77fa0ac18a43151a52ad324
PR c++/85552 - wrong instantiation of dtor for DMI.

The problem here is that when processing direct-initialization of a data
member, we don't need to worry about destruction semantics; that will be
handled in the [cd]tor.  Conveniently, we already have tf_no_cleanup from a
similar fix to new-expressions.

* typeck2.c (digest_nsdmi_init): Set tf_no_cleanup for direct-init.

From-SVN: r272287
gcc/cp/ChangeLog
gcc/cp/typeck2.c
gcc/testsuite/g++.dg/cpp0x/nsdmi-list5.C [new file with mode: 0644]