4.2 Fortran 2008 status
The latest version of the Fortran standard is ISO/IEC 1539-1:2010, informally known as Fortran 2008. The official version is available from International Organization for Standardization (ISO) or its national member organizations. The the final draft (FDIS) can be downloaded free of charge from http://www.nag.co.uk/sc22wg5/links.html. Fortran is developed by the Working Group 5 of Sub-Committee 22 of the Joint Technical Committee 1 of the International Organization for Standardization and the International Electrotechnical Commission (IEC). This group is known as WG5.
The GNU Fortran compiler supports several of the new features of Fortran 2008; the wiki has some information about the current Fortran 2008 implementation status. In particular, the following is implemented.
- The -std=f2008 option and support for the file extensions .f08 and .F08.
- The
OPEN
statement now supports theNEWUNIT=
option, which returns a unique file unit, thus preventing inadvertent use of the same unit in different parts of the program. - The
g0
format descriptor and unlimited format items. - The mathematical intrinsics
ASINH
,ACOSH
,ATANH
,ERF
,ERFC
,GAMMA
,LOG_GAMMA
,BESSEL_J0
,BESSEL_J1
,BESSEL_JN
,BESSEL_Y0
,BESSEL_Y1
,BESSEL_YN
,HYPOT
,NORM2
, andERFC_SCALED
. - Using complex arguments with
TAN
,SINH
,COSH
,TANH
,ASIN
,ACOS
, andATAN
is now possible;ATAN
(Y,X) is now an alias forATAN2
(Y,X). - Support of the
PARITY
intrinsic functions. - The following bit intrinsics:
LEADZ
andTRAILZ
for counting the number of leading and trailing zero bits,POPCNT
andPOPPAR
for counting the number of one bits and returning the parity;BGE
,BGT
,BLE
, andBLT
for bitwise comparisons;DSHIFTL
andDSHIFTR
for combined left and right shifts,MASKL
andMASKR
for simple left and right justified masks,MERGE_BITS
for a bitwise merge using a mask,SHIFTA
,SHIFTL
andSHIFTR
for shift operations, and the transformational bit intrinsicsIALL
,IANY
andIPARITY
. - Support of the
EXECUTE_COMMAND_LINE
intrinsic subroutine. - Support for the
STORAGE_SIZE
intrinsic inquiry function. - The
INT{8,16,32}
andREAL{32,64,128}
kind type parameters and the array-valued named constantsINTEGER_KINDS
,LOGICAL_KINDS
,REAL_KINDS
andCHARACTER_KINDS
of the intrinsic moduleISO_FORTRAN_ENV
. - The module procedures
C_SIZEOF
of the intrinsic moduleISO_C_BINDINGS
andCOMPILER_VERSION
andCOMPILER_OPTIONS
ofISO_FORTRAN_ENV
. - Coarray support for serial programs with -fcoarray=single flag and experimental support for multiple images with the -fcoarray=lib flag.
- Submodules are supported. It should noted that
MODULEs
do not produce the smod file needed by the descendentSUBMODULEs
unless they contain at least oneMODULE PROCEDURE
interface. The reason for this is thatSUBMODULEs
are useless withoutMODULE PROCEDUREs
. See http://j3-fortran.org/doc/meeting/207/15-209.txt for a discussion and a draft interpretation. Adopting this interpretation has the advantage that code that does not use submodules does not generate smod files. - The
DO CONCURRENT
construct is supported. - The
BLOCK
construct is supported. - The
STOP
and the newERROR STOP
statements now support all constant expressions. Both show the signals which were signaling at termination. - Support for the
CONTIGUOUS
attribute. - Support for
ALLOCATE
withMOLD
. - Support for the
IMPURE
attribute for procedures, which allows forELEMENTAL
procedures without the restrictions ofPURE
. - Null pointers (including
NULL()
) and not-allocated variables can be used as actual argument to optional non-pointer, non-allocatable dummy arguments, denoting an absent argument. - Non-pointer variables with
TARGET
attribute can be used as actual argument toPOINTER
dummies withINTENT(IN)
. - Pointers including procedure pointers and those in a derived type (pointer components) can now be initialized by a target instead of only by
NULL
. - The
EXIT
statement (with construct-name) can be now be used to leave not only theDO
but also theASSOCIATE
,BLOCK
,IF
,SELECT CASE
andSELECT TYPE
constructs. - Internal procedures can now be used as actual argument.
- Minor features: obsolesce diagnostics for
ENTRY
with -std=f2008; a line may start with a semicolon; for internal and module proceduresEND
can be used instead ofEND SUBROUTINE
andEND FUNCTION
;SELECTED_REAL_KIND
now also takes aRADIX
argument; intrinsic types are supported forTYPE
(intrinsic-type-spec); multiple type-bound procedures can be declared in a singlePROCEDURE
statement; implied-shape arrays are supported for named constants (PARAMETER
).
Next: Fortran 2018 status, Previous: Fortran 2003 status, Up: Fortran standards status [Contents][Index]
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-9.3.0/gfortran/Fortran-2008-status.html