------- Comment #4 from burnus at gcc dot gnu dot org  2009-11-15 14:59 -------
> -  if (sym->attr.flavor != FL_PROCEDURE
> +  if ((sym->attr.flavor != FL_PROCEDURE || sym == gfc_current_ns->proc_name)

Wouldn't it be more obvious to check for attr.result or something like that?
>From the testcase I understand how it works, but when I first looked at "sym ==
gfc_current_ns->proc_name" I was completely puzzled.

Besides, it probably fails for strange constructions such as

 type(field) function new_field()
  call g()
 contains
  subroutine g()
    call new_field%mesh%new_grid()
  end subroutine g
 end function new_field


-- 


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

Reply via email to