From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 46776388A409; Fri, 2 Apr 2021 23:57:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 46776388A409 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/99869] [11 Regression] ICE: in do_auto_deduction, at cp/pt.c:29620 Date: Fri, 02 Apr 2021 23:57:58 +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.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: ppalka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 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: Fri, 02 Apr 2021 23:57:59 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99869 --- Comment #4 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:260caabe10cde0158b87968a3bac85575301dafa commit r11-7963-g260caabe10cde0158b87968a3bac85575301dafa Author: Patrick Palka Date: Fri Apr 2 19:46:24 2021 -0400 c++: placeholder type constraint inside range-for [PR99869] In the testcase below, during ahead-of-time deduction of a constrained auto inside a range-based for loop, we trip over an assert within do_auto_deduction which expects the deduction context to be adc_return_type or adc_variable_type, but do_range_for_auto_deduction calls do_auto_deduction with the context defaulted to adc_unspecified. We could safely relax the assert to also accept adc_unspecified, but it seems the deduction context should really be adc_variable_type here. gcc/cp/ChangeLog: PR c++/99869 * parser.c (do_range_for_auto_deduction): Pass adc_variable_type to do_auto_deduction. gcc/testsuite/ChangeLog: PR c++/99869 * g++.dg/cpp2a/concepts-placeholder6.C: New test.=