Le 28/02/2022 à 22:37, Jakub Jelinek a écrit :
On Mon, Feb 28, 2022 at 09:45:10PM +0100, Mikael Morin wrote:
Le 28/02/2022 à 21:37, Mikael Morin a écrit :
Maybe corank should be checked together with rank?
Lesson learned today: expressions don’t have a corank.
There is gfc_is_coindexed that can be used.
Does pr104131-2.f90 really need to be rejected?
OpenMP 5.2 says that detach clause should be treated as if it appears on a
firstprivate clause and for the privatization clauses says:
"A private variable must not be coindexed or appear as an actual argument to a
procedure where
the corresponding dummy argument is a coarray."
5.1 had the same restriction.
There is also:
A variable that is part of another variable (as an array element or a structure
element) cannot
appear in a detach clause.
which tells that the check should be on expr->ref instead of
expr->sym->as or expr->rank.
None of the above excerpts from the spec forbid pr104131.f90 or
pr104131-2.f90 by the way.