[flang-commits] [flang] 879b726 - [Flang][OpenMP] Reenable and fix final few tests 6/6 (#93295)
via flang-commits
flang-commits at lists.llvm.org
Fri May 24 06:31:12 PDT 2024
Author: Kiran Chandramohan
Date: 2024-05-24T14:31:09+01:00
New Revision: 879b7268b8edca42f35648c4b54e5426bf0877bb
URL: https://github.com/llvm/llvm-project/commit/879b7268b8edca42f35648c4b54e5426bf0877bb
DIFF: https://github.com/llvm/llvm-project/commit/879b7268b8edca42f35648c4b54e5426bf0877bb.diff
LOG: [Flang][OpenMP] Reenable and fix final few tests 6/6 (#93295)
Add do02.f90 and taskloop03.f90 that were removed in
https://github.com/llvm/llvm-project/pull/92739
Replace shell script tests with python.
Added:
flang/test/Semantics/OpenMP/do02.f90
flang/test/Semantics/OpenMP/taskloop03.f90
Modified:
flang/test/Semantics/OpenMP/sections03.f90
flang/test/Semantics/OpenMP/simd03.f90
Removed:
################################################################################
diff --git a/flang/test/Semantics/OpenMP/do02.f90 b/flang/test/Semantics/OpenMP/do02.f90
new file mode 100644
index 0000000000000..d9f5c9963ca50
--- /dev/null
+++ b/flang/test/Semantics/OpenMP/do02.f90
@@ -0,0 +1,21 @@
+! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
+! XFAIL: *
+
+! OpenMP Version 4.5
+! 2.7.1 Loop Construct
+! Exit statement terminating !$OMP DO loop
+
+program omp_do
+ integer i, j, k
+
+ !$omp do
+ do i = 1, 10
+ do j = 1, 10
+ print *, "Hello"
+ end do
+ !ERROR: EXIT statement terminating !$OMP DO loop
+ exit
+ end do
+ !$omp end do
+
+end program omp_do
diff --git a/flang/test/Semantics/OpenMP/sections03.f90 b/flang/test/Semantics/OpenMP/sections03.f90
index b170f8674d19d..eb7e83ae2fd87 100644
--- a/flang/test/Semantics/OpenMP/sections03.f90
+++ b/flang/test/Semantics/OpenMP/sections03.f90
@@ -1,6 +1,4 @@
-! UNSUPPORTED: system-windows
-! Marking as unsupported due to suspected long runtime on Windows
-! RUN: %python %S/../test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
!XFAIL: *
! OpenMP version 5.0.0
! 2.8.1 sections construct
diff --git a/flang/test/Semantics/OpenMP/simd03.f90 b/flang/test/Semantics/OpenMP/simd03.f90
index 8df48368fa969..8c90eba8fd8eb 100644
--- a/flang/test/Semantics/OpenMP/simd03.f90
+++ b/flang/test/Semantics/OpenMP/simd03.f90
@@ -1,6 +1,4 @@
-! UNSUPPORTED: system-windows
-! Marking as unsupported due to suspected long runtime on Windows
-! RUN: %S/test_errors.sh %s %t %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
! XFAIL: *
! OpenMP Version 4.5
diff --git a/flang/test/Semantics/OpenMP/taskloop03.f90 b/flang/test/Semantics/OpenMP/taskloop03.f90
new file mode 100644
index 0000000000000..3fe6a593bf49f
--- /dev/null
+++ b/flang/test/Semantics/OpenMP/taskloop03.f90
@@ -0,0 +1,25 @@
+! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
+! XFAIL: *
+
+! OpenMP Version 4.5
+! 2.9.2 taskloop Construct
+! All loops associated with the taskloop construct must be perfectly nested,
+! there must be no intervening code or any OpenMP directive between
+! any two loops
+
+program omp_taskloop
+ integer i, j
+
+ !$omp taskloop private(j) grainsize(500) nogroup
+ do i=1, 10000
+ do j=1, i
+ call loop_body(i, j)
+ end do
+ !ERROR: Loops associated with !$omp taskloop is not perfectly nested
+ !$omp single
+ print *, "omp single"
+ !$omp end single
+ end do
+ !$omp end taskloop
+
+end program omp_taskloop
More information about the flang-commits
mailing list