[Patch, fortran] F2008 - implement pointer function assignment

FX fxcoudert@gmail.com
Thu Aug 27 14:54:00 GMT 2015


Hi Paul,

I’ll get to reviewing the patch tonight or tomorrow…

I think it shouldn’t be too hard to get the ambiguity lifted. We already can do it for array assignment vs. statement functions, so maybe we could get a hint from that?

touille /tmp $ cat a.f90
  integer :: f(2) = 0
  integer :: x = 1
  f(x) = x
  x = 2
  print *, f(x)
end
touille /tmp $ cat b.f90
  integer :: f
  integer :: x = 1
  f(x) = x
  x = 2
  print *, f(x)
end
touille /tmp $ gfortran a.f90 && ./a.out
           0
touille /tmp $ gfortran b.f90 && ./a.out
           2



FX


More information about the Fortran mailing list