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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:5f9fac6ca86458ef21ab91ca471429d63f954003

commit r13-3429-g5f9fac6ca86458ef21ab91ca471429d63f954003
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Fri Oct 21 09:00:41 2022 +0200

    c++: Fix up mangling ICE with void{} [PR106863]

    We ICE on the following testcase during mangling, finish_compound_literal
    returns for void{} void_node and the mangler doesn't handle it.
    Handling void_node in the mangler seems problematic to me, because
    we don't know for which case it has been created.
    The following patch arranges to mangle it as other compound literals
    with no operands, so it demangles as void{}, by returning a void type
    COMPOUND_LITERAL_P with no elements if processing_template_decl.
    Otherwise it keeps returning void_node.

    2022-10-21  Jakub Jelinek  <ja...@redhat.com>

            PR c++/106863
            * semantics.cc (finish_compound_literal): For void{}, if
            processing_template_decl return a COMPOUND_LITERAL_P
            CONSTRUCTOR rather than void_node.

            * g++.dg/cpp0x/dr2351-2.C: New test.

Reply via email to