diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/spec9.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/spec9.C | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec9.C b/gcc/testsuite/g++.old-deja/g++.pt/spec9.C new file mode 100644 index 000000000..e2c5b4e52 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/spec9.C @@ -0,0 +1,22 @@ +// { dg-do assemble } +extern "C" void abort(); + +template <class T> +inline int f(T t) +{ + return 0; +} + +int main() +{ + if (!f(3)) + abort(); +} + +template <> +int f(int i) // { dg-error "specialization\[^\n\]*after instantiation" } +{ + return 1; +} + + |