This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran, OOP] PR 43388: [F2008] ALLOCATE with MOLD=
Am 13.06.2010 19:20, schrieb Steve Kargl:
> On Sun, Jun 13, 2010 at 07:07:21PM +0200, Tobias Burnus wrote:
>
>> No, C637 ensures that there is either a MOLD=source-expr or
>> SOURCE=source-expr:
>> "C637 (R626) At most one of source-expr and type-spec shall appear."
>> (F2008 FDIS of 7th June 2010).
>>
> The patch checks for ALLOCATE(..., MOLD=x, MOLD=y) and
> issues an error. It does not check for ALLOCATE(..., MOLD=x,
> SOURCE=y). The patch treats MOLD and SOURCE as independent.
> Note, the BNF in R637 suggests that MOLD and SOURCE can
> appear together.
>
Well, R636 also suggests that type-spec and source-expr can appear
together - but C637 does not allow this either. (Although, if one finds
C637 ambiguous there is also C629 - though I think that's already
implied by C637, which I read as "one of (source-expr and type-spec)"
and not as "one of source-expr and one of type-spec" - the latter would
be redundant as there can only be one type-spec.)
The crucial point about C637 with regards to MOLD and SOURCE is that it
talks about "source-expr" and not about SOURCE (or about MOLD) itself.
Tobias
- References:
- [Patch, Fortran, OOP] PR 43388: [F2008] ALLOCATE with MOLD=
- Re: [Patch, Fortran, OOP] PR 43388: [F2008] ALLOCATE with MOLD=
- Re: [Patch, Fortran, OOP] PR 43388: [F2008] ALLOCATE with MOLD=
- Re: [Patch, Fortran, OOP] PR 43388: [F2008] ALLOCATE with MOLD=
- Re: [Patch, Fortran, OOP] PR 43388: [F2008] ALLOCATE with MOLD=