Fortran-2008-status.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1999-2017 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Funding Free Software", the Front-Cover
  8. Texts being (a) (see below), and with the Back-Cover Texts being (b)
  9. (see below). A copy of the license is included in the section entitled
  10. "GNU Free Documentation License".
  11. (a) The FSF's Front-Cover Text is:
  12. A GNU Manual
  13. (b) The FSF's Back-Cover Text is:
  14. You have freedom to copy and modify this GNU Manual, like GNU
  15. software. Copies published by the Free Software Foundation raise
  16. funds for GNU development. -->
  17. <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <title>The GNU Fortran Compiler: Fortran 2008 status</title>
  20. <meta name="description" content="The GNU Fortran Compiler: Fortran 2008 status">
  21. <meta name="keywords" content="The GNU Fortran Compiler: Fortran 2008 status">
  22. <meta name="resource-type" content="document">
  23. <meta name="distribution" content="global">
  24. <meta name="Generator" content="makeinfo">
  25. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  26. <link href="index.html#Top" rel="start" title="Top">
  27. <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
  28. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  29. <link href="Fortran-2003-and-2008-status.html#Fortran-2003-and-2008-status" rel="up" title="Fortran 2003 and 2008 status">
  30. <link href="TS-29113-status.html#TS-29113-status" rel="next" title="TS 29113 status">
  31. <link href="Fortran-2003-status.html#Fortran-2003-status" rel="prev" title="Fortran 2003 status">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.smallquotation {font-size: smaller}
  36. div.display {margin-left: 3.2em}
  37. div.example {margin-left: 3.2em}
  38. div.indentedblock {margin-left: 3.2em}
  39. div.lisp {margin-left: 3.2em}
  40. div.smalldisplay {margin-left: 3.2em}
  41. div.smallexample {margin-left: 3.2em}
  42. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  43. div.smalllisp {margin-left: 3.2em}
  44. kbd {font-style:oblique}
  45. pre.display {font-family: inherit}
  46. pre.format {font-family: inherit}
  47. pre.menu-comment {font-family: serif}
  48. pre.menu-preformatted {font-family: serif}
  49. pre.smalldisplay {font-family: inherit; font-size: smaller}
  50. pre.smallexample {font-size: smaller}
  51. pre.smallformat {font-family: inherit; font-size: smaller}
  52. pre.smalllisp {font-size: smaller}
  53. span.nocodebreak {white-space:nowrap}
  54. span.nolinebreak {white-space:nowrap}
  55. span.roman {font-family:serif; font-weight:normal}
  56. span.sansserif {font-family:sans-serif; font-weight:normal}
  57. ul.no-bullet {list-style: none}
  58. -->
  59. </style>
  60. </head>
  61. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  62. <a name="Fortran-2008-status"></a>
  63. <div class="header">
  64. <p>
  65. Next: <a href="TS-29113-status.html#TS-29113-status" accesskey="n" rel="next">TS 29113 status</a>, Previous: <a href="Fortran-2003-status.html#Fortran-2003-status" accesskey="p" rel="prev">Fortran 2003 status</a>, Up: <a href="Fortran-2003-and-2008-status.html#Fortran-2003-and-2008-status" accesskey="u" rel="up">Fortran 2003 and 2008 status</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  66. </div>
  67. <hr>
  68. <a name="Fortran-2008-status-1"></a>
  69. <h3 class="section">4.2 Fortran 2008 status</h3>
  70. <p>The latest version of the Fortran standard is ISO/IEC 1539-1:2010, informally
  71. known as Fortran 2008. The official version is available from International
  72. Organization for Standardization (ISO) or its national member organizations.
  73. The the final draft (FDIS) can be downloaded free of charge from
  74. <a href="http://www.nag.co.uk/sc22wg5/links.html">http://www.nag.co.uk/sc22wg5/links.html</a>. Fortran is developed by the
  75. Working Group 5 of Sub-Committee 22 of the Joint Technical Committee 1 of the
  76. International Organization for Standardization and the International
  77. Electrotechnical Commission (IEC). This group is known as
  78. <a href="http://www.nag.co.uk/sc22wg5/">WG5</a>.
  79. </p>
  80. <p>The GNU Fortran compiler supports several of the new features of Fortran 2008;
  81. the <a href="https://gcc.gnu.org/wiki/Fortran2008Status">wiki</a> has some information
  82. about the current Fortran 2008 implementation status. In particular, the
  83. following is implemented.
  84. </p>
  85. <ul>
  86. <li> The <samp>-std=f2008</samp> option and support for the file extensions
  87. <samp>.f08</samp> and <samp>.F08</samp>.
  88. </li><li> The <code>OPEN</code> statement now supports the <code>NEWUNIT=</code> option,
  89. which returns a unique file unit, thus preventing inadvertent use of the
  90. same unit in different parts of the program.
  91. </li><li> The <code>g0</code> format descriptor and unlimited format items.
  92. </li><li> The mathematical intrinsics <code>ASINH</code>, <code>ACOSH</code>, <code>ATANH</code>,
  93. <code>ERF</code>, <code>ERFC</code>, <code>GAMMA</code>, <code>LOG_GAMMA</code>, <code>BESSEL_J0</code>,
  94. <code>BESSEL_J1</code>, <code>BESSEL_JN</code>, <code>BESSEL_Y0</code>, <code>BESSEL_Y1</code>,
  95. <code>BESSEL_YN</code>, <code>HYPOT</code>, <code>NORM2</code>, and <code>ERFC_SCALED</code>.
  96. </li><li> Using complex arguments with <code>TAN</code>, <code>SINH</code>, <code>COSH</code>,
  97. <code>TANH</code>, <code>ASIN</code>, <code>ACOS</code>, and <code>ATAN</code> is now possible;
  98. <code>ATAN</code>(<var>Y</var>,<var>X</var>) is now an alias for <code>ATAN2</code>(<var>Y</var>,<var>X</var>).
  99. </li><li> Support of the <code>PARITY</code> intrinsic functions.
  100. </li><li> The following bit intrinsics: <code>LEADZ</code> and <code>TRAILZ</code> for
  101. counting the number of leading and trailing zero bits, <code>POPCNT</code> and
  102. <code>POPPAR</code> for counting the number of one bits and returning the parity;
  103. <code>BGE</code>, <code>BGT</code>, <code>BLE</code>, and <code>BLT</code> for bitwise comparisons;
  104. <code>DSHIFTL</code> and <code>DSHIFTR</code> for combined left and right shifts,
  105. <code>MASKL</code> and <code>MASKR</code> for simple left and right justified masks,
  106. <code>MERGE_BITS</code> for a bitwise merge using a mask, <code>SHIFTA</code>,
  107. <code>SHIFTL</code> and <code>SHIFTR</code> for shift operations, and the
  108. transformational bit intrinsics <code>IALL</code>, <code>IANY</code> and <code>IPARITY</code>.
  109. </li><li> Support of the <code>EXECUTE_COMMAND_LINE</code> intrinsic subroutine.
  110. </li><li> Support for the <code>STORAGE_SIZE</code> intrinsic inquiry function.
  111. </li><li> The <code>INT{8,16,32}</code> and <code>REAL{32,64,128}</code> kind type
  112. parameters and the array-valued named constants <code>INTEGER_KINDS</code>,
  113. <code>LOGICAL_KINDS</code>, <code>REAL_KINDS</code> and <code>CHARACTER_KINDS</code> of
  114. the intrinsic module <code>ISO_FORTRAN_ENV</code>.
  115. </li><li> The module procedures <code>C_SIZEOF</code> of the intrinsic module
  116. <code>ISO_C_BINDINGS</code> and <code>COMPILER_VERSION</code> and <code>COMPILER_OPTIONS</code>
  117. of <code>ISO_FORTRAN_ENV</code>.
  118. </li><li> Coarray support for serial programs with <samp>-fcoarray=single</samp> flag
  119. and experimental support for multiple images with the <samp>-fcoarray=lib</samp>
  120. flag.
  121. </li><li> Submodules are supported. It should noted that <code>MODULEs</code> do not
  122. produce the smod file needed by the descendent <code>SUBMODULEs</code> unless they
  123. contain at least one <code>MODULE PROCEDURE</code> interface. The reason for this is
  124. that <code>SUBMODULEs</code> are useless without <code>MODULE PROCEDUREs</code>. See
  125. http://j3-fortran.org/doc/meeting/207/15-209.txt for a discussion and a draft
  126. interpretation. Adopting this interpretation has the advantage that code that
  127. does not use submodules does not generate smod files.
  128. </li><li> The <code>DO CONCURRENT</code> construct is supported.
  129. </li><li> The <code>BLOCK</code> construct is supported.
  130. </li><li> The <code>STOP</code> and the new <code>ERROR STOP</code> statements now
  131. support all constant expressions. Both show the signals which were signaling
  132. at termination.
  133. </li><li> Support for the <code>CONTIGUOUS</code> attribute.
  134. </li><li> Support for <code>ALLOCATE</code> with <code>MOLD</code>.
  135. </li><li> Support for the <code>IMPURE</code> attribute for procedures, which
  136. allows for <code>ELEMENTAL</code> procedures without the restrictions of
  137. <code>PURE</code>.
  138. </li><li> Null pointers (including <code>NULL()</code>) and not-allocated variables
  139. can be used as actual argument to optional non-pointer, non-allocatable
  140. dummy arguments, denoting an absent argument.
  141. </li><li> Non-pointer variables with <code>TARGET</code> attribute can be used as
  142. actual argument to <code>POINTER</code> dummies with <code>INTENT(IN)</code>.
  143. </li><li> Pointers including procedure pointers and those in a derived
  144. type (pointer components) can now be initialized by a target instead
  145. of only by <code>NULL</code>.
  146. </li><li> The <code>EXIT</code> statement (with construct-name) can be now be
  147. used to leave not only the <code>DO</code> but also the <code>ASSOCIATE</code>,
  148. <code>BLOCK</code>, <code>IF</code>, <code>SELECT CASE</code> and <code>SELECT TYPE</code>
  149. constructs.
  150. </li><li> Internal procedures can now be used as actual argument.
  151. </li><li> Minor features: obsolesce diagnostics for <code>ENTRY</code> with
  152. <samp>-std=f2008</samp>; a line may start with a semicolon; for internal
  153. and module procedures <code>END</code> can be used instead of
  154. <code>END SUBROUTINE</code> and <code>END FUNCTION</code>; <code>SELECTED_REAL_KIND</code>
  155. now also takes a <code>RADIX</code> argument; intrinsic types are supported
  156. for <code>TYPE</code>(<var>intrinsic-type-spec</var>); multiple type-bound procedures
  157. can be declared in a single <code>PROCEDURE</code> statement; implied-shape
  158. arrays are supported for named constants (<code>PARAMETER</code>).
  159. </li></ul>
  160. <hr>
  161. <div class="header">
  162. <p>
  163. Next: <a href="TS-29113-status.html#TS-29113-status" accesskey="n" rel="next">TS 29113 status</a>, Previous: <a href="Fortran-2003-status.html#Fortran-2003-status" accesskey="p" rel="prev">Fortran 2003 status</a>, Up: <a href="Fortran-2003-and-2008-status.html#Fortran-2003-and-2008-status" accesskey="u" rel="up">Fortran 2003 and 2008 status</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  164. </div>
  165. </body>
  166. </html>