summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/tm/trxn-expr-3.c
blob: 0a87780f17e3f5ce8355d7e16585424c975a33d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// { dg-do compile }
// { dg-options "-fgnu-tm -O -fdump-tree-tmmark" }

int global;

int f2()
{
  return __transaction_atomic (global + 3)
         + __transaction_atomic (global + 4);
}

/* { dg-final { scan-tree-dump-times "ITM_RU" 2 "tmmark" } } */
/* { dg-final { scan-tree-dump-times "ITM_commitTransaction" 2 "tmmark" } } */
/* { dg-final { cleanup-tree-dump "tmmark" } } */