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

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Fri Mar 21 05:48:10 PDT 2025


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

>From a0460e711648d6508d6cd628e511b726e4d38fb5 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 1/2] [Flang] Add a Fortran Standards Support doc

---
 flang/docs/FortranStandardsSupport.md | 63 +++++++++++++++++++++++++++
 flang/docs/index.md                   |  1 +
 2 files changed, 64 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..5261633edc578
--- /dev/null
+++ b/flang/docs/FortranStandardsSupport.md
@@ -0,0 +1,63 @@
+<!--===- 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
diff --git a/flang/docs/index.md b/flang/docs/index.md
index 1de0ee2e6f0d6..0c92ea9cf7633 100644
--- a/flang/docs/index.md
+++ b/flang/docs/index.md
@@ -26,6 +26,7 @@ on how to get in touch with us and to learn more about the current status.
    C++style
    DesignGuideline
    FortranForCProgrammers
+   FortranStandardsSupport
    GettingInvolved
    GettingStarted
    ImplementingASemanticCheck

>From 8499992cc802c3f5a20b4ead7b401d0fa3f10613 Mon Sep 17 00:00:00 2001
From: Kiran Chandramohan <kiran.chandramohan at arm.com>
Date: Fri, 21 Mar 2025 12:45:35 +0000
Subject: [PATCH 2/2] Address review comments

---
 flang/docs/FortranStandardsSupport.md | 57 +++++++++++++--------------
 1 file changed, 28 insertions(+), 29 deletions(-)

diff --git a/flang/docs/FortranStandardsSupport.md b/flang/docs/FortranStandardsSupport.md
index 5261633edc578..5c960c8680686 100644
--- a/flang/docs/FortranStandardsSupport.md
+++ b/flang/docs/FortranStandardsSupport.md
@@ -1,12 +1,12 @@
-<!--===- docs/FortranStandardsSupport.md 
-  
+<!--===- 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
+# Flang Fortran Standards Support
 
 ```{contents}
 ---
@@ -14,12 +14,12 @@ 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.
+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.
+Standards support is provided upto Fortran 2008 for now. It will be extended later 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.
+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
@@ -27,37 +27,36 @@ the letters **P**, **Y**, **N** for the various implementation status.
 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 2023
+TBD
 
-## Fortran 95
-All features are supported.
+## Fortran 2018
+TBD
 
-## Fortran 2003
+## Fortran 2008
 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                            |
+| 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 2008
+## Fortran 2003
 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) |
+| Parameterized Derived Types                                | P      | PDT with length type parameters is not supported. See [Proposal](ParameterizedDerivedTypes.md) |
+| Assignment to allocatable                                  | P      | Assignment to whole allocatable 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 2018
-TBD
+## FORTRAN 77
+All features are supported.
 
-## Fortran 2023
-TBD
+## Fortran 90
+All features are supported.
+
+## Fortran 95
+All features are supported.



More information about the flang-commits mailing list