libbacktrace: update xcoff.c for base_address changes
[official-gcc.git] / gcc / testsuite / g++.dg / tm / noexcept-4.C
blob82db6ab477f5fea41086f8cd51098d9e18f72212
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.
6 struct TrueFalse
8   static constexpr bool v() { return true; }
9 };
11 int global;
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);
20 int f1()
22   return foo<TrueFalse>();
25 int f3()
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" } } */