-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Flang][OpenMP] Issue error if reduction clause has proc-pointer (#88999
) OpenMP 5.2: Section 5.5.5: A procedure pointer must not appear in a reduction clause. Fixes #87915
- Loading branch information
1 parent
df411fb
commit b3c72bc
Showing
2 changed files
with
27 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp | ||
|
||
! OpenMP 5.2: Section 5.5.5 : A procedure pointer must not appear in a | ||
! reduction clause. | ||
|
||
procedure(foo), pointer :: ptr | ||
integer :: i | ||
ptr => foo | ||
!ERROR: A procedure pointer 'ptr' must not appear in a REDUCTION clause. | ||
!$omp do reduction (+ : ptr) | ||
do i = 1, 10 | ||
end do | ||
contains | ||
subroutine foo | ||
end subroutine | ||
end |