aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/tm/pr56419.C
blob: c9a33a81319808c7d5bb51586e0dce05b22597e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// { dg-do compile }
// { dg-options "-fgnu-tm" }

int x = 0;
int inc_func(int i) {
     for (int j = 0; j < i; ++j)
     {
         __transaction_atomic { x+=1; }
     }
     return 0;
}

// { dg-final { scan-assembler "ITM_commitTransaction" } }