summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/tree-ssa/pr25771.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/tree-ssa/pr25771.C')
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr25771.C33
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr25771.C b/gcc/testsuite/g++.dg/tree-ssa/pr25771.C
new file mode 100644
index 000000000..6823494ea
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr25771.C
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+int ggggg();
+struct string {
+ static int _S_empty_rep_storage[];
+ void _M_destroy();
+ char* _M_rep;
+ ~string()
+ {
+ if (_M_rep != (char*)&_S_empty_rep_storage )
+ if (ggggg() <= 0)
+ _M_destroy();
+ }
+};
+extern void SDL_FreeSurface(int surface);
+struct scoped_resource {
+ ~scoped_resource() {
+ SDL_FreeSurface(1);
+ }
+};
+struct surface {
+ scoped_resource surface_;
+};
+struct button {
+ string help_text_;
+ string label_;
+ surface image_;
+};
+struct scrollbar {
+ string help_text_;
+ button uparrow_;
+};
+scrollbar a;
+