aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/tm/trxn-expr-2.c
blob: 0ef6526db7be8e14e8f6e0876a762c2e1700fa6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */
/* Make sure that we don't just crash without -fgnu-tm enabled.  */
/* { dg-options "" } */

int x;

int foo(void)
{
  return __transaction_atomic (x + 1);		/* { dg-error "" } */
}

int bar(void)
{
  return __transaction_relaxed (x + 1);		/* { dg-error "" } */
}