------- Comment #7 from janus at gcc dot gnu dot org  2010-03-05 09:56 -------
(In reply to comment #6)
> > ABSTRACT INTERFACE '...' must not be referenced at (1)
> 
> This was PR41873 and was fixed by querying "expr->value.function.name", which
> fails now. We should find a better way to silence this error message for
> polymorphic calls.

To solve this I propose the following:

Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c       (revision 157233)
+++ gcc/fortran/resolve.c       (working copy)
@@ -2556,8 +2556,8 @@ resolve_function (gfc_expr *expr)
     }

   /* If this ia a deferred TBP with an abstract interface (which may
-     of course be referenced), expr->value.function.name will be set.  */
-  if (sym && sym->attr.abstract && !expr->value.function.name)
+     of course be referenced), expr->value.function.esym will be set.  */
+  if (sym && sym->attr.abstract && !expr->value.function.esym)
     {
       gfc_error ("ABSTRACT INTERFACE '%s' must not be referenced at %L",
                 sym->name, &expr->where);


This leaves us with the following regressions:

FAIL: gfortran.dg/dynamic_dispatch_1.f03  -O0  (test for excess errors)
FAIL: gfortran.dg/dynamic_dispatch_3.f03  -O0  (test for excess errors)
FAIL: gfortran.dg/dynamic_dispatch_4.f03  -O0  (test for excess errors)
FAIL: gfortran.dg/dynamic_dispatch_6.f03  -O0  (test for excess errors)

due to the error

Error: Type mismatch in argument '...' at (1); passed CLASS(...) to CLASS(...)


-- 


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

Reply via email to