From patchwork Thu Sep 23 14:18:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 65536 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 6D1EDB70E1 for ; Fri, 24 Sep 2010 00:18:31 +1000 (EST) Received: (qmail 18735 invoked by alias); 23 Sep 2010 14:18:29 -0000 Received: (qmail 18719 invoked by uid 22791); 23 Sep 2010 14:18:27 -0000 X-SWARE-Spam-Status: No, hits=-0.5 required=5.0 tests=AWL, BAYES_50, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mx02.qsc.de (HELO mx02.qsc.de) (213.148.130.14) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 23 Sep 2010 14:18:20 +0000 Received: from [192.168.178.22] (port-92-204-109-183.dynamic.qsc.de [92.204.109.183]) by mx02.qsc.de (Postfix) with ESMTP id 15C3F1E562; Thu, 23 Sep 2010 16:18:17 +0200 (CEST) Message-ID: <4C9B61A9.5010903@net-b.de> Date: Thu, 23 Sep 2010 16:18:17 +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: [Patch,Fortran] Update gfortran.texi's Fortran 2008 status 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 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? Currently, the F2003/2008 status looks like: http://gcc.gnu.org/onlinedocs/gfortran/Fortran-2003-and-2008-status.html Attached patch updates the F2008 release status [It is 60.00 (International Standard under publication)] and adds a list of supported Fortran 2008 features (which I copied slightly modified from the 4.4 to 4.6 release notes). OK for check in? Or did you manage to find some of the typos, which I included in the patch and which I should fix before committal? Tobias Index: gcc/fortran/gfortran.texi =================================================================== --- gcc/fortran/gfortran.texi (revision 164563) +++ gcc/fortran/gfortran.texi (working copy) @@ -938,21 +938,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 ---------------------------------------------------------------------