1 // { dg-do compile { target c++11 } }
2 // { dg-options "-fgnu-tm -O -fdump-tree-tmmark -fdump-tree-tmlower" }
6 static constexpr bool v() { return true; }
11 template<typename T> int foo()
13 __transaction_atomic noexcept(T::v()) { global += 1; }
14 return __transaction_atomic noexcept(T::v()) (global + 2);
19 return foo<TrueFalse>();
24 return __transaction_atomic noexcept(true) (global + 3)
25 + __transaction_atomic noexcept(TrueFalse::v()) (global + 4);
30 __transaction_atomic noexcept(true) { global += 5; }
31 __transaction_atomic noexcept(TrueFalse::v()) { global += 6; }
35 /* { dg-final { scan-tree-dump-times "eh_must_not_throw" 12 "tmlower" } } */
36 /* { dg-final { scan-tree-dump-times "ITM_RU" 6 "tmmark" } } */