Retro68/gcc/libitm/testsuite/libitm.c++/eh-3.C

15 lines
261 B
C++
Raw Normal View History

2017-04-10 11:32:00 +00:00
// A handler cannot do the reverse of a transaction-safety conversion.
// { dg-do run }
// { dg-options "-fgnu-tm" }
extern "C" void abort();
void g() {}
int main()
{
try { throw g; }
catch (void (*p)() transaction_safe) { abort(); }
catch (...) { }
}