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

--- Comment #3 from Viktor Ostashevskyi <ostash at ostash dot kiev.ua> ---
Bisected to:

ee1de08d4d22648cf3168caa60e283135755da85 is the first bad commit
commit ee1de08d4d22648cf3168caa60e283135755da85
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Tue Dec 3 20:27:47 2019 +0100

    re PR c++/91369 (Implement P0784R7: constexpr new)

            PR c++/91369
            * constexpr.c (struct constexpr_global_ctx): Add cleanups member,
            initialize it in the ctor.
            (cxx_eval_constant_expression) <case TARGET_EXPR>: If
TARGET_EXPR_SLOT
            is already in the values hash_map, don't evaluate it again.  Put
            TARGET_EXPR_SLOT into hash_map even if not lval, and push it into
            save_exprs too.  If there is TARGET_EXPR_CLEANUP and not
            CLEANUP_EH_ONLY, push the cleanup to cleanups vector.
            <case CLEANUP_POINT_EXPR>: Save outer cleanups, set cleanups to
            local auto_vec, after evaluating the body evaluate cleanups and
            restore previous cleanups.
            <case TRY_CATCH_EXPR>: Don't crash if the first operand is
NULL_TREE.
            (cxx_eval_outermost_constant_expr): Set cleanups to local auto_vec,
            after evaluating the expression evaluate cleanups.

            * g++.dg/cpp2a/constexpr-new8.C: New test.

    From-SVN: r278945

Reply via email to