[Bug c++/97679] New: ICE with CTAD on a nested class template with constrained constructor

ppalka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 2 18:47:47 GMT 2020


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

            Bug ID: 97679
           Summary: ICE with CTAD on a nested class template with
                    constrained constructor
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppalka at gcc dot gnu.org
  Target Milestone: ---

$ cat testcase.C
template <bool V> struct A {
  template <class T> struct B { B(T) requires V; };
};

A<true>::B x(0);

$ g++ -std=c++20 testcase.C
testcase.C: In substitution of ‘template<class T> B(T)-> A<true>::B<T> requires
 T [with T = int]’:
testcase.C:5:15:   required from here
testcase.C:5:15: internal compiler error: Segmentation fault
    5 | A<true>::B x(0);
      |               ^


More information about the Gcc-bugs mailing list