From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 49BA13856259; Wed, 4 May 2022 14:48:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 49BA13856259 From: "chfast at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105481] New: ICE: unexpected expression of kind template_parm_index Date: Wed, 04 May 2022 14:48:42 +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: 11.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: chfast 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 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: Wed, 04 May 2022 14:48:42 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105481 Bug ID: 105481 Summary: ICE: unexpected expression of kind template_parm_index Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: chfast at gmail dot com Target Milestone: --- I get=20 intx_reduced.cpp: In substitution of =E2=80=98template uint f(const T&) [with unsigned int N =3D N; T =3D uint; =3D ]=E2=80=99: intx_reduced.cpp:18:31: required from here intx_reduced.cpp:13:5: internal compiler error: unexpected expression =E2= =80=98N=E2=80=99 of kind template_parm_index 13 | typename =3D typename std::enable_if>::value>::type> | ^~~~~~~~ for code: #include template struct uint { int words_[N]; }; template uint f(const uint& y) noexcept; template >::value>::type> uint f(const T& y) noexcept; using X =3D uint<1>; X (*fp)(X const&) noexcept =3D &f; The reduced version (cvise): template struct integral_constant { static constexpr _Tp value =3D __v; }; using true_type =3D integral_constant; using false_type =3D integral_constant; template using __bool_constant =3D integral_constant; template struct conditional; template struct __or_; template struct __or_<_B1, _B2> : conditional<_B1::value, _B1, _B2>::type {}; template struct is_const; template struct is_array : false_type {}; template struct is_function : __bool_constant::value> {}; template struct is_const : true_type {}; template , is_array<_To>>::value> struct __is_convertible_helper { template static true_type __test(int); typedef decltype(__test<_To>(0)) type; }; template struct is_convertible : __is_convertible_helper<_From, _To>::type {}; template struct enable_if { typedef _Tp type;= }; template struct conditional { typedef _Iffalse type; }; template struct uint; template uint f(const uint &); template < unsigned N, typename T, typename =3D typename enable_if>::value>::typ= e> uint f(T); using X =3D uint<1>; X (*fp)(X const &) =3D f;=