aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/gomp/flush-2.c
blob: 30ef5982712f43e38faf7f676366c0d5c7567191 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
int a, b;

void
foo (void)
{
  #pragma omp flush
  #pragma omp flush (a, b)
  #pragma omp flush acquire
  #pragma omp flush release
  #pragma omp flush acq_rel
  #pragma omp flush seq_cst
  #pragma omp flush relaxed		/* { dg-error "expected 'seq_cst', 'acq_rel', 'release' or 'acquire'" } */
  #pragma omp flush foobar		/* { dg-error "expected 'seq_cst', 'acq_rel', 'release' or 'acquire'" } */
  #pragma omp flush acquire (a, b)	/* { dg-error "'flush' list specified together with memory order clause" } */
  #pragma omp flush release (a, b)	/* { dg-error "'flush' list specified together with memory order clause" } */
  #pragma omp flush acq_rel (a, b)	/* { dg-error "'flush' list specified together with memory order clause" } */
  #pragma omp flush seq_cst (a, b)	/* { dg-error "'flush' list specified together with memory order clause" } */
}