File: resolve97.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 (94 lines) | stat: -rw-r--r-- 3,920 bytes parent folder | download | duplicates (18)
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
93
94
! RUN: %python %S/test_errors.py %s %flang_fc1

! Check errors from illegal (10.1.12 para 2) forward references
! in specification expressions to entities declared later in the
! same specification part.

module m1
  integer :: m1j1, m1j2, m1j3, m1j4
 contains
  subroutine s1
    !ERROR: Forward reference to 'm1j1' is not allowed in the same specification part
    integer(kind=kind(m1j1)) :: t_s1m1j1
    integer(kind=kind(m1s1j1)) :: t_s1j1 ! implicitly typed in s1
    integer :: m1j1, m1s1j1, m1s1j2, m1s1j4
    block
      !ERROR: Forward reference to 'm1j2' is not allowed in the same specification part
      integer(kind=kind(m1j2)) :: t_s1bm1j2
      !ERROR: Forward reference to 'm1s1j2' is not allowed in the same specification part
      integer(kind=kind(m1s1j2)) :: t_s1bm1s1j2
      !ERROR: Forward reference to 'm1s1j3' is not allowed in the same specification part
      integer(kind=kind(m1s1j3)) :: t_m1s1j3 ! m1s1j3 implicitly typed in s1
      integer :: m1j2, m1s1j2, m1s1j3
    end block
   contains
    subroutine s2
      !ERROR: Forward reference to 'm1j3' is not allowed in the same specification part
      integer(kind=kind(m1j3)) :: t_m1j3
      !ERROR: Forward reference to 'm1s1j3' is not allowed in the same specification part
      integer(kind=kind(m1s1j3)) :: t_m1s1j3
      integer :: m1j3, m1s1j3, m1s2j1
      block
        !ERROR: Forward reference to 'm1j4' is not allowed in the same specification part
        integer(kind=kind(m1j4)) :: t_m1j4
        !ERROR: Forward reference to 'm1s1j4' is not allowed in the same specification part
        integer(kind=kind(m1s1j4)) :: t_m1s1j4
        !ERROR: Forward reference to 'm1s2j1' is not allowed in the same specification part
        integer(kind=kind(m1s2j1)) :: t_m1s2j1
        !ERROR: Forward reference to 'm1s2j2' is not allowed in the same specification part
        integer(kind=kind(m1s2j2)) :: t_m1s2j2 ! m1s2j2 implicitly typed in s2
        integer :: m1j4, m1s1j4, m1s2j1, m1s2j2
      end block
    end subroutine
  end subroutine
end module

module m2
  implicit none
  integer :: m2j1, m2j2, m2j3, m2j4
 contains
  subroutine s1
    !ERROR: Forward reference to 'm2j1' is not allowed in the same specification part
    integer(kind=kind(m2j1)) :: t_s1m2j1
    !ERROR: No explicit type declared for 'm2s1j1'
    integer(kind=kind(m2s1j1)) :: t_s1j1
    integer :: m2j1, m2s1j1, m2s1j2, m2s1j4
    block
      !ERROR: Forward reference to 'm2j2' is not allowed in the same specification part
      integer(kind=kind(m2j2)) :: t_s1bm2j2
      !ERROR: Forward reference to 'm2s1j2' is not allowed in the same specification part
      integer(kind=kind(m2s1j2)) :: t_s1bm2s1j2
      !ERROR: No explicit type declared for 'm2s1j3'
      integer(kind=kind(m2s1j3)) :: t_m2s1j3
      integer :: m2j2, m2s1j2, m2s1j3
    end block
   contains
    subroutine s2
      !ERROR: Forward reference to 'm2j3' is not allowed in the same specification part
      integer(kind=kind(m2j3)) :: t_m2j3
      !ERROR: No explicit type declared for 'm2s1j3'
      integer(kind=kind(m2s1j3)) :: t_m2s1j3
      integer :: m2j3, m2s1j3, m2s2j1
      block
        !ERROR: Forward reference to 'm2j4' is not allowed in the same specification part
        integer(kind=kind(m2j4)) :: t_m2j4
        !ERROR: Forward reference to 'm2s1j4' is not allowed in the same specification part
        integer(kind=kind(m2s1j4)) :: t_m2s1j4
        !ERROR: Forward reference to 'm2s2j1' is not allowed in the same specification part
        integer(kind=kind(m2s2j1)) :: t_m2s2j1
        !ERROR: No explicit type declared for 'm2s2j2'
        integer(kind=kind(m2s2j2)) :: t_m2s2j2
        integer :: m2j4, m2s1j4, m2s2j1, m2s2j2
      end block
    end subroutine
  end subroutine
end module

! Case that elicited bad errors
SUBROUTINE KEEL
  INTEGER NODES
 CONTAINS
  SUBROUTINE SGEOM
    REAL :: RADIUS(nodes)
  END SUBROUTINE
END SUBROUTINE KEEL