1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
|
! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Atomic construct
! section 2.17.7
! Update assignment must be 'var = var op expr' or 'var = expr op var'
program OmpAtomic
use omp_lib
real x
integer y
logical m, n, l
x = 5.73
y = 3
m = .TRUE.
n = .FALSE.
!$omp atomic
x = x + 1
!$omp atomic
x = 1 + x
!$omp atomic
!ERROR: Atomic update variable 'x' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
x = y + 1
!$omp atomic
!ERROR: Atomic update variable 'x' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
x = 1 + y
!$omp atomic
x = x - 1
!$omp atomic
x = 1 - x
!$omp atomic
!ERROR: Atomic update variable 'x' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
x = y - 1
!$omp atomic
!ERROR: Atomic update variable 'x' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
x = 1 - y
!$omp atomic
x = x*1
!$omp atomic
x = 1*x
!$omp atomic
!ERROR: Atomic update variable 'x' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
x = y*1
!$omp atomic
!ERROR: Atomic update variable 'x' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
x = 1*y
!$omp atomic
x = x/1
!$omp atomic
x = 1/x
!$omp atomic
!ERROR: Atomic update variable 'x' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
x = y/1
!$omp atomic
!ERROR: Atomic update variable 'x' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
x = 1/y
!$omp atomic
m = m .AND. n
!$omp atomic
m = n .AND. m
!$omp atomic
!ERROR: Atomic update variable 'm' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
m = n .AND. l
!$omp atomic
m = m .OR. n
!$omp atomic
m = n .OR. m
!$omp atomic
!ERROR: Atomic update variable 'm' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
m = n .OR. l
!$omp atomic
m = m .EQV. n
!$omp atomic
m = n .EQV. m
!$omp atomic
!ERROR: Atomic update variable 'm' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
m = n .EQV. l
!$omp atomic
m = m .NEQV. n
!$omp atomic
m = n .NEQV. m
!$omp atomic
!ERROR: Atomic update variable 'm' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
m = n .NEQV. l
!$omp atomic update
x = x + 1
!$omp atomic update
x = 1 + x
!$omp atomic update
!ERROR: Atomic update variable 'x' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
x = y + 1
!$omp atomic update
!ERROR: Atomic update variable 'x' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
x = 1 + y
!$omp atomic update
x = x - 1
!$omp atomic update
x = 1 - x
!$omp atomic update
!ERROR: Atomic update variable 'x' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
x = y - 1
!$omp atomic update
!ERROR: Atomic update variable 'x' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
x = 1 - y
!$omp atomic update
x = x*1
!$omp atomic update
x = 1*x
!$omp atomic update
!ERROR: Atomic update variable 'x' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
x = y*1
!$omp atomic update
!ERROR: Atomic update variable 'x' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
x = 1*y
!$omp atomic update
x = x/1
!$omp atomic update
x = 1/x
!$omp atomic update
!ERROR: Atomic update variable 'x' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
x = y/1
!$omp atomic update
!ERROR: Atomic update variable 'x' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
x = 1/y
!$omp atomic update
m = m .AND. n
!$omp atomic update
m = n .AND. m
!$omp atomic update
!ERROR: Atomic update variable 'm' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
m = n .AND. l
!$omp atomic update
m = m .OR. n
!$omp atomic update
m = n .OR. m
!$omp atomic update
!ERROR: Atomic update variable 'm' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
m = n .OR. l
!$omp atomic update
m = m .EQV. n
!$omp atomic update
m = n .EQV. m
!$omp atomic update
!ERROR: Atomic update variable 'm' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
m = n .EQV. l
!$omp atomic update
m = m .NEQV. n
!$omp atomic update
m = n .NEQV. m
!$omp atomic update
!ERROR: Atomic update variable 'm' not found in the RHS of the assignment statement in an ATOMIC (UPDATE) construct
m = n .NEQV. l
end program OmpAtomic
|