diff options
Diffstat (limited to 'gcc-4.9/libvtv/testsuite/libvtv.cc/event-main.cpp')
-rw-r--r-- | gcc-4.9/libvtv/testsuite/libvtv.cc/event-main.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc-4.9/libvtv/testsuite/libvtv.cc/event-main.cpp b/gcc-4.9/libvtv/testsuite/libvtv.cc/event-main.cpp new file mode 100644 index 000000000..95c464031 --- /dev/null +++ b/gcc-4.9/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); +} |