blob: 710fb1a303135d9283291adb257955359be32d53 [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);
}