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

Paul Thomas paulthomas2@wanadoo.fr
Sat Apr 22 05:49:00 GMT 2006


Steve,

>
>
>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?

  for (a = c->ext.actual; a; a = a->next)
    {
      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;
    }

Paul

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.



More information about the Gcc-patches mailing list