PR116019: Improve tail call error message
[official-gcc.git] / libvtv / testsuite / libvtv.cc / template-list2.cc
blob3df8d372418660e6f72d5869aa49a28442f033b9
1 // { dg-do run }
3 #include <assert.h>
5 extern "C" int printf(const char *, ...);
7 class Subscriptor
9 public:
11 Subscriptor()
12 { counter = 1;}
14 virtual ~Subscriptor()
16 counter--;
17 assert(counter == 0);
20 private:
21 static int counter;
24 int Subscriptor::counter;
26 template <typename number>
27 class Polynomial : public Subscriptor
31 class LagrangeEquidistant: public Polynomial<double>
35 template<typename _Tp>
36 inline void
37 _MyDestroy(_Tp* __pointer)
38 { __pointer->~_Tp(); }
40 int main()
42 LagrangeEquidistant * s1 = new LagrangeEquidistant;
43 _MyDestroy(s1);
45 return 0;