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

--- Comment #4 from Jeffrey A. Law <law at redhat dot com> ---
My bisection points to:

commit ca09820d964b68e165153c6770b4403dece92004
Author: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Thu Dec 19 14:06:45 2019 +0000

            PR c++/66139 - EH cleanups for partially constructed aggregates.

    There were several overlapping PRs about failure to clean up fully
    constructed subobjects when an exception is thrown during aggregate
    initialization of a temporary.  I fixed this for non-temporaries in the
    context of 57510, but that fix didn't handle temporaries.  So this patch
    does split_nonconstant_init at gimplification time, which is much smaller
    than alternatives I tried.

            PR c++/57510
            * cp-gimplify.c (cp_gimplify_init_expr): Use
split_nonconstant_init.
            * typeck2.c (split_nonconstant_init): Handle non-variable dest.
            (split_nonconstant_init_1): Clear TREE_SIDE_EFFECTS.
            * tree.c (is_local_temp): New.

    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@279576
138bc75d-0d04-0410-961f-82ee72b054a4

Just in case we're chasing multiple issues, I'm attaching the testcase from
pybind11.  Compile on x86_64 with -O2.

Reply via email to