Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / canondo05.f90
blob934f8a0d42d2eacfbca799bbe9ab41d2c70cb124
1 ! Check that if there is a label or a name on an label-do-stmt,
2 ! then it is not lost when rewriting it to an non-label-do-stmt.
4 ! RUN: %flang_fc1 -fdebug-unparse-with-symbols -pedantic %s 2>&1 | FileCheck %s
6 ! CHECK: end do
7 ! CHECK: 2 do
8 ! CHECK: mainloop: do
9 ! CHECK: end do mainloop
11 ! CHECK-NOT: do [1-9]
13 subroutine foo()
14 do 1 i=1,2
15 goto 2
16 1 continue
17 2 do 3 i=1,2
18 3 continue
20 mainloop : do 4 i=1,100
21 do j=1,20
22 if (j==i) then
23 ! cycle mainloop: TODO: fix invalid complaints that mainloop construct
24 ! is not in scope.
25 end if
26 end do
27 4 end do mainloop
28 end subroutine