diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/memtemp25.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/memtemp25.C | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memtemp25.C b/gcc/testsuite/g++.old-deja/g++.pt/memtemp25.C new file mode 100644 index 000000000..6c196f5d4 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp25.C @@ -0,0 +1,20 @@ +// { dg-do link } +// GROUPS passed templates membertemplates +extern "C" int printf(const char*, ...); + +template <class X> +struct S +{ + template <class U> + void f(U u) { printf ("%d\n", sizeof (U)); } + + int i[4]; +}; + + +int main() +{ + S<char*> s; + s.f(3); + s.f(s); +} |