diff options
Diffstat (limited to 'contrib/gcc/f')
-rw-r--r-- | contrib/gcc/f/BUGS | 130 | ||||
-rw-r--r-- | contrib/gcc/f/NEWS | 531 | ||||
-rw-r--r-- | contrib/gcc/f/g77.1 | 1719 |
3 files changed, 0 insertions, 2380 deletions
diff --git a/contrib/gcc/f/BUGS b/contrib/gcc/f/BUGS deleted file mode 100644 index acfe4abf4b93..000000000000 --- a/contrib/gcc/f/BUGS +++ /dev/null @@ -1,130 +0,0 @@ -_Note:_ This file is automatically generated from the files -`bugs0.texi' and `bugs.texi'. `BUGS' is _not_ a source file, although -it is normally included within source distributions. - - This file lists known bugs in the GCC-3.2 version of the GNU Fortran -compiler. Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 Free -Software Foundation, Inc. You may copy, distribute, and modify it -freely as long as you preserve this copyright notice and permission -notice. - -Known Bugs In GNU Fortran -************************* - - This section identifies bugs that `g77' _users_ might run into in -the GCC-3.2 version of `g77'. This includes bugs that are actually in -the `gcc' back end (GBE) or in `libf2c', because those sets of code are -at least somewhat under the control of (and necessarily intertwined -with) `g77', so it isn't worth separating them out. - - For information on bugs in _other_ versions of `g77', see -`gcc/gcc/f/NEWS'. There, lists of bugs fixed in various versions of -`g77' can help determine what bugs existed in prior versions. - - An online, "live" version of this document (derived directly from -the mainline, development version of `g77' within `gcc') is available -via `http://www.gnu.org/software/gcc/onlinedocs/g77/Trouble.html'. -Follow the "Known Bugs" link. - - The following information was last updated on 2002-02-01: - - * `g77' fails to warn about use of a "live" iterative-DO variable as - an implied-DO variable in a `WRITE' or `PRINT' statement (although - it does warn about this in a `READ' statement). - - * Something about `g77''s straightforward handling of label - references and definitions sometimes prevents the GBE from - unrolling loops. Until this is solved, try inserting or removing - `CONTINUE' statements as the terminal statement, using the `END DO' - form instead, and so on. - - * Some confusion in diagnostics concerning failing `INCLUDE' - statements from within `INCLUDE''d or `#include''d files. - - * `g77' assumes that `INTEGER(KIND=1)' constants range from `-2**31' - to `2**31-1' (the range for two's-complement 32-bit values), - instead of determining their range from the actual range of the - type for the configuration (and, someday, for the constant). - - Further, it generally doesn't implement the handling of constants - very well in that it makes assumptions about the configuration - that it no longer makes regarding variables (types). - - Included with this item is the fact that `g77' doesn't recognize - that, on IEEE-754/854-compliant systems, `0./0.' should produce a - NaN and no warning instead of the value `0.' and a warning. - - * `g77' uses way too much memory and CPU time to process large - aggregate areas having any initialized elements. - - For example, `REAL A(1000000)' followed by `DATA A(1)/1/' takes up - way too much time and space, including the size of the generated - assembler file. - - Version 0.5.18 improves cases like this--specifically, cases of - _sparse_ initialization that leave large, contiguous areas - uninitialized--significantly. However, even with the - improvements, these cases still require too much memory and CPU - time. - - (Version 0.5.18 also improves cases where the initial values are - zero to a much greater degree, so if the above example ends with - `DATA A(1)/0/', the compile-time performance will be about as good - as it will ever get, aside from unrelated improvements to the - compiler.) - - Note that `g77' does display a warning message to notify the user - before the compiler appears to hang. - - * When debugging, after starting up the debugger but before being - able to see the source code for the main program unit, the user - must currently set a breakpoint at `MAIN__' (or `MAIN___' or - `MAIN_' if `MAIN__' doesn't exist) and run the program until it - hits the breakpoint. At that point, the main program unit is - activated and about to execute its first executable statement, but - that's the state in which the debugger should start up, as is the - case for languages like C. - - * Debugging `g77'-compiled code using debuggers other than `gdb' is - likely not to work. - - Getting `g77' and `gdb' to work together is a known - problem--getting `g77' to work properly with other debuggers, for - which source code often is unavailable to `g77' developers, seems - like a much larger, unknown problem, and is a lower priority than - making `g77' and `gdb' work together properly. - - On the other hand, information about problems other debuggers have - with `g77' output might make it easier to properly fix `g77', and - perhaps even improve `gdb', so it is definitely welcome. Such - information might even lead to all relevant products working - together properly sooner. - - * `g77' doesn't work perfectly on 64-bit configurations such as the - Digital Semiconductor ("DEC") Alpha. - - This problem is largely resolved as of version 0.5.23. - - * `g77' currently inserts needless padding for things like `COMMON - A,IPAD' where `A' is `CHARACTER*1' and `IPAD' is `INTEGER(KIND=1)' - on machines like x86, because the back end insists that `IPAD' be - aligned to a 4-byte boundary, but the processor has no such - requirement (though it is usually good for performance). - - The `gcc' back end needs to provide a wider array of - specifications of alignment requirements and preferences for - targets, and front ends like `g77' should take advantage of this - when it becomes available. - - * The `libf2c' routines that perform some run-time arithmetic on - `COMPLEX' operands were modified circa version 0.5.20 of `g77' to - work properly even in the presence of aliased operands. - - While the `g77' and `netlib' versions of `libf2c' differ on how - this is accomplished, the main differences are that we believe the - `g77' version works properly even in the presence of _partially_ - aliased operands. - - However, these modifications have reduced performance on targets - such as x86, due to the extra copies of operands involved. - diff --git a/contrib/gcc/f/NEWS b/contrib/gcc/f/NEWS deleted file mode 100644 index cc73668ebd7a..000000000000 --- a/contrib/gcc/f/NEWS +++ /dev/null @@ -1,531 +0,0 @@ -_Note:_ This file is automatically generated from the files -`news0.texi' and `news.texi'. `NEWS' is _not_ a source file, although -it is normally included within source distributions. - - This file lists news about the GCC-3.2 version (and some other -versions) of the GNU Fortran compiler. Copyright (C) -1995,1996,1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc. -You may copy, distribute, and modify it freely as long as you preserve -this copyright notice and permission notice. - -News About GNU Fortran -********************** - - Changes made to recent versions of GNU Fortran are listed below, -with the most recent version first. - - The changes are generally listed in order: - - 1. Code-generation and run-time-library bug-fixes - - 2. Compiler and run-time-library crashes involving valid code that - have been fixed - - 3. New features - - 4. Fixes and enhancements to existing features - - 5. New diagnostics - - 6. Internal improvements - - 7. Miscellany - - This order is not strict--for example, some items involve a -combination of these elements. - - Note that two variants of `g77' are tracked below. The `egcs' -variant is described vis-a-vis previous versions of `egcs' and/or an -official FSF version, as appropriate. Note that all such variants are -obsolete _as of July 1999_ - the information is retained here only for -its historical value. - - Therefore, `egcs' versions sometimes have multiple listings to help -clarify how they differ from other versions, though this can make -getting a complete picture of what a particular `egcs' version contains -somewhat more difficult. - - An online, "live" version of this document (derived directly from -the mainline, development version of `g77' within `gcc') is available at -`http://www.gnu.org/software/gcc/onlinedocs/g77/News.html'. - - The following information was last updated on 2002-10-28: - -In `GCC' 3.2 versus `GCC' 3.1: -============================== - - * Problem Reports fixed (in chronological order of submission): - `8308' - gcc-3.x does not compile files with suffix .r (RATFOR) [Fixed - in 3.2.1] - -In `GCC' 3.1 (formerly known as g77-0.5.27) versus `GCC' 3.0: -============================================================= - - * Problem Reports fixed (in chronological order of submission): - `947' - Data statement initialization with subscript of kind INTEGER*2 - - `3743' - Reference to intrinsic `ISHFT' invalid - - `3807' - Function BESJN(integer,double) problems - - `3957' - g77 -pipe -xf77-cpp-input sends output to stdout - - `4279' - g77 -h" gives bogus output - - `4730' - ICE on valid input using CALL EXIT(%VAL(...)) - - `4752' - g77 -v -c -xf77-version /dev/null -xnone causes ice - - `4885' - BACKSPACE example that doesn't work as of gcc/g77-3.0.x - - `5122' - g77 rejects accepted use of INTEGER*2 as type of DATA - statement loop index - - `5397' - ICE on compiling source with 540 000 000 REAL array - - `5473' - ICE on BESJN(integer*8,real) - - `5837' - bug in loop unrolling - - * `g77' now has its man page generated from the texinfo - documentation, to guarantee that it remains up to date. - - * `g77' used to reject the following program on 32-bit targets: - PROGRAM PROG - DIMENSION A(140 000 000) - END - with the message: - prog.f: In program `prog': - prog.f:2: - DIMENSION A(140 000 000) - ^ - Array `a' at (^) is too large to handle - because 140 000 000 REALs is larger than the largest bit-extent - that can be expressed in 32 bits. However, bit-sizes never play a - role after offsets have been converted to byte addresses. - Therefore this check has been removed, and the limit is now 2 - Gbyte of memory (around 530 000 000 REALs). Note: On GNU/Linux - systems one has to compile programs that occupy more than 1 Gbyte - statically, i.e. `g77 -static ...'. - - * Based on work done by Juergen Pfeifer (<juergen.pfeifer@gmx.net>) - libf2c is now a shared library. One can still link in all objects - with the program by specifying the `-static' option. - - * Robert Anderson (<rwa@alumni.princeton.edu>) thought up a two line - change that enables g77 to compile such code as: - SUBROUTINE SUB(A, N) - DIMENSION N(2) - DIMENSION A(N(1),N(2)) - A(1,1) = 1. - END - Note the use of array elements in the bounds of the adjustable - array A. - - * George Helffrich (<george@geo.titech.ac.jp>) implemented a change - in substring index checking (when specifying `-fbounds-check') - that permits the use of zero length substrings of the form - `string(1:0)'. - - * Based on code developed by Pedro Vazquez - (<vazquez@penelope.iqm.unicamp.br>), the `libf2c' library is now - able to read and write files larger than 2 Gbyte on 32-bit target - machines, if the operating system supports this. - -In 0.5.26, `GCC' 3.0 versus `GCC' 2.95: -======================================= - - * When a REWIND was issued after a WRITE statement on an unformatted - file, the implicit truncation was performed by copying the - truncated file to /tmp and copying the result back. This has been - fixed by using the `ftruncate' OS function. Thanks go to the - GAMESS developers for bringing this to our attention. - - * Using options `-g', `-ggdb' or `-gdwarf[-2]' (where appropriate - for your target) now also enables debugging information for COMMON - BLOCK and EQUIVALENCE items to be emitted. Thanks go to Andrew - Vaught (<andy@xena.eas.asu.edu>) and George Helffrich - (<george@geology.bristol.ac.uk>) for fixing this longstanding - problem. - - * It is not necessary anymore to use the option `-femulate-complex' - to compile Fortran code using COMPLEX arithmetic, even on 64-bit - machines (like the Alpha). This will improve code generation. - - * INTRINSIC arithmetic functions are now treated as routines that do - not depend on anything but their argument(s). This enables - further instruction scheduling, because it is known that they - cannot read or modify arbitrary locations. - - * Upgrade to `libf2c' as of 2000-12-05. - - This fixes a bug where a namelist containing initialization of - LOGICAL items and a variable starting with T or F would be read - incorrectly. - - * The `TtyNam' intrinsics now set NAME to all spaces (at run time) - if the system has no `ttyname' implementation available. - - * Upgrade to `libf2c' as of 1999-06-28. - - This fixes a bug whereby input to a `NAMELIST' read involving a - repeat count, such as `K(5)=10*3', was not properly handled by - `libf2c'. The first item was written to `K(5)', but the remaining - nine were written elsewhere (still within the array), not - necessarily starting at `K(6)'. - -In 0.5.25, `GCC' 2.95 (`EGCS' 1.2) versus `EGCS' 1.1.2: -======================================================= - - * `g77' no longer generates bad code for assignments, or other - conversions, of `REAL' or `COMPLEX' constant expressions to type - `INTEGER(KIND=2)' (often referred to as `INTEGER*8'). - - For example, `INTEGER*8 J; J = 4E10' now works as documented. - - * `g77' no longer truncates `INTEGER(KIND=2)' (usually `INTEGER*8') - subscript expressions when evaluating array references on systems - with pointers widers than `INTEGER(KIND=1)' (such as Alphas). - - * `g77' no longer generates bad code for an assignment to a - `COMPLEX' variable or array that partially overlaps one or more of - the sources of the same assignment (a very rare construction). It - now assigns through a temporary, in cases where such partial - overlap is deemed possible. - - * `libg2c' (`libf2c') no longer loses track of the file being worked - on during a `BACKSPACE' operation. - - * `libg2c' (`libf2c') fixes a bug whereby input to a `NAMELIST' read - involving a repeat count, such as `K(5)=10*3', was not properly - handled by `libf2c'. The first item was written to `K(5)', but - the remaining nine were written elsewhere (still within the array), - not necessarily starting at `K(6)'. - - * Automatic arrays now seem to be working on HP-UX systems. - - * The `Date' intrinsic now returns the correct result on big-endian - systems. - - * Fix `g77' so it no longer crashes when compiling I/O statements - using keywords that define `INTEGER' values, such as `IOSTAT=J', - where J is other than default `INTEGER' (such as `INTEGER*2'). - Instead, it issues a diagnostic. - - * Fix `g77' so it properly handles `DATA A/RPT*VAL/', where RPT is - not default `INTEGER', such as `INTEGER*2', instead of producing a - spurious diagnostic. Also fix `DATA (A(I),I=1,N)', where `N' is - not default `INTEGER' to work instead of crashing `g77'. - - * The `-ax' option is now obeyed when compiling Fortran programs. - (It is passed to the `f771' driver.) - - * The new `-fbounds-check' option causes `g77' to compile run-time - bounds checks of array subscripts, as well as of substring start - and end points. - - * `libg2c' now supports building as multilibbed library, which - provides better support for systems that require options such as - `-mieee' to work properly. - - * Source file names with the suffixes `.FOR' and `.FPP' now are - recognized by `g77' as if they ended in `.for' and `.fpp', - respectively. - - * The order of arguments to the _subroutine_ forms of the `CTime', - `DTime', `ETime', and `TtyNam' intrinsics has been swapped. The - argument serving as the returned value for the corresponding - function forms now is the _second_ argument, making these - consistent with the other subroutine forms of `libU77' intrinsics. - - * `g77' now warns about a reference to an intrinsic that has an - interface that is not Year 2000 (Y2K) compliant. Also, `libg2c' - has been changed to increase the likelihood of catching references - to the implementations of these intrinsics using the `EXTERNAL' - mechanism (which would avoid the new warnings). - - * `g77' now warns about a reference to a function when the - corresponding _subsequent_ function program unit disagrees with - the reference concerning the type of the function. - - * `-fno-emulate-complex' is now the default option. This should - result in improved performance of code that uses the `COMPLEX' - data type. - - * The `-malign-double' option now reliably aligns _all_ - double-precision variables and arrays on Intel x86 targets. - - * Even without the `-malign-double' option, `g77' reliably aligns - local double-precision variables that are not in `EQUIVALENCE' - areas and not `SAVE''d. - - * `g77' now open-codes ("inlines") division of `COMPLEX' operands - instead of generating a run-time call to the `libf2c' routines - `c_div' or `z_div', unless the `-Os' option is specified. - - * `g77' no longer generates code to maintain `errno', a C-language - concept, when performing operations such as the `SqRt' intrinsic. - - * `g77' developers can temporarily use the `-fflatten-arrays' option - to compare how the compiler handles code generation using C-like - constructs as compared to the Fortran-like method constructs - normally used. - - * A substantial portion of the `g77' front end's code-generation - component was rewritten. It now generates code using facilities - more robustly supported by the `gcc' back end. One effect of this - rewrite is that some codes no longer produce a spurious "label LAB - used before containing binding contour" message. - - * Support for the `-fugly' option has been removed. - - * Improve documentation and indexing, including information on Year - 2000 (Y2K) compliance, and providing more information on internals - of the front end. - - * Upgrade to `libf2c' as of 1999-05-10. - -In 0.5.24 versus 0.5.23: -======================== - - There is no `g77' version 0.5.24 at this time, or planned. 0.5.24 -is the version number designated for bug fixes and, perhaps, some new -features added, to 0.5.23. Version 0.5.23 requires `gcc' 2.8.1, as -0.5.24 was planned to require. - - Due to `EGCS' becoming `GCC' (which is now an acronym for "GNU -Compiler Collection"), and `EGCS' 1.2 becoming officially designated -`GCC' 2.95, there seems to be no need for an actual 0.5.24 release. - - To reduce the confusion already resulting from use of 0.5.24 to -designate `g77' versions within `EGCS' versions 1.0 and 1.1, as well as -in versions of `g77' documentation and notices during that period, -"mainline" `g77' version numbering resumes at 0.5.25 with `GCC' 2.95 -(`EGCS' 1.2), skipping over 0.5.24 as a placeholder version number. - - To repeat, there is no `g77' 0.5.24, but there is now a 0.5.25. -Please remain calm and return to your keypunch units. - -In `EGCS' 1.1.2 versus `EGCS' 1.1.1: -==================================== - - * Fix the `IDate' intrinsic (VXT) (in `libg2c') so the returned year - is in the documented, non-Y2K-compliant range of 0-99, instead of - being returned as 100 in the year 2000. - - * Fix the `Date_and_Time' intrinsic (in `libg2c') to return the - milliseconds value properly in VALUES(8). - - * Fix the `LStat' intrinsic (in `libg2c') to return device-ID - information properly in SARRAY(7). - - * Improve documentation. - -In `EGCS' 1.1.1 versus `EGCS' 1.1: -================================== - - * Fix `libg2c' so it performs an implicit `ENDFILE' operation (as - appropriate) whenever a `REWIND' is done. - - (This bug was introduced in 0.5.23 and `egcs' 1.1 in `g77''s - version of `libf2c'.) - - * Fix `libg2c' so it no longer crashes with a spurious diagnostic - upon doing any I/O following a direct formatted write. - - (This bug was introduced in 0.5.23 and `egcs' 1.1 in `g77''s - version of `libf2c'.) - - * Fix `g77' so it no longer crashes compiling references to the - `Rand' intrinsic on some systems. - - * Fix `g77' portion of installation process so it works better on - some systems (those with shells requiring `else true' clauses on - `if' constructs for the completion code to be set properly). - -In `EGCS' 1.1 versus `EGCS' 1.0.3: -================================== - - * Fix bugs in the `libU77' intrinsic `HostNm' that wrote one byte - beyond the end of its `CHARACTER' argument, and in the `libU77' - intrinsics `GMTime' and `LTime' that overwrote their arguments. - - * Assumed arrays with negative bounds (such as `REAL A(-1:*)') no - longer elicit spurious diagnostics from `g77', even on systems - with pointers having different sizes than integers. - - This bug is not known to have existed in any recent version of - `gcc'. It was introduced in an early release of `egcs'. - - * Valid combinations of `EXTERNAL', passing that external as a dummy - argument without explicitly giving it a type, and, in a subsequent - program unit, referencing that external as an external function - with a different type no longer crash `g77'. - - * `CASE DEFAULT' no longer crashes `g77'. - - * The `-Wunused' option no longer issues a spurious warning about - the "master" procedure generated by `g77' for procedures - containing `ENTRY' statements. - - * Support `FORMAT(I<EXPR>)' when EXPR is a compile-time constant - `INTEGER' expression. - - * Fix `g77' `-g' option so procedures that use `ENTRY' can be - stepped through, line by line, in `gdb'. - - * Allow any `REAL' argument to intrinsics `Second' and `CPU_Time'. - - * Use `tempnam', if available, to open scratch files (as in - `OPEN(STATUS='SCRATCH')') so that the `TMPDIR' environment - variable, if present, is used. - - * `g77''s version of `libf2c' separates out the setting of global - state (such as command-line arguments and signal handling) from - `main.o' into distinct, new library archive members. - - This should make it easier to write portable applications that - have their own (non-Fortran) `main()' routine properly set up the - `libf2c' environment, even when `libf2c' (now `libg2c') is a - shared library. - - * `g77' no longer installs the `f77' command and `f77.1' man page in - the `/usr' or `/usr/local' hierarchy, even if the `f77-install-ok' - file exists in the source or build directory. See the - installation documentation for more information. - - * `g77' no longer installs the `libf2c.a' library and `f2c.h' - include file in the `/usr' or `/usr/local' hierarchy, even if the - `f2c-install-ok' or `f2c-exists-ok' files exist in the source or - build directory. See the installation documentation for more - information. - - * The `libf2c.a' library produced by `g77' has been renamed to - `libg2c.a'. It is installed only in the `gcc' "private" directory - hierarchy, `gcc-lib'. This allows system administrators and users - to choose which version of the `libf2c' library from `netlib' they - wish to use on a case-by-case basis. See the installation - documentation for more information. - - * The `f2c.h' include (header) file produced by `g77' has been - renamed to `g2c.h'. It is installed only in the `gcc' "private" - directory hierarchy, `gcc-lib'. This allows system administrators - and users to choose which version of the include file from - `netlib' they wish to use on a case-by-case basis. See the - installation documentation for more information. - - * The `g77' command now expects the run-time library to be named - `libg2c.a' instead of `libf2c.a', to ensure that a version other - than the one built and installed as part of the same `g77' version - is picked up. - - * During the configuration and build process, `g77' creates - subdirectories it needs only as it needs them. Other cleaning up - of the configuration and build process has been performed as well. - - * `install-info' now used to update the directory of Info - documentation to contain an entry for `g77' (during installation). - - * Some diagnostics have been changed from warnings to errors, to - prevent inadvertent use of the resulting, probably buggy, programs. - These mostly include diagnostics about use of unsupported features - in the `OPEN', `INQUIRE', `READ', and `WRITE' statements, and - about truncations of various sorts of constants. - - * Improve compilation of `FORMAT' expressions so that a null byte is - appended to the last operand if it is a constant. This provides a - cleaner run-time diagnostic as provided by `libf2c' for statements - like `PRINT '(I1', 42'. - - * Improve documentation and indexing. - - * The upgrade to `libf2c' as of 1998-06-18 should fix a variety of - problems, including those involving some uses of the `T' format - specifier, and perhaps some build (porting) problems as well. - -In `EGCS' 1.1 versus `g77' 0.5.23: -================================== - - * Fix a code-generation bug that afflicted Intel x86 targets when - `-O2' was specified compiling, for example, an old version of the - `DNRM2' routine. - - The x87 coprocessor stack was being mismanaged in cases involving - assigned `GOTO' and `ASSIGN'. - - * `g77' no longer produces incorrect code and initial values for - `EQUIVALENCE' and `COMMON' aggregates that, due to "unnatural" - ordering of members vis-a-vis their types, require initial padding. - - * Fix `g77' crash compiling code containing the construct - `CMPLX(0.)' or similar. - - * `g77' no longer crashes when compiling code containing - specification statements such as `INTEGER(KIND=7) PTR'. - - * `g77' no longer crashes when compiling code such as `J = SIGNAL(1, - 2)'. - - * `g77' now treats `%LOC(EXPR)' and `LOC(EXPR)' as "ordinary" - expressions when they are used as arguments in procedure calls. - This change applies only to global (filewide) analysis, making it - consistent with how `g77' actually generates code for these cases. - - Previously, `g77' treated these expressions as denoting special - "pointer" arguments for the purposes of filewide analysis. - - * Fix `g77' crash (or apparently infinite run-time) when compiling - certain complicated expressions involving `COMPLEX' arithmetic - (especially multiplication). - - * Align static double-precision variables and arrays on Intel x86 - targets regardless of whether `-malign-double' is specified. - - Generally, this affects only local variables and arrays having the - `SAVE' attribute or given initial values via `DATA'. - - * The `g77' driver now ensures that `-lg2c' is specified in the link - phase prior to any occurrence of `-lm'. This prevents - accidentally linking to a routine in the SunOS4 `-lm' library when - the generated code wants to link to the one in `libf2c' (`libg2c'). - - * `g77' emits more debugging information when `-g' is used. - - This new information allows, for example, `which __g77_length_a' - to be used in `gdb' to determine the type of the phantom length - argument supplied with `CHARACTER' variables. - - This information pertains to internally-generated type, variable, - and other information, not to the longstanding deficiencies - vis-a-vis `COMMON' and `EQUIVALENCE'. - - * The F90 `Date_and_Time' intrinsic now is supported. - - * The F90 `System_Clock' intrinsic allows the optional arguments - (except for the `Count' argument) to be omitted. - - * Upgrade to `libf2c' as of 1998-06-18. - - * Improve documentation and indexing. - -In previous versions: -===================== - - Information on previous versions is not provided in this -`gcc/gcc/f/NEWS' file, to keep it short. See `gcc/gcc/f/news.texi', or -any of its other derivations (Info, HTML, dvi forms) for such -information. - diff --git a/contrib/gcc/f/g77.1 b/contrib/gcc/f/g77.1 deleted file mode 100644 index 91af9e0a5eca..000000000000 --- a/contrib/gcc/f/g77.1 +++ /dev/null @@ -1,1719 +0,0 @@ -.\" Automatically generated by Pod::Man version 1.15 -.\" Wed Feb 5 03:13:59 2003 -.\" -.\" Standard preamble: -.\" ====================================================================== -.de Sh \" Subsection heading -.br -.if t .Sp -.ne 5 -.PP -\fB\\$1\fR -.PP -.. -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Ip \" List item -.br -.ie \\n(.$>=3 .ne \\$3 -.el .ne 3 -.IP "\\$1" \\$2 -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R - -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. | will give a -.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used -.\" to do unbreakable dashes and therefore won't be available. \*(C` and -.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> -.tr \(*W-|\(bv\*(Tr -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -'br\} -.\" -.\" If the F register is turned on, we'll generate index entries on stderr -.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and -.\" index entries marked with X<> in POD. Of course, you'll have to process -.\" the output yourself in some meaningful fashion. -.if \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. nr % 0 -. rr F -.\} -.\" -.\" For nroff, turn off justification. Always turn off hyphenation; it -.\" makes way too many mistakes in technical documents. -.hy 0 -.if n .na -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -.bd B 3 -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ====================================================================== -.\" -.IX Title "G77 1" -.TH G77 1 "gcc-3.2.2" "2003-02-05" "GNU" -.UC -.SH "NAME" -g77 \- \s-1GNU\s0 project Fortran 77 compiler -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -g77 [\fB\-c\fR|\fB\-S\fR|\fB\-E\fR] - [\fB\-g\fR] [\fB\-pg\fR] [\fB\-O\fR\fIlevel\fR] - [\fB\-W\fR\fIwarn\fR...] [\fB\-pedantic\fR] - [\fB\-I\fR\fIdir\fR...] [\fB\-L\fR\fIdir\fR...] - [\fB\-D\fR\fImacro\fR[=\fIdefn\fR]...] [\fB\-U\fR\fImacro\fR] - [\fB\-f\fR\fIoption\fR...] [\fB\-m\fR\fImachine-option\fR...] - [\fB\-o\fR \fIoutfile\fR] \fIinfile\fR... -.PP -Only the most useful options are listed here; see below for the -remainder. -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -The \fBg77\fR command supports all the options supported by the -\&\fBgcc\fR command. -.PP -All \fBgcc\fR and \fBg77\fR options -are accepted both by \fBg77\fR and by \fBgcc\fR -(as well as any other drivers built at the same time, -such as \fBg++\fR), -since adding \fBg77\fR to the \fBgcc\fR distribution -enables acceptance of \fBg77\fR options -by all of the relevant drivers. -.PP -In some cases, options have positive and negative forms; -the negative form of \fB\-ffoo\fR would be \fB\-fno-foo\fR. -This manual documents only one of these two forms, whichever -one is not the default. -.SH "OPTIONS" -.IX Header "OPTIONS" -Here is a summary of all the options specific to \s-1GNU\s0 Fortran, grouped -by type. Explanations are in the following sections. -.Ip "\fIOverall Options\fR" 4 -.IX Item "Overall Options" -\&\fB\-fversion \-fset-g77\-defaults \-fno-silent\fR -.Ip "\fIShorthand Options\fR" 4 -.IX Item "Shorthand Options" -\&\fB\-ff66 \-fno-f66 \-ff77 \-fno-f77 \-fno-ugly\fR -.Ip "\fIFortran Language Options\fR" 4 -.IX Item "Fortran Language Options" -\&\fB\-ffree-form \-fno-fixed-form \-ff90 -\&\-fvxt \-fdollar-ok \-fno-backslash -\&\-fno-ugly-args \-fno-ugly-assign \-fno-ugly-assumed -\&\-fugly-comma \-fugly-complex \-fugly-init \-fugly-logint -\&\-fonetrip \-ftypeless-boz -\&\-fintrin-case-initcap \-fintrin-case-upper -\&\-fintrin-case-lower \-fintrin-case-any -\&\-fmatch-case-initcap \-fmatch-case-upper -\&\-fmatch-case-lower \-fmatch-case-any -\&\-fsource-case-upper \-fsource-case-lower -\&\-fsource-case-preserve -\&\-fsymbol-case-initcap \-fsymbol-case-upper -\&\-fsymbol-case-lower \-fsymbol-case-any -\&\-fcase-strict-upper \-fcase-strict-lower -\&\-fcase-initcap \-fcase-upper \-fcase-lower \-fcase-preserve -\&\-ff2c-intrinsics-delete \-ff2c-intrinsics-hide -\&\-ff2c-intrinsics-disable \-ff2c-intrinsics-enable -\&\-fbadu77\-intrinsics-delete \-fbadu77\-intrinsics-hide -\&\-fbadu77\-intrinsics-disable \-fbadu77\-intrinsics-enable -\&\-ff90\-intrinsics-delete \-ff90\-intrinsics-hide -\&\-ff90\-intrinsics-disable \-ff90\-intrinsics-enable -\&\-fgnu-intrinsics-delete \-fgnu-intrinsics-hide -\&\-fgnu-intrinsics-disable \-fgnu-intrinsics-enable -\&\-fmil-intrinsics-delete \-fmil-intrinsics-hide -\&\-fmil-intrinsics-disable \-fmil-intrinsics-enable -\&\-funix-intrinsics-delete \-funix-intrinsics-hide -\&\-funix-intrinsics-disable \-funix-intrinsics-enable -\&\-fvxt-intrinsics-delete \-fvxt-intrinsics-hide -\&\-fvxt-intrinsics-disable \-fvxt-intrinsics-enable -\&\-ffixed-line-length-\fR\fIn\fR \fB\-ffixed-line-length-none\fR -.Ip "\fIWarning Options\fR" 4 -.IX Item "Warning Options" -\&\fB\-fsyntax-only \-pedantic \-pedantic-errors \-fpedantic -\&\-w \-Wno-globals \-Wimplicit \-Wunused \-Wuninitialized -\&\-Wall \-Wsurprising -\&\-Werror \-W\fR -.Ip "\fIDebugging Options\fR" 4 -.IX Item "Debugging Options" -\&\fB\-g\fR -.Ip "\fIOptimization Options\fR" 4 -.IX Item "Optimization Options" -\&\fB\-malign-double -\&\-ffloat-store \-fforce-mem \-fforce-addr \-fno-inline -\&\-ffast-math \-fstrength-reduce \-frerun-cse-after-loop -\&\-funsafe-math-optimizations \-fno-trapping-math -\&\-fexpensive-optimizations \-fdelayed-branch -\&\-fschedule-insns \-fschedule-insn2 \-fcaller-saves -\&\-funroll-loops \-funroll-all-loops -\&\-fno-move-all-movables \-fno-reduce-all-givs -\&\-fno-rerun-loop-opt\fR -.Ip "\fIDirectory Options\fR" 4 -.IX Item "Directory Options" -\&\fB\-I\fR\fIdir\fR \fB\-I-\fR -.Ip "\fICode Generation Options\fR" 4 -.IX Item "Code Generation Options" -\&\fB\-fno-automatic \-finit-local-zero \-fno-f2c -\&\-ff2c-library \-fno-underscoring \-fno-ident -\&\-fpcc-struct-return \-freg-struct-return -\&\-fshort-double \-fno-common \-fpack-struct -\&\-fzeros \-fno-second-underscore -\&\-femulate-complex -\&\-falias-check \-fargument-alias -\&\-fargument-noalias \-fno-argument-noalias-global -\&\-fno-globals \-fflatten-arrays -\&\-fbounds-check \-ffortran-bounds-check\fR -.PP -Compilation can involve as many as four stages: preprocessing, code -generation (often what is really meant by the term ``compilation''), -assembly, and linking, always in that order. The first three -stages apply to an individual source file, and end by producing an -object file; linking combines all the object files (those newly -compiled, and those specified as input) into an executable file. -.PP -For any given input file, the file name suffix determines what kind of -program is contained in the file\-\-\-that is, the language in which the -program is written is generally indicated by the suffix. -Suffixes specific to \s-1GNU\s0 Fortran are listed below. -.Ip "\fIfile\fR\fB.f\fR" 4 -.IX Item "file.f" -.PD 0 -.Ip "\fIfile\fR\fB.for\fR" 4 -.IX Item "file.for" -.Ip "\fIfile\fR\fB.FOR\fR" 4 -.IX Item "file.FOR" -.PD -Fortran source code that should not be preprocessed. -.Sp -Such source code cannot contain any preprocessor directives, such -as \f(CW\*(C`#include\*(C'\fR, \f(CW\*(C`#define\*(C'\fR, \f(CW\*(C`#if\*(C'\fR, and so on. -.Sp -You can force \fB.f\fR files to be preprocessed by \fBcpp\fR by using -\&\fB\-x f77\-cpp-input\fR. -.Ip "\fIfile\fR\fB.F\fR" 4 -.IX Item "file.F" -.PD 0 -.Ip "\fIfile\fR\fB.fpp\fR" 4 -.IX Item "file.fpp" -.Ip "\fIfile\fR\fB.FPP\fR" 4 -.IX Item "file.FPP" -.PD -Fortran source code that must be preprocessed (by the C preprocessor -\&\fBcpp\fR, which is part of \s-1GNU\s0 \s-1CC\s0). -.Sp -Note that preprocessing is not extended to the contents of -files included by the \f(CW\*(C`INCLUDE\*(C'\fR directive\-\-\-the \f(CW\*(C`#include\*(C'\fR -preprocessor directive must be used instead. -.Ip "\fIfile\fR\fB.r\fR" 4 -.IX Item "file.r" -Ratfor source code, which must be preprocessed by the \fBratfor\fR -command, which is available separately (as it is not yet part of the \s-1GNU\s0 -Fortran distribution). -One version in Fortran, adapted for use with \fBg77\fR is at -<\fBftp://members.aol.com/n8tm/rat7.uue\fR> (of uncertain copyright -status). Another, public domain version in C is at -<\fBhttp://sepwww.stanford.edu/sep/prof/ratfor.shar.2\fR>. -.PP -\&\s-1UNIX\s0 users typically use the \fI\fIfile\fI.f\fR and \fI\fIfile\fI.F\fR -nomenclature. -Users of other operating systems, especially those that cannot -distinguish upper-case -letters from lower-case letters in their file names, typically use -the \fI\fIfile\fI.for\fR and \fI\fIfile\fI.fpp\fR nomenclature. -.PP -Use of the preprocessor \fBcpp\fR allows use of C-like -constructs such as \f(CW\*(C`#define\*(C'\fR and \f(CW\*(C`#include\*(C'\fR, but can -lead to unexpected, even mistaken, results due to Fortran's source file -format. -It is recommended that use of the C preprocessor -be limited to \f(CW\*(C`#include\*(C'\fR and, in -conjunction with \f(CW\*(C`#define\*(C'\fR, only \f(CW\*(C`#if\*(C'\fR and related directives, -thus avoiding in-line macro expansion entirely. -This recommendation applies especially -when using the traditional fixed source form. -With free source form, -fewer unexpected transformations are likely to happen, but use of -constructs such as Hollerith and character constants can nevertheless -present problems, especially when these are continued across multiple -source lines. -These problems result, primarily, from differences between the way -such constants are interpreted by the C preprocessor and by a Fortran -compiler. -.PP -Another example of a problem that results from using the C preprocessor -is that a Fortran comment line that happens to contain any -characters ``interesting'' to the C preprocessor, -such as a backslash at the end of the line, -is not recognized by the preprocessor as a comment line, -so instead of being passed through ``raw'', -the line is edited according to the rules for the preprocessor. -For example, the backslash at the end of the line is removed, -along with the subsequent newline, resulting in the next -line being effectively commented out\-\-\-unfortunate if that -line is a non-comment line of important code! -.PP -\&\fINote:\fR The \fB\-traditional\fR and \fB\-undef\fR flags are supplied -to \fBcpp\fR by default, to help avoid unpleasant surprises. -.PP -This means that \s-1ANSI\s0 C preprocessor features (such as the \fB#\fR -operator) aren't available, and only variables in the C reserved -namespace (generally, names with a leading underscore) are liable to -substitution by C predefines. -Thus, if you want to do system-specific -tests, use, for example, \fB#ifdef _\|_linux_\|_\fR rather than \fB#ifdef linux\fR. -Use the \fB\-v\fR option to see exactly how the preprocessor is invoked. -.PP -Unfortunately, the \fB\-traditional\fR flag will not avoid an error from -anything that \fBcpp\fR sees as an unterminated C comment, such as: -.PP -.Vb 2 -\& C Some Fortran compilers accept /* as starting -\& C an inline comment. -.Ve -The following options that affect overall processing are recognized -by the \fBg77\fR and \fBgcc\fR commands in a \s-1GNU\s0 Fortran installation: -.Ip "\fB\-fversion\fR" 4 -.IX Item "-fversion" -Ensure that the \fBg77\fR version of the compiler phase is reported, -if run, -and, starting in \f(CW\*(C`egcs\*(C'\fR version 1.1, -that internal consistency checks in the \fIf771\fR program are run. -.Sp -This option is supplied automatically when \fB\-v\fR or \fB\*(--verbose\fR -is specified as a command-line option for \fBg77\fR or \fBgcc\fR -and when the resulting commands compile Fortran source files. -.Sp -In \s-1GCC\s0 3.1, this is changed back to the behaviour \fBgcc\fR displays -for \fB.c\fR files. -.Ip "\fB\-fset-g77\-defaults\fR" 4 -.IX Item "-fset-g77-defaults" -\&\fIVersion info:\fR -This option was obsolete as of \f(CW\*(C`egcs\*(C'\fR -version 1.1. -The effect is instead achieved -by the \f(CW\*(C`lang_init_options\*(C'\fR routine -in \fIgcc/gcc/f/com.c\fR. -.Sp -Set up whatever \fBgcc\fR options are to apply to Fortran -compilations, and avoid running internal consistency checks -that might take some time. -.Sp -This option is supplied automatically when compiling Fortran code -via the \fBg77\fR or \fBgcc\fR command. -The description of this option is provided so that users seeing -it in the output of, say, \fBg77 \-v\fR understand why it is -there. -.Sp -Also, developers who run \f(CW\*(C`f771\*(C'\fR directly might want to specify it -by hand to get the same defaults as they would running \f(CW\*(C`f771\*(C'\fR -via \fBg77\fR or \fBgcc\fR -However, such developers should, after linking a new \f(CW\*(C`f771\*(C'\fR -executable, invoke it without this option once, -e.g. via \f(CW\*(C`./f771 \-quiet < /dev/null\*(C'\fR, -to ensure that they have not introduced any -internal inconsistencies (such as in the table of -intrinsics) before proceeding\-\--\fBg77\fR will crash -with a diagnostic if it detects an inconsistency. -.Ip "\fB\-fno-silent\fR" 4 -.IX Item "-fno-silent" -Print (to \f(CW\*(C`stderr\*(C'\fR) the names of the program units as -they are compiled, in a form similar to that used by popular -\&\s-1UNIX\s0 \fBf77\fR implementations and \fBf2c\fR -.Sh "Shorthand Options" -.IX Subsection "Shorthand Options" -The following options serve as ``shorthand'' -for other options accepted by the compiler: -.Ip "\fB\-fugly\fR" 4 -.IX Item "-fugly" -\&\fINote:\fR This option is no longer supported. -The information, below, is provided to aid -in the conversion of old scripts. -.Sp -Specify that certain ``ugly'' constructs are to be quietly accepted. -Same as: -.Sp -.Vb 3 -\& -fugly-args -fugly-assign -fugly-assumed -\& -fugly-comma -fugly-complex -fugly-init -\& -fugly-logint -.Ve -These constructs are considered inappropriate to use in new -or well-maintained portable Fortran code, but widely used -in old code. -.Ip "\fB\-fno-ugly\fR" 4 -.IX Item "-fno-ugly" -Specify that all ``ugly'' constructs are to be noisily rejected. -Same as: -.Sp -.Vb 3 -\& -fno-ugly-args -fno-ugly-assign -fno-ugly-assumed -\& -fno-ugly-comma -fno-ugly-complex -fno-ugly-init -\& -fno-ugly-logint -.Ve -.Ip "\fB\-ff66\fR" 4 -.IX Item "-ff66" -Specify that the program is written in idiomatic \s-1FORTRAN\s0 66. -Same as \fB\-fonetrip \-fugly-assumed\fR. -.Sp -The \fB\-fno-f66\fR option is the inverse of \fB\-ff66\fR. -As such, it is the same as \fB\-fno-onetrip \-fno-ugly-assumed\fR. -.Sp -The meaning of this option is likely to be refined as future -versions of \fBg77\fR provide more compatibility with other -existing and obsolete Fortran implementations. -.Ip "\fB\-ff77\fR" 4 -.IX Item "-ff77" -Specify that the program is written in idiomatic \s-1UNIX\s0 \s-1FORTRAN\s0 77 -and/or the dialect accepted by the \fBf2c\fR product. -Same as \fB\-fbackslash \-fno-typeless-boz\fR. -.Sp -The meaning of this option is likely to be refined as future -versions of \fBg77\fR provide more compatibility with other -existing and obsolete Fortran implementations. -.Ip "\fB\-fno-f77\fR" 4 -.IX Item "-fno-f77" -The \fB\-fno-f77\fR option is \fInot\fR the inverse -of \fB\-ff77\fR. -It specifies that the program is not written in idiomatic \s-1UNIX\s0 -\&\s-1FORTRAN\s0 77 or \fBf2c\fR but in a more widely portable dialect. -\&\fB\-fno-f77\fR is the same as \fB\-fno-backslash\fR. -.Sp -The meaning of this option is likely to be refined as future -versions of \fBg77\fR provide more compatibility with other -existing and obsolete Fortran implementations. -.Sh "Options Controlling Fortran Dialect" -.IX Subsection "Options Controlling Fortran Dialect" -The following options control the dialect of Fortran -that the compiler accepts: -.Ip "\fB\-ffree-form\fR" 4 -.IX Item "-ffree-form" -.PD 0 -.Ip "\fB\-fno-fixed-form\fR" 4 -.IX Item "-fno-fixed-form" -.PD -Specify that the source file is written in free form -(introduced in Fortran 90) instead of the more-traditional fixed form. -.Ip "\fB\-ff90\fR" 4 -.IX Item "-ff90" -Allow certain Fortran-90 constructs. -.Sp -This option controls whether certain -Fortran 90 constructs are recognized. -(Other Fortran 90 constructs -might or might not be recognized depending on other options such as -\&\fB\-fvxt\fR, \fB\-ff90\-intrinsics-enable\fR, and the -current level of support for Fortran 90.) -.Ip "\fB\-fvxt\fR" 4 -.IX Item "-fvxt" -Specify the treatment of certain constructs that have different -meanings depending on whether the code is written in -\&\s-1GNU\s0 Fortran (based on \s-1FORTRAN\s0 77 and akin to Fortran 90) -or \s-1VXT\s0 Fortran (more like \s-1VAX\s0 \s-1FORTRAN\s0). -.Sp -The default is \fB\-fno-vxt\fR. -\&\fB\-fvxt\fR specifies that the \s-1VXT\s0 Fortran interpretations -for those constructs are to be chosen. -.Ip "\fB\-fdollar-ok\fR" 4 -.IX Item "-fdollar-ok" -Allow \fB$\fR as a valid character in a symbol name. -.Ip "\fB\-fno-backslash\fR" 4 -.IX Item "-fno-backslash" -Specify that \fB\e\fR is not to be specially interpreted in character -and Hollerith constants a la C and many \s-1UNIX\s0 Fortran compilers. -.Sp -For example, with \fB\-fbackslash\fR in effect, \fBA\enB\fR specifies -three characters, with the second one being newline. -With \fB\-fno-backslash\fR, it specifies four characters, -\&\fBA\fR, \fB\e\fR, \fBn\fR, and \fBB\fR. -.Sp -Note that \fBg77\fR implements a fairly general form of backslash -processing that is incompatible with the narrower forms supported -by some other compilers. -For example, \fB'A\e003B'\fR is a three-character string in \fBg77\fR -whereas other compilers that support backslash might not support -the three-octal-digit form, and thus treat that string as longer -than three characters. -.Ip "\fB\-fno-ugly-args\fR" 4 -.IX Item "-fno-ugly-args" -Disallow passing Hollerith and typeless constants as actual -arguments (for example, \fB\s-1CALL\s0 FOO(4HABCD)\fR). -.Ip "\fB\-fugly-assign\fR" 4 -.IX Item "-fugly-assign" -Use the same storage for a given variable regardless of -whether it is used to hold an assigned-statement label -(as in \fB\s-1ASSIGN\s0 10 \s-1TO\s0 I\fR) or used to hold numeric data -(as in \fBI = 3\fR). -.Ip "\fB\-fugly-assumed\fR" 4 -.IX Item "-fugly-assumed" -Assume any dummy array with a final dimension specified as \fB1\fR -is really an assumed-size array, as if \fB*\fR had been specified -for the final dimension instead of \fB1\fR. -.Sp -For example, \fB\s-1DIMENSION\s0 X(1)\fR is treated as if it -had read \fB\s-1DIMENSION\s0 X(*)\fR. -.Ip "\fB\-fugly-comma\fR" 4 -.IX Item "-fugly-comma" -In an external-procedure invocation, -treat a trailing comma in the argument list -as specification of a trailing null argument, -and treat an empty argument list -as specification of a single null argument. -.Sp -For example, \fB\s-1CALL\s0 \f(BIFOO\fB\|(,)\fR is treated as -\&\fB\s-1CALL\s0 FOO(%\f(BIVAL\fB\|(0), %\f(BIVAL\fB\|(0))\fR. -That is, \fItwo\fR null arguments are specified -by the procedure call when \fB\-fugly-comma\fR is in force. -And \fBF = \f(BIFUNC()\fB\fR is treated as \fBF = FUNC(%\f(BIVAL\fB\|(0))\fR. -.Sp -The default behavior, \fB\-fno-ugly-comma\fR, is to ignore -a single trailing comma in an argument list. -So, by default, \fB\s-1CALL\s0 FOO(X,)\fR is treated -exactly the same as \fB\s-1CALL\s0 \f(BIFOO\fB\|(X)\fR. -.Ip "\fB\-fugly-complex\fR" 4 -.IX Item "-fugly-complex" -Do not complain about \fBREAL(\fR\fIexpr\fR\fB)\fR or -\&\fBAIMAG(\fR\fIexpr\fR\fB)\fR when \fIexpr\fR is a \f(CW\*(C`COMPLEX\*(C'\fR -type other than \f(CW\*(C`COMPLEX(KIND=1)\*(C'\fR\-\-\-usually -this is used to permit \f(CW\*(C`COMPLEX(KIND=2)\*(C'\fR -(\f(CW\*(C`DOUBLE COMPLEX\*(C'\fR) operands. -.Sp -The \fB\-ff90\fR option controls the interpretation -of this construct. -.Ip "\fB\-fno-ugly-init\fR" 4 -.IX Item "-fno-ugly-init" -Disallow use of Hollerith and typeless constants as initial -values (in \f(CW\*(C`PARAMETER\*(C'\fR and \f(CW\*(C`DATA\*(C'\fR statements), and -use of character constants to -initialize numeric types and vice versa. -.Sp -For example, \fB\s-1DATA\s0 I/'F'/, \s-1CHRVAR/65/\s0, J/4HABCD/\fR is disallowed by -\&\fB\-fno-ugly-init\fR. -.Ip "\fB\-fugly-logint\fR" 4 -.IX Item "-fugly-logint" -Treat \f(CW\*(C`INTEGER\*(C'\fR and \f(CW\*(C`LOGICAL\*(C'\fR variables and -expressions as potential stand-ins for each other. -.Sp -For example, automatic conversion between \f(CW\*(C`INTEGER\*(C'\fR and -\&\f(CW\*(C`LOGICAL\*(C'\fR is enabled, for many contexts, via this option. -.Ip "\fB\-fonetrip\fR" 4 -.IX Item "-fonetrip" -Executable iterative \f(CW\*(C`DO\*(C'\fR loops are to be executed at -least once each time they are reached. -.Sp -\&\s-1ANSI\s0 \s-1FORTRAN\s0 77 and more recent versions of the Fortran standard -specify that the body of an iterative \f(CW\*(C`DO\*(C'\fR loop is not executed -if the number of iterations calculated from the parameters of the -loop is less than 1. -(For example, \fB\s-1DO\s0 10 I = 1, 0\fR.) -Such a loop is called a \fIzero-trip loop\fR. -.Sp -Prior to \s-1ANSI\s0 \s-1FORTRAN\s0 77, many compilers implemented \f(CW\*(C`DO\*(C'\fR loops -such that the body of a loop would be executed at least once, even -if the iteration count was zero. -Fortran code written assuming this behavior is said to require -\&\fIone-trip loops\fR. -For example, some code written to the \s-1FORTRAN\s0 66 standard -expects this behavior from its \f(CW\*(C`DO\*(C'\fR loops, although that -standard did not specify this behavior. -.Sp -The \fB\-fonetrip\fR option specifies that the source \fIfile\fR\|(s) being -compiled require one-trip loops. -.Sp -This option affects only those loops specified by the (iterative) \f(CW\*(C`DO\*(C'\fR -statement and by implied-\f(CW\*(C`DO\*(C'\fR lists in I/O statements. -Loops specified by implied-\f(CW\*(C`DO\*(C'\fR lists in \f(CW\*(C`DATA\*(C'\fR and -specification (non-executable) statements are not affected. -.Ip "\fB\-ftypeless-boz\fR" 4 -.IX Item "-ftypeless-boz" -Specifies that prefix-radix non-decimal constants, such as -\&\fBZ'\s-1ABCD\s0'\fR, are typeless instead of \f(CW\*(C`INTEGER(KIND=1)\*(C'\fR. -.Sp -You can test for yourself whether a particular compiler treats -the prefix form as \f(CW\*(C`INTEGER(KIND=1)\*(C'\fR or typeless by running the -following program: -.Sp -.Vb 6 -\& EQUIVALENCE (I, R) -\& R = Z'ABCD1234' -\& J = Z'ABCD1234' -\& IF (J .EQ. I) PRINT *, 'Prefix form is TYPELESS' -\& IF (J .NE. I) PRINT *, 'Prefix form is INTEGER' -\& END -.Ve -Reports indicate that many compilers process this form as -\&\f(CW\*(C`INTEGER(KIND=1)\*(C'\fR, though a few as typeless, and at least one -based on a command-line option specifying some kind of -compatibility. -.Ip "\fB\-fintrin-case-initcap\fR" 4 -.IX Item "-fintrin-case-initcap" -.PD 0 -.Ip "\fB\-fintrin-case-upper\fR" 4 -.IX Item "-fintrin-case-upper" -.Ip "\fB\-fintrin-case-lower\fR" 4 -.IX Item "-fintrin-case-lower" -.Ip "\fB\-fintrin-case-any\fR" 4 -.IX Item "-fintrin-case-any" -.PD -Specify expected case for intrinsic names. -\&\fB\-fintrin-case-lower\fR is the default. -.Ip "\fB\-fmatch-case-initcap\fR" 4 -.IX Item "-fmatch-case-initcap" -.PD 0 -.Ip "\fB\-fmatch-case-upper\fR" 4 -.IX Item "-fmatch-case-upper" -.Ip "\fB\-fmatch-case-lower\fR" 4 -.IX Item "-fmatch-case-lower" -.Ip "\fB\-fmatch-case-any\fR" 4 -.IX Item "-fmatch-case-any" -.PD -Specify expected case for keywords. -\&\fB\-fmatch-case-lower\fR is the default. -.Ip "\fB\-fsource-case-upper\fR" 4 -.IX Item "-fsource-case-upper" -.PD 0 -.Ip "\fB\-fsource-case-lower\fR" 4 -.IX Item "-fsource-case-lower" -.Ip "\fB\-fsource-case-preserve\fR" 4 -.IX Item "-fsource-case-preserve" -.PD -Specify whether source text other than character and Hollerith constants -is to be translated to uppercase, to lowercase, or preserved as is. -\&\fB\-fsource-case-lower\fR is the default. -.Ip "\fB\-fsymbol-case-initcap\fR" 4 -.IX Item "-fsymbol-case-initcap" -.PD 0 -.Ip "\fB\-fsymbol-case-upper\fR" 4 -.IX Item "-fsymbol-case-upper" -.Ip "\fB\-fsymbol-case-lower\fR" 4 -.IX Item "-fsymbol-case-lower" -.Ip "\fB\-fsymbol-case-any\fR" 4 -.IX Item "-fsymbol-case-any" -.PD -Specify valid cases for user-defined symbol names. -\&\fB\-fsymbol-case-any\fR is the default. -.Ip "\fB\-fcase-strict-upper\fR" 4 -.IX Item "-fcase-strict-upper" -Same as \fB\-fintrin-case-upper \-fmatch-case-upper \-fsource-case-preserve -\&\-fsymbol-case-upper\fR. -(Requires all pertinent source to be in uppercase.) -.Ip "\fB\-fcase-strict-lower\fR" 4 -.IX Item "-fcase-strict-lower" -Same as \fB\-fintrin-case-lower \-fmatch-case-lower \-fsource-case-preserve -\&\-fsymbol-case-lower\fR. -(Requires all pertinent source to be in lowercase.) -.Ip "\fB\-fcase-initcap\fR" 4 -.IX Item "-fcase-initcap" -Same as \fB\-fintrin-case-initcap \-fmatch-case-initcap \-fsource-case-preserve -\&\-fsymbol-case-initcap\fR. -(Requires all pertinent source to be in initial capitals, -as in \fBPrint *,SqRt(Value)\fR.) -.Ip "\fB\-fcase-upper\fR" 4 -.IX Item "-fcase-upper" -Same as \fB\-fintrin-case-any \-fmatch-case-any \-fsource-case-upper -\&\-fsymbol-case-any\fR. -(Maps all pertinent source to uppercase.) -.Ip "\fB\-fcase-lower\fR" 4 -.IX Item "-fcase-lower" -Same as \fB\-fintrin-case-any \-fmatch-case-any \-fsource-case-lower -\&\-fsymbol-case-any\fR. -(Maps all pertinent source to lowercase.) -.Ip "\fB\-fcase-preserve\fR" 4 -.IX Item "-fcase-preserve" -Same as \fB\-fintrin-case-any \-fmatch-case-any \-fsource-case-preserve -\&\-fsymbol-case-any\fR. -(Preserves all case in user-defined symbols, -while allowing any-case matching of intrinsics and keywords. -For example, \fBcall Foo(i,I)\fR would pass two \fIdifferent\fR -variables named \fBi\fR and \fBI\fR to a procedure named \fBFoo\fR.) -.Ip "\fB\-fbadu77\-intrinsics-delete\fR" 4 -.IX Item "-fbadu77-intrinsics-delete" -.PD 0 -.Ip "\fB\-fbadu77\-intrinsics-hide\fR" 4 -.IX Item "-fbadu77-intrinsics-hide" -.Ip "\fB\-fbadu77\-intrinsics-disable\fR" 4 -.IX Item "-fbadu77-intrinsics-disable" -.Ip "\fB\-fbadu77\-intrinsics-enable\fR" 4 -.IX Item "-fbadu77-intrinsics-enable" -.PD -Specify status of \s-1UNIX\s0 intrinsics having inappropriate forms. -\&\fB\-fbadu77\-intrinsics-enable\fR is the default. -.Ip "\fB\-ff2c-intrinsics-delete\fR" 4 -.IX Item "-ff2c-intrinsics-delete" -.PD 0 -.Ip "\fB\-ff2c-intrinsics-hide\fR" 4 -.IX Item "-ff2c-intrinsics-hide" -.Ip "\fB\-ff2c-intrinsics-disable\fR" 4 -.IX Item "-ff2c-intrinsics-disable" -.Ip "\fB\-ff2c-intrinsics-enable\fR" 4 -.IX Item "-ff2c-intrinsics-enable" -.PD -Specify status of f2c-specific intrinsics. -\&\fB\-ff2c-intrinsics-enable\fR is the default. -.Ip "\fB\-ff90\-intrinsics-delete\fR" 4 -.IX Item "-ff90-intrinsics-delete" -.PD 0 -.Ip "\fB\-ff90\-intrinsics-hide\fR" 4 -.IX Item "-ff90-intrinsics-hide" -.Ip "\fB\-ff90\-intrinsics-disable\fR" 4 -.IX Item "-ff90-intrinsics-disable" -.Ip "\fB\-ff90\-intrinsics-enable\fR" 4 -.IX Item "-ff90-intrinsics-enable" -.PD -Specify status of F90\-specific intrinsics. -\&\fB\-ff90\-intrinsics-enable\fR is the default. -.Ip "\fB\-fgnu-intrinsics-delete\fR" 4 -.IX Item "-fgnu-intrinsics-delete" -.PD 0 -.Ip "\fB\-fgnu-intrinsics-hide\fR" 4 -.IX Item "-fgnu-intrinsics-hide" -.Ip "\fB\-fgnu-intrinsics-disable\fR" 4 -.IX Item "-fgnu-intrinsics-disable" -.Ip "\fB\-fgnu-intrinsics-enable\fR" 4 -.IX Item "-fgnu-intrinsics-enable" -.PD -Specify status of Digital's COMPLEX-related intrinsics. -\&\fB\-fgnu-intrinsics-enable\fR is the default. -.Ip "\fB\-fmil-intrinsics-delete\fR" 4 -.IX Item "-fmil-intrinsics-delete" -.PD 0 -.Ip "\fB\-fmil-intrinsics-hide\fR" 4 -.IX Item "-fmil-intrinsics-hide" -.Ip "\fB\-fmil-intrinsics-disable\fR" 4 -.IX Item "-fmil-intrinsics-disable" -.Ip "\fB\-fmil-intrinsics-enable\fR" 4 -.IX Item "-fmil-intrinsics-enable" -.PD -Specify status of MIL-STD-1753\-specific intrinsics. -\&\fB\-fmil-intrinsics-enable\fR is the default. -.Ip "\fB\-funix-intrinsics-delete\fR" 4 -.IX Item "-funix-intrinsics-delete" -.PD 0 -.Ip "\fB\-funix-intrinsics-hide\fR" 4 -.IX Item "-funix-intrinsics-hide" -.Ip "\fB\-funix-intrinsics-disable\fR" 4 -.IX Item "-funix-intrinsics-disable" -.Ip "\fB\-funix-intrinsics-enable\fR" 4 -.IX Item "-funix-intrinsics-enable" -.PD -Specify status of \s-1UNIX\s0 intrinsics. -\&\fB\-funix-intrinsics-enable\fR is the default. -.Ip "\fB\-fvxt-intrinsics-delete\fR" 4 -.IX Item "-fvxt-intrinsics-delete" -.PD 0 -.Ip "\fB\-fvxt-intrinsics-hide\fR" 4 -.IX Item "-fvxt-intrinsics-hide" -.Ip "\fB\-fvxt-intrinsics-disable\fR" 4 -.IX Item "-fvxt-intrinsics-disable" -.Ip "\fB\-fvxt-intrinsics-enable\fR" 4 -.IX Item "-fvxt-intrinsics-enable" -.PD -Specify status of \s-1VXT\s0 intrinsics. -\&\fB\-fvxt-intrinsics-enable\fR is the default. -.Ip "\fB\-ffixed-line-length-\fR\fIn\fR" 4 -.IX Item "-ffixed-line-length-n" -Set column after which characters are ignored in typical fixed-form -lines in the source file, and through which spaces are assumed (as -if padded to that length) after the ends of short fixed-form lines. -.Sp -Popular values for \fIn\fR include 72 (the -standard and the default), 80 (card image), and 132 (corresponds -to ``extended-source'' options in some popular compilers). -\&\fIn\fR may be \fBnone\fR, meaning that the entire line is meaningful -and that continued character constants never have implicit spaces appended -to them to fill out the line. -\&\fB\-ffixed-line-length-0\fR means the same thing as -\&\fB\-ffixed-line-length-none\fR. -.Sh "Options to Request or Suppress Warnings" -.IX Subsection "Options to Request or Suppress Warnings" -Warnings are diagnostic messages that report constructions which -are not inherently erroneous but which are risky or suggest there -might have been an error. -.PP -You can request many specific warnings with options beginning \fB\-W\fR, -for example \fB\-Wimplicit\fR to request warnings on implicit -declarations. Each of these specific warning options also has a -negative form beginning \fB\-Wno-\fR to turn off warnings; -for example, \fB\-Wno-implicit\fR. This manual lists only one of the -two forms, whichever is not the default. -.PP -These options control the amount and kinds of warnings produced by \s-1GNU\s0 -Fortran: -.Ip "\fB\-fsyntax-only\fR" 4 -.IX Item "-fsyntax-only" -Check the code for syntax errors, but don't do anything beyond that. -.Ip "\fB\-pedantic\fR" 4 -.IX Item "-pedantic" -Issue warnings for uses of extensions to \s-1ANSI\s0 \s-1FORTRAN\s0 77. -\&\fB\-pedantic\fR also applies to C-language constructs where they -occur in \s-1GNU\s0 Fortran source files, such as use of \fB\ee\fR in a -character constant within a directive like \fB#include\fR. -.Sp -Valid \s-1ANSI\s0 \s-1FORTRAN\s0 77 programs should compile properly with or without -this option. -However, without this option, certain \s-1GNU\s0 extensions and traditional -Fortran features are supported as well. -With this option, many of them are rejected. -.Sp -Some users try to use \fB\-pedantic\fR to check programs for strict \s-1ANSI\s0 -conformance. -They soon find that it does not do quite what they want\-\-\-it finds some -non-ANSI practices, but not all. -However, improvements to \fBg77\fR in this area are welcome. -.Ip "\fB\-pedantic-errors\fR" 4 -.IX Item "-pedantic-errors" -Like \fB\-pedantic\fR, except that errors are produced rather than -warnings. -.Ip "\fB\-fpedantic\fR" 4 -.IX Item "-fpedantic" -Like \fB\-pedantic\fR, but applies only to Fortran constructs. -.Ip "\fB\-w\fR" 4 -.IX Item "-w" -Inhibit all warning messages. -.Ip "\fB\-Wno-globals\fR" 4 -.IX Item "-Wno-globals" -Inhibit warnings about use of a name as both a global name -(a subroutine, function, or block data program unit, or a -common block) and implicitly as the name of an intrinsic -in a source file. -.Sp -Also inhibit warnings about inconsistent invocations and/or -definitions of global procedures (function and subroutines). -Such inconsistencies include different numbers of arguments -and different types of arguments. -.Ip "\fB\-Wimplicit\fR" 4 -.IX Item "-Wimplicit" -Warn whenever a variable, array, or function is implicitly -declared. -Has an effect similar to using the \f(CW\*(C`IMPLICIT NONE\*(C'\fR statement -in every program unit. -(Some Fortran compilers provide this feature by an option -named \fB\-u\fR or \fB/WARNINGS=DECLARATIONS\fR.) -.Ip "\fB\-Wunused\fR" 4 -.IX Item "-Wunused" -Warn whenever a variable is unused aside from its declaration. -.Ip "\fB\-Wuninitialized\fR" 4 -.IX Item "-Wuninitialized" -Warn whenever an automatic variable is used without first being initialized. -.Sp -These warnings are possible only in optimizing compilation, -because they require data-flow information that is computed only -when optimizing. If you don't specify \fB\-O\fR, you simply won't -get these warnings. -.Sp -These warnings occur only for variables that are candidates for -register allocation. Therefore, they do not occur for a variable -whose address is taken, or whose size -is other than 1, 2, 4 or 8 bytes. Also, they do not occur for -arrays, even when they are in registers. -.Sp -Note that there might be no warning about a variable that is used only -to compute a value that itself is never used, because such -computations may be deleted by data-flow analysis before the warnings -are printed. -.Sp -These warnings are made optional because \s-1GNU\s0 Fortran is not smart -enough to see all the reasons why the code might be correct -despite appearing to have an error. Here is one example of how -this can happen: -.Sp -.Vb 6 -\& SUBROUTINE DISPAT(J) -\& IF (J.EQ.1) I=1 -\& IF (J.EQ.2) I=4 -\& IF (J.EQ.3) I=5 -\& CALL FOO(I) -\& END -.Ve -If the value of \f(CW\*(C`J\*(C'\fR is always 1, 2 or 3, then \f(CW\*(C`I\*(C'\fR is -always initialized, but \s-1GNU\s0 Fortran doesn't know this. Here is -another common case: -.Sp -.Vb 6 -\& SUBROUTINE MAYBE(FLAG) -\& LOGICAL FLAG -\& IF (FLAG) VALUE = 9.4 -\& ... -\& IF (FLAG) PRINT *, VALUE -\& END -.Ve -This has no bug because \f(CW\*(C`VALUE\*(C'\fR is used only if it is set. -.Ip "\fB\-Wall\fR" 4 -.IX Item "-Wall" -The \fB\-Wunused\fR and \fB\-Wuninitialized\fR options combined. -These are all the -options which pertain to usage that we recommend avoiding and that we -believe is easy to avoid. -(As more warnings are added to \fBg77\fR some might -be added to the list enabled by \fB\-Wall\fR.) -.PP -The remaining \fB\-W...\fR options are not implied by \fB\-Wall\fR -because they warn about constructions that we consider reasonable to -use, on occasion, in clean programs. -.Ip "\fB\-Wsurprising\fR" 4 -.IX Item "-Wsurprising" -Warn about ``suspicious'' constructs that are interpreted -by the compiler in a way that might well be surprising to -someone reading the code. -These differences can result in subtle, compiler-dependent -(even machine-dependent) behavioral differences. -The constructs warned about include: -.RS 4 -.Ip "\(bu" 4 -Expressions having two arithmetic operators in a row, such -as \fBX*\-Y\fR. -Such a construct is nonstandard, and can produce -unexpected results in more complicated situations such -as \fBX**\-Y*Z\fR. -\&\fBg77\fR along with many other compilers, interprets -this example differently than many programmers, and a few -other compilers. -Specifically, \fBg77\fR interprets \fBX**\-Y*Z\fR as -\&\fB(X**(\-Y))*Z\fR, while others might think it should -be interpreted as \fBX**(\-(Y*Z))\fR. -.Sp -A revealing example is the constant expression \fB2**\-2*1.\fR, -which \fBg77\fR evaluates to .25, while others might evaluate -it to 0., the difference resulting from the way precedence affects -type promotion. -.Sp -(The \fB\-fpedantic\fR option also warns about expressions -having two arithmetic operators in a row.) -.Ip "\(bu" 4 -Expressions with a unary minus followed by an operand and then -a binary operator other than plus or minus. -For example, \fB\-2**2\fR produces a warning, because -the precedence is \fB\-(2**2)\fR, yielding \-4, not -\&\fB(\-2)**2\fR, which yields 4, and which might represent -what a programmer expects. -.Sp -An example of an expression producing different results -in a surprising way is \fB\-I*S\fR, where \fII\fR holds -the value \fB\-2147483648\fR and \fIS\fR holds \fB0.5\fR. -On many systems, negating \fII\fR results in the same -value, not a positive number, because it is already the -lower bound of what an \f(CW\*(C`INTEGER(KIND=1)\*(C'\fR variable can hold. -So, the expression evaluates to a positive number, while -the ``expected'' interpretation, \fB(\-I)*S\fR, would -evaluate to a negative number. -.Sp -Even cases such as \fB\-I*J\fR produce warnings, -even though, in most configurations and situations, -there is no computational difference between the -results of the two interpretations\-\-\-the purpose -of this warning is to warn about differing interpretations -and encourage a better style of coding, not to identify -only those places where bugs might exist in the user's -code. -.Ip "\(bu" 4 -\&\f(CW\*(C`DO\*(C'\fR loops with \f(CW\*(C`DO\*(C'\fR variables that are not -of integral type\-\-\-that is, using \f(CW\*(C`REAL\*(C'\fR -variables as loop control variables. -Although such loops can be written to work in the -``obvious'' way, the way \fBg77\fR is required by the -Fortran standard to interpret such code is likely to -be quite different from the way many programmers expect. -(This is true of all \f(CW\*(C`DO\*(C'\fR loops, but the differences -are pronounced for non-integral loop control variables.) -.RE -.RS 4 -.RE -.Ip "\fB\-Werror\fR" 4 -.IX Item "-Werror" -Make all warnings into errors. -.Ip "\fB\-W\fR" 4 -.IX Item "-W" -Turns on ``extra warnings'' and, if optimization is specified -via \fB\-O\fR, the \fB\-Wuninitialized\fR option. -(This might change in future versions of \fBg77\fR -.Sp -``Extra warnings'' are issued for: -.RS 4 -.Ip "\(bu" 4 -Unused parameters to a procedure (when \fB\-Wunused\fR also is -specified). -.Ip "\(bu" 4 -Overflows involving floating-point constants (not available -for certain configurations). -.RE -.RS 4 -.RE -.PP -Some of these have no effect when compiling programs written in Fortran: -.Ip "\fB\-Wcomment\fR" 4 -.IX Item "-Wcomment" -.PD 0 -.Ip "\fB\-Wformat\fR" 4 -.IX Item "-Wformat" -.Ip "\fB\-Wparentheses\fR" 4 -.IX Item "-Wparentheses" -.Ip "\fB\-Wswitch\fR" 4 -.IX Item "-Wswitch" -.Ip "\fB\-Wtraditional\fR" 4 -.IX Item "-Wtraditional" -.Ip "\fB\-Wshadow\fR" 4 -.IX Item "-Wshadow" -.Ip "\fB\-Wid-clash-\fR\fIlen\fR" 4 -.IX Item "-Wid-clash-len" -.Ip "\fB\-Wlarger-than-\fR\fIlen\fR" 4 -.IX Item "-Wlarger-than-len" -.Ip "\fB\-Wconversion\fR" 4 -.IX Item "-Wconversion" -.Ip "\fB\-Waggregate-return\fR" 4 -.IX Item "-Waggregate-return" -.Ip "\fB\-Wredundant-decls\fR" 4 -.IX Item "-Wredundant-decls" -.PD -These options all could have some relevant meaning for -\&\s-1GNU\s0 Fortran programs, but are not yet supported. -.Sh "Options for Debugging Your Program or \s-1GNU\s0 Fortran" -.IX Subsection "Options for Debugging Your Program or GNU Fortran" -\&\s-1GNU\s0 Fortran has various special options that are used for debugging -either your program or \fBg77\fR -.Ip "\fB\-g\fR" 4 -.IX Item "-g" -Produce debugging information in the operating system's native format -(stabs, \s-1COFF\s0, \s-1XCOFF\s0, or \s-1DWARF\s0). \s-1GDB\s0 can work with this debugging -information. -.Sp -A sample debugging session looks like this (note the use of the breakpoint): -.Sp -.Vb 24 -\& $ cat gdb.f -\& PROGRAM PROG -\& DIMENSION A(10) -\& DATA A /1.,2.,3.,4.,5.,6.,7.,8.,9.,10./ -\& A(5) = 4. -\& PRINT*,A -\& END -\& $ g77 -g -O gdb.f -\& $ gdb a.out -\& ... -\& (gdb) break MAIN__ -\& Breakpoint 1 at 0x8048e96: file gdb.f, line 4. -\& (gdb) run -\& Starting program: /home/toon/g77-bugs/./a.out -\& Breakpoint 1, MAIN__ () at gdb.f:4 -\& 4 A(5) = 4. -\& Current language: auto; currently fortran -\& (gdb) print a(5) -\& $1 = 5 -\& (gdb) step -\& 5 PRINT*,A -\& (gdb) print a(5) -\& $2 = 4 -\& ... -.Ve -One could also add the setting of the breakpoint and the first run command -to the file \fI.gdbinit\fR in the current directory, to simplify the debugging -session. -.Sh "Options That Control Optimization" -.IX Subsection "Options That Control Optimization" -Most Fortran users will want to use no optimization when -developing and testing programs, and use \fB\-O\fR or \fB\-O2\fR when -compiling programs for late-cycle testing and for production use. -However, note that certain diagnostics\-\-\-such as for uninitialized -variables\-\-\-depend on the flow analysis done by \fB\-O\fR, i.e. you -must use \fB\-O\fR or \fB\-O2\fR to get such diagnostics. -.PP -The following flags have particular applicability when -compiling Fortran programs: -.Ip "\fB\-malign-double\fR" 4 -.IX Item "-malign-double" -(Intel x86 architecture only.) -.Sp -Noticeably improves performance of \fBg77\fR programs making -heavy use of \f(CW\*(C`REAL(KIND=2)\*(C'\fR (\f(CW\*(C`DOUBLE PRECISION\*(C'\fR) data -on some systems. -In particular, systems using Pentium, Pentium Pro, 586, and -686 implementations -of the i386 architecture execute programs faster when -\&\f(CW\*(C`REAL(KIND=2)\*(C'\fR (\f(CW\*(C`DOUBLE PRECISION\*(C'\fR) data are -aligned on 64\-bit boundaries -in memory. -.Sp -This option can, at least, make benchmark results more consistent -across various system configurations, versions of the program, -and data sets. -.Sp -\&\fINote:\fR The warning in the \fBgcc\fR documentation about -this option does not apply, generally speaking, to Fortran -code compiled by \fBg77\fR -.Sp -\&\fIAlso also note:\fR The negative form of \fB\-malign-double\fR -is \fB\-mno-align-double\fR, not \fB\-benign-double\fR. -.Ip "\fB\-ffloat-store\fR" 4 -.IX Item "-ffloat-store" -Might help a Fortran program that depends on exact \s-1IEEE\s0 conformance on -some machines, but might slow down a program that doesn't. -.Sp -This option is effective when the floating-point unit is set to work in -\&\s-1IEEE\s0 854 `extended precision'\-\-\-as it typically is on x86 and m68k \s-1GNU\s0 -systems\-\-\-rather than \s-1IEEE\s0 754 double precision. \fB\-ffloat-store\fR -tries to remove the extra precision by spilling data from floating-point -registers into memory and this typically involves a big performance -hit. However, it doesn't affect intermediate results, so that it is -only partially effective. `Excess precision' is avoided in code like: -.Sp -.Vb 2 -\& a = b + c -\& d = a * e -.Ve -but not in code like: -.Sp -.Vb 1 -\& d = (b + c) * e -.Ve -For another, potentially better, way of controlling the precision, -see \f(CW@ref\fR{Floating-point precision}. -.Ip "\fB\-fforce-mem\fR" 4 -.IX Item "-fforce-mem" -.PD 0 -.Ip "\fB\-fforce-addr\fR" 4 -.IX Item "-fforce-addr" -.PD -Might improve optimization of loops. -.Ip "\fB\-fno-inline\fR" 4 -.IX Item "-fno-inline" -Don't compile statement functions inline. -Might reduce the size of a program unit\-\-\-which might be at -expense of some speed (though it should compile faster). -Note that if you are not optimizing, no functions can be expanded inline. -.Ip "\fB\-ffast-math\fR" 4 -.IX Item "-ffast-math" -Might allow some programs designed to not be too dependent -on \s-1IEEE\s0 behavior for floating-point to run faster, or die trying. -Sets \fB\-funsafe-math-optimizations\fR, and -\&\fB\-fno-trapping-math\fR. -.Ip "\fB\-funsafe-math-optimizations\fR" 4 -.IX Item "-funsafe-math-optimizations" -Allow optimizations that may be give incorrect results -for certain \s-1IEEE\s0 inputs. -.Ip "\fB\-fno-trapping-math\fR" 4 -.IX Item "-fno-trapping-math" -Allow the compiler to assume that floating-point arithmetic -will not generate traps on any inputs. This is useful, for -example, when running a program using \s-1IEEE\s0 \*(L"non-stop\*(R" -floating-point arithmetic. -.Ip "\fB\-fstrength-reduce\fR" 4 -.IX Item "-fstrength-reduce" -Might make some loops run faster. -.Ip "\fB\-frerun-cse-after-loop\fR" 4 -.IX Item "-frerun-cse-after-loop" -.PD 0 -.Ip "\fB\-fexpensive-optimizations\fR" 4 -.IX Item "-fexpensive-optimizations" -.Ip "\fB\-fdelayed-branch\fR" 4 -.IX Item "-fdelayed-branch" -.Ip "\fB\-fschedule-insns\fR" 4 -.IX Item "-fschedule-insns" -.Ip "\fB\-fschedule-insns2\fR" 4 -.IX Item "-fschedule-insns2" -.Ip "\fB\-fcaller-saves\fR" 4 -.IX Item "-fcaller-saves" -.PD -Might improve performance on some code. -.Ip "\fB\-funroll-loops\fR" 4 -.IX Item "-funroll-loops" -Typically improves performance on code using iterative \f(CW\*(C`DO\*(C'\fR loops by -unrolling them and is probably generally appropriate for Fortran, though -it is not turned on at any optimization level. -Note that outer loop unrolling isn't done specifically; decisions about -whether to unroll a loop are made on the basis of its instruction count. -.Sp -Also, no `loop discovery'[1] is done, so only loops written with \f(CW\*(C`DO\*(C'\fR -benefit from loop optimizations, including\-\-\-but not limited -to\-\-\-unrolling. Loops written with \f(CW\*(C`IF\*(C'\fR and \f(CW\*(C`GOTO\*(C'\fR are not -currently recognized as such. This option unrolls only iterative -\&\f(CW\*(C`DO\*(C'\fR loops, not \f(CW\*(C`DO WHILE\*(C'\fR loops. -.Ip "\fB\-funroll-all-loops\fR" 4 -.IX Item "-funroll-all-loops" -Probably improves performance on code using \f(CW\*(C`DO WHILE\*(C'\fR loops by -unrolling them in addition to iterative \f(CW\*(C`DO\*(C'\fR loops. In the absence -of \f(CW\*(C`DO WHILE\*(C'\fR, this option is equivalent to \fB\-funroll-loops\fR -but possibly slower. -.Ip "\fB\-fno-move-all-movables\fR" 4 -.IX Item "-fno-move-all-movables" -.PD 0 -.Ip "\fB\-fno-reduce-all-givs\fR" 4 -.IX Item "-fno-reduce-all-givs" -.Ip "\fB\-fno-rerun-loop-opt\fR" 4 -.IX Item "-fno-rerun-loop-opt" -.PD -In general, the optimizations enabled with these options will lead to -faster code being generated by \s-1GNU\s0 Fortran; hence they are enabled by default -when issuing the \fBg77\fR command. -.Sp -\&\fB\-fmove-all-movables\fR and \fB\-freduce-all-givs\fR will enable -loop optimization to move all loop-invariant index computations in nested -loops over multi-rank array dummy arguments out of these loops. -.Sp -\&\fB\-frerun-loop-opt\fR will move offset calculations resulting -from the fact that Fortran arrays by default have a lower bound of 1 -out of the loops. -.Sp -These three options are intended to be removed someday, once -loop optimization is sufficiently advanced to perform all those -transformations without help from these options. -.Sh "Options Controlling the Preprocessor" -.IX Subsection "Options Controlling the Preprocessor" -These options control the C preprocessor, which is run on each C source -file before actual compilation. -.PP -Some of these options also affect how \fBg77\fR processes the -\&\f(CW\*(C`INCLUDE\*(C'\fR directive. -Since this directive is processed even when preprocessing -is not requested, it is not described in this section. -.PP -However, the \f(CW\*(C`INCLUDE\*(C'\fR directive does not apply -preprocessing to the contents of the included file itself. -.PP -Therefore, any file that contains preprocessor directives -(such as \f(CW\*(C`#include\*(C'\fR, \f(CW\*(C`#define\*(C'\fR, and \f(CW\*(C`#if\*(C'\fR) -must be included via the \f(CW\*(C`#include\*(C'\fR directive, not -via the \f(CW\*(C`INCLUDE\*(C'\fR directive. -Therefore, any file containing preprocessor directives, -if included, is necessarily included by a file that itself -contains preprocessor directives. -.Sh "Options for Directory Search" -.IX Subsection "Options for Directory Search" -These options affect how the \fBcpp\fR preprocessor searches -for files specified via the \f(CW\*(C`#include\*(C'\fR directive. -Therefore, when compiling Fortran programs, they are meaningful -when the preprocessor is used. -.PP -Some of these options also affect how \fBg77\fR searches -for files specified via the \f(CW\*(C`INCLUDE\*(C'\fR directive, -although files included by that directive are not, -themselves, preprocessed. -These options are: -.Ip "\fB\-I-\fR" 4 -.IX Item "-I-" -.PD 0 -.Ip "\fB\-I\fR\fIdir\fR" 4 -.IX Item "-Idir" -.PD -These affect interpretation of the \f(CW\*(C`INCLUDE\*(C'\fR directive -(as well as of the \f(CW\*(C`#include\*(C'\fR directive of the \fBcpp\fR -preprocessor). -.Sp -Note that \fB\-I\fR\fIdir\fR must be specified \fIwithout\fR any -spaces between \fB\-I\fR and the directory name\-\-\-that is, -\&\fB\-Ifoo/bar\fR is valid, but \fB\-I foo/bar\fR -is rejected by the \fBg77\fR compiler (though the preprocessor supports -the latter form). -Also note that the general behavior of \fB\-I\fR and -\&\f(CW\*(C`INCLUDE\*(C'\fR is pretty much the same as of \fB\-I\fR with -\&\f(CW\*(C`#include\*(C'\fR in the \fBcpp\fR preprocessor, with regard to -looking for \fIheader.gcc\fR files and other such things. -.Sh "Options for Code Generation Conventions" -.IX Subsection "Options for Code Generation Conventions" -These machine-independent options control the interface conventions -used in code generation. -.PP -Most of them have both positive and negative forms; the negative form -of \fB\-ffoo\fR would be \fB\-fno-foo\fR. In the table below, only -one of the forms is listed\-\-\-the one which is not the default. You -can figure out the other form by either removing \fBno-\fR or adding -it. -.Ip "\fB\-fno-automatic\fR" 4 -.IX Item "-fno-automatic" -Treat each program unit as if the \f(CW\*(C`SAVE\*(C'\fR statement was specified -for every local variable and array referenced in it. -Does not affect common blocks. -(Some Fortran compilers provide this option under -the name \fB\-static\fR.) -.Ip "\fB\-finit-local-zero\fR" 4 -.IX Item "-finit-local-zero" -Specify that variables and arrays that are local to a program unit -(not in a common block and not passed as an argument) are to be initialized -to binary zeros. -.Sp -Since there is a run-time penalty for initialization of variables -that are not given the \f(CW\*(C`SAVE\*(C'\fR attribute, it might be a -good idea to also use \fB\-fno-automatic\fR with \fB\-finit-local-zero\fR. -.Ip "\fB\-fno-f2c\fR" 4 -.IX Item "-fno-f2c" -Do not generate code designed to be compatible with code generated -by \fBf2c\fR use the \s-1GNU\s0 calling conventions instead. -.Sp -The \fBf2c\fR calling conventions require functions that return -type \f(CW\*(C`REAL(KIND=1)\*(C'\fR to actually return the C type \f(CW\*(C`double\*(C'\fR, -and functions that return type \f(CW\*(C`COMPLEX\*(C'\fR to return the -values via an extra argument in the calling sequence that points -to where to store the return value. -Under the \s-1GNU\s0 calling conventions, such functions simply return -their results as they would in \s-1GNU\s0 C\-\--\f(CW\*(C`REAL(KIND=1)\*(C'\fR functions -return the C type \f(CW\*(C`float\*(C'\fR, and \f(CW\*(C`COMPLEX\*(C'\fR functions -return the \s-1GNU\s0 C type \f(CW\*(C`complex\*(C'\fR (or its \f(CW\*(C`struct\*(C'\fR -equivalent). -.Sp -This does not affect the generation of code that interfaces with the -\&\f(CW\*(C`libg2c\*(C'\fR library. -.Sp -However, because the \f(CW\*(C`libg2c\*(C'\fR library uses \fBf2c\fR -calling conventions, \fBg77\fR rejects attempts to pass -intrinsics implemented by routines in this library as actual -arguments when \fB\-fno-f2c\fR is used, to avoid bugs when -they are actually called by code expecting the \s-1GNU\s0 calling -conventions to work. -.Sp -For example, \fB\s-1INTRINSIC\s0 \s-1ABS\s0;CALL FOO(\s-1ABS\s0)\fR is -rejected when \fB\-fno-f2c\fR is in force. -(Future versions of the \fBg77\fR run-time library might -offer routines that provide GNU-callable versions of the -routines that implement the \fBf2c\fR intrinsics -that may be passed as actual arguments, so that -valid programs need not be rejected when \fB\-fno-f2c\fR -is used.) -.Sp -\&\fBCaution:\fR If \fB\-fno-f2c\fR is used when compiling any -source file used in a program, it must be used when compiling -\&\fIall\fR Fortran source files used in that program. -.Ip "\fB\-ff2c-library\fR" 4 -.IX Item "-ff2c-library" -Specify that use of \f(CW\*(C`libg2c\*(C'\fR (or the original \f(CW\*(C`libf2c\*(C'\fR) -is required. -This is the default for the current version of \fBg77\fR -.Sp -Currently it is not -valid to specify \fB\-fno-f2c-library\fR. -This option is provided so users can specify it in shell -scripts that build programs and libraries that require the -\&\f(CW\*(C`libf2c\*(C'\fR library, even when being compiled by future -versions of \fBg77\fR that might otherwise default to -generating code for an incompatible library. -.Ip "\fB\-fno-underscoring\fR" 4 -.IX Item "-fno-underscoring" -Do not transform names of entities specified in the Fortran -source file by appending underscores to them. -.Sp -With \fB\-funderscoring\fR in effect, \fBg77\fR appends two underscores -to names with underscores and one underscore to external names with -no underscores. (\fBg77\fR also appends two underscores to internal -names with underscores to avoid naming collisions with external names. -The \fB\-fno-second-underscore\fR option disables appending of the -second underscore in all cases.) -.Sp -This is done to ensure compatibility with code produced by many -\&\s-1UNIX\s0 Fortran compilers, including \fBf2c\fR which perform the -same transformations. -.Sp -Use of \fB\-fno-underscoring\fR is not recommended unless you are -experimenting with issues such as integration of (\s-1GNU\s0) Fortran into -existing system environments (vis-a-vis existing libraries, tools, and -so on). -.Sp -For example, with \fB\-funderscoring\fR, and assuming other defaults like -\&\fB\-fcase-lower\fR and that \fB\f(BIj()\fB\fR and \fB\f(BImax_count()\fB\fR are -external functions while \fBmy_var\fR and \fBlvar\fR are local variables, -a statement like -.Sp -.Vb 1 -\& I = J() + MAX_COUNT (MY_VAR, LVAR) -.Ve -is implemented as something akin to: -.Sp -.Vb 1 -\& i = j_() + max_count__(&my_var__, &lvar); -.Ve -With \fB\-fno-underscoring\fR, the same statement is implemented as: -.Sp -.Vb 1 -\& i = j() + max_count(&my_var, &lvar); -.Ve -Use of \fB\-fno-underscoring\fR allows direct specification of -user-defined names while debugging and when interfacing \fBg77\fR -code with other languages. -.Sp -Note that just because the names match does \fInot\fR mean that the -interface implemented by \fBg77\fR for an external name matches the -interface implemented by some other language for that same name. -That is, getting code produced by \fBg77\fR to link to code produced -by some other compiler using this or any other method can be only a -small part of the overall solution\-\-\-getting the code generated by -both compilers to agree on issues other than naming can require -significant effort, and, unlike naming disagreements, linkers normally -cannot detect disagreements in these other areas. -.Sp -Also, note that with \fB\-fno-underscoring\fR, the lack of appended -underscores introduces the very real possibility that a user-defined -external name will conflict with a name in a system library, which -could make finding unresolved-reference bugs quite difficult in some -cases\-\-\-they might occur at program run time, and show up only as -buggy behavior at run time. -.Sp -In future versions of \fBg77\fR we hope to improve naming and linking -issues so that debugging always involves using the names as they appear -in the source, even if the names as seen by the linker are mangled to -prevent accidental linking between procedures with incompatible -interfaces. -.Ip "\fB\-fno-second-underscore\fR" 4 -.IX Item "-fno-second-underscore" -Do not append a second underscore to names of entities specified -in the Fortran source file. -.Sp -This option has no effect if \fB\-fno-underscoring\fR is -in effect. -.Sp -Otherwise, with this option, an external name such as \fB\s-1MAX_COUNT\s0\fR -is implemented as a reference to the link-time external symbol -\&\fBmax_count_\fR, instead of \fBmax_count_\|_\fR. -.Ip "\fB\-fno-ident\fR" 4 -.IX Item "-fno-ident" -Ignore the \fB#ident\fR directive. -.Ip "\fB\-fzeros\fR" 4 -.IX Item "-fzeros" -Treat initial values of zero as if they were any other value. -.Sp -As of version 0.5.18, \fBg77\fR normally treats \f(CW\*(C`DATA\*(C'\fR and -other statements that are used to specify initial values of zero -for variables and arrays as if no values were actually specified, -in the sense that no diagnostics regarding multiple initializations -are produced. -.Sp -This is done to speed up compiling of programs that initialize -large arrays to zeros. -.Sp -Use \fB\-fzeros\fR to revert to the simpler, slower behavior -that can catch multiple initializations by keeping track of -all initializations, zero or otherwise. -.Sp -\&\fICaution:\fR Future versions of \fBg77\fR might disregard this option -(and its negative form, the default) or interpret it somewhat -differently. -The interpretation changes will affect only non-standard -programs; standard-conforming programs should not be affected. -.Ip "\fB\-femulate-complex\fR" 4 -.IX Item "-femulate-complex" -Implement \f(CW\*(C`COMPLEX\*(C'\fR arithmetic via emulation, -instead of using the facilities of -the \fBgcc\fR back end that provide direct support of -\&\f(CW\*(C`complex\*(C'\fR arithmetic. -.Sp -(\fBgcc\fR had some bugs in its back-end support -for \f(CW\*(C`complex\*(C'\fR arithmetic, due primarily to the support not being -completed as of version 2.8.1 and \f(CW\*(C`egcs\*(C'\fR 1.1.2.) -.Sp -Use \fB\-femulate-complex\fR if you suspect code-generation bugs, -or experience compiler crashes, -that might result from \fBg77\fR using the \f(CW\*(C`COMPLEX\*(C'\fR support -in the \fBgcc\fR back end. -If using that option fixes the bugs or crashes you are seeing, -that indicates a likely \fBg77\fR bugs -(though, all compiler crashes are considered bugs), -so, please report it. -(Note that the known bugs, now believed fixed, produced compiler crashes -rather than causing the generation of incorrect code.) -.Sp -Use of this option should not affect how Fortran code compiled -by \fBg77\fR works in terms of its interfaces to other code, -e.g. that compiled by \fBf2c\fR -.Sp -As of \s-1GCC\s0 version 3.0, this option is not necessary anymore. -.Sp -\&\fICaution:\fR Future versions of \fBg77\fR might ignore both forms -of this option. -.Ip "\fB\-falias-check\fR" 4 -.IX Item "-falias-check" -.PD 0 -.Ip "\fB\-fargument-alias\fR" 4 -.IX Item "-fargument-alias" -.Ip "\fB\-fargument-noalias\fR" 4 -.IX Item "-fargument-noalias" -.Ip "\fB\-fno-argument-noalias-global\fR" 4 -.IX Item "-fno-argument-noalias-global" -.PD -\&\fIVersion info:\fR -These options are not supported by -versions of \fBg77\fR based on \fBgcc\fR version 2.8. -.Sp -These options specify to what degree aliasing -(overlap) -is permitted between -arguments (passed as pointers) and \f(CW\*(C`COMMON\*(C'\fR (external, or -public) storage. -.Sp -The default for Fortran code, as mandated by the \s-1FORTRAN\s0 77 and -Fortran 90 standards, is \fB\-fargument-noalias-global\fR. -The default for code written in the C language family is -\&\fB\-fargument-alias\fR. -.Sp -Note that, on some systems, compiling with \fB\-fforce-addr\fR in -effect can produce more optimal code when the default aliasing -options are in effect (and when optimization is enabled). -.Ip "\fB\-fno-globals\fR" 4 -.IX Item "-fno-globals" -Disable diagnostics about inter-procedural -analysis problems, such as disagreements about the -type of a function or a procedure's argument, -that might cause a compiler crash when attempting -to inline a reference to a procedure within a -program unit. -(The diagnostics themselves are still produced, but -as warnings, unless \fB\-Wno-globals\fR is specified, -in which case no relevant diagnostics are produced.) -.Sp -Further, this option disables such inlining, to -avoid compiler crashes resulting from incorrect -code that would otherwise be diagnosed. -.Sp -As such, this option might be quite useful when -compiling existing, ``working'' code that happens -to have a few bugs that do not generally show themselves, -but which \fBg77\fR diagnoses. -.Sp -Use of this option therefore has the effect of -instructing \fBg77\fR to behave more like it did -up through version 0.5.19.1, when it paid little or -no attention to disagreements between program units -about a procedure's type and argument information, -and when it performed no inlining of procedures -(except statement functions). -.Sp -Without this option, \fBg77\fR defaults to performing -the potentially inlining procedures as it started doing -in version 0.5.20, but as of version 0.5.21, it also -diagnoses disagreements that might cause such inlining -to crash the compiler as (fatal) errors, -and warns about similar disagreements -that are currently believed to not -likely to result in the compiler later crashing -or producing incorrect code. -.Ip "\fB\-fflatten-arrays\fR" 4 -.IX Item "-fflatten-arrays" -Use back end's C-like constructs -(pointer plus offset) -instead of its \f(CW\*(C`ARRAY_REF\*(C'\fR construct -to handle all array references. -.Sp -\&\fINote:\fR This option is not supported. -It is intended for use only by \fBg77\fR developers, -to evaluate code-generation issues. -It might be removed at any time. -.Ip "\fB\-fbounds-check\fR" 4 -.IX Item "-fbounds-check" -.PD 0 -.Ip "\fB\-ffortran-bounds-check\fR" 4 -.IX Item "-ffortran-bounds-check" -.PD -Enable generation of run-time checks for array subscripts -and substring start and end points -against the (locally) declared minimum and maximum values. -.Sp -The current implementation uses the \f(CW\*(C`libf2c\*(C'\fR -library routine \f(CW\*(C`s_rnge\*(C'\fR to print the diagnostic. -.Sp -However, whereas \fBf2c\fR generates a single check per -reference for a multi-dimensional array, of the computed -offset against the valid offset range (0 through the size of the array), -\&\fBg77\fR generates a single check per \fIsubscript\fR expression. -This catches some cases of potential bugs that \fBf2c\fR does not, -such as references to below the beginning of an assumed-size array. -.Sp -\&\fBg77\fR also generates checks for \f(CW\*(C`CHARACTER\*(C'\fR substring references, -something \fBf2c\fR currently does not do. -.Sp -Use the new \fB\-ffortran-bounds-check\fR option -to specify bounds-checking for only the Fortran code you are compiling, -not necessarily for code written in other languages. -.Sp -\&\fINote:\fR To provide more detailed information on the offending subscript, -\&\fBg77\fR provides the \f(CW\*(C`libg2c\*(C'\fR run-time library routine \f(CW\*(C`s_rnge\*(C'\fR -with somewhat differently-formatted information. -Here's a sample diagnostic: -.Sp -.Vb 3 -\& Subscript out of range on file line 4, procedure rnge.f/bf. -\& Attempt to access the -6-th element of variable b[subscript-2-of-2]. -\& Aborted -.Ve -The above message indicates that the offending source line is -line 4 of the file \fIrnge.f\fR, -within the program unit (or statement function) named \fBbf\fR. -The offended array is named \fBb\fR. -The offended array dimension is the second for a two-dimensional array, -and the offending, computed subscript expression was \fB\-6\fR. -.Sp -For a \f(CW\*(C`CHARACTER\*(C'\fR substring reference, the second line has -this appearance: -.Sp -.Vb 1 -\& Attempt to access the 11-th element of variable a[start-substring]. -.Ve -This indicates that the offended \f(CW\*(C`CHARACTER\*(C'\fR variable or array -is named \fBa\fR, -the offended substring position is the starting (leftmost) position, -and the offending substring expression is \fB11\fR. -.Sp -(Though the verbage of \f(CW\*(C`s_rnge\*(C'\fR is not ideal -for the purpose of the \fBg77\fR compiler, -the above information should provide adequate diagnostic abilities -to it users.) -.PP -Some of these do \fInot\fR work when compiling programs written in Fortran: -.Ip "\fB\-fpcc-struct-return\fR" 4 -.IX Item "-fpcc-struct-return" -.PD 0 -.Ip "\fB\-freg-struct-return\fR" 4 -.IX Item "-freg-struct-return" -.PD -You should not use these except strictly the same way as you -used them to build the version of \f(CW\*(C`libg2c\*(C'\fR with which -you will be linking all code compiled by \fBg77\fR with the -same option. -.Ip "\fB\-fshort-double\fR" 4 -.IX Item "-fshort-double" -This probably either has no effect on Fortran programs, or -makes them act loopy. -.Ip "\fB\-fno-common\fR" 4 -.IX Item "-fno-common" -Do not use this when compiling Fortran programs, -or there will be Trouble. -.Ip "\fB\-fpack-struct\fR" 4 -.IX Item "-fpack-struct" -This probably will break any calls to the \f(CW\*(C`libg2c\*(C'\fR library, -at the very least, even if it is built with the same option. -.SH "ENVIRONMENT" -.IX Header "ENVIRONMENT" -\&\s-1GNU\s0 Fortran currently does not make use of any environment -variables to control its operation above and beyond those -that affect the operation of \fBgcc\fR. -.SH "BUGS" -.IX Header "BUGS" -For instructions on reporting bugs, see -<\fBhttp://gcc.gnu.org/bugs.html\fR>. Use of the \fBgccbug\fR -script to report bugs is recommended. -.SH "FOOTNOTES" -.IX Header "FOOTNOTES" -.Ip "1." 4 -\&\fIloop discovery\fR refers to the -process by which a compiler, or indeed any reader of a program, -determines which portions of the program are more likely to be executed -repeatedly as it is being run. Such discovery typically is done early -when compiling using optimization techniques, so the ``discovered'' -loops get more attention\-\-\-and more run-time resources, such as -registers\-\-\-from the compiler. It is easy to ``discover'' loops that are -constructed out of looping constructs in the language -(such as Fortran's \f(CW\*(C`DO\*(C'\fR). For some programs, ``discovering'' loops -constructed out of lower-level constructs (such as \f(CW\*(C`IF\*(C'\fR and -\&\f(CW\*(C`GOTO\*(C'\fR) can lead to generation of more optimal code -than otherwise. -.SH "SEE ALSO" -.IX Header "SEE ALSO" -\&\fIgpl\fR\|(7), \fIgfdl\fR\|(7), \fIfsf-funding\fR\|(7), -\&\fIcpp\fR\|(1), \fIgcov\fR\|(1), \fIgcc\fR\|(1), \fIas\fR\|(1), \fIld\fR\|(1), \fIgdb\fR\|(1), \fIadb\fR\|(1), \fIdbx\fR\|(1), \fIsdb\fR\|(1) -and the Info entries for \fIgcc\fR, \fIcpp\fR, \fIg77\fR, \fIas\fR, -\&\fIld\fR, \fIbinutils\fR and \fIgdb\fR. -.SH "AUTHOR" -.IX Header "AUTHOR" -See the Info entry for \fBg77\fR for contributors to \s-1GCC\s0 and G77. -.SH "COPYRIGHT" -.IX Header "COPYRIGHT" -Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002 -Free Software Foundation, Inc. -.PP -Permission is granted to copy, distribute and/or modify this document -under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1 or -any later version published by the Free Software Foundation; with the -Invariant Sections being ``\s-1GNU\s0 General Public License'' and ``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 \fIgfdl\fR\|(7) man page. -.PP -(a) The \s-1FSF\s0's Front-Cover Text is: -.PP -.Vb 1 -\& A GNU Manual -.Ve -(b) The \s-1FSF\s0's Back-Cover Text is: -.PP -.Vb 3 -\& 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. -.Ve |