1 ! RUN: %python %S/test_modfile.py %s %flang_fc1
2 ! Test declarations with coarray-spec
4 ! Different ways of declaring the same coarray.
6 real :: a(1:5)[1:10,1:*]
7 real, dimension(5) :: b
[1:10,1:*]
8 real, codimension
[1:10,1:*] :: c(5)
9 real, codimension
[1:10,1:*], dimension(5) :: d
10 codimension
:: e
[1:10,1:*]
16 ! real(4)::a(1_8:5_8)[1_8:10_8,1_8:*]
17 ! real(4)::b(1_8:5_8)[1_8:10_8,1_8:*]
18 ! real(4)::c(1_8:5_8)[1_8:10_8,1_8:*]
19 ! real(4)::d(1_8:5_8)[1_8:10_8,1_8:*]
20 ! real(4)::e(1_8:5_8)[1_8:10_8,1_8:*]
23 ! coarray-spec in codimension and target statements.
25 codimension
:: a
[10,*], b
[*]
26 target
:: c
[10,*], d
[*]
30 ! real(4)::a[1_8:10_8,1_8:*]
32 ! real(4),target::c[1_8:10_8,1_8:*]
33 ! real(4),target::d[1_8:*]
36 ! coarray-spec in components and with non-constants bounds
39 real, allocatable
:: c
[:,:]
40 complex, allocatable
, codimension
[:,:] :: d
42 real, allocatable
:: e
[:,:,:]
47 real, codimension
[1:n
,2:*] :: b
53 ! real(4),allocatable::c[:,:]
54 ! complex(4),allocatable::d[:,:]
56 ! real(4),allocatable::e[:,:,:]
60 ! real(4)::a[1_8:n,2_8:*]
61 ! real(4)::b[1_8:n,2_8:*]
65 ! coarray-spec in both attributes and entity-decl
67 real, codimension
[2:*], dimension(2:5) :: a
, b(4,4), c
[10,*], d(4,4)[10,*]
71 ! real(4)::a(2_8:5_8)[2_8:*]
72 ! real(4)::b(1_8:4_8,1_8:4_8)[2_8:*]
73 ! real(4)::c(2_8:5_8)[1_8:10_8,1_8:*]
74 ! real(4)::d(1_8:4_8,1_8:4_8)[1_8:10_8,1_8:*]