blob: 4391159e23531ad866c10c51c4e9dc5d1cd2e65e [file] [log] [blame]
// { dg-do compile }
// { dg-options "-fno-exceptions -fgnu-tm -O -std=c++0x -fdump-tree-tmlower" }
struct TrueFalse
{
static constexpr bool v() { return true; }
};
int global;
template<typename T> int foo()
{
return __transaction_atomic noexcept(T::v()) (global + 1);
}
int f1()
{
return foo<TrueFalse>();
}
/* { dg-final { scan-tree-dump-times "eh_must_not_throw" 0 "tmlower" } } */
/* { dg-final { scan-tree-dump-times "__transaction_atomic" 1 "tmlower" } } */
/* { dg-final { cleanup-tree-dump "tmlower" } } */