-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang][OpenMP] Added semantic checks for target update (#71270)
This patch adds the following semantic check for target update ``` At least one motion-clause must be specified. ``` A motion clause is either a `to` or a `from` clause. This patch also adds a test for the following semantic check which was already supported. ``` At most one nowait clause can appear on the directive. ```
- Loading branch information
Showing
5 changed files
with
37 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp | ||
|
||
subroutine foo(x) | ||
integer :: x | ||
!ERROR: At least one motion-clause (TO/FROM) must be specified on TARGET UPDATE construct. | ||
!$omp target update | ||
|
||
!ERROR: At least one motion-clause (TO/FROM) must be specified on TARGET UPDATE construct. | ||
!$omp target update nowait | ||
|
||
!$omp target update to(x) nowait | ||
|
||
!ERROR: At most one NOWAIT clause can appear on the TARGET UPDATE directive | ||
!$omp target update to(x) nowait nowait | ||
|
||
end subroutine |