From d8a2d2c14602f00b5113b3bf103b522bf22af1ac Mon Sep 17 00:00:00 2001 From: Kaviya Rajendiran Date: Tue, 13 May 2025 16:06:49 +0530 Subject: [PATCH] [FLANG][OpenMP][Taskloop] - Add testcase for reduction and in_reduction clause in taskloop construct --- .../test/Lower/OpenMP/Todo/taskloop-inreduction.f90 | 13 +++++++++++++ flang/test/Lower/OpenMP/Todo/taskloop-reduction.f90 | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 flang/test/Lower/OpenMP/Todo/taskloop-inreduction.f90 create mode 100644 flang/test/Lower/OpenMP/Todo/taskloop-reduction.f90 diff --git a/flang/test/Lower/OpenMP/Todo/taskloop-inreduction.f90 b/flang/test/Lower/OpenMP/Todo/taskloop-inreduction.f90 new file mode 100644 index 0000000000000..8acc399a92abe --- /dev/null +++ b/flang/test/Lower/OpenMP/Todo/taskloop-inreduction.f90 @@ -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 diff --git a/flang/test/Lower/OpenMP/Todo/taskloop-reduction.f90 b/flang/test/Lower/OpenMP/Todo/taskloop-reduction.f90 new file mode 100644 index 0000000000000..0c16bd227257f --- /dev/null +++ b/flang/test/Lower/OpenMP/Todo/taskloop-reduction.f90 @@ -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