summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.oliva/template6.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.oliva/template6.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.oliva/template6.C12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.oliva/template6.C b/gcc/testsuite/g++.old-deja/g++.oliva/template6.C
new file mode 100644
index 000000000..270d67695
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.oliva/template6.C
@@ -0,0 +1,12 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva <oliva@dcc.unicamp.br>
+// simplified from bug report by Meenaradchagan Vishnu <mvishnu@fore.com>
+
+template <typename> struct foo {};
+template <> void foo(); // { dg-error "not a template function" } bad specialization
+
+struct baz {};
+template <> void baz (); // { dg-error "not a template function" } bad specialization