aboutsummaryrefslogtreecommitdiff
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 00000000000..b5443c0fa6b
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p8786.C
@@ -0,0 +1,24 @@
+// Build don't link:
+// Special g++ Options: -O
+// prms-id: 8786
+
+class B {
+public:
+ inline ~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;
+}