[FORTRAN PATCH] PR30400: ANY not accepted as FORALL mask
Paul Thomas
paulthomas2@wanadoo.fr
Sun Feb 18 18:53:00 GMT 2007
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.
Just for the record:
if (gfc_match_char ('=') != MATCH_YES
|| iter->var->expr_type != EXPR_VARIABLE)
{
m = MATCH_NO;
goto cleanup;
}
m = gfc_match_expr (&iter->start);
if (m != MATCH_YES)
goto cleanup;
It clears the first '=' but the subsequent "= expr" returns a MATCH_NO
and so goes to cleanup.
Paul
More information about the Fortran
mailing list