summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/abi/local1-a.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/abi/local1-a.cc')
-rw-r--r--gcc/testsuite/g++.dg/abi/local1-a.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/abi/local1-a.cc b/gcc/testsuite/g++.dg/abi/local1-a.cc
new file mode 100644
index 000000000..638479e74
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/local1-a.cc
@@ -0,0 +1,14 @@
+struct B {
+ virtual void b() {}
+};
+
+static B* f() {
+ struct D : public B {
+ };
+
+ return new D;
+}
+
+B* g() {
+ return f();
+}