Skip to content

Commit bc6d651

Browse files
author
Ferran Toda
committed
looprange constant parameter test
1 parent ead87b9 commit bc6d651

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

flang/test/Semantics/OpenMP/loop-transformation-clauses01.f90

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ subroutine loop_transformation_construct1
77
implicit none
88
integer, parameter:: i = 5
99
integer :: x
10+
integer :: a
1011
integer :: v(i)
1112

1213
!ERROR: At most one LOOPRANGE clause can appear on the FUSE directive
@@ -48,4 +49,18 @@ subroutine loop_transformation_construct1
4849
v(x) = x * 2
4950
end do
5051
!$omp end fuse
52+
53+
!ERROR: Must be a constant value
54+
!$omp fuse looprange(a,2)
55+
do x = 1, i
56+
v(x) = x * 2
57+
end do
58+
!$omp end fuse
59+
60+
!ERROR: Must be a constant value
61+
!$omp fuse looprange(1,a)
62+
do x = 1, i
63+
v(x) = x * 2
64+
end do
65+
!$omp end fuse
5166
end subroutine

0 commit comments

Comments
 (0)