File: resolve42.f90

package info (click to toggle)
llvm-toolchain-11 1%3A11.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 995,808 kB
  • sloc: cpp: 4,767,656; ansic: 760,916; asm: 477,436; python: 170,940; objc: 69,804; lisp: 29,914; sh: 23,855; f90: 18,173; pascal: 7,551; perl: 7,471; ml: 5,603; awk: 3,489; makefile: 2,573; xml: 915; cs: 573; fortran: 503; javascript: 452
file content (114 lines) | stat: -rw-r--r-- 2,470 bytes parent folder | download | duplicates (2)
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
! RUN: %S/test_errors.sh %s %t %f18
subroutine s1
  !ERROR: Array 'z' without ALLOCATABLE or POINTER attribute must have explicit shape
  common x, y(4), z(:)
end

subroutine s2
  common /c1/ x, y, z
  !ERROR: 'y' is already in a COMMON block
  common y
end

subroutine s3
  procedure(real) :: x
  !ERROR: 'x' is already declared as a procedure
  common x
  common y
  !ERROR: 'y' is already declared as an object
  procedure(real) :: y
end

subroutine s5
  integer x(2)
  !ERROR: The dimensions of 'x' have already been declared
  common x(4), y(4)
  !ERROR: The dimensions of 'y' have already been declared
  real y(2)
end

function f6(x) result(r)
  !ERROR: Dummy argument 'x' may not appear in a COMMON block
  !ERROR: ALLOCATABLE object 'y' may not appear in a COMMON block
  common x,y,z
  allocatable y
  !ERROR: Function result 'r' may not appear in a COMMON block
  common r
end

module m7
  !ERROR: Variable 'w' with BIND attribute may not appear in a COMMON block
  !ERROR: Variable 'z' with BIND attribute may not appear in a COMMON block
  common w,z
  integer, bind(c) :: z
  integer, bind(c,name="w") :: w
end

module m8
  type t
  end type
  class(*), pointer :: x
  !ERROR: Unlimited polymorphic pointer 'x' may not appear in a COMMON block
  !ERROR: Unlimited polymorphic pointer 'y' may not appear in a COMMON block
  common x, y
  class(*), pointer :: y
end

module m9
  integer x
end
subroutine s9
  use m9
  !ERROR: 'x' is use-associated from module 'm9' and cannot be re-declared
  common x
end

module m10
  type t
  end type
  type(t) :: x
  !ERROR: Derived type 'x' in COMMON block must have the BIND or SEQUENCE attribute
  common x
end

module m11
  type t1
    sequence
    integer, allocatable :: a
  end type
  type t2
    sequence
    type(t1) :: b
    integer:: c
  end type
  type(t2) :: x2
  !ERROR: Derived type variable 'x2' may not appear in a COMMON block due to ALLOCATABLE component
  common x2
end

module m12
  type t1
    sequence
    integer :: a = 123
  end type
  type t2
    sequence
    type(t1) :: b
    integer:: c
  end type
  type(t2) :: x2
  !ERROR: Derived type variable 'x2' may not appear in a COMMON block due to component with default initialization
  common x2
end

subroutine s13
  block
    !ERROR: COMMON statement is not allowed in a BLOCK construct
    common x
  end block
end

subroutine s14
  !ERROR: 'c' appears as a COMMON block in a BIND statement but not in a COMMON statement
  bind(c) :: /c/
end