view gcc/testsuite/g++.dg/template/crash128.C @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR c++/54090

template <int n>
struct X {

  template <int N, bool = (n >= N), typename T = void> struct Y;

  template <int N, typename T>
  struct Y<N, true, T> {};

  static const int M = n / 2;

  template <typename T>
  struct Y<X::M, true, T> {};
};

void foo() {
  X<10>::Y<10/2> y;
}