From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A8BFB38618BC; Thu, 1 Feb 2024 15:41:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A8BFB38618BC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706802077; bh=L5k/Gn9A/Mgy9IE3ANoEqX1rVJC1HtWfUuCGztcCetQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ti4Gz28eqJWbRdKHLH3DXIzOlFQbPmwX8bVCzo1ey3bBw4DafdQRedJO6DyhkeIP3 tsrMk5bV21WjltpjMcvdhuc2cxQqVVUpmZjuQ10dfrdDbGKJhJ0gMYKZOvT5nuFh/0 6DQoPQ8nYv7jku5diE271ybvFIjKjXfT4hnr+SFY= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/112437] ICE with throw inside concept sometimes and -std=c++20 Date: Thu, 01 Feb 2024 15:41:16 +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: 14.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: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112437 --- Comment #4 from GCC Commits --- The releases/gcc-13 branch has been updated by Marek Polacek : https://gcc.gnu.org/g:aa24f8f67fbff1c324c189b2bec9f58bd09f82dd commit r13-8268-gaa24f8f67fbff1c324c189b2bec9f58bd09f82dd Author: Marek Polacek Date: Wed Jan 31 17:33:26 2024 -0500 c++: ICE with throw inside concept [PR112437] We crash in the loop at the end of treat_lvalue_as_rvalue_p for code like template concept Throwable =3D requires(T x) { throw x; }; because the code assumes that we eventually reach sk_function_parms or sk_try and bail, but in a concept we're in a sk_namespace. We're already checking sk_try so we don't crash in a function-try-block, but I've added a test anyway. PR c++/112437 gcc/cp/ChangeLog: * typeck.cc (treat_lvalue_as_rvalue_p): Bail out on sk_namespac= e in the move on throw of parms loop. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-throw1.C: New test. * g++.dg/eh/throw4.C: New test. (cherry picked from commit 65b105b4f399559685200e1598ead8c7d0935c04)=