view gcc/testsuite/gcc.dg/tm/wrap-4.c @ 132:d34655255c78

update gcc-8.2
author mir3636
date Thu, 25 Oct 2018 10:21:07 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { 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" } } */