This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR25099 - elemental subroutine argument conformance checking
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