brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 10b33a3 Raw
60 lines · plain
1! REQUIRES: openmp_runtime2 3! RUN: %python %S/../test_errors.py %s %flang -fopenmp %openmp_flags4use omp_lib5! Check OpenMP 2.13.6 atomic Construct6 7  a = 1.08  !$omp parallel num_threads(4)9  !$omp atomic seq_cst, read10  b = a11 12  !$omp atomic seq_cst write13  a = b14  !$omp end atomic15 16  !ERROR: ACQUIRE clause is not allowed on directive ATOMIC in OpenMP v3.1, try -fopenmp-version=5017  !ERROR: HINT clause is not allowed on directive ATOMIC in OpenMP v3.1, try -fopenmp-version=5018  !$omp atomic read acquire hint(OMP_LOCK_HINT_CONTENDED)19  a = b20 21  !ERROR: RELEASE clause is not allowed on directive ATOMIC in OpenMP v3.1, try -fopenmp-version=5022  !ERROR: HINT clause is not allowed on directive ATOMIC in OpenMP v3.1, try -fopenmp-version=5023  !$omp atomic release hint(OMP_LOCK_HINT_UNCONTENDED) write24  a = b25 26  !$omp atomic capture seq_cst27  b = a28  a = a + 129  !$omp end atomic30 31  !ERROR: HINT clause is not allowed on directive ATOMIC in OpenMP v3.1, try -fopenmp-version=5032  !ERROR: ACQ_REL clause is not allowed on directive ATOMIC in OpenMP v3.1, try -fopenmp-version=5033  !$omp atomic hint(1) acq_rel capture34  b = a35  a = a + 136  !$omp end atomic37 38  !ERROR: At most one clause from the 'atomic' group is allowed on ATOMIC construct39  !$omp atomic read write40  !ERROR: Atomic expression a+1._4 should be a variable41  a = a + 142 43  !$omp atomic44  a = a + 145  !ERROR: NUM_THREADS clause is not allowed on the ATOMIC directive46  !$omp atomic num_threads(4)47  a = a + 148 49  !ERROR: ATOMIC UPDATE operation with CAPTURE should contain two statements50  !ERROR: NUM_THREADS clause is not allowed on the ATOMIC directive51  !$omp atomic capture num_threads(4)52  a = a + 153 54  !ERROR: RELAXED clause is not allowed on directive ATOMIC in OpenMP v3.1, try -fopenmp-version=5055  !$omp atomic relaxed56  a = a + 157 58  !$omp end parallel59end60