brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · 917554d Raw
71 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! C1167 -- An exit-stmt shall not appear within a DO CONCURRENT construct if 3! it belongs to that construct or an outer construct.4 5subroutine do_concurrent_test1(n)6  implicit none7  integer :: i1,i2,i3,i4,i5,i6,n8  mytest1: if (n>0) then9  nc1:       do concurrent(i1=1:n)10  nc2:         do i2=1,n11  nc3:           do concurrent(i3=1:n)12  nc4:             do i4=1,n13  nc5:               do concurrent(i5=1:n)14  nc6:                 do i6=1,n15!ERROR: EXIT must not leave a DO CONCURRENT statement16!ERROR: EXIT must not leave a DO CONCURRENT statement17!ERROR: EXIT must not leave a DO CONCURRENT statement18                         if (i6==10) exit mytest119                       end do nc620                     end do nc521                   end do nc422                 end do nc323               end do nc224             end do nc125           end if mytest126end subroutine do_concurrent_test127 28subroutine do_concurrent_test2(n)29  implicit none30  integer :: i1,i2,i3,i4,i5,i6,n31  mytest2: if (n>0) then32  nc1:       do concurrent(i1=1:n)33  nc2:         do i2=1,n34  nc3:           do concurrent(i3=1:n)35  nc4:             do i4=1,n36  nc5:               do concurrent(i5=1:n)37  nc6:                 do i6=1,n38!ERROR: EXIT must not leave a DO CONCURRENT statement39!ERROR: EXIT must not leave a DO CONCURRENT statement40                         if (i6==10) exit nc341                       end do nc642                     end do nc543                   end do nc444                 end do nc345               end do nc246             end do nc147           end if mytest248end subroutine do_concurrent_test249 50subroutine do_concurrent_test3(n)51  implicit none52  integer :: i1,i2,i3,i4,i5,i6,n53  mytest3: if (n>0) then54  nc1:       do concurrent(i1=1:n)55  nc2:         do i2=1,n56  nc3:           do concurrent(i3=1:n)57!ERROR: EXIT must not leave a DO CONCURRENT statement58                   if (i3==4) exit nc259  nc4:             do i4=1,n60  nc5:               do concurrent(i5=1:n)61  nc6:                 do i6=1,n62                         if (i6==10) print *, "hello"63                       end do nc664                     end do nc565                   end do nc466                 end do nc367               end do nc268             end do nc169           end if mytest370end subroutine do_concurrent_test371