diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/crash17.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/crash17.C | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/crash17.C b/gcc/testsuite/g++.dg/template/crash17.C new file mode 100644 index 000000000..9fa826b99 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/crash17.C @@ -0,0 +1,19 @@ +template <int I> +struct A { +}; + +template <typename T> +struct B { + typedef typename T::type type; + static const type j = T::j; + + A<j> b; +}; + +struct C { + typedef int type; + static const int j = 3; +}; + +int i = B<C>::j; + |