| 1 |
// PR c++/80059 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
// { dg-options "-fgnu-tm" } |
| 4 |
|
| 5 |
template<typename> int foo(bool b) |
| 6 |
{ |
| 7 |
return __transaction_atomic noexcept(b) (0); // { dg-error "is not a constant expression" } |
| 8 |
} |
| 9 |
|
| 10 |
void bar() |
| 11 |
{ |
| 12 |
foo<int>(true); |
| 13 |
} |