Closed
Description
This issue is for tracking gfortran bug report 78892, which was first reported in an OpenCoarrays mailing list message. The gfortran bug report contains the following text:
The code below demonstrates a regression in which gfortran 7.0.0 20161215 is not performing a necessary implicit type conversion before putting data on a remote image. By contrast, the code below works as expected with gfortran 5.4.0 and 6.2.0.
$ cat convert-before-put.f90
real :: a[*]
integer :: receiver
associate(me=>this_image())
if (me == 1) then
do receiver = 2, num_images()
a[receiver] = receiver ! implicit real(receiver) needed here
sync images (receiver) ! notify remote image that data has been put
end do
else
sync images (1) ! await notification of data put by image 1
if (a/=real(me)) print *, "Image ",me,": received ",a,", but expected ",real(me)
end if
end associate
end
$ caf convert-before-put.f90
$ cafrun -np 2 ./a.out
Image 2 : received 0.00000000 , but expected 2.00000000