summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/spec38.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/spec38.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/spec38.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec38.C b/gcc/testsuite/g++.old-deja/g++.pt/spec38.C
new file mode 100644
index 000000000..75095575b
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/spec38.C
@@ -0,0 +1,17 @@
+// { dg-do assemble }
+//
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 19 Jan 2001 <nathan@codesourcery.com>
+
+// Bug 1638. We failed to check if a function instantiation produced a void
+// parameter type.
+
+template <class T> struct S
+{
+ int f (T); // { dg-error "" } void type
+};
+
+void foo ()
+{
+ S<void> s;
+}