From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5E8883858C54; Tue, 6 Feb 2024 22:32:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E8883858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707258722; bh=VBWysUw6X3jY6jC1/nj644NJvYh9I7Zt08tvCg+HBgw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WZhGSDXo50/2H+GH1ohhxe/l/ebBbt+sj5V1FeRsOi6mMsTZ20IIabjPd2j+YjA0H RVuS4gp344dYO77TAYguH8EeCkrMTO2N4ZJTdTjfmU3tKotPEtbq0ZS7rbORI8V0dt Oy0mwP5188UYb6yf0Ji6uwb7FHownXZ8FLv3WaP4= From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113789] [13/14 Regression] ICE on P2266/C++23 `decltype(throw x)` where x is move-eligible parameter Date: Tue, 06 Feb 2024 22:32:02 +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: mpolacek at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113789 --- Comment #4 from Marek Polacek --- Um, that's not it. Since struct AutoPtr { AutoPtr() =3D default; AutoPtr(AutoPtr&) {} }; template int f (T p) { throw p; } void g () { f (AutoPtr ()); } is rejected in C++23, we probably should have rejected the decltype(throw p= , 1) candidate and never get to the throw in the body of the function f.=