Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.jason / template27.C
blobe16ef7d6ccf4540302f8a601ac0932984cd4b5b8
1 // { dg-do run  }
2 // PRMS Id: 6826
3 // Check that unnecessary templates are not instantiated.
5 template <class T> 
6 class Test 
7
8  public: 
9   void doThiss(); 
10   void doThat(); 
13 template <class T> 
14 void Test<T>::doThiss() 
15
16   T x; 
18   x.thiss(); 
19
21 template <class T> 
22 void Test<T>::doThat() 
23
24   T x; 
26   x.that(); 
27
29 class A 
30
31  public: 
32   void thiss() {}; 
35 class B
36
37  public: 
38   void that() {}; 
41 int main() 
42
43   Test<A> a; 
44   a.doThiss();                  // a.doThat() is not well formed, but then
45                                 // it's not used so needn't be instantiated. 
46   
47   Test<B> b;
48   b.doThat();                   // simillarly b.doThiss(); 
49