Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions flang/lib/Semantics/check-io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,8 @@ void IoChecker::Enter(const parser::InquireSpec::LogVar &spec) {
specKind = IoSpecKind::Pending;
break;
}
CheckForDefinableVariable(std::get<parser::ScalarLogicalVariable>(spec.t),
parser::ToUpperCaseLetters(common::EnumToString(specKind)));
SetSpecifier(specKind);
}

Expand Down
10 changes: 10 additions & 0 deletions flang/test/Semantics/bug144453.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
!RUN: %python %S/test_errors.py %s %flang_fc1
function func(immutable)
logical func
logical, intent(in) :: immutable
!No warning about an undefined function result should appear
INQUIRE(file="/usr/local/games/adventure", EXIST=func)
!ERROR: EXIST variable 'immutable' is not definable
!BECAUSE: 'immutable' is an INTENT(IN) dummy argument
INQUIRE(file="/usr/local/games/adventure", EXIST=immutable)
end
Loading