From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7F901397280A; Thu, 18 Jun 2020 15:51:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F901397280A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1592495492; bh=0D54UmTYC9F2lt77N1vf1FGvcZLB++uHdwcwJI+8hFI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=flFNAPUEU74Qk66Nwc2sbyBhKLPqhqf0pqbPtm49cmycnTCIdA+ZbtEflWvkUdN6H lN7CX/iq5taXBOSoxCrvFPuRTaqg+qGAUYgznwEZbOGXQ4aT7asMdyDo5pu7LebVw+ kWntUQz3yG2WrOLHiE94vItwSzQsr+QSRxwVg7/o= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95735] ICE on invalid non-type template argument Date: Thu, 18 Jun 2020 15:51:32 +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: 10.1.0 X-Bugzilla-Keywords: ice-on-invalid-code, patch 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: mpolacek 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 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: Thu, 18 Jun 2020 15:51:32 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95735 --- Comment #4 from CVS Commits --- The master branch has been updated by Marek Polacek : https://gcc.gnu.org/g:5421fae8b17c7401f3a4ac5b9f414a47f7bda379 commit r11-1516-g5421fae8b17c7401f3a4ac5b9f414a47f7bda379 Author: Marek Polacek Date: Thu Jun 18 09:38:42 2020 -0400 c++: ICE in requires-expressions with invalid args [PR95735] This ICE-on-invalid goes back to GCC 6. In finish_template_variable, if coerce_innermost_template_parms returns error_mark_node, we pass it down to constraints_satisfied_p and that error_mark_node flows down to various satisfy_* functions and then to various tsubst_* functions, where we crash. diagnose_constraints also doesn't cope with error arglist, so I think we should just return as in the patch below. gcc/cp/ChangeLog: PR c++/95735 * pt.c (finish_template_variable): Return if coerce_innermost_template_parms return error_mark_node. gcc/testsuite/ChangeLog: PR c++/95735 * g++.dg/cpp2a/concepts-err2.C: New test.=