1 ! REQUIRES: openmp_runtime
3 ! RUN: %python %S/../test_errors.py %s %flang %openmp_flags
6 ! 2.17.1 critical construct
7 ! If the hint clause is specified, the critical construct must have a name.
11 !ERROR: Hint clause other than omp_sync_hint_none cannot be specified for an unnamed CRITICAL directive
12 !$omp critical hint(omp_lock_hint_speculative)
16 !$omp critical (foo) hint(omp_lock_hint_speculative)
18 !$omp end critical (foo)
20 !ERROR: Hint clause other than omp_sync_hint_none cannot be specified for an unnamed CRITICAL directive
21 !$omp critical hint(omp_lock_hint_nonspeculative)
25 !$omp critical (foo) hint(omp_lock_hint_nonspeculative)
27 !$omp end critical (foo)
29 !ERROR: Hint clause other than omp_sync_hint_none cannot be specified for an unnamed CRITICAL directive
30 !$omp critical hint(omp_lock_hint_contended)
34 !$omp critical (foo) hint(omp_lock_hint_contended)
36 !$omp end critical (foo)
38 !ERROR: Hint clause other than omp_sync_hint_none cannot be specified for an unnamed CRITICAL directive
39 !$omp critical hint(omp_lock_hint_uncontended)
43 !$omp critical (foo) hint(omp_lock_hint_uncontended)
45 !$omp end critical (foo)
47 !$omp critical hint(omp_sync_hint_none)
51 !$omp critical (foo) hint(omp_sync_hint_none)
53 !$omp end critical (foo)