[Patch, Fortran, OOP] PR 43388: [F2008] ALLOCATE with MOLD=
Janus Weil
janus@gcc.gnu.org
Mon Jun 14 22:42:00 GMT 2010
>> Ok, since at least the Cray compiler and Dick Hendrickson (and Steve?)
>> seem to support Tobias' interpretation that SOURCE and MOLD cannot
>> appear together, I probably have to face the fact that my initial
>> naive interpretation was incorrect.
>
> I can understand your interpretation.
Meaning you understand it, but you still think it's not what was
intended by the standard?
>If one rewrites C637 as
>
> "At most one of apple and orange shall appear."
>
> then it's clear an apple and an orange cannot be
> used together. This modified version does not suggest
> to me that a "red apple" and "green apple" cannot
> appear in an allocate statement.
Yeah, that's kind of how I read it.
>> So, what does that mean for the implementation? One can argue that we
>> don't need an expr4 if SOURCE and MOLD cannot appear together. But
>> then, if I put either of them into expr3, what is the best way to
>> distinguish between SOURCE and MOLD at resolution stage? I guess I
>> could just put a one-bit flag 'mold' into gfc_code.ext.alloc. Any
>> better ideas?
>
> gfc_expr already has a few bit fields. I'll suggest adding
> 'mold' there.
Alright, I guess I'll try this and cook up a new patch.
Cheers,
Janus
More information about the Fortran
mailing list