1 // { dg-do compile { target c++11 } }
2 // { dg-options "-fgnu-tm -O -fdump-tree-tmmark -fdump-tree-tmlower" }
4 // Similar to noexcept-1.C but without an explicit (true) for noexcept.
8 static constexpr bool v() { return true; }
13 template<typename T> int foo()
15 __transaction_atomic noexcept { global += 1; }
16 return __transaction_atomic noexcept (global + 2)
17 + __transaction_atomic noexcept (global + 3);
22 return foo<TrueFalse>();
27 __transaction_atomic noexcept { global += 4; }
28 return __transaction_atomic noexcept (global + 5)
29 + __transaction_atomic noexcept (global + 6);
32 /* { dg-final { scan-tree-dump-times "eh_must_not_throw" 12 "tmlower" } } */
33 /* { dg-final { scan-tree-dump-times "ITM_RU" 6 "tmmark" } } */