xref: /llvm-project/flang/test/Semantics/label06.f90 (revision ee9c9170480a5f628846eb82d300e88d4add45d5)
1! RUN: not %flang_fc1 -fdebug-unparse-with-symbols %s 2>&1 | FileCheck %s
2! CHECK: warning: Label '10' is in a construct that should not be used as a branch target here
3! CHECK: Label '20' was not found
4! CHECK: Label '30' is not a branch target
5! CHECK: Control flow use of '30'
6! CHECK: warning: Label '40' is in a construct that should not be used as a branch target here
7! CHECK: warning: Label '50' is in a construct that should not be used as a branch target here
8
9subroutine sub00(n)
10  GOTO (10,20,30) n
11  if (n .eq. 1) then
1210   print *, "xyz"
13  end if
1430 FORMAT (1x,i6)
15end subroutine sub00
16
17subroutine sub01(n)
18  real n
19  GOTO (40,50,60) n
20  if (n .eq. 1) then
2140   print *, "xyz"
2250 end if
2360 continue
24end subroutine sub01
25