rs6000: Change optab for ibm128 and ieee128 conversion
[official-gcc.git] / gcc / testsuite / g++.dg / tm / noexcept-1.C
blobdcbd3d8ee9c6736ec67244e4f4d1677d88772776
1 // { dg-do compile { target c++11 } }
2 // { dg-options "-fgnu-tm -O -fdump-tree-tmmark -fdump-tree-tmlower" }
4 struct TrueFalse
6   static constexpr bool v() { return true; }
7 };
9 int global;
11 template<typename T> int foo()
13   __transaction_atomic noexcept(T::v()) { global += 1; }
14   return __transaction_atomic noexcept(T::v()) (global + 2);
17 int f1()
19   return foo<TrueFalse>();
22 int f2()
24   return __transaction_atomic noexcept(true) (global + 3)
25          + __transaction_atomic noexcept(TrueFalse::v()) (global + 4);
28 int f3()
30   __transaction_atomic noexcept(true) { global += 5; }
31   __transaction_atomic noexcept(TrueFalse::v()) { global += 6; }
32   return global;
35 /* { dg-final { scan-tree-dump-times "eh_must_not_throw" 12 "tmlower" } } */
36 /* { dg-final { scan-tree-dump-times "ITM_RU" 6 "tmmark" } } */