[flang-commits] [flang] [Flang] Add a Fortran Standards Support doc (PR #132195)

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Mon Mar 24 10:30:59 PDT 2025


================
@@ -0,0 +1,115 @@
+<!--===- docs/FortranStandardsSupport.md
+
+   Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+   See https://llvm.org/LICENSE.txt for license information.
+   SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+-->
+
+# Flang Fortran Standards Support
+
+```{contents}
+---
+local:
+---
+```
+
+This document summarizes Fortran standards support in Flang. The information is only provided as a guideline. The
+TODOs/Not Yet Implemented messages emitted by the compiler for unimplemented features should be treated as authoritative.
+
+The standards support information is provided as a table with three columns that are self explanatory. The Status column uses
+the letters **P**, **Y**, **N** for the implementation status:
+- **P** : When the implementation is incomplete for a few cases
+- **Y** : When the implementation is complete
+- **N** : When the implementation is absent
+
+Note : No distinction is made between the support in the Parser/Semantics and MLIR or Lowering support.
+
+## Fortran 2023
+See [document](F202X.md) for a brief discussion about the new features in Fortran 2023. The following table summarizes the
+status of all important Fortran 2023 features.
+
+| Feature                                                    | Status | Comments                                                |
+|------------------------------------------------------------|--------|---------------------------------------------------------|
+| Allow longer statement lines and overall statement length  | Y      | |
+| Automatic allocation of lengths of character variables     | N      | |
+| The specifiers typeof and classof                          | N      | |
+| Conditional expressions and arguments                      | N      | |
+| More use of boz constants                                  | P      | All usages other than enum are supported |
+| Intrinsics for extracting tokens from a string             | N      | |
+| Intrinsics for Trig functions that work in degrees         | N      | |
+| Intrinsics for Trig functions that work in half revolutions| N      | |
+| Changes to system_clock                                    | N      | |
+| Changes for conformance with the new IEEE standard         | Y      | |
+| Additional named constants to specify kinds                | Y      | |
+| Extensions for c_f_pointer intrinsic                       | N      | |
+| Procedures for converting between fortran and c strings    | N      | |
+| The at edit descriptor                                     | N      | |
+| Control over leading zeros in output of real values        | N      | |
+| Extensions for Namelist                                    | N      | |
+| Allow an object of a type with a coarray ultimate component to be an array or allocatable | N | |
+| Put with Notify                                            | N      | |
+| Error conditions in collectives                            | N      | |
+| Simple procedures                                          | N      | |
+| Using integer arrays to specify subscripts                 | N      | |
+| Using integer arrays to specify rank and bound of an array | N      | |
+| Using an integer constant to specify rank                  | N      | |
+| Reduction specifier for do concurrent                      | Y      | |
+| Enumerations                                               | N      | |
+
+## Fortran 2018
+All features except those listed in the following table are supported. Almost all of the unsupported features are related to
+coarrays.
----------------
kiranchandramohan wrote:

I now have the following sentence:
```
 Almost all of the unsupported features are related to the additional parallel features (coarrays/teams/collectives).
 ```
 The support status of collectives and teams are individually called out in the status table for Fortran 2018.

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


More information about the flang-commits mailing list