gcc/libvtv/testsuite/libvtv.cc/dataentry.cc
Caroline Tice 41e96dc8f0 Update libvtv testsuite so that most of the tests now run under
the dejagnu test harness.

From-SVN: r202373
2013-09-08 16:35:14 -07:00

40 lines
747 B
C++

// { dg-do run }
template<int patch_dim, int patch_space_dim>
class DataOutInterface
{
public:
virtual ~DataOutInterface() {}
};
template <int dof_handler_dim, int patch_dim, int patch_space_dim=patch_dim>
class DataOut_DoFData : public DataOutInterface<patch_dim,patch_space_dim>
{
public:
virtual ~DataOut_DoFData() {}
class DataEntryBase {
public:
virtual ~DataEntryBase () {}
};
template <typename T>
class DataEntry : public DataEntryBase
{
public:
virtual ~DataEntry() {}
};
};
template <typename T> void Destroy(T * p) __attribute__((noinline));
template <typename T> void Destroy(T * p)
{
delete p;
}
int main()
{
DataOut_DoFData<3,3>::DataEntryBase * p = new DataOut_DoFData<3,3>::DataEntry<int>();
Destroy(p);
}