xref: /llvm-project/flang/test/Semantics/label18.f90 (revision 48a8262cb8dce16b0e64cb1aec1d74dc96e5d551)
1! RUN: %python %S/test_errors.py %s %flang_fc1 -Werror
2program main
3  if (.true.) then
4    do j = 1, 2
5      goto 1 ! ok; used to cause looping in label resolution
6    end do
7  else
8    goto 1 ! ok
91 end if
10  if (.true.) then
11    do j = 1, 2
12      !WARNING: Label '1' is in a construct that should not be used as a branch target here
13      goto 1
14    end do
15  end if
16  !WARNING: Label '1' is in a construct that should not be used as a branch target here
17  goto 1
18end
19