Debian Codegraph @

gcc/testsuite/gfortran.dg/coarray/coindexed_7.f90

raw
1 !{ dg-do compile }
2
3 ! Check PR120847 is fixed.
4
5 program p
6 implicit none
7
8 type T
9 integer, allocatable :: i(:, :) [:]
10 end type T
11
12 type(T) :: o
13 integer, allocatable :: c[:]
14 integer :: i
15
16 c = 7
17
18 allocate(o%i(4, 5)[*], source=6)
19
20 do i = 1, 4
21 c = o%i(mod(i, 2), mod(i, 3))[1]
22 end do
23
24 end program p