diff --git a/gcc/testsuite/g++.dg/abi/rtti1.C b/gcc/testsuite/g++.dg/abi/rtti1.C new file mode 100644 index 00000000000..4535296004d --- /dev/null +++ b/gcc/testsuite/g++.dg/abi/rtti1.C @@ -0,0 +1,13 @@ +// Test that we don't emit the type_info for a polymorphic class other than +// with the vtable. + +struct A { + virtual ~A(); +}; + +void f () +{ + throw A(); +} + +// { dg-final { scan-assembler-dem-not {typeinfo for A[: \t\n]} } }