File: label15.f90

package info (click to toggle)
llvm-toolchain-13 1%3A13.0.1-11
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,418,840 kB
  • sloc: cpp: 5,290,826; ansic: 996,570; asm: 544,593; python: 188,212; objc: 72,027; lisp: 30,291; f90: 25,395; sh: 24,898; javascript: 9,780; pascal: 9,398; perl: 7,484; ml: 5,432; awk: 3,523; makefile: 2,913; xml: 953; cs: 573; fortran: 539
file content (92 lines) | stat: -rw-r--r-- 1,506 bytes parent folder | download | duplicates (29)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
! RUN: %flang_fc1 -fdebug-unparse %s 2>&1 | FileCheck %s

!CHECK-NOT: error:
module mm
   interface
      module subroutine m(n)
      end
   end interface
end module mm

program p
   use mm
20 print*, 'p'
21 call p1
22 call p2
23 f0 = f(0); print '(f5.1)', f0
24 f1 = f(1); print '(f5.1)', f1
25 call s(0); call s(1)
26 call m(0); call m(1)
27 if (.false.) goto 29
28 print*, 'px'
contains
   subroutine p1
      print*, 'p1'
      goto 29
29 end subroutine p1
   subroutine p2
      print*, 'p2'
      goto 29
29 end subroutine p2
29 end

function f(n)
   print*, 'f'
31 call f1
32 call f2
   f = 30.
   if (n == 0) goto 39
   f = f + 3.
   print*, 'fx'
contains
   subroutine f1
      print*, 'f1'
      goto 39
39 end subroutine f1
   subroutine f2
      print*, 'f2'
      goto 39
39 end subroutine f2
39 end

subroutine s(n)
   print*, 's'
41 call s1
42 call s2
43 call s3
   if (n == 0) goto 49
   print*, 'sx'
contains
   subroutine s1
      print*, 's1'
      goto 49
49 end subroutine s1
   subroutine s2
      print*, 's2'
      goto 49
49 end subroutine s2
   subroutine s3
      print*, 's3'
      goto 49
49 end subroutine s3
49 end

submodule(mm) mm1
contains
   module procedure m
      print*, 'm'
   50 call m1
   51 call m2
      if (n == 0) goto 59
      print*, 'mx'
   contains
      subroutine m1
         print*, 'm1'
         goto 59
   59 end subroutine m1
      subroutine m2
         print*, 'm2'
         goto 59
   59 end subroutine m2
   59 end procedure m
end submodule mm1