https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121429
Bug ID: 121429
Summary: [caf_shmem] Test fails without explicit SYNC ALL
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: jvdelisle at gcc dot gnu.org
Target Milestone: ---
The following test fails without a SYNC ALL before or after the deallocate.
Should the deallocate automatically sync the images?
program main
implicit none
integer, allocatable, codimension[:] :: a(:), b(:)
integer :: n, i, left, right
integer :: k
n = num_images()
i = this_image()
if (n < 3) error stop "Need at least three images"
left = modulo(i+n-2,n)+1
right = modulo(i,n)+1
do k=1,1000
allocate(a(k+5)[*])
allocate(b(k)[*])
b(:)[right] = right + 1000 * k
!sync all
deallocate (a) ! This synchronizes automatically
!sync all
if (any(b(:)[left] /= left + 1000 * k)) error stop "Test failed"
deallocate (b)
end do
end program main