From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A348638582AC; Wed, 31 May 2023 18:19:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A348638582AC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685557141; bh=tj0+1107xxRyr8vehMD7fiJHvPaTQG8ZA5goPRTIR3U=; h=From:To:Subject:Date:From; b=n3ICC+GtnEhyhrEb8HrYTDLCwXUoP9QH0Mo/gaeWvo4ONTn/XWk16mOC6SLjWHC6k ay1s0xE5hGcwa0hnFTFTqPU9d3FqYPnIHlVxB9YOj0HSuI51IaTP3g/WSmiYZllDy6 fFV72o9ZZfA8cBn5sDw1qMnPjWR4tSmNruZHOxxc= From: "stevenxia990430 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110065] New: auto in template argument causes ICE, also accepts-invalid Date: Wed, 31 May 2023 18:19:01 +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: 12.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: stevenxia990430 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=3D110065 Bug ID: 110065 Summary: auto in template argument causes ICE, also accepts-invalid Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: stevenxia990430 at gmail dot com Target Milestone: --- The following program produces internal compiler error: Segmentation fault. Tested on GCC-trunk To quickly reproduce: https://gcc.godbolt.org/z/noY1qxK91 ``` #include #include auto main() -> int { std::cout << std::is_scoped_enum_v auto&>; return EXIT_SUCCESS; } ``` Note, if we remove the std::cout and produce the following code: ``` #include #include auto main() -> int { std::is_scoped_enum_v auto&>; return EXIT_SUCCESS; } ``` gcc compiles without any error, however this code is rejected by Clang (tes= ted on Clang-trunk)=