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

--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Marek Polacek
<mpola...@gcc.gnu.org>:

https://gcc.gnu.org/g:9046f9aeae0f926e7365d39809a80855e7dc184a

commit r12-10713-g9046f9aeae0f926e7365d39809a80855e7dc184a
Author: Marek Polacek <pola...@redhat.com>
Date:   Mon Sep 16 16:42:38 2024 -0400

    c++: crash with anon VAR_DECL [PR116676]

    r12-3495 added maybe_warn_about_constant_value which will crash if
    it gets a nameless VAR_DECL, which is what happens in this PR.

    We created this VAR_DECL in cp_parser_decomposition_declaration.

            PR c++/116676

    gcc/cp/ChangeLog:

            * constexpr.cc (maybe_warn_about_constant_value): Check DECL_NAME.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp1z/constexpr-116676.C: New test.

    Reviewed-by: Jason Merrill <ja...@redhat.com>
    (cherry picked from commit dfe0d4389a3ce43179563a63046ad3e74d615a08)

Reply via email to