[Patch, fortran] PR25099 - elemental subroutine argument conformance checking

Paul Thomas paulthomas2@wanadoo.fr
Fri Apr 21 18:19:00 GMT 2006


Steve,

       for (a = c->ext.actual; a; a = a->next)
     {
+     /* The last upper bound of an assumed size array argument must
+        be present.  */
       if (a->expr != NULL
         && a->expr->rank > 0
         && resolve_assumed_size_actual (a->expr))
         return FAILURE;
+
+      /* Array actual arguments must conform.  */
+      if (e != NULL && a->expr->rank
+        && gfc_check_conformance ("elemental subroutine", a->expr, e)
+            == FAILURE)
+        return FAILURE;

The line above detects second and subsequent array arguments and tests 
them against the first,
+
+      if (e == NULL && a->expr->rank)
+        e = a->expr;

This finds the first array argument and stores it.  This order is chosen 
to stop the conformance of the first being checked against itself.
     }
     }

Paul
 



More information about the Gcc-patches mailing list