[flang-commits] [flang] [flang][NFC] Document an intentional violation of the ISO standard (PR #172105)

Tarun Prabhu via flang-commits flang-commits at lists.llvm.org
Sun Dec 14 03:21:30 PST 2025


================
@@ -189,6 +189,20 @@ end
   `PROCEDURE(), POINTER, NOPASS` derived type components.
   Such procedures may *not* be referenced as implicitly typed functions
   without first being associated with a function pointer.
+* Some intrinsic functions (`COUNT`, `LBOUND`, `LCOBOUND`, `TRANSFER`,
+  `UBOUND`, and `UCOBOUND`) have arguments (usually `DIM=`) that are documented
+  as not allowing `OPTIONAL` dummy arguments to appear as their values.
+  This prohibition appeared on the `DIM=` arguments of more
+  intrinsic functions in earlier revisions of the ISO standard.
+  (Perhaps these are meant to avoid misunderstanding these arguments,
+  which appear in square brackets in the synopses, as if their dynamic
+  presence at runtime could affect the semantics of the intrinsic in
+  the same way as the static presence or absence of the argument does
+  at compilation time, which would not be possible.)
+  No compiler seems to enforce this requirement, and we interpret it
----------------
tarunprabhu wrote:

```suggestion
  No compiler seems to enforce this requirement. We interpret it
```

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


More information about the flang-commits mailing list