std::get<std::list<parser::ImageSelectorSpec>>(x.imageSelector.t)) {
std::visit(
common::visitors{
- [&](const auto &x) {Analyze(x.v); },
+ [&](const auto &x) { Analyze(x.v); },
},
imageSelSpec.u);
}
// Reverse the chain of symbols so that the base is first and coarray
// ultimate component is last.
- return Designate(
- DataRef{CoarrayRef{SymbolVector{reversed.crbegin(), reversed.crend()},
- std::move(subscripts), std::move(cosubscripts)}});
+ if (cosubsOk) {
+ return Designate(
+ DataRef{CoarrayRef{SymbolVector{reversed.crbegin(), reversed.crend()},
+ std::move(subscripts), std::move(cosubscripts)}});
+ }
}
return std::nullopt;
}
integer, dimension(4) :: intArray
integer :: intScalarCoarray[*]
integer :: intCoarray[3, 4, *]
+ integer :: smallIntCoarray[4, *]
intCoVar = 343
! OK
rVar1 = rCoarray[1,2,3]
rVar1 = rCoarray[1,2]
!ERROR: Must have INTEGER type, but is REAL(4)
rVar1 = rCoarray[1,2,3.4]
+ !ERROR: Must have INTEGER type, but is REAL(4)
+ iVar1 = smallIntCoarray[3.4]
!ERROR: Must be a scalar value, but is a rank-1 array
rVar1 = rCoarray[1,intArray,3]
! OK