diff options
Diffstat (limited to 'gcc-4.9/libvtv/testsuite/libvtv.cc/dataentry.cc')
-rw-r--r-- | gcc-4.9/libvtv/testsuite/libvtv.cc/dataentry.cc | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/gcc-4.9/libvtv/testsuite/libvtv.cc/dataentry.cc b/gcc-4.9/libvtv/testsuite/libvtv.cc/dataentry.cc new file mode 100644 index 000000000..6246136e5 --- /dev/null +++ b/gcc-4.9/libvtv/testsuite/libvtv.cc/dataentry.cc @@ -0,0 +1,39 @@ +// { 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); +} |