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
OPENstatement 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
g0format 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, andATANis now possible;ATAN(Y,X) is now an alias forATAN2(Y,X). - Support of the
PARITYintrinsic functions. - The following bit intrinsics:
LEADZandTRAILZfor counting the number of leading and trailing zero bits,POPCNTandPOPPARfor counting the number of one bits and returning the parity;BGE,BGT,BLE, andBLTfor bitwise comparisons;DSHIFTLandDSHIFTRfor combined left and right shifts,MASKLandMASKRfor simple left and right justified masks,MERGE_BITSfor a bitwise merge using a mask,SHIFTA,SHIFTLandSHIFTRfor shift operations, and the transformational bit intrinsicsIALL,IANYandIPARITY. - Support of the
EXECUTE_COMMAND_LINEintrinsic subroutine. - Support for the
STORAGE_SIZEintrinsic inquiry function. - The
INT{8,16,32}andREAL{32,64,128}kind type parameters and the array-valued named constantsINTEGER_KINDS,LOGICAL_KINDS,REAL_KINDSandCHARACTER_KINDSof the intrinsic moduleISO_FORTRAN_ENV. - The module procedures
C_SIZEOFof the intrinsic moduleISO_C_BINDINGSandCOMPILER_VERSIONandCOMPILER_OPTIONSofISO_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
MODULEsdo not produce the smod file needed by the descendentSUBMODULEsunless they contain at least oneMODULE PROCEDUREinterface. The reason for this is thatSUBMODULEsare 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 CONCURRENTconstruct is supported. - The
BLOCKconstruct is supported. - The
STOPand the newERROR STOPstatements now support all constant expressions. Both show the signals which were signaling at termination. - Support for the
CONTIGUOUSattribute. - Support for
ALLOCATEwithMOLD. - Support for the
IMPUREattribute for procedures, which allows forELEMENTALprocedures 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
TARGETattribute can be used as actual argument toPOINTERdummies 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
EXITstatement (with construct-name) can be now be used to leave not only theDObut also theASSOCIATE,BLOCK,IF,SELECT CASEandSELECT TYPEconstructs. - Internal procedures can now be used as actual argument.
- Minor features: obsolesce diagnostics for
ENTRYwith -std=f2008; a line may start with a semicolon; for internal and module proceduresENDcan be used instead ofEND SUBROUTINEandEND FUNCTION;SELECTED_REAL_KINDnow also takes aRADIXargument; intrinsic types are supported forTYPE(intrinsic-type-spec); multiple type-bound procedures can be declared in a singlePROCEDUREstatement; implied-shape arrays are supported for named constants (PARAMETER).
Next: TS 29113 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-8.4.0/gfortran/Fortran-2008-status.html