[Patch, Fortran, OOP] PR 43388: [F2008] ALLOCATE with MOLD=
Steve Kargl
sgk@troutmask.apl.washington.edu
Sun Jun 13 18:27:00 GMT 2010
On Sun, Jun 13, 2010 at 08:04:55PM +0200, Tobias Burnus wrote:
> Janus Weil wrote:
> >>>
> >> Yes, I think you're right that C637 prohibits MOLD and SOURCE
> >> from appearing in the same statement. I was looking for a
> >> constraint the explicitly made this statement.
> >>
> > I think the way in which C637 talks about "source-expr" is slightly
> > ambiguous, and I read it such that SOURCE and MOLD would be allowed
> > together, but neither of them together with type-spec.
> >
>
> Re-reading I agree that that's a possible reading, though I think my
> reading is more likely; also technically as it avoids the precedence
> ambiguity of having MOLD and SOURCE in the same statement - and I do not
> see a case where it makes sense and would more in more than a very
> constructed example.
>
With F2003 (when no MOLD existed), Janus's reading is certainly
how I interpreted C637 because C636 explicitly disallowed
SOURCE= from appearing more than once. Now, that F2008 has
added MOLD=, C637 does appear to somewhat ambiguous.
--
Steve
More information about the Fortran
mailing list