Skip to content

Commit e22f537

Browse files
[Flang][OpenMP] Reenable and fix final few tests 6/6
Add do02.f90 and taskloop03.f90 that were removed in llvm#92739 Replace shell script tests with python.
1 parent ebc6c28 commit e22f537

File tree

4 files changed

+48
-6
lines changed

4 files changed

+48
-6
lines changed

flang/test/Semantics/OpenMP/do02.f90

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
2+
! XFAIL: *
3+
4+
! OpenMP Version 4.5
5+
! 2.7.1 Loop Construct
6+
! Exit statement terminating !$OMP DO loop
7+
8+
program omp_do
9+
integer i, j, k
10+
11+
!$omp do
12+
do i = 1, 10
13+
do j = 1, 10
14+
print *, "Hello"
15+
end do
16+
!ERROR: EXIT statement terminating !$OMP DO loop
17+
exit
18+
end do
19+
!$omp end do
20+
21+
end program omp_do

flang/test/Semantics/OpenMP/sections03.f90

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
! UNSUPPORTED: system-windows
2-
! Marking as unsupported due to suspected long runtime on Windows
3-
! RUN: %python %S/../test_errors.py %s %flang -fopenmp
1+
! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
42
!XFAIL: *
53
! OpenMP version 5.0.0
64
! 2.8.1 sections construct

flang/test/Semantics/OpenMP/simd03.f90

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
! UNSUPPORTED: system-windows
2-
! Marking as unsupported due to suspected long runtime on Windows
3-
! RUN: %S/test_errors.sh %s %t %flang -fopenmp
1+
! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
42
! XFAIL: *
53

64
! OpenMP Version 4.5
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
2+
! XFAIL: *
3+
4+
! OpenMP Version 4.5
5+
! 2.9.2 taskloop Construct
6+
! All loops associated with the taskloop construct must be perfectly nested,
7+
! there must be no intervening code or any OpenMP directive between
8+
! any two loops
9+
10+
program omp_taskloop
11+
integer i, j
12+
13+
!$omp taskloop private(j) grainsize(500) nogroup
14+
do i=1, 10000
15+
do j=1, i
16+
call loop_body(i, j)
17+
end do
18+
!ERROR: Loops associated with !$omp taskloop is not perfectly nested
19+
!$omp single
20+
print *, "omp single"
21+
!$omp end single
22+
end do
23+
!$omp end taskloop
24+
25+
end program omp_taskloop

0 commit comments

Comments
 (0)