aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tm/wrap-4.c
blob: 9a4ec061f89a1c443b03ab351bb5cd972a1a3ded (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-options "-fgnu-tm -fdump-tree-optimized -O2" } */

static void candy() { candycane(); }

static void tootsie_roll () __attribute__((transaction_wrap (candy)));
static void tootsie_roll () { bark(); }

void foo()
{
  __transaction_relaxed { candy(); }
}

/* We still have one call to candy()-- on the uninstrumented path
   everything is as usual.  */
/* { dg-final { scan-tree-dump-times "candy \\(\\);" 1 "optimized" } } */

/* { dg-final { cleanup-tree-dump "optimized" } } */