summaryrefslogtreecommitdiff
path: root/libvtv/testsuite/libvtv.cc/event-main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libvtv/testsuite/libvtv.cc/event-main.cpp')
-rw-r--r--libvtv/testsuite/libvtv.cc/event-main.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/libvtv/testsuite/libvtv.cc/event-main.cpp b/libvtv/testsuite/libvtv.cc/event-main.cpp
new file mode 100644
index 00000000000..95c4640313a
--- /dev/null
+++ b/libvtv/testsuite/libvtv.cc/event-main.cpp
@@ -0,0 +1,15 @@
+// { dg-do run }
+
+#include "event-private.h"
+
+template<typename T> void derefIfNotNull(T* ptr)
+{
+ if (ptr != 0)
+ ptr->deref();
+}
+
+int main()
+{
+ Event * ev = new Event;
+ derefIfNotNull(ev);
+}