1 ! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
2 ! Semantic checks on hint clauses, as they appear on critical construct
11 !$omp critical (name) hint(1)
13 !$omp end critical (name)
15 !$omp critical (name) hint(2)
17 !$omp end critical (name)
19 !ERROR: Hint clause value is not a valid OpenMP synchronization value
20 !$omp critical (name) hint(3)
22 !$omp end critical (name)
24 !$omp critical (name) hint(5)
26 !$omp end critical (name)
28 !ERROR: Hint clause value is not a valid OpenMP synchronization value
29 !$omp critical (name) hint(7)
31 !$omp end critical (name)
33 !ERROR: Hint clause must have non-negative constant integer expression
34 !ERROR: Must be a constant value
35 !$omp critical (name) hint(x)
37 !$omp end critical (name)
39 !$omp critical (name) hint(4)
41 !$omp end critical (name)
43 !$omp critical (name) hint(8)
45 !$omp end critical (name)
47 !$omp critical (name) hint(omp_sync_hint_uncontended)
49 !$omp end critical (name)
51 !$omp critical (name) hint(omp_lock_hint_speculative)
53 !$omp end critical (name)
55 !ERROR: Hint clause must have non-negative constant integer expression
56 !ERROR: Must be a constant value
57 !$omp critical (name) hint(omp_sync_hint_uncontended + omp_sync_hint)
59 !$omp end critical (name)
61 !$omp critical (name) hint(omp_sync_hint_nonspeculative)
63 !$omp end critical (name)
65 !$omp critical (name) hint(omp_sync_hint_none)
67 !$omp end critical (name)
69 !$omp critical (name) hint(omp_sync_hint_uncontended + omp_lock_hint_speculative)
71 !$omp end critical (name)
73 !$omp critical (name) hint(omp_lock_hint_nonspeculative + omp_lock_hint_uncontended)
75 !$omp end critical (name)
77 !$omp critical (name) hint(omp_lock_hint_contended + omp_sync_hint_speculative)
79 !$omp end critical (name)
81 !$omp critical (name) hint(omp_lock_hint_contended + omp_sync_hint_nonspeculative)
83 !$omp end critical (name)
85 !ERROR: Hint clause value is not a valid OpenMP synchronization value
86 !$omp critical (name) hint(omp_sync_hint_uncontended + omp_sync_hint_contended)
88 !$omp end critical (name)
90 !ERROR: Hint clause value is not a valid OpenMP synchronization value
91 !$omp critical (name) hint(omp_sync_hint_nonspeculative + omp_lock_hint_speculative)
93 !$omp end critical (name)
95 !ERROR: Hint clause must have non-negative constant integer expression
96 !$omp critical (name) hint(1.0)
98 !$omp end critical (name)
100 !ERROR: Hint clause must have non-negative constant integer expression
101 !ERROR: Operands of + must be numeric; have LOGICAL(4) and INTEGER(4)
102 !$omp critical (name) hint(z + omp_sync_hint_nonspeculative)
104 !$omp end critical (name)
106 !ERROR: Hint clause must have non-negative constant integer expression
107 !ERROR: Must be a constant value
108 !$omp critical (name) hint(k + omp_sync_hint_speculative)
110 !$omp end critical (name)
112 !ERROR: Hint clause must have non-negative constant integer expression
113 !ERROR: Must be a constant value
114 !$omp critical (name) hint(p(1) + omp_sync_hint_uncontended)
116 !$omp end critical (name)