Skip to content

Commit 1ee5f69

Browse files
committed
Add check for cuf kernel loop number exceeding do concurrent index range, and add a test for it
1 parent fa592f1 commit 1ee5f69

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

flang/test/Semantics/cuf09.cuf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ program main
133133
!$cuf kernel do <<< 1, 2 >>>
134134
do concurrent (j=1:10)
135135
end do
136+
!ERROR: !$CUF KERNEL DO (2) must be followed by a DO construct with tightly nested outer levels of counted DO loops
137+
!$cuf kernel do(2) <<< 1, 2 >>>
138+
do concurrent (j=1:10)
139+
end do
136140
!$cuf kernel do <<< 1, 2 >>>
137141
do 1 j=1,10
138142
1 continue ! ok

0 commit comments

Comments
 (0)