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

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Thu Mar 20 05:08:57 PDT 2025


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

None

>From 3eb17750e6a97b37e51cfae8387db5dcc1f2391a Mon Sep 17 00:00:00 2001
From: Kiran Chandramohan <kiran.chandramohan at arm.com>
Date: Thu, 20 Mar 2025 12:05:40 +0000
Subject: [PATCH] [Flang] Add a Fortran Standards Support doc

---
 flang/docs/FortranStandardsSupport.md | 76 +++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)
 create mode 100644 flang/docs/FortranStandardsSupport.md

diff --git a/flang/docs/FortranStandardsSupport.md b/flang/docs/FortranStandardsSupport.md
new file mode 100644
index 0000000000000..6e3f719469d35
--- /dev/null
+++ b/flang/docs/FortranStandardsSupport.md
@@ -0,0 +1,76 @@
+<!--===- 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's Fortran standards support
+
+```{contents}
+---
+local:
+---
+```
+
+This document summarizes Flang's Fortran standards support. The information is only provided as a guideline. The compiler emits
+TODOs/Not Yet Implemented messages for unimplemented features and that should be treated as the authoratative information. 
+Standards support is provided upto Fortran 2008 for now. It will be later extended for Fortran 2018 and Fortran 2023.
+
+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 various 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 1 : No distinction is made between the support in the Parser/Semantics and MLIR or Lowering support.
+Note 2 : Besides the features listed below a few intrinsics like MIN/MAX are not supported for a few cases with CHARACTER type.
+
+## Fortran 77
+All features are supported.
+
+## Fortran 90
+All features are supported.
+
+## Fortran 95
+All features are supported.
+
+## Fortran 2003
+All features except those listed in the following table are supported.
+
+|------------------------------------------------------------|--------|---------------------------------------------------------|
+| Feature                                                    | Status | Comments                                                |
+|------------------------------------------------------------|--------|---------------------------------------------------------|
+| Parameterized Derived Types                                | P      | PDT with length type is not supported.                  |
+|                                                            |        | See [Proposal](ParameterizedDerivedTypes.md)            |
+|------------------------------------------------------------|--------|---------------------------------------------------------|
+| Assignment to allocatable                                  | P      | Assignment to whole allocatable in FORALL is not        |
+|                                                            |        | implemented.                                            |
+|------------------------------------------------------------|--------|---------------------------------------------------------|
+| Pointer Assignment                                         | P      | Polymorphic assignment in FORALL is not implemented     |
+|------------------------------------------------------------|--------|---------------------------------------------------------|
+| The VOLATILE attribute                                     | P      | Volatile in procedure interfaces is not implemented     |
+|------------------------------------------------------------|--------|---------------------------------------------------------|
+| Asynchronous input/output                                  | P      | IO will happen synchronously                            |
+|------------------------------------------------------------|--------|---------------------------------------------------------|
+
+## Fortran 2008
+All features except those listed in the following table are supported.
+
+|------------------------------------------------------------|--------|---------------------------------------------------------|
+| Feature                                                    | Status | Comments                                                |
+|------------------------------------------------------------|--------|---------------------------------------------------------|
+| Coarrays                                                   | N      | Lowering and runtime support is not implemented         |
+|------------------------------------------------------------|--------|---------------------------------------------------------|
+| do concurrent                                              | P      | Sequential execution works. Parallel support in progress|
+|------------------------------------------------------------|--------|---------------------------------------------------------|
+| Internal procedure as an actual argument or pointer target | Y      | Current implementation requires stack to be executable. |
+|                                                            |        | See [Proposal](InternalProcedureTrampolines.md)         |
+|------------------------------------------------------------|--------|---------------------------------------------------------|
+
+## Fortran 2018
+TBD
+
+## Fortran 2023
+TBD



More information about the flang-commits mailing list