File: label06.f90

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (24 lines) | stat: -rw-r--r-- 734 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
! RUN: not %flang_fc1 -fdebug-unparse-with-symbols %s 2>&1 | FileCheck %s
! CHECK: warning: Label '10' is in a construct that should not be used as a branch target here
! CHECK: Label '20' was not found
! CHECK: Label '30' is not a branch target
! CHECK: Control flow use of '30'
! CHECK: warning: Label '40' is in a construct that should not be used as a branch target here
! CHECK: warning: Label '50' is in a construct that should not be used as a branch target here

subroutine sub00(n)
  GOTO (10,20,30) n
  if (n .eq. 1) then
10   print *, "xyz"
  end if
30 FORMAT (1x,i6)
end subroutine sub00

subroutine sub01(n)
  real n
  GOTO (40,50,60) n
  if (n .eq. 1) then
40   print *, "xyz"
50 end if
60 continue
end subroutine sub01