This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fwd: [Patch, Fortran,4.6] Coarray 3/n: Codimension declaration support


Daniel Kraft wrote:
> Ok, now I get it.  However, this seems to assume that as consists
> either only of ordinary or only of co-dimensions, right?  But that's
> probably all that is needed, because of the usage as above.
>
> If this is correct, could you add assert's or comments to clarify that?

Yes, that's the case and it is ensured using the symbol.c's
gfc_add_<attribute> functions:

  if (as->rank
      && gfc_add_dimension (&sym->attr, sym->name, error_loc) == FAILURE)
    return FAILURE;

  if (as->corank
      && gfc_add_codimension (&sym->attr, sym->name, error_loc) == FAILURE)
    return FAILURE;

If the attribute is already present, one gets the error:

      duplicate_attr ("CODIMENSION", where);

  gfc_error ("Duplicate %s attribute specified at %L", attr, where);

Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]