aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tm/wrap-4.c
blob: 9e1e70c544fc407f6b711a66b58cec564b3c85ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { 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(); }
}

/* { dg-final { scan-tree-dump-times "candy" 0 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */