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

--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>:

https://gcc.gnu.org/g:d33c3b5ac9b9b3e314ae9118d483ade7e91a80a5

commit r14-7260-gd33c3b5ac9b9b3e314ae9118d483ade7e91a80a5
Author: Patrick Palka <ppa...@redhat.com>
Date:   Mon Jan 15 16:49:19 2024 -0500

    c++: non-dep array list-init w/ non-triv dtor [PR109899]

    The get_target_expr call added in r12-7069-g119cea98f66476 causes us
    for the below testcase to call build_vec_delete in a template context,
    which builds a templated destructor call and checks expr_noexcept_p for
    it, which ICEs because the call has templated form.

    Much of the work of build_vec_delete however is code generation and thus
    will just get discarded in a template context, and that includes the
    code guarded by expr_noexcept_p.  So this patch narrowly fixes this ICE
    by eliding the expr_noexcept_p call when in a template context.

            PR c++/109899

    gcc/cp/ChangeLog:

            * init.cc (build_vec_delete_1): Assume expr_noexcept_p returns
            false in a template context.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/initlist-array21.C: New test.

    Reviewed-by: Jason Merrill <ja...@redhat.com>

Reply via email to