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

void bark (void);
void candycane (void);
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" } } */