Skip to content

Commit 0b490f1

Browse files
authored
[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"
1 parent aef39f5 commit 0b490f1

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
! RUN: %not_todo_cmd bbc -emit-fir -fopenmp -fopenmp-version=50 -o - %s 2>&1 | FileCheck %s
2+
! RUN: %not_todo_cmd %flang_fc1 -emit-fir -fopenmp -fopenmp-version=50 -o - %s 2>&1 | FileCheck %s
3+
4+
! CHECK: not yet implemented: Unhandled clause IN_REDUCTION in TASKLOOP construct
5+
subroutine omp_taskloop_inreduction()
6+
integer x
7+
x = 0
8+
!$omp taskloop in_reduction(+:x)
9+
do i = 1, 100
10+
x = x + 1
11+
end do
12+
!$omp end taskloop
13+
end subroutine omp_taskloop_inreduction
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
! RUN: %not_todo_cmd bbc -emit-fir -fopenmp -fopenmp-version=50 -o - %s 2>&1 | FileCheck %s
2+
! RUN: %not_todo_cmd %flang_fc1 -emit-fir -fopenmp -fopenmp-version=50 -o - %s 2>&1 | FileCheck %s
3+
4+
! CHECK: not yet implemented: Unhandled clause REDUCTION in TASKLOOP construct
5+
subroutine omp_taskloop_reduction()
6+
integer x
7+
x = 0
8+
!$omp taskloop reduction(+:x)
9+
do i = 1, 100
10+
x = x + 1
11+
end do
12+
!$omp end taskloop
13+
end subroutine omp_taskloop_reduction

0 commit comments

Comments
 (0)