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



janus at gcc dot gnu.org changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

             Status|NEW                         |ASSIGNED

         AssignedTo|unassigned at gcc dot       |janus at gcc dot gnu.org

                   |gnu.org                     |



--- Comment #4 from janus at gcc dot gnu.org 2013-01-10 11:48:54 UTC ---

I think the following patch makes sense:



Index: gcc/fortran/resolve.c

===================================================================

--- gcc/fortran/resolve.c    (revision 194927)

+++ gcc/fortran/resolve.c    (working copy)

@@ -3803,7 +3803,7 @@ resolve_call (gfc_code *c)



   /* Subroutines without the RECURSIVE attribution are not allowed to

    * call themselves.  */

-  if (csym && is_illegal_recursion (csym, gfc_current_ns))

+  if (!c->expr1 && csym && is_illegal_recursion (csym, gfc_current_ns))

     {

       if (csym->attr.entry && csym->ns->entries)

     gfc_error ("ENTRY '%s' at %L cannot be called recursively, as"





This is the same workaround that we use in resolve_call for deferred TBPs with

abstract interfaces.

Reply via email to