aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8.1/gcc/testsuite/gcc.dg/tm/indirect-2.c
blob: dd7168f0519476af2533ec81ce0e067bd12feb6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */
/* { dg-options "-fgnu-tm" } */

void __attribute__((transaction_safe))
foo(void);

void __attribute__((transaction_safe))
set_fn(void)
{
  void __attribute__((transaction_safe)) (*fn)(void);
  fn = foo;
  fn();
}

/* { dg-final { scan-assembler "_ITM_getTMCloneSafe" } } */