aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/tm/trxn-expr-3.c
blob: db66873dc80932e833dc45cf456264e05e0a1c07 (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" 4 "tmmark" } } */
/* { dg-final { cleanup-tree-dump "tmmark" } } */