1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
4 ! 2.17.1 critical construct
5 ! If the hint clause is specified, the critical construct must have a name.
9 !ERROR: Hint clause other than omp_sync_hint_none cannot be specified for an unnamed CRITICAL directive
10 !$omp critical hint(omp_lock_hint_speculative)
14 !$omp critical (foo) hint(omp_lock_hint_speculative)
16 !$omp end critical (foo)
18 !ERROR: Hint clause other than omp_sync_hint_none cannot be specified for an unnamed CRITICAL directive
19 !$omp critical hint(omp_lock_hint_nonspeculative)
23 !$omp critical (foo) hint(omp_lock_hint_nonspeculative)
25 !$omp end critical (foo)
27 !ERROR: Hint clause other than omp_sync_hint_none cannot be specified for an unnamed CRITICAL directive
28 !$omp critical hint(omp_lock_hint_contended)
32 !$omp critical (foo) hint(omp_lock_hint_contended)
34 !$omp end critical (foo)
36 !ERROR: Hint clause other than omp_sync_hint_none cannot be specified for an unnamed CRITICAL directive
37 !$omp critical hint(omp_lock_hint_uncontended)
41 !$omp critical (foo) hint(omp_lock_hint_uncontended)
43 !$omp end critical (foo)
45 !$omp critical hint(omp_sync_hint_none)
49 !$omp critical (foo) hint(omp_sync_hint_none)
51 !$omp end critical (foo)