https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125113
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pault at gcc dot gnu.org
--- Comment #5 from Paul Thomas <pault at gcc dot gnu.org> ---
Having looked at (and only slightly understood the diagnosis), I was led to the
following workaround:
program pr125113
type :: box
integer, pointer :: data(:) => null()
end type
integer, allocatable, target :: src(:)[:]
integer :: dest(2), i, first_gid, last_gid
type(box), allocatable :: buffer[:]
! allocate(src(0)[*]) ! Works with gfortran but rejected by ifx.
! forrtl: severe (195): An allocatable coarray
! cannot be allocated by an assignment statement
allocate(src(2*num_images())[*])
if (this_image() == 1) then
src = [(i, i = 1, 2*num_images())]
end if
first_gid = 1 + 2*(this_image() - 1)
last_gid = 2*this_image()
allocate(buffer[*])
buffer%data => src
sync all
dest = buffer[1]%data(first_gid:last_gid)
if (any(dest /= [first_gid, last_gid])) error stop
end program
Does the ifx error point to a fresh PR?
Paul