From patchwork Thu Sep 23 14:54:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 65537 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 2E5FCB70E3 for ; Fri, 24 Sep 2010 00:54:19 +1000 (EST) Received: (qmail 22485 invoked by alias); 23 Sep 2010 14:54:15 -0000 Received: (qmail 22465 invoked by uid 22791); 23 Sep 2010 14:54:12 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SARE_URI_DIGITS4 X-Spam-Check-By: sourceware.org Received: from mx01.qsc.de (HELO mx01.qsc.de) (213.148.129.14) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 23 Sep 2010 14:54:06 +0000 Received: from [192.168.178.22] (port-92-204-109-183.dynamic.qsc.de [92.204.109.183]) by mx01.qsc.de (Postfix) with ESMTP id 95D933D460; Thu, 23 Sep 2010 16:54:02 +0200 (CEST) Message-ID: <4C9B6A09.2080605@net-b.de> Date: Thu, 23 Sep 2010 16:54:01 +0200 From: Tobias Burnus User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100914 SUSE/3.1.4 Thunderbird/3.1.4 MIME-Version: 1.0 To: gcc patches , gfortran Subject: Re: [Patch,Fortran] Update gfortran.texi's Fortran 2008 status References: <4C9B61A9.5010903@net-b.de> In-Reply-To: <4C9B61A9.5010903@net-b.de> Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On 09/23/2010 04:18 PM, Tobias Burnus wrote: > The Fortran 2003 and 2008 status in the manual badly needs to be > updated. I did the simple part: Updating the Fortran 2008 section; > updating Fortran 2003 is more work. I think also other parts of the > manual need some love. Anyone volunteering to look though the manual > and doing some janitorial work? A slightly updated version - F2008 is unchanged but I also modified other places: - Remove examples for implemented F2003 features as the list does not really contain the real highlights and the F2003/F2008 should provide the rest - Remove OpenMPv2.5 referral - a few lines later OpenMP v3.0 is already referred to - Update another place for Fortran 2008, which is now an ISO standard and no longer under development The patch has been checked via "make pdf info html" and the result has been visually inspected. OK for the trunk? TODO: Update "Fortran 2003 status" which I did not not touch but the list of supported features has not been updated since about 4.3. (I currently do not plan to work on this.) Tobias Index: gcc/fortran/gfortran.texi =================================================================== --- gcc/fortran/gfortran.texi (revision 164563) +++ gcc/fortran/gfortran.texi (working copy) @@ -474,9 +474,8 @@ standard-compliant Fortran 95, Fortran 9 including a number of standard and non-standard extensions, and can be used on real-world programs. In particular, the supported extensions include OpenMP, Cray-style pointers, and several Fortran 2003 and Fortran -2008 features such as enumeration, stream I/O, and some of the -enhancements to allocatable array support from TR 15581. However, it is -still under development and has a few remaining rough edges. +2008 features, including TR 15581. However, it is still under +development and has a few remaining rough edges. At present, the GNU Fortran compiler passes the @uref{http://www.fortran-2000.com/ArnaudRecipes/fcvs21_f95.html, @@ -521,22 +520,14 @@ future standards---in particular, Fortra The GNU Fortran compiler implements ISO/IEC 1539:1997 (Fortran 95). As such, it can also compile essentially all standard-compliant Fortran 90 and Fortran 77 programs. It also supports -the ISO/IEC TR-15581 enhancements to allocatable arrays, and -the @uref{http://www.openmp.org/drupal/mp-documents/spec25.pdf, -OpenMP Application Program Interface v2.5} specification. +the ISO/IEC TR-15581 enhancements to allocatable arrays. In the future, the GNU Fortran compiler will also support ISO/IEC -1539-1:2004 (Fortran 2003) and future Fortran standards. Partial support -of that standard is already provided; the current status of Fortran 2003 -support is reported in the @ref{Fortran 2003 status} section of the -documentation. - -The next version of the Fortran standard (Fortran 2008) is currently -being developed and the GNU Fortran compiler supports some of its new -features. This support is based on the latest draft of the standard -(available from @url{http://www.nag.co.uk/sc22wg5/}) and no guarantee of -future compatibility is made, as the final standard might differ from the -draft. For more information, see the @ref{Fortran 2008 status} section. +1539-1:2004 (Fortran 2003), ISO/IEC 1539-1:2010 (Fortran 2008) and +future Fortran standards. Partial support of the Fortran 2003 and +Fortran 2008 standard is already provided; the current status of the +support is reported in the @ref{Fortran 2003 status} and +@ref{Fortran 2008 status} sections of the documentation. Additionally, the GNU Fortran compilers supports the OpenMP specification (version 3.0, @url{http://openmp.org/wp/openmp-specifications/}). @@ -938,21 +929,102 @@ Extension of derived-types (the @code{EX @node Fortran 2008 status @section Fortran 2008 status -The next version of the Fortran standard after Fortran 2003 is currently -being worked on by the Working Group 5 of Sub-Committee 22 of the Joint -Technical Committee 1 of the International Organization for -Standardization (ISO) and the International Electrotechnical Commission -(IEC). This group is known as @uref{http://www.nag.co.uk/sc22wg5/, WG5}. -The next revision of the Fortran standard is informally referred to as -Fortran 2008, reflecting its planned release year. The GNU Fortran -compiler has support for some of the new features in Fortran 2008. This -support is based on the latest draft, available from -@url{http://www.nag.co.uk/sc22wg5/}. However, as the final standard may -differ from the drafts, no guarantee of backward compatibility can be -made and you should only use it for experimental purposes. +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 +@url{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 +@uref{http://www.nag.co.uk/sc22wg5/, WG5}. + +The GNU Fortran supports several of the new features of Fortran 2008; the +@uref{http://gcc.gnu.org/wiki/Fortran2008Status, wiki} has some information +about the current Fortran 2008 implementation status. In particular, the +following is implemented. + +@itemize +@item The @code{-std=f2008} option and support for the file extensions +@code{.f2008} and @code{.F2008}. + +@item The @code{OPEN} statement now supports the @code{NEWUNIT=} option, +which returns a unique file unit, thus preventing inadvertent use of the +same unit in different parts of the program. + +@item The @code{g0} format descriptor and unlimited format items. + +@item The mathematical intrinsics @code{ASINH}, @code{ACOSH}, @code{ATANH}, +@code{ERF}, @code{ERFC}, @code{GAMMA}, @code{LOG_GAMMA}, @code{BESSEL_J0}, +@code{BESSEL_J1}, @code{BESSEL_JN}, @code{BESSEL_Y0}, @code{BESSEL_Y1}, +@code{BESSEL_YN}, @code{HYPOT}, @code{NORM2}, and @code{ERFC_SCALED}. + +@item Using complex arguments with @code{TAN}, @code{SINH}, @code{COSH}, +@code{TANH}, @code{ASIN}, @code{ACOS}, and @code{ATAN} is now possible; +@code{ATAN}(@var{Y},@var{X}) is now an alias for @code{ATAN2}(@var{Y},@var{X}). + +@item Support of the @code{PARITY} intrinsic functions. + +@item The following bit intrinsics: @code{LEADZ} and @code{TRAILZ} for +counting the number of leading and trailing zero bits, @code{POPCNT} and +@code{POPPAR} for counting the number of one bits and returning the parity; +@code{BGE}, @code{BGT}, @code{BLE}, and @code{BLT} for bitwise comparisons; +@code{DSHIFTL} and @code{DSHIFTR} for combined left and right shifts, +@code{MASKL} and @code{MASKR} for simple left and right justified masks, +@code{MERGE_BITS} for a bitwise merge using a mask, @code{SHIFTA}, +@code{SHIFTL} and @code{SHIFTR} for shift operations, and the +transformational bit intrinsics @code{IALL}, @code{IANY} and @code{IPARITY}. + +@item Support of the @code{EXECUTE_COMMAND_LINE} intrinsic subroutine. + +@item Support for the @code{STORAGE_SIZE} intrinsic inquiry function. + +@item The @code{INT@{8,16,32@}} and @code{REAL@{32,64,128@}} kind type +parameters of the intrinsic module @code{ISO_FORTRAN_ENV}. + +@item Experimental coarray support (for one image only), use the +@code{-fcoarray=single} flag to enable it. + +@item The @code{BLOCK} construct is supported. + +@item The @code{STOP} and the new @code{ERROR STOP} statements now +support all constant expressions. + +@item Support for the @code{CONTIGUOUS} attribute. + +@item Support for @code{ALLOCATE} with @code{MOLD}. + +@item Support for the @code{IMPURE} attribute for procedures, which +allows for @code{ELEMENTAL} procedures without the restrictions of +@code{PURE}. + +@item Null pointers (including @code{NULL()}) and not-allocated variables +can be used as actual argument to optional non-pointer, non-allocatable +dummy arguments, denoting an absent argument. +@item Non-pointer variables with @code{TARGET} attribute can be used as +actual argument to @code{POINTER} dummies with @code{INTENT(IN)}. + +@item Pointers including procedure pointers and those in a derived +type (pointer components) can now be initialized by a target instead +of only by @code{NULL}. + +@item The @code{EXIT} statement (with construct-name) can be now be +used to leave not only the @code{DO} but also the @code{ASSOCIATE}, +@code{BLOCK}, @code{IF}, @code{SELECT CASE} and @code{SELECT TYPE} +constructs. + +@item Internal procedures can now be used as actual argument. + +@item Minor features: obsolesce diagnostics for @code{ENTRY} with +@code{-std=f2008}; a line may start with a semicolon; for internal +and module procedures @code{END} can be used instead of +@code{END SUBROUTINE} and @code{END FUNCTION}; @code{SELECTED_REAL_KIND} +now also takes a @code{RADIX} argument; intrinsic types are supported +for @code{TYPE}(@var{intrinsic-type-spec}); multiple type-bound procedures +can be declared in a single @code{PROCEDURE} statement; implied-shape +arrays are supported for named constants (@code{PARAMETER}). +@end itemize -The @uref{http://gcc.gnu.org/wiki/Fortran2008Status, wiki} has some information -about the current Fortran 2008 implementation status. @c ---------------------------------------------------------------------