2 // { dg-options "-fgnu-tm -O -fdump-tree-tmmark" }
6 static bool v() { return true; }
11 template<typename T> int foo()
13 __transaction_atomic { global += 2; }
14 return __transaction_atomic (global + 1);
17 template<typename T> int bar() __transaction_atomic
22 template<typename T> void bar2() __transaction_atomic
30 return foo<TrueFalse>() + bar<TrueFalse>();
33 /* 4 transactions overall, two of them write to global: */
34 /* { dg-final { scan-tree-dump-times "ITM_RU4\\s*\\(&global" 4 "tmmark" } } */
35 /* { dg-final { scan-tree-dump-times "ITM_WU4\\s*\\(&global" 2 "tmmark" } } */
36 /* { dg-final { cleanup-tree-dump "tmmark" } } */