From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ACD7E3857407; Fri, 21 Oct 2022 07:03:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ACD7E3857407 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666335816; bh=NoXwnQSiesWpPeBgHRcTy12Co1O8/p4wm3n8vT6A46g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VdvzXZvCHaltc6Eq5evuo2I8YCIv9QLgxEA37S+4aX0dMwR6WVkn5rp5lT9S4ZWIm oq/DrascMUuLV+cP8Kn7qD6+l2lOLRTtmg3CPAb5WVTeBheBasxBgxJuWZKxL2qHVn 1kLGv5tvm+OPRZjAPEtoIjPxVzLfPIb8V9qFGAM0= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106863] ICE in write_template_arg_literal, at cp/mangle.cc:3678 since r12-4782-geca767aa51d1f696 Date: Fri, 21 Oct 2022 07:03:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: ABI, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106863 --- Comment #5 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:5f9fac6ca86458ef21ab91ca471429d63f954003 commit r13-3429-g5f9fac6ca86458ef21ab91ca471429d63f954003 Author: Jakub Jelinek 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_liter= al 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 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.=