diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/static9.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/static9.C | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/static9.C b/gcc/testsuite/g++.old-deja/g++.pt/static9.C new file mode 100644 index 000000000..f23741cd3 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/static9.C @@ -0,0 +1,27 @@ +// { dg-do assemble } +// Origin: Mark Mitchell <mark@codesourcery.com> + +template <class T> +struct S { + int i; +}; + +template <class T> +struct X { + static S<T> s[]; +}; + +template <class T> +S<T> X<T>::s[] = { + { 3 } +}; + +struct Z {}; + +void f(S<Z>* s); + +void g() +{ + f (X<Z>::s); +} + |