summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/p8786.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.mike/p8786.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p8786.C24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p8786.C b/gcc/testsuite/g++.old-deja/g++.mike/p8786.C
new file mode 100644
index 000000000..577111ec3
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p8786.C
@@ -0,0 +1,24 @@
+// { dg-do assemble }
+// { dg-options "-O" }
+// prms-id: 8786
+
+class B {
+public:
+ ~B();
+};
+
+class D : public B {
+public:
+ D(int);
+};
+
+int foo() {
+ D t(0);
+
+ bool h = 1;
+ if (h) {
+ D p(0);
+ return 0;
+ }
+ return 0;
+}