libstdc++-v3: Handle iconv as optional for newlib builds [PR116362]
[official-gcc.git] / gcc / testsuite / g++.dg / tm / nested-1.C
blob1f4e19e9891a8e120964287522e6a9aa101afebb
1 // { dg-do compile }
2 // { dg-options "-fgnu-tm" }
4 class HashTree
6 public:
7    __attribute__((transaction_safe))
8    int add_element2();
9 private:
10    int Count;
14 __attribute__((transaction_safe))
15 int HashTree::add_element2()
17  int tt;
18   __transaction_atomic {
19     tt = Count;
20  }
21  return tt;