aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/deduct6.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/deduct6.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/deduct6.C24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/deduct6.C b/gcc/testsuite/g++.old-deja/g++.pt/deduct6.C
new file mode 100644
index 00000000000..7fcef4edc4b
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/deduct6.C
@@ -0,0 +1,24 @@
+// Build don't link:
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 13 Feb 2001 <nathan@codesourcery.com>
+
+// Bug 1962. We were not dealing with qualified array types properly.
+
+#include <stdio.h>
+
+template <typename T, unsigned I> int Baz (T (&obj)[I])
+{
+ printf ("%s\n", __PRETTY_FUNCTION__);
+ return 1;
+}
+
+int main ()
+{
+ static int const ca[1] = {1};
+ static int a[1] = {1};
+
+ Baz (ca);
+ Baz (a);
+
+ return 0;
+}