This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[7.0 Regression] Bug 78892 - no type conversion before coarray put


The code below demonstrates a regression in which a gfortran 7.0.0 build dated 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]