File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -258,6 +258,9 @@ void SelectTypeChecker::Enter(const parser::SelectTypeConstruct &construct) {
258258 if (IsProcedure (*selector)) {
259259 context_.Say (
260260 selectTypeStmt.source , " Selector may not be a procedure" _err_en_US);
261+ } else if (evaluate::IsAssumedRank (*selector)) {
262+ context_.Say (selectTypeStmt.source ,
263+ " Assumed-rank variable may only be used as actual argument" _err_en_US);
261264 } else if (auto exprType{selector->GetType ()}) {
262265 const auto &typeCaseList{
263266 std::get<std::list<parser::SelectTypeConstruct::TypeCase>>(
Original file line number Diff line number Diff line change @@ -288,4 +288,11 @@ subroutine CheckNotProcedure
288288 function f () result(res)
289289 class(shape), allocatable :: res
290290 end
291+
292+ subroutine CheckAssumedRankInSelectType (var )
293+ class(* ), intent (in ) :: var(..)
294+ ! ERROR: Assumed-rank variable may only be used as actual argument
295+ select type (var)
296+ end select
297+ end
291298end
You can’t perform that action at this time.
0 commit comments