| 1 |
// Transaction-unsafe testcase from TM TS. |
| 2 |
// { dg-options -fgnu-tm } |
| 3 |
|
| 4 |
template<class T> |
| 5 |
void f(T) transaction_safe; |
| 6 |
template<> |
| 7 |
void f(bool); // not transaction-safe |
| 8 |
|
| 9 |
void g() transaction_safe |
| 10 |
{ |
| 11 |
f(42); // OK |
| 12 |
f(true); // { dg-error "unsafe" } |
| 13 |
} |