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
On Sat, Apr 22, 2006 at 07:49:26AM +0200, Paul Thomas wrote:
>
> >
> >Is the check on a->expr->rank actually needed here?
> >Doesn't the preceding if statement guarantee a->expr->rank
> >is validate?
> >
> Seeing that it's you, does this do it for you?
Yes. This is fine. The orginal patch appeared to be
doing unnecessary checks of a->expr->rank. To me,
the revised patch is easier to understand.
> {
> if (a->expr == NULL || a->expr->rank == 0)
> continue;
>
> /* The last upper bound of an assumed size array argument must
> be present. */
> if (resolve_assumed_size_actual (a->expr))
> return FAILURE;
>
> /* Array actual arguments must conform. */
> if (e != NULL)
> {
> if (gfc_check_conformance ("elemental subroutine", a->expr, e)
> == FAILURE)
> return FAILURE;
> }
> else
> e = a->expr;
> }
>
> PS If either this or the dependency checking tests are to be committed
> to trunk before mid-May, somebody will have to review them today.
> Alternatively, I could just commit tomorrow morning and see what falls
> out of the tree over the next few weeks, before committing to 4.1.
You can commit this patch. I won't have time to check the other
patch until tomorrow. If Thomas or Tobi or ... can't get you a
review, I'll review and possible commit for you in your absences.
--
Steve