blob: 49dd564894a59894d0aa302677551af23d2d2e3a [file] [log] [blame]
// Transaction-unsafe testcase from TM TS.
// { dg-options -fgnu-tm }
struct S {
virtual ~S();
};
void f() transaction_safe {
S s; // { dg-error "unsafe" "invocation of unsafe destructor" }
}
int g(int x) { // is transaction-safe
if (x <= 0)
return 0;
return x + g(x-1);
}