[flang-commits] [flang] [flang] Error out when assumed rank variable in used as selector in SELECT TYPE statement (PR #74286)
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Mon Jan 1 10:16:46 PST 2024
================
@@ -258,6 +258,10 @@ void SelectTypeChecker::Enter(const parser::SelectTypeConstruct &construct) {
if (IsProcedure(*selector)) {
context_.Say(
selectTypeStmt.source, "Selector may not be a procedure"_err_en_US);
+ } else if (evaluate::IsAssumedRank(*selector)) {
+ context_.Say(selectTypeStmt.source,
+ "Assumed-rank variable "
----------------
klausler wrote:
I recommend that you not split error messages across multiple lines -- that makes it much more difficult to grep the sources to find the code that emits a particular error.
https://github.com/llvm/llvm-project/pull/74286
More information about the flang-commits
mailing list