From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A51573945C24; Tue, 22 Mar 2022 05:18:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A51573945C24 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103186] [11 Regression] ICE with lambda as default argument in template Date: Tue, 22 Mar 2022 05:18:37 +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: 11.2.0 X-Bugzilla-Keywords: assemble-failure, c++-lambda, ice-checking, 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: P2 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.3 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2022 05:18:37 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103186 --- Comment #15 from CVS Commits --- The releases/gcc-11 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:97949b796566ad10895e69aadafb2462e45617b6 commit r11-9684-g97949b796566ad10895e69aadafb2462e45617b6 Author: Jason Merrill Date: Wed Jan 26 16:42:57 2022 -0500 c++: lambda in template default argument [PR103186] The problem with this testcase was that since my patch for PR97900 we weren't preserving DECL_UID identity for parameters of instantiations of templated functions, so using those parameters as the keys for the defarg_inst map broke. I think this was always fragile given the possibility of redeclarations, so instead of reverting that change let's switch to keying off the function. Memory use compiling stdc++.h is not noticeably different. PR c++/103186 gcc/cp/ChangeLog: * pt.c (defarg_inst): Use tree_vec_map_cache_hasher. (defarg_insts_for): New. (tsubst_default_argument): Adjust. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/lambda/lambda-defarg10.C: New test.=