From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D2EEA3839C42; Wed, 11 May 2022 19:30:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D2EEA3839C42 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105541] [12/13 Regression] ICE: Segmentation fault when template lambda in requires-clause Date: Wed, 11 May 2022 19:30:36 +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.0 X-Bugzilla-Keywords: 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: P1 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.2 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: Wed, 11 May 2022 19:30:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105541 --- Comment #5 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:88459c3965e2a2f62ab4d4c8b2ac8460b1a15c33 commit r13-332-g88459c3965e2a2f62ab4d4c8b2ac8460b1a15c33 Author: Jason Merrill Date: Wed May 11 14:53:26 2022 -0400 c++: lambda template in requires [PR105541] Since the patch for PR103408, the template parameters for the lambda in this test have level 1 instead of 2, and we were treating null template args= as 1 level of arguments, so tsubst_template_parms decided it had nothing to = do. Fixed by distinguishing between <> and no args at all, which is what we have in our "substitution" in a requires-expression. PR c++/105541 gcc/cp/ChangeLog: * cp-tree.h (TMPL_ARGS_DEPTH): 0 for null args. * parser.cc (cp_parser_enclosed_template_argument_list): Use 0-length TREE_VEC for <>. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/lambda-requires1.C: New test.=