https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85552

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Jun 14 13:22:33 2019
New Revision: 272287

URL: https://gcc.gnu.org/viewcvs?rev=272287&root=gcc&view=rev
Log:
        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.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/nsdmi-list5.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck2.c

Reply via email to