Le 28/02/2022 à 19:38, Kwok Cheung Yeung a écrit :
In gfc_expression_rank, e->ref is non-NULL, so e->rank is not set from
the symtree. It then iterates through the ref elements - ref->type ==
REF_ARRAY and ref->u.ar.type == AR_ELEMENT, so e->rank remains at 0.
This is the expected behavior.
I'll move the check to resolve_omp_clauses and see if it works there.
It won’t work differently there.
Looking at the testcases, the rank should be 1 for pr104131.f90 and 0
for pr104131-2.f90.
A scalar coarray remains a scalar; its rank is 0.
Maybe corank should be checked together with rank?