brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · b77bd66 Raw
56 lines · plain
1! REQUIRES: openmp_runtime2 3! RUN: %python %S/../test_errors.py %s %flang %openmp_flags4 5! OpenMP Version 5.06! 2.17.1 critical construct7! If the hint clause is specified, the critical construct must have a name.8program sample9   use omp_lib10   integer i, j11   !ERROR: When HINT other than 'omp_sync_hint_none' is present, CRITICAL directive should have a name12   !$omp critical hint(omp_lock_hint_speculative)13   j = j + 114   !$omp end critical15 16   !$omp critical (foo) hint(omp_lock_hint_speculative)17   i = i - 118   !$omp end critical (foo)19 20   !ERROR: When HINT other than 'omp_sync_hint_none' is present, CRITICAL directive should have a name21   !$omp critical hint(omp_lock_hint_nonspeculative)22   j = j + 123   !$omp end critical24 25   !$omp critical (foo) hint(omp_lock_hint_nonspeculative)26   i = i - 127   !$omp end critical (foo)28 29   !ERROR: When HINT other than 'omp_sync_hint_none' is present, CRITICAL directive should have a name30   !$omp critical hint(omp_lock_hint_contended)31   j = j + 132   !$omp end critical33 34   !$omp critical (foo) hint(omp_lock_hint_contended)35   i = i - 136   !$omp end critical (foo)37 38   !ERROR: When HINT other than 'omp_sync_hint_none' is present, CRITICAL directive should have a name39   !$omp critical hint(omp_lock_hint_uncontended)40   j = j + 141   !$omp end critical42 43   !$omp critical (foo) hint(omp_lock_hint_uncontended)44   i = i - 145   !$omp end critical (foo)46 47   !$omp critical hint(omp_sync_hint_none)48   j = j + 149   !$omp end critical50 51   !$omp critical (foo) hint(omp_sync_hint_none)52   i = i - 153   !$omp end critical (foo)54 55end program sample56