diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/memtemp81.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/memtemp81.C | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memtemp81.C b/gcc/testsuite/g++.old-deja/g++.pt/memtemp81.C new file mode 100644 index 000000000..37a3417bf --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp81.C @@ -0,0 +1,24 @@ +// { dg-do assemble } + +template <int i> class a +{ +public : +int k; + +template <int j> int f() const { return this->f<j-1>(); } + +int g() const { return f<i>(); } +}; + +template <> +template <> +int a<2>::f<0>() const { + return 0; +} + +int main() +{ +a<2> x; +return x.g(); +} + |