Files
llvm-tms34010/flang/docs/FortranStandardsSupport.md
Dan Bonachea 9879da4f92 [flang][docs] Document multi-image support status (#209025)
Update `flang/docs/FortranStandardsSupport.md` to reflect the current
state of multi-image (coarray) feature support.

The previous list of multi-image features was incomplete, and several
multi-image features added in F2008 were inaccurately listed in the
F2018 section.

Recent PRs adding functionality now reflected in this document include:
* #205847
* #192944
* #182110

Older (pre-22) PRs adding functionality that was not previously
mentioned include:
* #154081
* #154166
2026-07-13 13:20:10 -07:00

8.8 KiB

Flang Fortran Standards Support

---
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 Y, P, N for the implementation status:

  • Y : Yes. When the implementation is complete
  • P : Partial. When the implementation is incomplete for a few cases
  • N : No. When the implementation is absent

There is no distinction made between support in the Parser/Semantics and the MLIR or Lowering stages.

Note: The two major missing features in Flang at present are coarrays and parameterized derived types (PDTs) with length type parameters.

Fortran 2023

See document for a brief discussion about the new features in Fortran 2023. The following table summarizes the status of all important Fortran 2023 features. The table entries are based on the document The new features in Fortran 2023.

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 Y
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 Y
Intrinsics for Trig functions that work in degrees Y
Intrinsics for Trig functions that work in half revolutions Y
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 Y
Procedures for converting between fortran and c strings N
The at edit descriptor N
Control over leading zeros in output of real values Y
Extensions for Namelist N
Allow an object of a type with a coarray ultimate component to be an array or allocatable N Multi-image/Coarray feature
Put with Notify N Multi-image/Coarray feature
Error conditions in collectives P Experimental support via PRIF
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 Y
Reduction specifier for do concurrent P Syntax is accepted
Enumerations N

Fortran 2018

All features except those listed in the following table are supported. Almost all of the unsupported features are related to the multi-image execution. The table entries are based on the document The new features in Fortran 2018.

Feature Status Comments
Asynchronous communication P Syntax is accepted
Collective subroutines P Experimental support via PRIF, missing co_reduce
Intrinsic function coshape P Experimental support via PRIF
Form team statement P Experimental support via PRIF
Change team construct P Experimental support via PRIF, missing coarray association
Sync team statement P Experimental support via PRIF
Intrinsic functions get_team and team_number P Experimental support via PRIF
Team arguments to other intrinsics P Experimental support via PRIF
Coarrays allocated in teams N Multi-image/Coarray feature
Critical construct N Multi-image/Coarray feature
Events N Multi-image/Coarray feature
Intrinsic move_alloc extensions P Multi-image/Coarray feature
Detecting failed and stopped images N Multi-image/Coarray feature
New and enhanced atomic subroutines N Multi-image/Coarray feature
Image failure and stat= specifiers P Multi-image/Coarray feature. stat_failed_image is added

Fortran 2008

All features except those listed in the following table are supported.

Feature Status Comments
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 FAQ and Proposal
Intrinsic functions this_image, num_images P Experimental support via PRIF
Sync all, sync images, sync memory statements P Experimental support via PRIF
Non-allocatable save coarrays of intrinsic type P Experimental support via PRIF
Other coarray data objects N Multi-image/Coarray feature
Intrinsic functions image_index, ucobound, lcobound P Experimental support via PRIF
Image selectors (coindexed access) N Multi-image/Coarray feature
Atomic subroutines N Multi-image/Coarray feature
Lock and unlock statements N Multi-image/Coarray feature

Fortran 2003

All features except those listed in the following table are supported.

Feature Status Comments
Parameterized Derived Types P PDT with length type parameters is not supported. See Proposal
Assignment to allocatable P Assignment to whole allocatable in FORALL is not implemented
Asynchronous input/output P IO will happen synchronously
MIN/MAX extensions for CHARACTER P Some variants are not supported

Fortran 95

All features are supported.

Fortran 90

All features are supported.

FORTRAN 77

All features are supported.