From patchwork Mon Nov 1 23:56:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 46935 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BDBB23857C62 for ; Mon, 1 Nov 2021 23:58:38 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id BE79A385840D; Mon, 1 Nov 2021 23:57:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BE79A385840D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: wwasl5a8vGWVvFg++9aaTIKyKSbEfhUNPbrke20AQ88X/BuLJ5tkLv5RzO1O/vOshLO3U20PJH DaB3+tTlE+kZsSSpnYJtpDrilGd2fUIrtb7OchzgDKDiNZWC11PGJOPoEgw8Ge6PoQFczGQroG q8NZkCyZCgZGD7Hx7SGSS94XmyDNhQHuP7S75LCOWYvX5cG2pRU2kPXfSW6DBU2VKZOI35vqXR QPzdtKmd4faEcxvoMbbF7kdCQJmsG4lwbZ1gk3JgGZ3pzCBQHrcxOzSh7YnHHiwInJ+AlRImCS 6UglS+TYnHHTXVJMz7CdRGs9 X-IronPort-AV: E=Sophos;i="5.87,201,1631606400"; d="scan'208";a="67917980" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 01 Nov 2021 15:57:27 -0800 IronPort-SDR: 13EQKuouNmkbaNMilK0mKBime2Ya9sMxvmvfuFYXPO/CpXXmCUlX6JBGbaMkZxCsHxeu/Wm2Cy 1ndbkxQSsfGNyiSU//woZjRzfn8SAqgR4AhVgHMs0R6GO8lqnJw4wq5yLSDJ6ut8lycFzlGu7W m+5zmys7dGNlfNdB4EGTQ/q87ZaMb5UrjNiIPpqMM2dy1XU+uxSlRcKl1s3d2sJQ2gS7oJU6gM vD6cFLLGpPz4KYN+hGJMaf1IAaRMqS1jgvUM2M5bGoJz3ChMb9wo3lEf0A+NnRTxxLOHNrKpED OmU= From: Sandra Loosemore To: , Subject: [PATCH 1/5] Fortran manual: Combine standard conformance docs in one place. Date: Mon, 1 Nov 2021 17:56:59 -0600 Message-ID: <20211101235703.112341-2-sandra@codesourcery.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211101235703.112341-1-sandra@codesourcery.com> References: <20211101235703.112341-1-sandra@codesourcery.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-09.mgc.mentorg.com (147.34.90.209) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_ASCII_DIVIDERS, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Discussion of conformance with various revisions of the Fortran standard was split between two separate parts of the manual. This patch moves it all to the introductory chapter. 2021-11-01 Sandra Loosemore gcc/fortran/ * gfortran.texi (Standards): Move discussion of specific standard versions here.... (Fortran standards status): ...from here, and delete this node. --- gcc/fortran/gfortran.texi | 508 +++++++++++++++++++++++----------------------- 1 file changed, 250 insertions(+), 258 deletions(-) diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi index 0ace382..26cf44f 100644 --- a/gcc/fortran/gfortran.texi +++ b/gcc/fortran/gfortran.texi @@ -180,7 +180,6 @@ Part I: Invoking GNU Fortran * Runtime:: Influencing runtime behavior with environment variables. Part II: Language Reference -* Fortran standards status:: Fortran 2003, 2008 and 2018 features supported by GNU Fortran. * Compiler Characteristics:: User-visible implementation details. * Extensions:: Language extensions implemented by GNU Fortran. * Mixed-Language Programming:: Interoperability with C @@ -524,7 +523,10 @@ Fortran 2008 and Fortran 2018. @cindex Standards @menu -* Varying Length Character Strings:: +* Fortran 95 status:: +* Fortran 2003 status:: +* Fortran 2008 status:: +* Fortran 2018 status:: @end menu The GNU Fortran compiler implements @@ -547,8 +549,8 @@ There also is support for the OpenACC specification (targeting version 2.6, @uref{http://www.openacc.org/}). See @uref{https://gcc.gnu.org/wiki/OpenACC} for more information. -@node Varying Length Character Strings -@subsection Varying Length Character Strings +@node Fortran 95 status +@subsection Fortran 95 status @cindex Varying length character strings @cindex Varying length strings @cindex strings, varying length @@ -565,257 +567,8 @@ the features of @code{ISO_VARYING_STRING} and should be considered as replacement. (Namely, allocatable or pointers of the type @code{character(len=:)}.) - -@c ===================================================================== -@c PART I: INVOCATION REFERENCE -@c ===================================================================== - -@tex -\part{I}{Invoking GNU Fortran} -@end tex - -@c --------------------------------------------------------------------- -@c Compiler Options -@c --------------------------------------------------------------------- - -@include invoke.texi - - -@c --------------------------------------------------------------------- -@c Runtime -@c --------------------------------------------------------------------- - -@node Runtime -@chapter Runtime: Influencing runtime behavior with environment variables -@cindex environment variable - -The behavior of the @command{gfortran} can be influenced by -environment variables. - -Malformed environment variables are silently ignored. - -@menu -* TMPDIR:: Directory for scratch files -* GFORTRAN_STDIN_UNIT:: Unit number for standard input -* GFORTRAN_STDOUT_UNIT:: Unit number for standard output -* GFORTRAN_STDERR_UNIT:: Unit number for standard error -* GFORTRAN_UNBUFFERED_ALL:: Do not buffer I/O for all units -* GFORTRAN_UNBUFFERED_PRECONNECTED:: Do not buffer I/O for preconnected units. -* GFORTRAN_SHOW_LOCUS:: Show location for runtime errors -* GFORTRAN_OPTIONAL_PLUS:: Print leading + where permitted -* GFORTRAN_LIST_SEPARATOR:: Separator for list output -* GFORTRAN_CONVERT_UNIT:: Set endianness for unformatted I/O -* GFORTRAN_ERROR_BACKTRACE:: Show backtrace on run-time errors -* GFORTRAN_FORMATTED_BUFFER_SIZE:: Buffer size for formatted files -* GFORTRAN_UNFORMATTED_BUFFER_SIZE:: Buffer size for unformatted files -@end menu - -@node TMPDIR -@section @env{TMPDIR}---Directory for scratch files - -When opening a file with @code{STATUS='SCRATCH'}, GNU Fortran tries to -create the file in one of the potential directories by testing each -directory in the order below. - -@enumerate -@item -The environment variable @env{TMPDIR}, if it exists. - -@item -On the MinGW target, the directory returned by the @code{GetTempPath} -function. Alternatively, on the Cygwin target, the @env{TMP} and -@env{TEMP} environment variables, if they exist, in that order. - -@item -The @code{P_tmpdir} macro if it is defined, otherwise the directory -@file{/tmp}. -@end enumerate - -@node GFORTRAN_STDIN_UNIT -@section @env{GFORTRAN_STDIN_UNIT}---Unit number for standard input - -This environment variable can be used to select the unit number -preconnected to standard input. This must be a positive integer. -The default value is 5. - -@node GFORTRAN_STDOUT_UNIT -@section @env{GFORTRAN_STDOUT_UNIT}---Unit number for standard output - -This environment variable can be used to select the unit number -preconnected to standard output. This must be a positive integer. -The default value is 6. - -@node GFORTRAN_STDERR_UNIT -@section @env{GFORTRAN_STDERR_UNIT}---Unit number for standard error - -This environment variable can be used to select the unit number -preconnected to standard error. This must be a positive integer. -The default value is 0. - -@node GFORTRAN_UNBUFFERED_ALL -@section @env{GFORTRAN_UNBUFFERED_ALL}---Do not buffer I/O on all units - -This environment variable controls whether all I/O is unbuffered. If -the first letter is @samp{y}, @samp{Y} or @samp{1}, all I/O is -unbuffered. This will slow down small sequential reads and writes. If -the first letter is @samp{n}, @samp{N} or @samp{0}, I/O is buffered. -This is the default. - -@node GFORTRAN_UNBUFFERED_PRECONNECTED -@section @env{GFORTRAN_UNBUFFERED_PRECONNECTED}---Do not buffer I/O on preconnected units - -The environment variable named @env{GFORTRAN_UNBUFFERED_PRECONNECTED} controls -whether I/O on a preconnected unit (i.e.@: STDOUT or STDERR) is unbuffered. If -the first letter is @samp{y}, @samp{Y} or @samp{1}, I/O is unbuffered. This -will slow down small sequential reads and writes. If the first letter -is @samp{n}, @samp{N} or @samp{0}, I/O is buffered. This is the default. - -@node GFORTRAN_SHOW_LOCUS -@section @env{GFORTRAN_SHOW_LOCUS}---Show location for runtime errors - -If the first letter is @samp{y}, @samp{Y} or @samp{1}, filename and -line numbers for runtime errors are printed. If the first letter is -@samp{n}, @samp{N} or @samp{0}, do not print filename and line numbers -for runtime errors. The default is to print the location. - -@node GFORTRAN_OPTIONAL_PLUS -@section @env{GFORTRAN_OPTIONAL_PLUS}---Print leading + where permitted - -If the first letter is @samp{y}, @samp{Y} or @samp{1}, -a plus sign is printed -where permitted by the Fortran standard. If the first letter -is @samp{n}, @samp{N} or @samp{0}, a plus sign is not printed -in most cases. Default is not to print plus signs. - -@node GFORTRAN_LIST_SEPARATOR -@section @env{GFORTRAN_LIST_SEPARATOR}---Separator for list output - -This environment variable specifies the separator when writing -list-directed output. It may contain any number of spaces and -at most one comma. If you specify this on the command line, -be sure to quote spaces, as in -@smallexample -$ GFORTRAN_LIST_SEPARATOR=' , ' ./a.out -@end smallexample -when @command{a.out} is the compiled Fortran program that you want to run. -Default is a single space. - -@node GFORTRAN_CONVERT_UNIT -@section @env{GFORTRAN_CONVERT_UNIT}---Set endianness for unformatted I/O - -By setting the @env{GFORTRAN_CONVERT_UNIT} variable, it is possible -to change the representation of data for unformatted files. -The syntax for the @env{GFORTRAN_CONVERT_UNIT} variable is: -@smallexample -GFORTRAN_CONVERT_UNIT: mode | mode ';' exception | exception ; -mode: 'native' | 'swap' | 'big_endian' | 'little_endian' ; -exception: mode ':' unit_list | unit_list ; -unit_list: unit_spec | unit_list unit_spec ; -unit_spec: INTEGER | INTEGER '-' INTEGER ; -@end smallexample -The variable consists of an optional default mode, followed by -a list of optional exceptions, which are separated by semicolons -from the preceding default and each other. Each exception consists -of a format and a comma-separated list of units. Valid values for -the modes are the same as for the @code{CONVERT} specifier: - -@itemize @w{} -@item @code{NATIVE} Use the native format. This is the default. -@item @code{SWAP} Swap between little- and big-endian. -@item @code{LITTLE_ENDIAN} Use the little-endian format -for unformatted files. -@item @code{BIG_ENDIAN} Use the big-endian format for unformatted files. -@end itemize -A missing mode for an exception is taken to mean @code{BIG_ENDIAN}. -Examples of values for @env{GFORTRAN_CONVERT_UNIT} are: -@itemize @w{} -@item @code{'big_endian'} Do all unformatted I/O in big_endian mode. -@item @code{'little_endian;native:10-20,25'} Do all unformatted I/O -in little_endian mode, except for units 10 to 20 and 25, which are in -native format. -@item @code{'10-20'} Units 10 to 20 are big-endian, the rest is native. -@end itemize - -Setting the environment variables should be done on the command -line or via the @command{export} -command for @command{sh}-compatible shells and via @command{setenv} -for @command{csh}-compatible shells. - -Example for @command{sh}: -@smallexample -$ gfortran foo.f90 -$ GFORTRAN_CONVERT_UNIT='big_endian;native:10-20' ./a.out -@end smallexample - -Example code for @command{csh}: -@smallexample -% gfortran foo.f90 -% setenv GFORTRAN_CONVERT_UNIT 'big_endian;native:10-20' -% ./a.out -@end smallexample - -Using anything but the native representation for unformatted data -carries a significant speed overhead. If speed in this area matters -to you, it is best if you use this only for data that needs to be -portable. - -@xref{CONVERT specifier}, for an alternative way to specify the -data representation for unformatted files. @xref{Runtime Options}, for -setting a default data representation for the whole program. The -@code{CONVERT} specifier overrides the @option{-fconvert} compile options. - -@emph{Note that the values specified via the GFORTRAN_CONVERT_UNIT -environment variable will override the CONVERT specifier in the -open statement}. This is to give control over data formats to -users who do not have the source code of their program available. - -@node GFORTRAN_ERROR_BACKTRACE -@section @env{GFORTRAN_ERROR_BACKTRACE}---Show backtrace on run-time errors - -If the @env{GFORTRAN_ERROR_BACKTRACE} variable is set to @samp{y}, -@samp{Y} or @samp{1} (only the first letter is relevant) then a -backtrace is printed when a serious run-time error occurs. To disable -the backtracing, set the variable to @samp{n}, @samp{N}, @samp{0}. -Default is to print a backtrace unless the @option{-fno-backtrace} -compile option was used. - -@node GFORTRAN_FORMATTED_BUFFER_SIZE -@section @env{GFORTRAN_FORMATTED_BUFFER_SIZE}---Set buffer size for formatted I/O - -The @env{GFORTRAN_FORMATTED_BUFFER_SIZE} environment variable -specifies buffer size in bytes to be used for formatted output. -The default value is 8192. - -@node GFORTRAN_UNFORMATTED_BUFFER_SIZE -@section @env{GFORTRAN_UNFORMATTED_BUFFER_SIZE}---Set buffer size for unformatted I/O - -The @env{GFORTRAN_UNFORMATTED_BUFFER_SIZE} environment variable -specifies buffer size in bytes to be used for unformatted output. -The default value is 131072. - -@c ===================================================================== -@c PART II: LANGUAGE REFERENCE -@c ===================================================================== - -@tex -\part{II}{Language Reference} -@end tex - -@c --------------------------------------------------------------------- -@c Fortran standards status -@c --------------------------------------------------------------------- - -@node Fortran standards status -@chapter Fortran standards status - -@menu -* Fortran 2003 status:: -* Fortran 2008 status:: -* Fortran 2018 status:: -@end menu - @node Fortran 2003 status -@section Fortran 2003 status +@subsection Fortran 2003 status GNU Fortran supports several Fortran 2003 features; an incomplete list can be found below. See also the @@ -992,7 +745,7 @@ Renaming of operators in the @code{USE} statement. @node Fortran 2008 status -@section Fortran 2008 status +@subsection 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 @@ -1112,7 +865,7 @@ arrays are supported for named constants (@code{PARAMETER}). @node Fortran 2018 status -@section Status of Fortran 2018 support +@subsection Status of Fortran 2018 support @itemize @item ERROR STOP in a PURE procedure @@ -1131,7 +884,7 @@ specifier now conforms to Fortran 2018. @end itemize -@subsection TS 29113 Status (Further Interoperability with C) +@subsubsection TS 29113 Status (Further Interoperability with C) GNU Fortran supports some of the new features of the Technical Specification (TS) 29113 on Further Interoperability of Fortran with C. @@ -1162,7 +915,7 @@ done in the library. The include file ISO_Fortran_binding.h is can be found in -@subsection TS 18508 Status (Additional Parallel Features) +@subsubsection TS 18508 Status (Additional Parallel Features) GNU Fortran supports the following new features of the Technical Specification 18508 on Additional Parallel Features in Fortran: @@ -1183,6 +936,245 @@ polymorphic components. @end itemize + + +@c ===================================================================== +@c PART I: INVOCATION REFERENCE +@c ===================================================================== + +@tex +\part{I}{Invoking GNU Fortran} +@end tex + +@c --------------------------------------------------------------------- +@c Compiler Options +@c --------------------------------------------------------------------- + +@include invoke.texi + + +@c --------------------------------------------------------------------- +@c Runtime +@c --------------------------------------------------------------------- + +@node Runtime +@chapter Runtime: Influencing runtime behavior with environment variables +@cindex environment variable + +The behavior of the @command{gfortran} can be influenced by +environment variables. + +Malformed environment variables are silently ignored. + +@menu +* TMPDIR:: Directory for scratch files +* GFORTRAN_STDIN_UNIT:: Unit number for standard input +* GFORTRAN_STDOUT_UNIT:: Unit number for standard output +* GFORTRAN_STDERR_UNIT:: Unit number for standard error +* GFORTRAN_UNBUFFERED_ALL:: Do not buffer I/O for all units +* GFORTRAN_UNBUFFERED_PRECONNECTED:: Do not buffer I/O for preconnected units. +* GFORTRAN_SHOW_LOCUS:: Show location for runtime errors +* GFORTRAN_OPTIONAL_PLUS:: Print leading + where permitted +* GFORTRAN_LIST_SEPARATOR:: Separator for list output +* GFORTRAN_CONVERT_UNIT:: Set endianness for unformatted I/O +* GFORTRAN_ERROR_BACKTRACE:: Show backtrace on run-time errors +* GFORTRAN_FORMATTED_BUFFER_SIZE:: Buffer size for formatted files +* GFORTRAN_UNFORMATTED_BUFFER_SIZE:: Buffer size for unformatted files +@end menu + +@node TMPDIR +@section @env{TMPDIR}---Directory for scratch files + +When opening a file with @code{STATUS='SCRATCH'}, GNU Fortran tries to +create the file in one of the potential directories by testing each +directory in the order below. + +@enumerate +@item +The environment variable @env{TMPDIR}, if it exists. + +@item +On the MinGW target, the directory returned by the @code{GetTempPath} +function. Alternatively, on the Cygwin target, the @env{TMP} and +@env{TEMP} environment variables, if they exist, in that order. + +@item +The @code{P_tmpdir} macro if it is defined, otherwise the directory +@file{/tmp}. +@end enumerate + +@node GFORTRAN_STDIN_UNIT +@section @env{GFORTRAN_STDIN_UNIT}---Unit number for standard input + +This environment variable can be used to select the unit number +preconnected to standard input. This must be a positive integer. +The default value is 5. + +@node GFORTRAN_STDOUT_UNIT +@section @env{GFORTRAN_STDOUT_UNIT}---Unit number for standard output + +This environment variable can be used to select the unit number +preconnected to standard output. This must be a positive integer. +The default value is 6. + +@node GFORTRAN_STDERR_UNIT +@section @env{GFORTRAN_STDERR_UNIT}---Unit number for standard error + +This environment variable can be used to select the unit number +preconnected to standard error. This must be a positive integer. +The default value is 0. + +@node GFORTRAN_UNBUFFERED_ALL +@section @env{GFORTRAN_UNBUFFERED_ALL}---Do not buffer I/O on all units + +This environment variable controls whether all I/O is unbuffered. If +the first letter is @samp{y}, @samp{Y} or @samp{1}, all I/O is +unbuffered. This will slow down small sequential reads and writes. If +the first letter is @samp{n}, @samp{N} or @samp{0}, I/O is buffered. +This is the default. + +@node GFORTRAN_UNBUFFERED_PRECONNECTED +@section @env{GFORTRAN_UNBUFFERED_PRECONNECTED}---Do not buffer I/O on preconnected units + +The environment variable named @env{GFORTRAN_UNBUFFERED_PRECONNECTED} controls +whether I/O on a preconnected unit (i.e.@: STDOUT or STDERR) is unbuffered. If +the first letter is @samp{y}, @samp{Y} or @samp{1}, I/O is unbuffered. This +will slow down small sequential reads and writes. If the first letter +is @samp{n}, @samp{N} or @samp{0}, I/O is buffered. This is the default. + +@node GFORTRAN_SHOW_LOCUS +@section @env{GFORTRAN_SHOW_LOCUS}---Show location for runtime errors + +If the first letter is @samp{y}, @samp{Y} or @samp{1}, filename and +line numbers for runtime errors are printed. If the first letter is +@samp{n}, @samp{N} or @samp{0}, do not print filename and line numbers +for runtime errors. The default is to print the location. + +@node GFORTRAN_OPTIONAL_PLUS +@section @env{GFORTRAN_OPTIONAL_PLUS}---Print leading + where permitted + +If the first letter is @samp{y}, @samp{Y} or @samp{1}, +a plus sign is printed +where permitted by the Fortran standard. If the first letter +is @samp{n}, @samp{N} or @samp{0}, a plus sign is not printed +in most cases. Default is not to print plus signs. + +@node GFORTRAN_LIST_SEPARATOR +@section @env{GFORTRAN_LIST_SEPARATOR}---Separator for list output + +This environment variable specifies the separator when writing +list-directed output. It may contain any number of spaces and +at most one comma. If you specify this on the command line, +be sure to quote spaces, as in +@smallexample +$ GFORTRAN_LIST_SEPARATOR=' , ' ./a.out +@end smallexample +when @command{a.out} is the compiled Fortran program that you want to run. +Default is a single space. + +@node GFORTRAN_CONVERT_UNIT +@section @env{GFORTRAN_CONVERT_UNIT}---Set endianness for unformatted I/O + +By setting the @env{GFORTRAN_CONVERT_UNIT} variable, it is possible +to change the representation of data for unformatted files. +The syntax for the @env{GFORTRAN_CONVERT_UNIT} variable is: +@smallexample +GFORTRAN_CONVERT_UNIT: mode | mode ';' exception | exception ; +mode: 'native' | 'swap' | 'big_endian' | 'little_endian' ; +exception: mode ':' unit_list | unit_list ; +unit_list: unit_spec | unit_list unit_spec ; +unit_spec: INTEGER | INTEGER '-' INTEGER ; +@end smallexample +The variable consists of an optional default mode, followed by +a list of optional exceptions, which are separated by semicolons +from the preceding default and each other. Each exception consists +of a format and a comma-separated list of units. Valid values for +the modes are the same as for the @code{CONVERT} specifier: + +@itemize @w{} +@item @code{NATIVE} Use the native format. This is the default. +@item @code{SWAP} Swap between little- and big-endian. +@item @code{LITTLE_ENDIAN} Use the little-endian format +for unformatted files. +@item @code{BIG_ENDIAN} Use the big-endian format for unformatted files. +@end itemize +A missing mode for an exception is taken to mean @code{BIG_ENDIAN}. +Examples of values for @env{GFORTRAN_CONVERT_UNIT} are: +@itemize @w{} +@item @code{'big_endian'} Do all unformatted I/O in big_endian mode. +@item @code{'little_endian;native:10-20,25'} Do all unformatted I/O +in little_endian mode, except for units 10 to 20 and 25, which are in +native format. +@item @code{'10-20'} Units 10 to 20 are big-endian, the rest is native. +@end itemize + +Setting the environment variables should be done on the command +line or via the @command{export} +command for @command{sh}-compatible shells and via @command{setenv} +for @command{csh}-compatible shells. + +Example for @command{sh}: +@smallexample +$ gfortran foo.f90 +$ GFORTRAN_CONVERT_UNIT='big_endian;native:10-20' ./a.out +@end smallexample + +Example code for @command{csh}: +@smallexample +% gfortran foo.f90 +% setenv GFORTRAN_CONVERT_UNIT 'big_endian;native:10-20' +% ./a.out +@end smallexample + +Using anything but the native representation for unformatted data +carries a significant speed overhead. If speed in this area matters +to you, it is best if you use this only for data that needs to be +portable. + +@xref{CONVERT specifier}, for an alternative way to specify the +data representation for unformatted files. @xref{Runtime Options}, for +setting a default data representation for the whole program. The +@code{CONVERT} specifier overrides the @option{-fconvert} compile options. + +@emph{Note that the values specified via the GFORTRAN_CONVERT_UNIT +environment variable will override the CONVERT specifier in the +open statement}. This is to give control over data formats to +users who do not have the source code of their program available. + +@node GFORTRAN_ERROR_BACKTRACE +@section @env{GFORTRAN_ERROR_BACKTRACE}---Show backtrace on run-time errors + +If the @env{GFORTRAN_ERROR_BACKTRACE} variable is set to @samp{y}, +@samp{Y} or @samp{1} (only the first letter is relevant) then a +backtrace is printed when a serious run-time error occurs. To disable +the backtracing, set the variable to @samp{n}, @samp{N}, @samp{0}. +Default is to print a backtrace unless the @option{-fno-backtrace} +compile option was used. + +@node GFORTRAN_FORMATTED_BUFFER_SIZE +@section @env{GFORTRAN_FORMATTED_BUFFER_SIZE}---Set buffer size for formatted I/O + +The @env{GFORTRAN_FORMATTED_BUFFER_SIZE} environment variable +specifies buffer size in bytes to be used for formatted output. +The default value is 8192. + +@node GFORTRAN_UNFORMATTED_BUFFER_SIZE +@section @env{GFORTRAN_UNFORMATTED_BUFFER_SIZE}---Set buffer size for unformatted I/O + +The @env{GFORTRAN_UNFORMATTED_BUFFER_SIZE} environment variable +specifies buffer size in bytes to be used for unformatted output. +The default value is 131072. + +@c ===================================================================== +@c PART II: LANGUAGE REFERENCE +@c ===================================================================== + +@tex +\part{II}{Language Reference} +@end tex + + + @c --------------------------------------------------------------------- @c Compiler Characteristics @c ---------------------------------------------------------------------