This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran, fix PR 25097] Additional constraints on FORALL headers



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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]