https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123782
--- Comment #14 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Another tidbit I found is that the array a has the attribute TARGET but
subcomponents do not.
So the c => a%x is invalid whereas c => a is valid. This has nothing to do with
contiguous.
Regarding contiguous:
Expression, Valid as RHS of => ?, Reason
a, Yes, declared target
a(3:8), Yes, section of target array
obj, Yes, derived type variable with target
obj%comp, Yes, component of target variable
obj(4)%comp, Yes, same
obj%comp_array, No, whole component array — not TARGET
obj_array(:)%comp, No, very common mistake — same reason
local variable
without TARGET,No, compiler error