-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[Flang] Add a Fortran Standards Support doc #132195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
a0460e7
8499992
6c4b380
84165a7
8f9db84
8eb16e4
6781534
66199ad
04fb498
27260b6
c36aebc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -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 | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we take the suggested change above, should we also remove
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||||||||||
TODOs/Not Yet Implemented messages for unimplemented features and that should be treated as the authoratative information. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||||||||||
Standards support is provided upto Fortran 2008 for now. It will be later extended for Fortran 2018 and Fortran 2023. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "upto" should be "up to" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have removed this sentence. |
||||||||||
|
||||||||||
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. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||||||||||
- **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. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have a list of the intrinsics where support for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not have a list of intrinsics here. The only ones I am actually aware or the MIN/MAX intrinsic. Since I was not 100% I am making a conservative statement here. Do we want to just say MIN/MAX only? Do you have additional info in the gfortran testsuite? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can check to see if there are any failures as a result of this. I don't know off the top of my head. |
||||||||||
|
||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since all the contents in the first three sections are the same, I suggest to consolidate to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have reorganized in descending order of standards. I do not have entries for 2018 and 2023 now. If it is OK, we can add that in subsequent PRs. |
||||||||||
## Fortran 77 | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FORTRAN 77 - consistent with what we use in FortranFeatureHistory.md There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||||||||||
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) | | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. length type => length type parameters There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||||||||||
| Assignment to allocatable | P | Assignment to whole allocatable in FORALL is not implemented | | ||||||||||
| Pointer Assignment | P | Polymorphic assignment in FORALL is not implemented | | ||||||||||
tblah marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| The VOLATILE attribute | P | Volatile in procedure interfaces is not implemented | | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Volatile => VOLATILE There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||||||||||
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done