summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/opt/dtor4.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/opt/dtor4.h')
-rw-r--r--gcc/testsuite/g++.dg/opt/dtor4.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/opt/dtor4.h b/gcc/testsuite/g++.dg/opt/dtor4.h
new file mode 100644
index 000000000..d3b43beab
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/dtor4.h
@@ -0,0 +1,8 @@
+#include <cassert>
+
+struct S
+{
+ int a, i;
+ S () : i(1) {}
+ __attribute__((noinline)) ~S () { assert (i == 1); }
+};