[FLANG][OpenMP][Taskloop] - Add testcase for reduction and in_reduction clause in taskloop construct (#139704)

Added a testcase for reduction and in_reduction clause in taskloop
construct.
Reduction and in_reduction clauses are not supported in taskloop so
below error is issued: "not yet implemented: Unhandled clause
REDUCTION/IN_REDUCTION in TASKLOOP construct"
This commit is contained in:
Kaviya Rajendiran 2025-05-14 10:26:21 +05:30 committed by GitHub
parent aef39f5dcb
commit 0b490f11da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,13 @@
! RUN: %not_todo_cmd bbc -emit-fir -fopenmp -fopenmp-version=50 -o - %s 2>&1 | FileCheck %s
! RUN: %not_todo_cmd %flang_fc1 -emit-fir -fopenmp -fopenmp-version=50 -o - %s 2>&1 | FileCheck %s
! CHECK: not yet implemented: Unhandled clause IN_REDUCTION in TASKLOOP construct
subroutine omp_taskloop_inreduction()
integer x
x = 0
!$omp taskloop in_reduction(+:x)
do i = 1, 100
x = x + 1
end do
!$omp end taskloop
end subroutine omp_taskloop_inreduction

View File

@ -0,0 +1,13 @@
! RUN: %not_todo_cmd bbc -emit-fir -fopenmp -fopenmp-version=50 -o - %s 2>&1 | FileCheck %s
! RUN: %not_todo_cmd %flang_fc1 -emit-fir -fopenmp -fopenmp-version=50 -o - %s 2>&1 | FileCheck %s
! CHECK: not yet implemented: Unhandled clause REDUCTION in TASKLOOP construct
subroutine omp_taskloop_reduction()
integer x
x = 0
!$omp taskloop reduction(+:x)
do i = 1, 100
x = x + 1
end do
!$omp end taskloop
end subroutine omp_taskloop_reduction