Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.pt / spec15.C
blobc812da068f59c57ebbe18c8de176379c4dd6f326
1 // { dg-do run  }
2 extern "C" void abort();
4 template <class T>
5 struct S1
7   static void f();
8 };
10 template <>
11 void S1<int>::f() {}
13 struct S2
15   template <class T>
16   static void g(T);
19 template <>
20 void S2::g(double) {}
22 template <>
23 void S2::g<int>(int) {}
25 template <class T>
26 struct S3
28   template <class U>
29   static int h(U);
32 template <>
33 template <>
34 int S3<double>::h(int) { return 0; }
36 template <>
37 template <>
38 int S3<char>::h(int) { return 1; }
40 int main()
42   S1<int>::f();
43   S2::g(3.0);
44   S2::g(7);
46   if (S3<double>::h(7) != 0) 
47     abort();
48   if (S3<char>::h(7) != 1)
49     abort();