https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109066

--- Comment #2 from Paul Thomas <pault at gcc dot gnu.org> ---
Hi Andrew,

Thanks for the report. However, IMHO the code is invalid since the result of
hdf5Constructor is not defined.

  function hdf5Constructor() result(self)
    implicit none
    type(hdf5Object) :: self
    self = hdf5Object (resourceManager())
    return
  end function hdf5Constructor

works a treat.

If there is a requirement in the standard that a function result such as this
be initialised, I am unable to find it in the F2018 standard. 

Paul

Reply via email to