brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.1 KiB · eabfe54 Raw
82 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp -fopenmp-version=522!3! OpenMP Version 5.24!5! 2.10.2 single Construct6! Valid and invalid testcases for copyprivate and nowait clause on the single directive7 8program single9    ! Valid testcases10    !$omp single11        print *, x12    !$omp end single13 14    !$omp single nowait15        print *, x16    !$omp end single17 18    !$omp single copyprivate(x, y, z)19        print *, x20    !$omp end single21 22    !$omp single23        print *, x24    !$omp end single copyprivate(x)25 26    ! Invalid testcases27    !$omp single28        print *, x29    !ERROR: NOWAIT clause must not be used with COPYPRIVATE clause on the SINGLE directive30    !$omp end single copyprivate(x) nowait31 32    !ERROR: 'x' appears in more than one COPYPRIVATE clause on the SINGLE directive33    !$omp single copyprivate(x) copyprivate(x)34        print *, x35    !$omp end single36 37    !$omp single38        print *, x39    !ERROR: 'x' appears in more than one COPYPRIVATE clause on the END SINGLE directive40    !$omp end single copyprivate(x) copyprivate(x)41 42    !ERROR: At most one NOWAIT clause can appear on the SINGLE directive43    !$omp single nowait nowait44        print *, x45    !$omp end single46 47    !$omp single48        print *, x49    !ERROR: At most one NOWAIT clause can appear on the END SINGLE directive50    !$omp end single nowait nowait51 52    !ERROR: NOWAIT clause must not be used with COPYPRIVATE clause on the SINGLE directive53    !$omp single copyprivate(x) nowait54        print *, x55    !WARNING: The COPYPRIVATE clause with 'x' is already used on the SINGLE directive [-Wopen-mp-usage]56    !ERROR: At most one NOWAIT clause can appear on the SINGLE directive57    !$omp end single copyprivate(x) nowait58 59    !$omp single copyprivate(x)60        print *, x61    !WARNING: The COPYPRIVATE clause with 'x' is already used on the SINGLE directive [-Wopen-mp-usage]62    !ERROR: NOWAIT clause must not be used with COPYPRIVATE clause on the SINGLE directive63    !$omp end single copyprivate(x) nowait64 65    !ERROR: NOWAIT clause must not be used with COPYPRIVATE clause on the SINGLE directive66    !$omp single copyprivate(x, y) nowait67        print *, x68    !WARNING: The COPYPRIVATE clause with 'x' is already used on the SINGLE directive [-Wopen-mp-usage]69    !ERROR: 'z' appears in more than one COPYPRIVATE clause on the END SINGLE directive70    !ERROR: At most one NOWAIT clause can appear on the SINGLE directive71    !$omp end single copyprivate(x, z) copyprivate(z) nowait72 73    !ERROR: NOWAIT clause must not be used with COPYPRIVATE clause on the SINGLE directive74    !$omp single copyprivate(x) nowait copyprivate(y) copyprivate(z)75        print *, x76    !WARNING: The COPYPRIVATE clause with 'x' is already used on the SINGLE directive [-Wopen-mp-usage]77    !WARNING: The COPYPRIVATE clause with 'y' is already used on the SINGLE directive [-Wopen-mp-usage]78    !WARNING: The COPYPRIVATE clause with 'z' is already used on the SINGLE directive [-Wopen-mp-usage]79    !ERROR: At most one NOWAIT clause can appear on the SINGLE directive80    !$omp end single copyprivate(x, y, z) nowait81end program82