https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126201

            Bug ID: 126201
           Summary: ICE in in resolve_typename_type, at cp/pt.cc:31112
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Created attachment 64990
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64990&action=edit
testcase

While reducing another ICE, the reducer found this:
the error is genuine, but no ICE on gcc15/16.

$ cat testcase2.i 
struct __strip_reference_wrapper;
template <typename> using __decay_and_strip __strip_reference_wrapper;
template <typename, typename> struct pair;
template <typename _T1> make_pair() {
  typedef typename __decay_and_strip<_T1>::__type __ds_type1;
  typedef typename __ds_type2;
  pair<__ds_type1, __ds_type2>

$ g++-17 -c testcase2.i 
testcase2.i:2:45: error: expected '=' before '__strip_reference_wrapper'
    2 | template <typename> using __decay_and_strip __strip_reference_wrapper;
      |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~
testcase2.i:4:25: error: ISO C++ forbids declaration of 'make_pair' with no
type [-fpermissive]
    4 | template <typename _T1> make_pair() {
      |                         ^~~~~~~~~
testcase2.i: In function 'int make_pair()':
testcase2.i:6:20: error: expected nested-name-specifier before '__ds_type2'
[-Wtemplate-body]
    6 |   typedef typename __ds_type2;
      |                    ^~~~~~~~~~
testcase2.i:7:30: internal compiler error: in resolve_typename_type, at
cp/pt.cc:31112
    7 |   pair<__ds_type1, __ds_type2>
      |                              ^

gcc version 17.0.0 20260710 (experimental)
1f949c2f1ab60a8b3e3d99faff337a921150d2f4
  • [Bug c++/126201] New: ICE ... manuel.lauss at googlemail dot com via Gcc-bugs

Reply via email to