[FORTRAN PATCH] PR30400: ANY not accepted as FORALL mask

Tobias Schlüter tobias.schlueter@physik.uni-muenchen.de
Sun Feb 18 18:24:00 GMT 2007


Paul Richard Thomas wrote:
> Tobi,
> 
>> > there's one corner case which I think we should put into a testcase: a
>> > mask expression which uses the '==' operator, something like "forall
>> > (j=1:5, j==2)"  The code in match_forall_iterator seems to be doing the
>> > right thing when it sees this, but it's worth making sure.
> 
>>      <var> = <start>:<end>[:<stride>][, <scalar mask>]  */ ?
>>
>> 7.5.4.1
>>
>> R747 forall-construct is forall-construct-stmt
>> [forall-body-construct ] ...
>> end-forall-stmt
>> R748 forall-construct-stmt is [forall-construct-name :] FORALL 
>> forall-header
>> R749 forall-header is (forall-triplet-spec-list [, scalar-mask-expr] )
>>
>> It looks OK to me or am I missing something (wouldn't be the first 
>> time:))
>>
>> Paul
>>
>> -- 
>> Anon: "Ignorantibus veritatem dicere semper utile est."
>>
>> Abraham Lincoln: "It is better to be thought a fool than to speak and
>> remove all doubt."
> 
> Does forall_6.f90, with its "i < 3", satisfy you here or do you have
> some specific concern about "=="?

Again, I should have been more verbose.  I'm specifically worried about 
"==" because if we get to "i=", determine that what follows is not a 
triplet-spec, and if we then not backup correctly, we may not match the 
valid "i==j".

- Tobi



More information about the Fortran mailing list