aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/gomp/requires-8.c
blob: 4d56e7d33e96ccbb869007d3afcff971edd29371 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#pragma omp requires atomic_default_mem_order(acquire)

int
bar (int a, int b)
{
  int c;

  #pragma omp atomic write /* { dg-error "'#pragma omp atomic write' incompatible with 'acquire' clause implicitly provided by a 'requires' directive" } */
    a = b;

  #pragma omp atomic read
    c = a;
  return c;
}