@@ -973,7 +973,8 @@ MaybeExpr ExpressionAnalyzer::Analyze(const parser::Name &n) {
973
973
}
974
974
}
975
975
if (!isWholeAssumedSizeArrayOk_ &&
976
- semantics::IsAssumedSizeArray (*n.symbol )) { // C1002, C1014, C1231
976
+ semantics::IsAssumedSizeArray (
977
+ ResolveAssociations (*n.symbol ))) { // C1002, C1014, C1231
977
978
AttachDeclaration (
978
979
SayAt (n,
979
980
" Whole assumed-size array '%s' may not appear here without subscripts" _err_en_US,
@@ -3741,9 +3742,12 @@ MaybeExpr ExpressionAnalyzer::Analyze(const parser::Selector &selector) {
3741
3742
}
3742
3743
}
3743
3744
}
3745
+ // Not a Variable -> FunctionReference
3746
+ auto restorer{AllowWholeAssumedSizeArray ()};
3747
+ return Analyze (selector.u );
3748
+ } else { // Expr
3749
+ return Analyze (selector.u );
3744
3750
}
3745
- // Not a Variable -> FunctionReference; handle normally as Variable or Expr
3746
- return Analyze (selector.u );
3747
3751
}
3748
3752
3749
3753
MaybeExpr ExpressionAnalyzer::Analyze (const parser::DataStmtConstant &x) {
@@ -3999,6 +4003,7 @@ void ArgumentAnalyzer::Analyze(
3999
4003
const parser::ActualArgSpec &arg, bool isSubroutine) {
4000
4004
// TODO: C1534: Don't allow a "restricted" specific intrinsic to be passed.
4001
4005
std::optional<ActualArgument> actual;
4006
+ auto restorer{context_.AllowWholeAssumedSizeArray ()};
4002
4007
common::visit (
4003
4008
common::visitors{
4004
4009
[&](const common::Indirection<parser::Expr> &x) {
0 commit comments