-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[Flang][OpenMP] Reenable and fix final few tests 6/6 #93295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Flang][OpenMP] Reenable and fix final few tests 6/6 #93295
Conversation
@llvm/pr-subscribers-flang-openmp @llvm/pr-subscribers-flang-semantics Author: Kiran Chandramohan (kiranchandramohan) ChangesAdd do02.f90 and taskloop03.f90 that were removed in #92739 Full diff: https://github.com/llvm/llvm-project/pull/93295.diff 4 Files Affected:
diff --git a/flang/test/Semantics/OpenMP/do02.f90 b/flang/test/Semantics/OpenMP/do02.f90
new file mode 100644
index 0000000000000..987593a39c036
--- /dev/null
+++ b/flang/test/Semantics/OpenMP/do02.f90
@@ -0,0 +1,20 @@
+! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
+
+! 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 to construct outside of DO construct is not allowed
+ 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..921e27f2e1c38 100644
--- a/flang/test/Semantics/OpenMP/sections03.f90
+++ b/flang/test/Semantics/OpenMP/sections03.f90
@@ -1,7 +1,5 @@
-! UNSUPPORTED: system-windows
-! Marking as unsupported due to suspected long runtime on Windows
-! RUN: %python %S/../test_errors.py %s %flang -fopenmp
-!XFAIL: *
+! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
+! XFAIL: *
! OpenMP version 5.0.0
! 2.8.1 sections construct
! Orphaned section directives are prohibited. That is, the section directives must appear within the sections construct and must not be encountered elsewhere in the sections region
diff --git a/flang/test/Semantics/OpenMP/simd03.f90 b/flang/test/Semantics/OpenMP/simd03.f90
index 8df48368fa969..944114839b591 100644
--- a/flang/test/Semantics/OpenMP/simd03.f90
+++ b/flang/test/Semantics/OpenMP/simd03.f90
@@ -1,7 +1,4 @@
-! UNSUPPORTED: system-windows
-! Marking as unsupported due to suspected long runtime on Windows
-! RUN: %S/test_errors.sh %s %t %flang -fopenmp
-! XFAIL: *
+! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
! OpenMP Version 4.5
! 2.8.1 simd Construct
@@ -16,7 +13,7 @@ program omp_simd
!$omp simd
do i = 1, 10
- !ERROR: Invalid OpenMP construct inside simd region
+ !ERROR: The only OpenMP constructs that can be encountered during execution of a 'SIMD' region are the `ATOMIC` construct, the `LOOP` construct, the `SIMD` construct and the `ORDERED` construct with the `SIMD` clause.
!$omp single
a(i) = i
!$omp end single
diff --git a/flang/test/Semantics/OpenMP/taskloop03.f90 b/flang/test/Semantics/OpenMP/taskloop03.f90
new file mode 100644
index 0000000000000..afb880d73844d
--- /dev/null
+++ b/flang/test/Semantics/OpenMP/taskloop03.f90
@@ -0,0 +1,24 @@
+! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
+
+! 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: A worksharing region may not be closely nested inside a worksharing, explicit task, taskloop, critical, ordered, atomic, or master region
+ !$omp single
+ print *, "omp single"
+ !$omp end single
+ end do
+ !$omp end taskloop
+
+end program omp_taskloop
|
Add do02.f90 and taskloop03.f90 that were removed in llvm#92739 Replace shell script tests with python.
98ea51a
to
e22f537
Compare
We had some leftover shell scripts in XFAILed tests that probably caused the issue. I have moved them over to python testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Testing time and porting tests to python seems fine.
Add do02.f90 and taskloop03.f90 that were removed in #92739
Replace shell script tests with python.