<html lang="en"> <head> <title>Fortran 2003 status - The GNU Fortran Compiler</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="The GNU Fortran Compiler"> <meta name="generator" content="makeinfo 4.13"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="Fortran-2003-and-2008-status.html#Fortran-2003-and-2008-status" title="Fortran 2003 and 2008 status"> <link rel="next" href="Fortran-2008-status.html#Fortran-2008-status" title="Fortran 2008 status"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <!-- Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being ``Funding Free Software'', the Front-Cover Texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the section entitled ``GNU Free Documentation License''. (a) The FSF's Front-Cover Text is: A GNU Manual (b) The FSF's Back-Cover Text is: You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development.--> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <div class="node"> <a name="Fortran-2003-status"></a> <p> Next: <a rel="next" accesskey="n" href="Fortran-2008-status.html#Fortran-2008-status">Fortran 2008 status</a>, Up: <a rel="up" accesskey="u" href="Fortran-2003-and-2008-status.html#Fortran-2003-and-2008-status">Fortran 2003 and 2008 status</a> <hr> </div> <h3 class="section">4.1 Fortran 2003 status</h3> <p>GNU Fortran supports several Fortran 2003 features; an incomplete list can be found below. See also the <a href="http://gcc.gnu.org/wiki/Fortran2003">wiki page</a> about Fortran 2003. <ul> <li>Procedure pointers including procedure-pointer components with <code>PASS</code> attribute. <li>Procedures which are bound to a derived type (type-bound procedures) including <code>PASS</code>, <code>PROCEDURE</code> and <code>GENERIC</code>, and operators bound to a type. <li>Abstract interfaces and and type extension with the possibility to override type-bound procedures or to have deferred binding. <li>Polymorphic entities (“<code>CLASS</code>”) for derived types – including <code>SAME_TYPE_AS</code>, <code>EXTENDS_TYPE_OF</code> and <code>SELECT TYPE</code>. Note that the support for array-valued polymorphic entities is incomplete and unlimited polymophism is currently not supported. <li>The <code>ASSOCIATE</code> construct. <li>Interoperability with C including enumerations, <li>In structure constructors the components with default values may be omitted. <li>Extensions to the <code>ALLOCATE</code> statement, allowing for a type-specification with type parameter and for allocation and initialization from a <code>SOURCE=</code> expression; <code>ALLOCATE</code> and <code>DEALLOCATE</code> optionally return an error message string via <code>ERRMSG=</code>. <li>Reallocation on assignment: If an intrinsic assignment is used, an allocatable variable on the left-hand side is automatically allocated (if unallocated) or reallocated (if the shape is different). Currently, scalar deferred character length left-hand sides are correctly handled but arrays are not yet fully implemented. <li>Transferring of allocations via <code>MOVE_ALLOC</code>. <li>The <code>PRIVATE</code> and <code>PUBLIC</code> attributes may be given individually to derived-type components. <li>In pointer assignments, the lower bound may be specified and the remapping of elements is supported. <li>For pointers an <code>INTENT</code> may be specified which affect the association status not the value of the pointer target. <li>Intrinsics <code>command_argument_count</code>, <code>get_command</code>, <code>get_command_argument</code>, and <code>get_environment_variable</code>. <li>Support for unicode characters (ISO 10646) and UTF-8, including the <code>SELECTED_CHAR_KIND</code> and <code>NEW_LINE</code> intrinsic functions. <li>Support for binary, octal and hexadecimal (BOZ) constants in the intrinsic functions <code>INT</code>, <code>REAL</code>, <code>CMPLX</code> and <code>DBLE</code>. <li>Support for namelist variables with allocatable and pointer attribute and nonconstant length type parameter. <li><a name="index-array_002c-constructors-274"></a><a name="index-g_t_0040code_007b_005b_002e_002e_002e_005d_007d-275"></a>Array constructors using square brackets. That is, <code>[...]</code> rather than <code>(/.../)</code>. Type-specification for array constructors like <code>(/ some-type :: ... /)</code>. <li>Extensions to the specification and initialization expressions, including the support for intrinsics with real and complex arguments. <li>Support for the asynchronous input/output syntax; however, the data transfer is currently always synchronously performed. <li><a name="index-g_t_0040code_007bFLUSH_007d-statement-276"></a><a name="index-statement_002c-_0040code_007bFLUSH_007d-277"></a><code>FLUSH</code> statement. <li><a name="index-g_t_0040code_007bIOMSG_003d_007d-specifier-278"></a><code>IOMSG=</code> specifier for I/O statements. <li><a name="index-g_t_0040code_007bENUM_007d-statement-279"></a><a name="index-g_t_0040code_007bENUMERATOR_007d-statement-280"></a><a name="index-statement_002c-_0040code_007bENUM_007d-281"></a><a name="index-statement_002c-_0040code_007bENUMERATOR_007d-282"></a><a name="index-g_t_0040code_007bfshort_002denums_007d-283"></a>Support for the declaration of enumeration constants via the <code>ENUM</code> and <code>ENUMERATOR</code> statements. Interoperability with <samp><span class="command">gcc</span></samp> is guaranteed also for the case where the <samp><span class="command">-fshort-enums</span></samp> command line option is given. <li><a name="index-TR-15581-284"></a>TR 15581: <ul> <li><a name="index-g_t_0040code_007bALLOCATABLE_007d-dummy-arguments-285"></a><code>ALLOCATABLE</code> dummy arguments. <li><a name="index-g_t_0040code_007bALLOCATABLE_007d-function-results-286"></a><code>ALLOCATABLE</code> function results <li><a name="index-g_t_0040code_007bALLOCATABLE_007d-components-of-derived-types-287"></a><code>ALLOCATABLE</code> components of derived types </ul> <li><a name="index-g_t_0040code_007bSTREAM_007d-I_002fO-288"></a><a name="index-g_t_0040code_007bACCESS_003d_0027STREAM_0027_007d-I_002fO-289"></a>The <code>OPEN</code> statement supports the <code>ACCESS='STREAM'</code> specifier, allowing I/O without any record structure. <li>Namelist input/output for internal files. <li>Further I/O extensions: Rounding during formatted output, using of a decimal comma instead of a decimal point, setting whether a plus sign should appear for positive numbers. <li><a name="index-g_t_0040code_007bPROTECTED_007d-statement-290"></a><a name="index-statement_002c-_0040code_007bPROTECTED_007d-291"></a>The <code>PROTECTED</code> statement and attribute. <li><a name="index-g_t_0040code_007bVALUE_007d-statement-292"></a><a name="index-statement_002c-_0040code_007bVALUE_007d-293"></a>The <code>VALUE</code> statement and attribute. <li><a name="index-g_t_0040code_007bVOLATILE_007d-statement-294"></a><a name="index-statement_002c-_0040code_007bVOLATILE_007d-295"></a>The <code>VOLATILE</code> statement and attribute. <li><a name="index-g_t_0040code_007bIMPORT_007d-statement-296"></a><a name="index-statement_002c-_0040code_007bIMPORT_007d-297"></a>The <code>IMPORT</code> statement, allowing to import host-associated derived types. <li>The intrinsic modules <code>ISO_FORTRAN_ENVIRONMENT</code> is supported, which contains parameters of the I/O units, storage sizes. Additionally, procedures for C interoperability are available in the <code>ISO_C_BINDING</code> module. <li><a name="index-g_t_0040code_007bUSE_002c-INTRINSIC_007d-statement-298"></a><a name="index-statement_002c-_0040code_007bUSE_002c-INTRINSIC_007d-299"></a><a name="index-g_t_0040code_007bISO_005fFORTRAN_005fENV_007d-statement-300"></a><a name="index-statement_002c-_0040code_007bISO_005fFORTRAN_005fENV_007d-301"></a><code>USE</code> statement with <code>INTRINSIC</code> and <code>NON_INTRINSIC</code> attribute; supported intrinsic modules: <code>ISO_FORTRAN_ENV</code>, <code>ISO_C_BINDING</code>, <code>OMP_LIB</code> and <code>OMP_LIB_KINDS</code>. <li>Renaming of operators in the <code>USE</code> statement. </ul> </body></html>