2 ! { dg-options "-fcoarray=lib" }
4 ! Valid code - but currently not implemented for -fcoarray=lib; single okay
9 integer, allocatable
:: a
13 type(t
), allocatable
:: caf2
[:]
15 type(t
), save :: caf
[*],x
18 x
= caf
[4] ! { dg-error "Sorry, coindexed coarray at \\(1\\) with allocatable component is not yet supported" }
19 x
%a
= caf
[4]%a
! { dg-error "Sorry, coindexed access to a pointer or allocatable component of the coindexed coarray at \\(1\\) is not yet supported" }
21 x
= y
%caf2
[5] ! { dg-error "Sorry, coindexed coarray at \\(1\\) with allocatable component is not yet supported" }
22 x
%a
= y
%caf2
[4]%a
! { dg-error "Sorry, coindexed access to a pointer or allocatable component of the coindexed coarray at \\(1\\) is not yet supported" }
23 x
%b
= y
%caf2
[4]%b
! OK
33 type(t
), allocatable
:: caf2
[:]
35 type(t
), save :: caf
[*],x
39 x
%a
= caf
[4]%a
! { dg-error "Sorry, coindexed access to a pointer or allocatable component of the coindexed coarray at \\(1\\) is not yet supported" }
42 x
%a
= y
%caf2
[4]%a
! { dg-error "Sorry, coindexed access to a pointer or allocatable component of the coindexed coarray at \\(1\\) is not yet supported" }
43 x
%b
= y
%caf2
[4]%b
! OK
52 type(t
), allocatable
:: caf2(:)[:]
54 type(t
), save :: caf(10)[*]
58 x(1) = caf(2)[4]%b
! OK
59 x(:) = caf(:)[4]%b
! { dg-error "Sorry, coindexed access at \\(1\\) to a scalar component with an array partref is not yet supported" }
61 x(1) = y
%caf2(2)[4]%b
! OK
62 x(:) = y
%caf2(:)[4]%b
! { dg-error "Sorry, coindexed access at \\(1\\) to a scalar component with an array partref is not yet supported" }
68 integer, allocatable
:: a
72 class(t
), allocatable
:: caf2
[:]
74 class(t
), allocatable
:: caf
[:]
78 !x = caf[4] ! Unsupported - and ICEs in resolve_ordinary_assign, cf. PR fortran/65397
79 x
%a
= caf
[4]%a
! { dg-error "Sorry, coindexed access to a pointer or allocatable component of the coindexed coarray at \\(1\\) is not yet supported" }
81 !x = y%caf2[5] ! Unsupported - and ICEs in resolve_ordinary_assign, cf. PR fortran/65397
82 x
%a
= y
%caf2
[4]%a
! { dg-error "Sorry, coindexed access to a pointer or allocatable component of the coindexed coarray at \\(1\\) is not yet supported" }
83 x
%b
= y
%caf2
[4]%b
! OK
93 class(t
), allocatable
:: caf2
[:]
95 class(t
), save, allocatable
:: caf
[:]
99 !x = caf[4] ! OK - but ICEs in resolve_ordinary_assign, cf. PR fortran/65397
100 x
%a
= caf
[4]%a
! { dg-error "Sorry, coindexed access to a pointer or allocatable component of the coindexed coarray at \\(1\\) is not yet supported" }
102 !x = y%caf2[5] ! OK - but ICEs in resolve_ordinary_assign, cf. PR fortran/65397
103 x
%a
= y
%caf2
[4]%a
! { dg-error "Sorry, coindexed access to a pointer or allocatable component of the coindexed coarray at \\(1\\) is not yet supported" }
104 x
%b
= y
%caf2
[4]%b
! OK
113 class(t
), allocatable
:: caf2(:)[:]
115 class(t
), save, allocatable
:: caf(:)[:]
119 x(1) = caf(2)[4]%b
! OK
120 x(:) = caf(:)[4]%b
! { dg-error "Sorry, coindexed access at \\(1\\) to a scalar component with an array partref is not yet supported" }
122 x(1) = y
%caf2(2)[4]%b
! OK
123 x(:) = y
%caf2(:)[4]%b
! { dg-error "Sorry, coindexed access at \\(1\\) to a scalar component with an array partref is not yet supported" }