summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/template')
-rw-r--r--gcc/testsuite/g++.dg/template/pr11858.C5
-rw-r--r--gcc/testsuite/g++.dg/template/pr24663.C22
-rw-r--r--gcc/testsuite/g++.dg/template/unify12.C46
-rw-r--r--gcc/testsuite/g++.dg/template/unify13.C26
-rw-r--r--gcc/testsuite/g++.dg/template/unify14.C5
-rw-r--r--gcc/testsuite/g++.dg/template/unify15.C15
-rw-r--r--gcc/testsuite/g++.dg/template/unify16.C56
-rw-r--r--gcc/testsuite/g++.dg/template/unify17.C11
8 files changed, 0 insertions, 186 deletions
diff --git a/gcc/testsuite/g++.dg/template/pr11858.C b/gcc/testsuite/g++.dg/template/pr11858.C
deleted file mode 100644
index dc0d6881393..00000000000
--- a/gcc/testsuite/g++.dg/template/pr11858.C
+++ /dev/null
@@ -1,5 +0,0 @@
-// PR c++/11858
-
-template <typename T> struct S { static typename T::x f (); }; // { dg-error "" }
-template <class T> int f (int [sizeof(T::f())]);
-int const i = f<S<int> >(0); // { dg-error "no matching function" }
diff --git a/gcc/testsuite/g++.dg/template/pr24663.C b/gcc/testsuite/g++.dg/template/pr24663.C
deleted file mode 100644
index 2dc68c2ed24..00000000000
--- a/gcc/testsuite/g++.dg/template/pr24663.C
+++ /dev/null
@@ -1,22 +0,0 @@
-// PR c++/24663
-
-template<int I> int f1 (char[I]);
-template<int I> int f1 (char p1 = I);
-int i = f1<0>(0);
-
-template<typename T, int I> int f2 (T[I]); // { dg-error "" }
-int j = f2<int, 0>(0); // { dg-error "no matching function" }
-int k = f2<void, 1>(0); // { dg-error "no matching function" }
-
-int o[5];
-int l = f2<int[5], 1>(&o);
-
-template<int I> int f3 (char [][I]);
-template<int I> int f3 (char p1 = I);
-int x1 = f3<1>(0); // { dg-error "is ambiguous" }
-int x2 = f3<1>();
-
-template<typename T, int I> int f4 (T [][I]); // { dg-error "" }
-int y1 = f4<void, 1>(0); // { dg-error "no matching function" }
-int y2 = f4<int (void), 1>(0); // { dg-error "no matching function" }
-int y3 = f4<int&, 1>(0); // { dg-error "no matching function" }
diff --git a/gcc/testsuite/g++.dg/template/unify12.C b/gcc/testsuite/g++.dg/template/unify12.C
deleted file mode 100644
index 6e624e41d6a..00000000000
--- a/gcc/testsuite/g++.dg/template/unify12.C
+++ /dev/null
@@ -1,46 +0,0 @@
-// { dg-do run }
-#include <cassert>
-
-template<typename T, int I> int foo (T [I][I]) { return 0; }
-
-template int foo (char [][6]);
-
-template <typename T>
-int foo (T *)
-{
- return -1;
-}
-
-template <typename T>
-int foo (T [3][3])
-{
- return 1;
-}
-
-template <int I>
-int foo (bool [I][I])
-{
- return 2;
-}
-
-template <>
-int foo (bool [3][2])
-{
- return 3;
-}
-
-char x[3];
-bool y[4];
-bool z[3][2];
-
-int a = foo (&x);
-int b = foo (&y);
-int c = foo (z);
-
-int
-main ()
-{
- assert (a == 1);
- assert (b == 2);
- assert (c == 3);
-}
diff --git a/gcc/testsuite/g++.dg/template/unify13.C b/gcc/testsuite/g++.dg/template/unify13.C
deleted file mode 100644
index 56a46df7ee3..00000000000
--- a/gcc/testsuite/g++.dg/template/unify13.C
+++ /dev/null
@@ -1,26 +0,0 @@
-// { dg-do run }
-#include <cassert>
-
-template<typename T, int I> int foo (T [I][I]) { return 0; }
-
-template<typename T>
-int foo (T [3][2])
-{
- return 1;
-}
-
-template <>
-int foo (bool [3][2])
-{
- return 2;
-}
-
-bool z[3][2];
-
-int a = foo (z);
-
-int
-main ()
-{
- assert (a == 2);
-}
diff --git a/gcc/testsuite/g++.dg/template/unify14.C b/gcc/testsuite/g++.dg/template/unify14.C
deleted file mode 100644
index 7fda8fd381a..00000000000
--- a/gcc/testsuite/g++.dg/template/unify14.C
+++ /dev/null
@@ -1,5 +0,0 @@
-template <typename T, int X>
-void bar (T [X]) { }
-
-template <typename T, int X>
-void bar (const T [X]) { }
diff --git a/gcc/testsuite/g++.dg/template/unify15.C b/gcc/testsuite/g++.dg/template/unify15.C
deleted file mode 100644
index fe4848b998f..00000000000
--- a/gcc/testsuite/g++.dg/template/unify15.C
+++ /dev/null
@@ -1,15 +0,0 @@
-// { dg-do run }
-#include <cassert>
-
-template <typename T, int N>
-int bar (T (&) [N]) { return 0; }
-
-template <typename T, int N>
-int bar (const T (&) [N]) { return 1; }
-
-int
-main ()
-{
- const int s[2] = { 0 };
- assert (bar (s) == 1);
-}
diff --git a/gcc/testsuite/g++.dg/template/unify16.C b/gcc/testsuite/g++.dg/template/unify16.C
deleted file mode 100644
index 7b5a2aa4692..00000000000
--- a/gcc/testsuite/g++.dg/template/unify16.C
+++ /dev/null
@@ -1,56 +0,0 @@
-// { dg-do run }
-#include <cassert>
-
-template <typename T>
-struct Foo
-{
- static int foo (T) { return 0; }
-};
-
-template <typename T, int I>
-struct Foo<T[I]>
-{
- static int foo (T[I]) { return 1; }
-};
-
-template <int I>
-struct Foo<char[I]>
-{
- static int foo (char[I]) { return 2; }
-};
-
-template <typename T>
-struct Foo<T[5]>
-{
- static int foo (T[5]) { return 3; }
-};
-
-template <>
-struct Foo<char[5]>
-{
- static int foo (char[5]) { return 4; }
-};
-
-template <>
-struct Foo<const char[5]>
-{
- static int foo (const char[5]) { return 5; }
-};
-
-int a = Foo<const char[5]>::foo (0);
-int b = Foo<char[5]>::foo (0);
-int c = Foo<bool[5]>::foo (0);
-int d = Foo<char[4]>::foo (0);
-int e = Foo<bool[4]>::foo (0);
-int f = Foo<char[]>::foo (0);
-
-int
-main (void)
-{
- assert (a == 5);
- assert (b == 4);
- assert (c == 3);
- assert (d == 2);
- assert (e == 1);
- assert (f == 0);
-}
diff --git a/gcc/testsuite/g++.dg/template/unify17.C b/gcc/testsuite/g++.dg/template/unify17.C
deleted file mode 100644
index 2da8553aad8..00000000000
--- a/gcc/testsuite/g++.dg/template/unify17.C
+++ /dev/null
@@ -1,11 +0,0 @@
-void foo (int *);
-
-template <typename T>
-void bar (void (T[5])); // { dg-error "array of 'void'" }
-
-void
-baz (void)
-{
- bar (foo); // { dg-bogus "" }
- bar<void> (0); // { dg-error "no matching function" }
-}