[gfortran, fix PR 25097] Additional constraints on FORALL headers
Tobias Schlüter
tobias.schlueter@physik.uni-muenchen.de
Thu Oct 4 20:41:00 GMT 2007
Sigh, the corrct PR number is PR 25076.
- Tobi
Tobias Schlüter wrote:
> Tobias Schlüter wrote:
>> Tobias Schlüter wrote:
>>> we hadn't yet implemented the following constraint on FORALL headers:
>>> "A subscript or stride in a forall-triplet-spec shall not contain a
>>> reference to any index-name in the forall-triplet-spec-list in which
>>> it appears." This patch fixes this, using the pre-existing
>>> gfc_find_forall_index for the purpose. This meant moving it to the
>>> front of the file, and calling it in a trivial fashion (which is
>>> wasteful, but I can't imagine this ever becoming a performance
>>> bottleneck). I promise to remove the "gfc_" prefix, I only realized
>>> its presence after I had cut the diff.
>>
>> Please don't waste your time on this patch yet: while removing the
>> gfc_* prefix, I found that there already exists code which claims to
>> address the same issue. I'll see what it does, and why it doesn't do
>> as advertized and report back.
>
> Ok, here's an updated version. It removes the old code and augments my
> new code to also check all triplet specifications, not only later ones
> (i.e. for (iter; ... ) for (iter = iter; ...) instead of for (iter; ...
> ) for (iter = iter->next; ...)). Throwing this at the testsuite
> revealed the necessity to deal with NULL expressions in
> find_forall_index(), which was done.
>
> Built and testing on i386-darwin. Ok, provided the testsuite passes?
>
> Cheers,
> - Tobi
>
More information about the Fortran
mailing list