brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · f808ed9 Raw
78 lines · plain
1!RUN: %python %S/../test_errors.py %s %flang -fopenmp -fopenmp-version=602 3subroutine f004  integer :: x, y, v5 6  !ERROR: ATOMIC UPDATE operation with CAPTURE should contain two statements7  !$omp atomic update capture8  x = v9  x = x + 110  y = x11  !$omp end atomic12end13 14subroutine f0115  integer :: x, y, v16 17  !ERROR: ATOMIC UPDATE operation with CAPTURE should contain two assignments18  !$omp atomic update capture19  x = v20  block21    x = x + 122    y = x23  end block24  !$omp end atomic25end26 27subroutine f0228  integer :: x, y29 30  ! The update and capture statements can be inside of a single BLOCK.31  ! The end-directive is then optional. Expect no diagnostics.32  !$omp atomic update capture33  block34    x = x + 135    y = x36  end block37end38 39subroutine f0340  integer :: x41 42  !ERROR: In ATOMIC UPDATE operation with CAPTURE neither statement could be the capture43  !$omp atomic update capture44  x = x + 145  x = x + 246  !$omp end atomic47end48 49subroutine f0450  integer :: x, v51 52  !$omp atomic update capture53  !WARNING: In ATOMIC UPDATE operation with CAPTURE either statement could be the update and the capture, assuming the first one is the capture statement54  v = x55  x = v56  !$omp end atomic57end58 59subroutine f0560  integer :: x, v, z61 62  !$omp atomic update capture63  !ERROR: In ATOMIC UPDATE operation with CAPTURE the right-hand side of the capture assignment should read z64  v = x65  z = x + 166  !$omp end atomic67end68 69subroutine f0670  integer :: x, v, z71 72  !$omp atomic update capture73  z = x + 174  !ERROR: In ATOMIC UPDATE operation with CAPTURE the right-hand side of the capture assignment should read z75  v = x76  !$omp end atomic77end78