[flang-commits] [flang] [flang] Catch READ(... SIZE=) with NML= or FMT=* (PR #71235)

via flang-commits flang-commits at lists.llvm.org
Fri Nov 3 16:52:54 PDT 2023


================
@@ -793,6 +793,10 @@ void IoChecker::Leave(const parser::ReadStmt &readStmt) {
   CheckForProhibitedSpecifier(IoSpecKind::Delim); // C1212
   CheckForProhibitedSpecifier(IoSpecKind::Sign); // C1212
   CheckForProhibitedSpecifier(IoSpecKind::Rec, IoSpecKind::End); // C1220
+  CheckForProhibitedSpecifier(
+      IoSpecKind::Nml, IoSpecKind::Size); // F'2023 C1214
+  CheckForProhibitedSpecifier(
+      IoSpecKind::Size, flags_.test(Flag::StarFmt), "FMT=*"); // F'2023 C1214
----------------
vdonaldson wrote:

I think swapping the "FMT=*" and "SIZE" specifiers would "match" the standard text a little better: 
```
CheckForProhibitedSpecifier(
    flags_.test(Flag::StarFmt), "FMT=*", IoSpecKind::Size); // F2023 C1214
```

https://github.com/llvm/llvm-project/pull/71235


More information about the flang-commits mailing list