From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 936A63858D3C; Sun, 7 May 2023 04:16:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 936A63858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683433011; bh=2OuU9YnmFNrM9k4ekbZaJ9MEJBkLU62wAzjespIiFk0=; h=From:To:Subject:Date:From; b=EQv1FMZDyC3SVaMg/py3PBFsjavjQzCUxYUeWHf4redbVCH+t9aRcDZjKkj/vfNCB UUPUHGtA6sPJnz0EZhvfsiN8oOXYO+f5DHjk7ADrrMcGf5H8Kf/Xrgi9+Pzd0FeDjM RlqS1sxouqhsAilL10c/vdRTAT9SPrfmsSNa3bQE= From: "jlame646 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109763] New: GCC accepts invalid program involving decltype(classtype::memberfunction) when used with concepts Date: Sun, 07 May 2023 04:16:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jlame646 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D109763 Bug ID: 109763 Summary: GCC accepts invalid program involving decltype(classtype::memberfunction) when used with concepts Product: gcc Version: 13.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jlame646 at gmail dot com Target Milestone: --- The following invalid program is accepted by gcc trunk. https://godbolt.org/z/Ma67TTs5e ``` #include #include =20 #include template < typename T > concept test =3D std::same_as ; struct D { int func(int); }; int main() {=20 std::cout << test;=20=20=20=20=20=20 } ``` Note `decltype` on a non-static member function is not allowed and so it sh= ould be ill-formed.=