aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/tm/pr54893.c
blob: 8967f384afddf99a0b9db41e3a53565e993352dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-options "-fgnu-tm -fdump-ipa-tmipa" } */

/* Test that volatiles are allowed inside relaxed transactions.  */

volatile int test_var = 0;

int main()
{
  __transaction_relaxed {
    test_var++;
  }
}

/* { dg-final { scan-ipa-dump "GTMA_DOES_GO_IRREVOCABLE" "tmipa" } } */
/* { dg-final { cleanup-ipa-dump "tmipa" } } */