Debian Codegraph @

gcc/testsuite/g++.dg/tm/nested-1.C

raw
1 // { dg-do compile }
2 // { dg-options "-fgnu-tm" }
3
4 class HashTree
5 {
6 public:
7 __attribute__((transaction_safe))
8 int add_element2();
9 private:
10 int Count;
11 };
12
13
14 __attribute__((transaction_safe))
15 int HashTree::add_element2()
16 {
17 int tt;
18 __transaction_atomic {
19 tt = Count;
20 }
21 return tt;
22 }