https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120843
Bug ID: 120843
Summary: [Coarray] Inconsistent ranks for operator reported
when coarray ranks differ
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: vehre at gcc dot gnu.org
Target Milestone: ---
Reproducer:
program p
implicit none
integer, allocatable :: arr(:,:) [:,:]
integer :: c[*]
integer :: i,j
c = 7
allocate(arr(4,3)[2,*], source=6)
do i = 1, 4
do j = 1, 3
print *, arr(i, j)* c
end do
end do
end program p
results in:
$ gfortran-16 -c p.f90 -fcoarray=lib
p.f90:15:18-27:
15 | print *, arr(i, j)* c
| 1 2
Error: Inconsistent ranks for operator at (1) and (2)