aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/gomp/atomic-9.c
blob: 35548395f369eaed7adab4e833d682d8fd51ea55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-ompexp" } */
/* { dg-additional-options "-Wno-volatile" { target c++ } } */
/* { dg-require-effective-target cas_int } */

volatile int *bar(void);

void f1(void)
{
  #pragma omp atomic
    *bar() += 1;
}

/* { dg-final { scan-tree-dump-times "__atomic_fetch_add" 1 "ompexp" } } */