gcc/testsuite/g++.dg/template/crash128.C
raw| 1 | // PR c++/54090 |
| 2 | |
| 3 | template <int n> |
| 4 | struct X { |
| 5 | |
| 6 | template <int N, bool = (n >= N), typename T = void> struct Y; |
| 7 | |
| 8 | template <int N, typename T> |
| 9 | struct Y<N, true, T> {}; |
| 10 | |
| 11 | static const int M = n / 2; |
| 12 | |
| 13 | template <typename T> |
| 14 | struct Y<X::M, true, T> {}; |
| 15 | }; |
| 16 | |
| 17 | void foo() { |
| 18 | X<10>::Y<10/2> y; |
| 19 | } |