summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/abi/local1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/abi/local1.C')
-rw-r--r--gcc/testsuite/g++.dg/abi/local1.C22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/abi/local1.C b/gcc/testsuite/g++.dg/abi/local1.C
new file mode 100644
index 000000000..518193c89
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/local1.C
@@ -0,0 +1,22 @@
+// { dg-do run }
+// { dg-additional-sources "local1-a.cc" }
+
+#include <typeinfo>
+
+struct B {
+ virtual void b() {}
+};
+
+static B* f() {
+ struct D : public B {
+ };
+
+ return new D;
+}
+
+extern B* g();
+
+int main () {
+ if (typeid (*f()) == typeid (*g()))
+ return 1;
+}