diff options
Diffstat (limited to 'gcc-4.8.1/gcc/testsuite/g++.dg/abi/local1.C')
-rw-r--r-- | gcc-4.8.1/gcc/testsuite/g++.dg/abi/local1.C | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/abi/local1.C b/gcc-4.8.1/gcc/testsuite/g++.dg/abi/local1.C new file mode 100644 index 000000000..518193c89 --- /dev/null +++ b/gcc-4.8.1/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; +} |