This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fwd: [Patch, Fortran,4.6] Coarray 3/n: Codimension declaration support
- From: Tobias Burnus <burnus at net-b dot de>
- To: Daniel Kraft <d at domob dot eu>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 17 Feb 2010 21:56:50 +0100
- Subject: Re: Fwd: [Patch, Fortran,4.6] Coarray 3/n: Codimension declaration support
- References: <4B751E71.8010403@net-b.de> <4B7C3A81.9070008@domob.eu> <4B7C5025.90001@net-b.de> <4B7C5751.8060501@domob.eu>
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