diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/other/crash-11.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/other/crash-11.C | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/other/crash-11.C b/gcc-4.9/gcc/testsuite/g++.dg/other/crash-11.C new file mode 100644 index 000000000..29ee231be --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/other/crash-11.C @@ -0,0 +1,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; + |