------- Comment #6 from janus at gcc dot gnu dot org  2009-07-01 08:54 -------
The compile-time error in comment #5 is fixed by:

Index: gcc/fortran/interface.c
===================================================================
--- gcc/fortran/interface.c     (revision 149129)
+++ gcc/fortran/interface.c     (working copy)
@@ -1911,7 +1911,10 @@ compare_actual_formal (gfc_actual_arglis
       /* Satisfy 12.4.1.3 by ensuring that a procedure pointer actual argument
         is provided for a procedure pointer formal argument.  */
       if (f->sym->attr.proc_pointer
-         && !(a->expr->symtree->n.sym->attr.proc_pointer
+         && !((a->expr->expr_type == EXPR_VARIABLE
+               && a->expr->symtree->n.sym->attr.proc_pointer)
+              || (a->expr->expr_type == EXPR_FUNCTION
+                  && a->expr->symtree->n.sym->result->attr.proc_pointer)
               || is_proc_ptr_comp (a->expr, NULL)))
        {
          if (where)


However, it still gives a runtime segfault due to:

    void (*<T63>) (void) D.1556;
    D.1556 = getptr ();
    sub (&&D.1556);


-- 


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

Reply via email to