File: modfile24.f90

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-20
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,496,436 kB
  • sloc: cpp: 5,593,990; ansic: 986,873; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,547; xml: 953; cs: 573; fortran: 567
file content (75 lines) | stat: -rw-r--r-- 1,758 bytes parent folder | download | duplicates (19)
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
! RUN: %python %S/test_modfile.py %s %flang_fc1
! Test declarations with coarray-spec

! Different ways of declaring the same coarray.
module m1
  real :: a(1:5)[1:10,1:*]
  real, dimension(5) :: b[1:10,1:*]
  real, codimension[1:10,1:*] :: c(5)
  real, codimension[1:10,1:*], dimension(5) :: d
  codimension :: e[1:10,1:*]
  dimension :: e(5)
  real :: e
end
!Expect: m1.mod
!module m1
! real(4)::a(1_8:5_8)[1_8:10_8,1_8:*]
! real(4)::b(1_8:5_8)[1_8:10_8,1_8:*]
! real(4)::c(1_8:5_8)[1_8:10_8,1_8:*]
! real(4)::d(1_8:5_8)[1_8:10_8,1_8:*]
! real(4)::e(1_8:5_8)[1_8:10_8,1_8:*]
!end

! coarray-spec in codimension and target statements.
module m2
  codimension :: a[10,*], b[*]
  target :: c[10,*], d[*]
end
!Expect: m2.mod
!module m2
! real(4)::a[1_8:10_8,1_8:*]
! real(4)::b[1_8:*]
! real(4),target::c[1_8:10_8,1_8:*]
! real(4),target::d[1_8:*]
!end

! coarray-spec in components and with non-constants bounds
module m3
  type t
    real, allocatable :: c[:,:]
    complex, allocatable, codimension[:,:] :: d
  end type
  real, allocatable :: e[:,:,:]
contains
  subroutine s(a, b, n)
    integer(8) :: n
    real :: a[1:n,2:*]
    real, codimension[1:n,2:*] :: b
  end
end
!Expect: m3.mod
!module m3
! type::t
!  real(4),allocatable::c[:,:]
!  complex(4),allocatable::d[:,:]
! end type
! real(4),allocatable::e[:,:,:]
!contains
! subroutine s(a,b,n)
!  integer(8)::n
!  real(4)::a[1_8:n,2_8:*]
!  real(4)::b[1_8:n,2_8:*]
! end
!end

! coarray-spec in both attributes and entity-decl
module m4
  real, codimension[2:*], dimension(2:5) :: a, b(4,4), c[10,*], d(4,4)[10,*]
end
!Expect: m4.mod
!module m4
! real(4)::a(2_8:5_8)[2_8:*]
! real(4)::b(1_8:4_8,1_8:4_8)[2_8:*]
! real(4)::c(2_8:5_8)[1_8:10_8,1_8:*]
! real(4)::d(1_8:4_8,1_8:4_8)[1_8:10_8,1_8:*]
!end