xfail dg-final "Sunk statements: 5" on hppa*64*-*-*
[official-gcc.git] / libstdc++-v3 / testsuite / 18_support / 105387_memptr.cc
blobf5612f42929538c9755aecff911fc14b97712596
1 #include <testsuite_hooks.h>
3 // Test related to PR libstdc++/105387
4 // Check that pointer-to-member type exceptions can still be caught with -frtti.
5 // { dg-require-effective-target rtti }
7 void test_catch_ptr_to_member()
9 bool exception_thrown = false;
10 struct X { int i; };
11 try {
12 throw &X::i;
14 catch (const int X::*) {
15 exception_thrown = true;
18 VERIFY(exception_thrown);
21 int main()
23 test_catch_ptr_to_member();
24 return 0;