http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47042

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-29 
16:39:57 UTC ---
NAG shows the error:
  POINTER function PTMP needs an explicit interface

Intel the error:
  This name has not been declared as an array or a function.   [PTMP]
    get_cstring(i:i) = ptmp(i)
-----------------------^

g95:
  Error: POINTER function 'ptmp' at (1) must have an explicit interface

"A procedure other than a statement function shall have an explicit interface
if it is referenced and [...]
(3) the procedure has a result that
    (a) is an array,
    (b) is a pointer or is allocatable, or [...]"
(F2008, "12.4.2.2 Explicit interface")


One could add such a check in  gfc_procedure_use:

  if (sym->attr.if_source == IFSRC_UNKNOWN)
    {
      [...]
      if (sym->attr.pointer && sym->attr.proc != PROC_ST_FUNCTION)
        {
          gfc_error ("");

Possibly also needed for ALLOCATABLE and maybe even with Dimension?

Reply via email to