aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/other/crash-11.C
blob: 29ee231bee960dd2b6707f73c6134732ea7557d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Origin: PR c++/43327
// { dg-do compile }

template <typename _T>
struct A
{
  template <int _N, int _M> struct B;

  template <int _N>
  struct B<_N, _T::m>
  {
     static void f();
  };
};

struct C
{
  static int m;
};

void m()
{
  A<C>::B<1, 4>::f(); // { dg-error "incomplete type|not a valid" }
}

int C::m = 4;