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 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
|
! RUN: %python %S/test_symbols.py %s %flang_fc1
! Forward references in pointer initializers and TBP bindings.
!DEF: /m Module
module m
implicit none
abstract interface
!DEF: /m/iface ABSTRACT, PUBLIC (Subroutine) Subprogram
subroutine iface
end subroutine
end interface
!DEF: /m/op1 POINTER, PUBLIC ObjectEntity REAL(4)
real, pointer :: op1
!DEF: /m/op2 POINTER, PUBLIC ObjectEntity REAL(4)
!DEF: /m/null INTRINSIC, PUBLIC, PURE (Function) ProcEntity
real, pointer :: op2 => null()
!DEF: /m/op3 POINTER, PUBLIC (InDataStmt) ObjectEntity REAL(4)
!DEF: /m/x PUBLIC, TARGET ObjectEntity REAL(4)
real, pointer :: op3 => x
!DEF: /m/op4 POINTER, PUBLIC (InDataStmt) ObjectEntity REAL(4)
!DEF: /m/y PUBLIC, TARGET ObjectEntity REAL(4)
real, pointer :: op4 => y(1)
!REF: /m/iface
!DEF: /m/pp1 EXTERNAL, POINTER, PUBLIC (Subroutine) ProcEntity
procedure(iface), pointer :: pp1
!REF: /m/iface
!DEF: /m/pp2 EXTERNAL, POINTER, PUBLIC (Subroutine) ProcEntity
!REF: /m/null
procedure(iface), pointer :: pp2 => null()
!REF: /m/iface
!DEF: /m/pp3 EXTERNAL, POINTER, PUBLIC (Subroutine) ProcEntity
!DEF: /m/ext1 EXTERNAL, PUBLIC (Subroutine) ProcEntity
procedure(iface), pointer :: pp3 => ext1
!REF: /m/iface
!DEF: /m/pp4 EXTERNAL, POINTER, PUBLIC (Subroutine) ProcEntity
!DEF: /m/ext2 EXTERNAL, PUBLIC (Subroutine) Subprogram
procedure(iface), pointer :: pp4 => ext2
!REF: /m/iface
!DEF: /m/pp5 EXTERNAL, POINTER, PUBLIC (Subroutine) ProcEntity
!DEF: /m/ext3 EXTERNAL, PUBLIC (Subroutine) ProcEntity
procedure(iface), pointer :: pp5 => ext3
!REF: /m/iface
!DEF: /m/pp6 EXTERNAL, POINTER, PUBLIC (Subroutine) ProcEntity
!DEF: /m/modproc1 PUBLIC (Subroutine) Subprogram
procedure(iface), pointer :: pp6 => modproc1
!DEF: /m/t1 PUBLIC DerivedType
type :: t1
!DEF: /m/t1/opc1 POINTER ObjectEntity REAL(4)
real, pointer :: opc1
!DEF: /m/t1/opc2 POINTER ObjectEntity REAL(4)
!REF: /m/null
real, pointer :: opc2 => null()
!DEF: /m/t1/opc3 POINTER (InDataStmt) ObjectEntity REAL(4)
!REF: /m/x
real, pointer :: opc3 => x
!DEF: /m/t1/opc4 POINTER (InDataStmt) ObjectEntity REAL(4)
!REF: /m/y
real, pointer :: opc4 => y(1)
!REF: /m/iface
!DEF: /m/t1/ppc1 NOPASS, POINTER (Subroutine) ProcEntity
procedure(iface), nopass, pointer :: ppc1
!REF: /m/iface
!DEF: /m/t1/ppc2 NOPASS, POINTER (Subroutine) ProcEntity
!REF: /m/null
procedure(iface), nopass, pointer :: ppc2 => null()
!REF: /m/iface
!DEF: /m/t1/ppc3 NOPASS, POINTER (Subroutine) ProcEntity
!REF: /m/ext1
procedure(iface), nopass, pointer :: ppc3 => ext1
!REF: /m/iface
!DEF: /m/t1/ppc4 NOPASS, POINTER (Subroutine) ProcEntity
!REF: /m/ext2
procedure(iface), nopass, pointer :: ppc4 => ext2
!REF: /m/iface
!DEF: /m/t1/ppc5 NOPASS, POINTER (Subroutine) ProcEntity
!REF: /m/ext3
procedure(iface), nopass, pointer :: ppc5 => ext3
!REF: /m/iface
!DEF: /m/t1/ppc6 NOPASS, POINTER (Subroutine) ProcEntity
!REF: /m/modproc1
procedure(iface), nopass, pointer :: ppc6 => modproc1
contains
!DEF: /m/t1/b2 NOPASS ProcBinding
!REF: /m/ext2
procedure, nopass :: b2 => ext2
!DEF: /m/t1/b3 NOPASS ProcBinding
!REF: /m/ext3
procedure, nopass :: b3 => ext3
!DEF: /m/t1/b4 NOPASS ProcBinding
!REF: /m/modproc1
procedure, nopass :: b4 => modproc1
end type
!DEF: /m/pdt1 PUBLIC DerivedType
!DEF: /m/pdt1/k TypeParam INTEGER(4)
type :: pdt1(k)
!REF: /m/pdt1/k
integer, kind :: k
!DEF: /m/pdt1/opc1 POINTER ObjectEntity REAL(4)
real, pointer :: opc1
!DEF: /m/pdt1/opc2 POINTER ObjectEntity REAL(4)
!REF: /m/null
real, pointer :: opc2 => null()
!DEF: /m/pdt1/opc3 POINTER (InDataStmt) ObjectEntity REAL(4)
!REF: /m/x
real, pointer :: opc3 => x
!DEF: /m/pdt1/opc4 POINTER (InDataStmt) ObjectEntity REAL(4)
!REF: /m/y
!REF: /m/pdt1/k
real, pointer :: opc4 => y(k)
!REF: /m/iface
!DEF: /m/pdt1/ppc1 NOPASS, POINTER (Subroutine) ProcEntity
procedure(iface), nopass, pointer :: ppc1
!REF: /m/iface
!DEF: /m/pdt1/ppc2 NOPASS, POINTER (Subroutine) ProcEntity
!REF: /m/null
procedure(iface), nopass, pointer :: ppc2 => null()
!REF: /m/iface
!DEF: /m/pdt1/ppc3 NOPASS, POINTER (Subroutine) ProcEntity
!REF: /m/ext1
procedure(iface), nopass, pointer :: ppc3 => ext1
!REF: /m/iface
!DEF: /m/pdt1/ppc4 NOPASS, POINTER (Subroutine) ProcEntity
!REF: /m/ext2
procedure(iface), nopass, pointer :: ppc4 => ext2
!REF: /m/iface
!DEF: /m/pdt1/ppc5 NOPASS, POINTER (Subroutine) ProcEntity
!REF: /m/ext3
procedure(iface), nopass, pointer :: ppc5 => ext3
!REF: /m/iface
!DEF: /m/pdt1/ppc6 NOPASS, POINTER (Subroutine) ProcEntity
!REF: /m/modproc1
procedure(iface), nopass, pointer :: ppc6 => modproc1
contains
!DEF: /m/pdt1/b2 NOPASS ProcBinding
!REF: /m/ext2
procedure, nopass :: b2 => ext2
!DEF: /m/pdt1/b3 NOPASS ProcBinding
!REF: /m/ext3
procedure, nopass :: b3 => ext3
!DEF: /m/pdt1/b4 NOPASS ProcBinding
!REF: /m/modproc1
procedure, nopass :: b4 => modproc1
end type
!REF: /m/t1
!DEF: /m/t1x PUBLIC ObjectEntity TYPE(t1)
type(t1) :: t1x
!REF: /m/pdt1
!DEF: /m/pdt1x PUBLIC ObjectEntity TYPE(pdt1(k=1_4))
type(pdt1(1)) :: pdt1x
!REF: /m/x
!REF: /m/y
real, target :: x, y(2)
!REF: /m/ext1
external :: ext1
!REF: /m/iface
!REF: /m/ext3
procedure(iface) :: ext3
interface
!REF: /m/ext2
subroutine ext2
end subroutine
end interface
!DEF: /m/op10 POINTER, PUBLIC(InDataStmt) ObjectEntity REAL(4)
!REF: /m/x
real, pointer :: op10 => x
!DEF: /m/op11 POINTER, PUBLIC(InDataStmt) ObjectEntity REAL(4)
!REF: /m/y
real, pointer :: op11 => y(1)
!REF: /m/iface
!DEF: /m/pp10 EXTERNAL, POINTER, PUBLIC (Subroutine) ProcEntity
!REF: /m/ext1
procedure(iface), pointer :: pp10 => ext1
!REF: /m/iface
!DEF: /m/pp11 EXTERNAL, POINTER, PUBLIC (Subroutine) ProcEntity
!REF: /m/ext2
procedure(iface), pointer :: pp11 => ext2
!DEF: /m/t2 PUBLIC DerivedType
type :: t2
!DEF: /m/t2/opc10 POINTER (InDataStmt) ObjectEntity REAL(4)
!REF: /m/x
real, pointer :: opc10 => x
!DEF: /m/t2/opc11 POINTER (InDataStmt) ObjectEntity REAL(4)
!REF: /m/y
real, pointer :: opc11 => y(1)
!REF: /m/iface
!DEF: /m/t2/ppc10 NOPASS, POINTER (Subroutine) ProcEntity
!REF: /m/ext1
procedure(iface), nopass, pointer :: ppc10 => ext1
!REF: /m/iface
!DEF: /m/t2/ppc11 NOPASS, POINTER (Subroutine) ProcEntity
!REF: /m/ext2
procedure(iface), nopass, pointer :: ppc11 => ext2
contains
!DEF: /m/t2/b10 NOPASS ProcBinding
!REF: /m/ext2
procedure, nopass :: b10 => ext2
!DEF: /m/t2/b11 NOPASS ProcBinding
!REF: /m/ext3
procedure, nopass :: b11 => ext3
end type
!DEF: /m/pdt2 PUBLIC DerivedType
!DEF: /m/pdt2/k TypeParam INTEGER(4)
type :: pdt2(k)
!REF: /m/pdt2/k
integer, kind :: k
!DEF: /m/pdt2/opc10 POINTER (InDataStmt) ObjectEntity REAL(4)
!REF: /m/x
real, pointer :: opc10 => x
!DEF: /m/pdt2/opc11 POINTER (InDataStmt) ObjectEntity REAL(4)
!REF: /m/y
!REF: /m/pdt2/k
real, pointer :: opc11 => y(k)
!REF: /m/iface
!DEF: /m/pdt2/ppc10 NOPASS, POINTER (Subroutine) ProcEntity
!REF: /m/ext1
procedure(iface), nopass, pointer :: ppc10 => ext1
!REF: /m/iface
!DEF: /m/pdt2/ppc11 NOPASS, POINTER (Subroutine) ProcEntity
!REF: /m/ext2
procedure(iface), nopass, pointer :: ppc11 => ext2
contains
!DEF: /m/pdt2/b10 NOPASS ProcBinding
!REF: /m/ext2
procedure, nopass :: b10 => ext2
!DEF: /m/pdt2/b11 NOPASS ProcBinding
!REF: /m/ext3
procedure, nopass :: b11 => ext3
end type
!REF: /m/t2
!DEF: /m/t2x PUBLIC ObjectEntity TYPE(t2)
type(t2) :: t2x
!REF: /m/pdt2
!DEF: /m/pdt2x PUBLIC ObjectEntity TYPE(pdt2(k=1_4))
type(pdt2(1)) :: pdt2x
contains
!REF: /m/modproc1
subroutine modproc1
end subroutine
end module
!DEF: /ext1 (Subroutine) Subprogram
subroutine ext1
end subroutine
!DEF: /ext2 (Subroutine) Subprogram
subroutine ext2
end subroutine
!DEF: /ext3 (Subroutine) Subprogram
subroutine ext3
end subroutine
!DEF: /main MainProgram
program main
!REF: /m
use :: m
!DEF: /main/pdt1 Use
!DEF: /main/pdt1y ObjectEntity TYPE(pdt1(k=2_4))
type(pdt1(2)) :: pdt1y
!DEF: /main/pdt2 Use
!DEF: /main/pdt2y ObjectEntity TYPE(pdt2(k=2_4))
type(pdt2(2)) :: pdt2y
print *, "compiled"
end program
|