GFortranStandards - GCC Wiki (original) (raw)
Fortran Standards Documents
Contents
- Fortran Standards Documents
- Other Relevant Standards
- OpenMP (Open Multi-Processing)
- OpenACC (Open Accelerator)
- POSIX
- ISO/IEC Project 22.24772: Guidance for Avoiding Vulnerabilities through Language Selection and Use
- IEEE 754
- ISO/IEC 9899 Programming languages -- C
- ISO/IEC 14882 Programming languages -- C++
- ISO/IEC 8652 Programming languages -- Ada
- Message Passing Interface (MPI)
- Unified Parallel C (UPC)
Draft (unofficial) versions of the various recent Fortran standards and corrigenda are available from the J3 website, the WG5 website, in various formats. In addition, some older Fortran standards are available from www.fortran.com. The official standards can be bought from the International Organization for Standardization (ISO) or from your national standardization organization. In particular, ANSI's webshop often sells the standard for much less than ISO.
Documents of the format N_nnnn_ (e.g. N1830) are available from on the web server of WG5, documents of the form yy-nnnn (e.g. 04-007) or with an additional r_n_ suffix indicating the revision (e.g. 97-007r2) are available from http://j3-fortran.org/doc/ in the "year" subdirectory.
Note that, of these standards, GNU Fortran currently only supports the base Fortran 95 standard (not parts 2 or 3) as amended in the two corrigenda, the Fortran 95 TR 15581 extension, the Fortran 77 standard with the MIL-STD 1753 extensions, and some portions of the Fortran 2003 and 2008 standard; these standards have been highlighted in bold. The other documents are linked here for reference, but should not be taken as documentation of GNU Fortran features.
Fortran - Automatic Coding System for the IBM 704
- The oldest version; dated October 15, 1956, first presented in February 1957 and first delivered in April 1957. Fortran - Programmer's Reference Manual (PDF)
Fortran 66
Fortran 77
- Fortran 77 Standard (!X3J3/90.4, ISO 1539:1980): (html) (text 2) (html)
- DoD Extensions to Fortran 77 (MIL-STD 1753): (html) (html 2)
Fortran 90
- Fortran 90 Standard ISO/IEC 1539:1991: (pdf)
Fortran 95
- Fortran 95 Standard, final draft (ISO/IEC 1539-1:1997): (all formats), (pdf, N1191, DIS).
- Fortran 95 Standard (Part 2: ISO-Varying-Strings), final draft (ISO/IEC 1539-2:2000): (pdf) (Reference implementation written in Fortran 1, 2 - and a Fortran 2003/2008 version of it)
- (ISO Varying strings are not implemented in GNU Fortran, but a Fortran 95 module exists which implements this is Fortran.)
- Fortran 95 Standard (Part 3: Conditional Compilation), final draft (ISO/IEC 1539-3:1998): (pdf)
- (Conditional Compilation is not supported directly by GNU Fortran but you can preprocess the files using COCO. Note: The WG5 "convenor [...] asked SC22 at its September [2010] plenary to request a JTC1 country ballot for withdrawal".)
- Fortran 95 Floating-Point Exceptions TR, draft (ISO/IEC TR 15580:2001): (pdf)
- Fortran 95 Allocatable Components TR, draft (ISO/IEC TR 15581:2001): (pdf)
- Fortran 95 Corrigendum 1, draft: (pdf)
- Fortran 95 Corrigendum 2, draft: (pdf)
- Completed interpretations of Fortran 95
Fortran 2003
- Fortran 2003 Standard, final draft (ISO/IEC 1539-1:2004(E)): (ascii), (TeX), (pdf).
- Fortran 2003, Enhanced Modules TR, draft (ISO/IEC TR 19767:2005(E)): (pdf).
- Fortran 2003 Corrigendum 1, draft (ISO/IEC 1539-1:2004/Cor 1:2006 (E)): (pdf)
- Fortran 2003 Corrigendum 2, final draft (ISO/IEC 1539-1:2004/Cor.2:2007 (E)): (pdf)
- Fortran 2003 Corrigendum 3, draft: PDF (defect reports)
- Fortran 2003 Corrigendum 4: PDF
- Fortran 2003 Corrigendum 5: PDF
- Fortran 2003 Corrigenda 1 to 5: combination of the corrigenda about - PDF
- Fortran 2003 update pages (consists of corrigenda 1 and 2)
- Completed interpretations of Fortran 2003
- The New Features of Fortran 2003 by John Reid (non normative) and something similar by NAG
- N1764: New (2008-12-08) interpretations, which passed the J3 ballot
- N1805: Fortran interpretations that have passed a J3 letter ballot
Fortran 2008
- Fortran 2008 (latest draft) (nearly FDIS, 2010-04-27; published 2010-10-06 as ISO/IEC 1539-1:2010) (Non-normative coarrays description, non-normative coarray rational)
- The new features of Fortran 2008 by John Reid (non normative)
- Draft Technical Corrigendum 1 (N1903, ISO/IEC 1539-1:2010/Cor 1:2012 [freely downloadable]) (Version with WG5 comments, defect report)
- Draft Technical Corrigendum 2 (N1958; ISO/IEC 1539-1:2010/Cor 2:2013; with WG5 comments; defect report)
- Draft Technical Corrigendum 3 (N2003; ISO/IEC 1539-1:2010/CD Cor 3; with WG5 comments; defect report)
- Combined Technical Corrigenda 1 to 3 for Fortran 2008 (N2005)
TS 29113 Further Interoperability of Fortran with C
Note: ISO changed it from Technical Report (TR) to Technical Specification (TS)
- N1942 (draft FDTS as sent to SC22, 11 October 2012)
- ISO page for ISO/IEC TS 29113:2012
TS 18508 Additional Parallel Features in Fortran
- Draft (N2048, 9th March 2015)
- ISO page for ISO/IEC NP TS 18508
- Requirements for further coarray features (N1981, November 2013)
- Schedule
Fortran 2018
- Interpretation Document (J3/18-007r1, WD 1539-1, 2018-08-28)
- The new features of Fortran 2018 by John Reid (WG5/N2145, non normative)
Fortran 2023
- Fortran 2023 (J3/23-007, 2023-12-22) with incorporates interpretation requests
- Draft Fortran 2023 (J3/23-007r1, 13th June 2023)
- The new features of Fortran 202x by John Reid (2 Feburary 2022, non normative)
Other Relevant Standards
OpenMP (Open Multi-Processing)
OpenMP specifications - see also GCC's OpenMP project page
OpenACC (Open Accelerator)
OpenACC Specifications - see also GCC's OpenACC page
POSIX
The IEEE standard covering Fortran 77 POSIX bindings is available online, though unfortunately only from locations with appropriate subscriptions to the IEEE server (e.g., many university networks). For those who do have such access, the link is:
POSIX Fortran 77 Language Interfaces (IEEE Std 1003.9-1992) (pdf)
Note IEEE 1003.9-1992 was withdrawn 6 February 2003. Some vendors provide their own way to access POSIX functions and make those available as module; for instance the IFPORT module of Intel or the f90_* modules of NAG. There also some compiler-independent efforts to make them accessible, e.g. Posix90 (doc), flibs' platform/files and directories, fortranposix.
ISO/IEC Project 22.24772: Guidance for Avoiding Vulnerabilities through Language Selection and Use
"The OWGV project is preparing comparative guidance spanning multiple programming languages, so that application developers will be better able to avoid the programming errors that lead to vulnerabilities in these languages and their attendant consequences. This guidance can also be used by developers to select source code evaluation tools that can discover and eliminate coding errors that lead to vulnerabilities."
- ISO/IEC TR 24772:2013 (free ZIP file) (listed as freely available ISO standard; see also ISO/IEC TR 24772:2013)
- Draft N0461 (2013-08-14; Revised Baseline draft Ed. 3) - with Fortran Annex
- ISO/IEC IS 17960 Code Signing for Source Code (draft, 2013-10-10)
IEEE 754
The IEEE Standard for Binary Floating-Point Arithmetic (IEEE 754) is the most widely-used standard for floating-point computation. Unfortunately, they are not freely available.
- IEEE 754-1985 Standard for Binary Floating-Point Arithmetic
- IEEE 854-1987 Standard for Radix-Independent Floating-Point Arithmetic
- IEEE 754-2008 IEEE Standard for Floating-Point Arithmetic
- Latest publicly available draft of IEEE 754-2008 (4 October 2006)
The IEEE 754-2008 standard has been adopted as ISO/IEC/IEEE 60559:2011
ISO/IEC 9899 Programming languages -- C
The C standard is relevant for two parts: (a) the interoperability features of Fortran 2003/2008/interop TR and (b) for the C Preprocessor (CPP; "Preprocessing directives"), which gfortran supports as vendor extension.
- '''JTC1/SC22/WG14''' - C (C drafts are also available there)
ISO/IEC 14882 Programming languages -- C++
- '''JTC1/SC22/WG21''' - C++ (C++ drafts available, at least for C++98)
ISO/IEC 8652 Programming languages -- Ada
- Ada 2012 language reference page (ISO/IEC 8652:2012(E), ISO page)
- Note the section "B.5 Interfacing with Fortran" in the appendix of Ada 2012.
Message Passing Interface (MPI)
Unified Parallel C (UPC)
- UPC spec page
- GCC's UPC: GCCUPC homepage, see also gupc branch and GUPS page