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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to anlauf from comment #2)
> Untested patch:
...
> +  if (c->expr_type != EXPR_VARIABLE

Will this also work with:

  character, target :: c
  n = fget(ptr_returning_func())
contains
  function ptr_returning_func() result(res)
    character, ptr :: res
    res => c
  end
end

as ptr_returning_func() (a function reference with data pointer result) is a
variable in the sense of the Fortran standard (F2018:R902)?

  * * *

  add_sym_1_intent ("fget", GFC_ISYM_FGET, CLASS_IMPURE, ACTUAL_NO, BT_INTEGER,
             di, GFC_STD_GNU, gfc_check_fgetput, NULL, gfc_resolve_fget,
             c, BT_CHARACTER, dc, REQUIRED, INTENT_OUT);

Do we need some generic check for INTENT_OUT to get passed something definable?

Reply via email to