File: symbol22.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 (55 lines) | stat: -rw-r--r-- 1,235 bytes parent folder | download | duplicates (14)
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
! RUN: %python %S/test_symbols.py %s %flang_fc1
! Allow redeclaration of inherited inaccessible components
!DEF: /m1 Module
module m1
 !DEF: /m1/t0 PRIVATE DerivedType
 type, private :: t0
 end type
 !REF: /m1/t0
 !DEF: /m1/t1 PUBLIC DerivedType
 type, extends(t0) :: t1
  !DEF: /m1/t1/n1a PRIVATE ObjectEntity INTEGER(4)
  !DEF: /m1/t1/n1b PRIVATE ObjectEntity INTEGER(4)
  integer, private :: n1a = 1, n1b = 2
 end type
end module
!DEF: /m2 Module
module m2
 !REF: /m1
 use :: m1
 !DEF: /m2/t1 PUBLIC Use
 !DEF: /m2/t2 PUBLIC DerivedType
 type, extends(t1) :: t2
  !DEF: /m2/t2/t0 ObjectEntity REAL(4)
  real :: t0
  !DEF: /m2/t2/n1a ObjectEntity REAL(4)
  real :: n1a
 end type
 !REF: /m2/t2
 !DEF: /m2/t3 PUBLIC DerivedType
 type, extends(t2) :: t3
  !DEF: /m2/t3/n1b ObjectEntity REAL(4)
  real :: n1b
 end type
end module
!DEF: /test (Subroutine) Subprogram
subroutine test
 !REF: /m2
 use :: m2
 !DEF: /test/t3 Use
 !DEF: /test/x ObjectEntity TYPE(t3)
 type(t3) :: x
 !REF: /test/x
 !REF: /m2/t3/n1b
 x%n1b = 1.
 !REF: /test/x
 !DEF: /m2/t3/t2 (ParentComp) ObjectEntity TYPE(t2)
 !DEF: /test/t2 Use
 x%t2 = t2(t0=2., n1a=3.)
 !REF: /test/x
 !REF: /m2/t2/t0
 x%t0 = 4.
 !REF: /test/x
 !REF: /m2/t2/n1a
 x%n1a = 5.
end subroutine