@c %**start of header
@setfilename g77.info
-@set last-up-date 1998-08-23
+@set last-up-date 1998-09-01
@set version-g77 0.5.24
@set email-general egcs@@cygnus.com
@set email-bugs egcs-bugs@@cygnus.com
@email{fortran@@gnu.org} asking for a recent copy of the
GNU Fortran @file{.plan} file.
-@heading In @code{egcs} 1.1:
+@heading In @code{egcs} 1.1 (versus 0.5.24):
+@itemize @bullet
+@cindex alignment
+@cindex double-precision performance
+@cindex -malign-double
+@item
+Align static double-precision variables and arrays
+on Intel x86 targets
+regardless of whether @samp{-malign-double} is specified.
+
+Generally, this affects only local variables and arrays
+having the @code{SAVE} attribute
+or given initial values via @code{DATA}.
+@end itemize
+
+@heading In @code{egcs} 1.1 (versus @code{egcs} 1.0.3):
+@itemize @bullet
+@item
+Support @samp{FORMAT(I<@var{expr}>)} when @var{expr} is a
+compile-time constant @code{INTEGER} expression.
+
+@item
+Fix @code{g77} @samp{-g} option so procedures that
+use @samp{ENTRY} can be stepped through, line by line,
+in @code{gdb}.
+
+@item
+Allow any @code{REAL} argument to intrinsics
+@code{Second} and @code{CPU_Time}.
+
+@item
+Use @code{tempnam}, if available, to open scratch files
+(as in @samp{OPEN(STATUS='SCRATCH')})
+so that the @code{TMPDIR} environment variable,
+if present, is used.
+
+@item
+@code{g77}'s version of @code{libf2c} separates out
+the setting of global state
+(such as command-line arguments and signal handling)
+from @file{main.o} into distinct, new library
+archive members.
+
+This should make it easier to write portable applications
+that have their own (non-Fortran) @code{main()} routine
+properly set up the @code{libf2c} environment, even
+when @code{libf2c} (now @code{libg2c}) is a shared library.
+
+@item
+The @code{g77} command now expects the run-time library
+to be named @code{libg2c.a} instead of @code{libf2c.a},
+to ensure that a version other than the one built and
+installed as part of the same @code{g77} version is picked up.
+
+@item
+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 @code{OPEN}, @code{INQUIRE}, @code{READ}, and
+@code{WRITE} statements,
+and about truncations of various sorts of constants.
+@end itemize
+
+@heading In 0.5.24 and @code{egcs} 1.1 (versus 0.5.23):
@itemize @bullet
@item
@code{g77} now treats @samp{%LOC(@var{expr})} and
in @code{libf2c} (@code{libg2c}).
@item
-The F90 @samp{DATE_AND_TIME} intrinsic now is
+@code{g77} emits more debugging information when
+@samp{-g} is used.
+
+This new information allows, for example,
+@kbd{which __g77_length_a} to be used in @code{gdb}
+to determine the type of the phantom length argument
+supplied with @samp{CHARACTER} variables.
+
+This information pertains to internally-generated
+type, variable, and other information,
+not to the longstanding deficiencies vis-a-vis
+@samp{COMMON} and @samp{EQUIVALENCE}.
+
+@item
+The F90 @samp{Date_and_Time} intrinsic now is
supported.
@item
-The F90 @samp{SYSTEM_CLOCK} intrinsic allows
+The F90 @samp{System_Clock} intrinsic allows
the optional arguments (except for the @samp{Count}
argument) to be omitted.
-
-@item
-Upgrade to @code{libf2c} as of 1998-06-18.
@end itemize
@heading In 0.5.23:
and @samp{-fargument-noalias-global},
and the corresponding alias-analysis code.
-(Version 1.0.1 of @code{egcs} has the alias-analysis
+(@code{egcs} has the alias-analysis
code, but not the @code{__restrict__} keyword.
@code{egcs} @code{g77} users benefit from the alias-analysis
code despite the lack of the @code{__restrict__} keyword,
@samp{-freduce-all-givs},
and @samp{-frerun-loop-opt}.
-(Version 1.0.1 of @code{egcs} supports these options.
+(@code{egcs} supports these options.
@code{g77} users of @code{egcs} benefit from them even if
they are not explicitly specified,
because the defaults are optimized for @code{g77} users.)
@heading In 0.5.22:
@itemize @bullet
@item
-Fix @code{SIGNAL} intrinsic so it offers portable
+Fix @code{Signal} intrinsic so it offers portable
support for 64-bit systems (such as Digital Alphas
running GNU/Linux).
@item
Use @code{tempnam}, if available, to open scratch files
-(as in @samp{OPEN(STATUS='SCRATCH')}
+(as in @samp{OPEN(STATUS='SCRATCH')})
so that the @code{TMPDIR} environment variable,
if present, is used.
@samp{-fbadu77-intrinsics-*} options.
@end itemize
+@heading In @code{egcs} 1.0.2 (versus @code{egcs} 1.0.1):
+@itemize @bullet
+@item
+Fix compiler so it accepts @samp{-fgnu-intrinsics-*} and
+@samp{-fbadu77-intrinsics-*} options.
+@end itemize
+
+@heading In @code{egcs} 1.0 (versus 0.5.21):
+@itemize @bullet
+@item
+Version 1.0 of @code{egcs}
+contains several regressions against
+version 0.5.21 of @code{g77},
+due to using the
+``vanilla'' @code{gcc} back end instead of patching
+it to fix a few bugs and improve performance in a
+few cases.
+
+@xref{Actual Bugs,,Actual Bugs We Haven't Fixed Yet},
+available in plain-text format in @code{gcc/f/BUGS},
+for information on the known bugs in this version,
+including the regressions.
+
+Features that have been dropped from this version
+of @code{g77} due to their being implemented
+via @code{g77}-specific patches to the @code{gcc}
+back end in previous releases include:
+
+@itemize --
+@item
+Support for the C-language @code{restrict} keyword.
+
+@item
+Support for the @samp{-W} option warning about
+integer division by zero.
+
+@item
+The Intel x86-specific option @samp{-malign-double}
+applying to stack-allocated data
+as well as statically-allocate data.
+@end itemize
+
+@cindex -@w{}-driver option
+@cindex g77 options, -@w{}-driver
+@cindex options, -@w{}-driver
+@item
+Remove support for the @samp{--driver} option,
+as @code{g77} now does all the driving,
+just like @code{gcc}.
+
+@item
+Allow any numeric argument to intrinsics
+@code{Int2} and @code{Int8}.
+@end itemize
+
@heading In 0.5.21:
@itemize @bullet
@item
that these diagnostics normally would identify.
@item
-Fix @code{libU77} routines that accept file names
-to strip trailing spaces from them, for consistency
+Fix @code{libU77} routines that accept file and other names
+to strip trailing blanks from them, for consistency
with other implementations.
+Blanks may be forcibly appended to such names by
+appending a single null character (@samp{CHAR(0)})
+to the significant trailing blanks.
+
+@item
+Fix @code{CHMOD} intrinsic to work with file names
+that have embedded blanks, commas, and so on.
@item
Fix @code{SIGNAL} intrinsic so it accepts an
@item
Add @code{CPU_TIME} intrinsic.
+@item
+Add @code{ALARM} intrinsic.
+
@item
@code{CTIME} intrinsic now accepts any @code{INTEGER}
argument, not just @code{INTEGER(KIND=2)}.
+
+@item
+@code{g77} driver now prints version information (such as produced
+by @kbd{g77 -v}) to @code{stderr} instead of @code{stdout}.
+
+@item
+The @samp{.r} suffix now designates a Ratfor source file,
+to be preprocessed via the @code{ratfor} command, available
+separately.
@end itemize
@heading In 0.5.20:
@item
Dave Love's implementation of @code{libU77} has been
added to the version of @code{libf2c} distributed with
-and built by @code{g77}.
+and built as part of @code{g77}.
@code{g77} now knows about the routines in this library
as intrinsics.
(holds the same number of bits)
as the character-pointer type on the machine.
-On most systems, this won't make a noticeable difference,
-whereas on Alphas and other systems with 64-bit pointers,
+On most machines, this won't make a difference,
+whereas, on Alphas and other systems with 64-bit pointers,
the @code{INTEGER(KIND=0)} type is equivalent to @code{INTEGER(KIND=2)}
(often referred to as @code{INTEGER*8})
instead of the more common @code{INTEGER(KIND=1)}
to contain the new @code{REALPART}, @code{IMAGPART},
and @code{COMPLEX} intrinsics.
An old group, @samp{dcp}, has been removed.
+
+@item
+Complain about industry-wide ambiguous references
+@samp{REAL(@var{expr})} and @samp{AIMAG(@var{expr})},
+where @var{expr} is @code{DOUBLE COMPLEX} (or any
+complex type other than @code{COMPLEX}), unless
+@samp{-ff90} option specifies Fortran 90 interpretation
+or new @samp{-fugly-complex} option, in conjunction with
+@samp{-fnot-f90}, specifies @code{f2c} interpretation.
@end itemize
@heading In 0.5.19:
@c The text of this file appears in the file BUGS
@c in the G77 distribution, as well as in the G77 manual.
-@c 1998-05-20
+@c 1998-09-01
@ifclear NEWSONLY
@node News
This order is not strict---for example, some items
involve a combination of these elements.
-@heading In @code{egcs} 1.1:
+Note that two variants of @code{g77} are tracked below.
+The @code{egcs} variant is described vis-a-vis
+previous versions of @code{egcs} and/or
+an official FSF version,
+as appropriate.
+
+Therefore, @code{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 @code{egcs} version contains
+somewhat more difficult.
+
+@heading In @code{egcs} 1.1 (versus 0.5.24):
+@itemize @bullet
+@item
+Fix @code{g77} crash compiling code
+containing the construct @samp{CMPLX(0.)} or similar.
+
+@item
+Fix @code{g77} crash
+(or apparently infinite run-time)
+when compiling certain complicated expressions
+involving @code{COMPLEX} arithmetic
+(especially multiplication).
+
+@cindex DNRM2
+@cindex stack, 387 coprocessor
+@cindex Intel x86
+@cindex -O2
+@item
+Fix a code-generation bug that afflicted
+Intel x86 targets when @samp{-O2} was specified
+compiling, for example, an old version of
+the @samp{DNRM2} routine.
+
+The x87 coprocessor stack was being
+mismanaged in cases involving assigned @code{GOTO}
+and @code{ASSIGN}.
+
+@cindex alignment
+@cindex double-precision performance
+@cindex -malign-double
+@item
+Align static double-precision variables and arrays
+on Intel x86 targets
+regardless of whether @samp{-malign-double} is specified.
+
+Generally, this affects only local variables and arrays
+having the @code{SAVE} attribute
+or given initial values via @code{DATA}.
+@end itemize
+
+@heading In @code{egcs} 1.1 (versus @code{egcs} 1.0.3):
+@itemize @bullet
+@item
+Fix bugs in the @code{libU77} intrinsic @samp{HostNm}
+that wrote one byte beyond the end of its @samp{CHARACTER}
+argument,
+and in the @code{libU77} intrinsics
+@samp{GMTime} and @samp{LTime}
+that overwrote their arguments.
+
+@item
+Assumed arrays with negative bounds
+(such as @samp{REAL A(-1:*)})
+no longer elicit spurious diagnostics from @code{g77},
+even on systems with pointers having
+different sizes than integers.
+
+@item
+Valid combinations of @code{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 @code{g77}.
+
+@item
+@code{CASE DEFAULT} no longer crashes @code{g77}.
+
+@item
+The @samp{-Wunused} option no longer issues a spurious
+warning about the ``master'' procedure generated by
+@code{g77} for procedures containing @code{ENTRY} statements.
+
+@item
+Support @samp{FORMAT(I<@var{expr}>)} when @var{expr} is a
+compile-time constant @code{INTEGER} expression.
+
+@item
+Fix @code{g77} @samp{-g} option so procedures that
+use @samp{ENTRY} can be stepped through, line by line,
+in @code{gdb}.
+
+@item
+Allow any @code{REAL} argument to intrinsics
+@code{Second} and @code{CPU_Time}.
+
+@item
+Use @code{tempnam}, if available, to open scratch files
+(as in @samp{OPEN(STATUS='SCRATCH')})
+so that the @code{TMPDIR} environment variable,
+if present, is used.
+
+@item
+@code{g77}'s version of @code{libf2c} separates out
+the setting of global state
+(such as command-line arguments and signal handling)
+from @file{main.o} into distinct, new library
+archive members.
+
+This should make it easier to write portable applications
+that have their own (non-Fortran) @code{main()} routine
+properly set up the @code{libf2c} environment, even
+when @code{libf2c} (now @code{libg2c}) is a shared library.
+
+@item
+@code{g77} no longer installs the @file{f77} command
+and @file{f77.1} man page
+in the @file{/usr} or @file{/usr/local} heirarchy,
+even if the @file{f77-install-ok} file exists
+in the source or build directory.
+See the installation documentation for more information.
+
+@item
+@code{g77} no longer installs the @file{libf2c.a} library
+and @file{f2c.h} include file
+in the @file{/usr} or @file{/usr/local} heirarchy,
+even if the @file{f2c-install-ok} or @file{f2c-exists-ok} files exist
+in the source or build directory.
+See the installation documentation for more information.
+
+@item
+The @file{libf2c.a} library produced by @code{g77} has been
+renamed to @file{libg2c.a}.
+It is installed only in the @code{gcc} ``private''
+directory heirarchy, @file{gcc-lib}.
+This allows system administrators and users to choose which
+version of the @code{libf2c} library from @code{netlib} they
+wish to use on a case-by-case basis.
+See the installation documentation for more information.
+
+@item
+The @file{f2c.h} include (header) file produced by @code{g77}
+has been renamed to @file{g2c.h}.
+It is installed only in the @code{gcc} ``private''
+directory heirarchy, @file{gcc-lib}.
+This allows system administrators and users to choose which
+version of the include file from @code{netlib} they
+wish to use on a case-by-case basis.
+See the installation documentation for more information.
+
+@item
+The @code{g77} command now expects the run-time library
+to be named @code{libg2c.a} instead of @code{libf2c.a},
+to ensure that a version other than the one built and
+installed as part of the same @code{g77} version is picked up.
+
+@item
+During the configuration and build process,
+@code{g77} creates subdirectories it needs only as it
+needs them.
+Other cleaning up of the configuration and build process
+has been performed as well.
+
+@item
+@code{install-info} now used to update the directory of
+Info documentation to contain an entry for @code{g77}
+(during installation).
+
+@item
+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 @code{OPEN}, @code{INQUIRE}, @code{READ}, and
+@code{WRITE} statements,
+and about truncations of various sorts of constants.
+
+@item
+Improve compilation of @code{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 @code{libf2c} for statements like @samp{PRINT '(I1', 42}.
+
+@item
+Improve documentation and indexing.
+
+@item
+The upgrade to @code{libf2c} as of 1998-06-18
+should fix a variety of problems, including
+those involving some uses of the @samp{T} format
+specifier, and perhaps some build (porting) problems
+as well.
+@end itemize
+
+@heading In 0.5.24 and @code{egcs} 1.1 (versus 0.5.23):
@itemize @bullet
@item
@code{g77} no longer produces incorrect code
@samp{COMMON} and @samp{EQUIVALENCE}.
@item
-The F90 @samp{DATE_AND_TIME} intrinsic now is
+The F90 @samp{Date_and_Time} intrinsic now is
supported.
@item
-The F90 @samp{SYSTEM_CLOCK} intrinsic allows
+The F90 @samp{System_Clock} intrinsic allows
the optional arguments (except for the @samp{Count}
argument) to be omitted.
Improve documentation and indexing.
@end itemize
-@heading In 0.5.23:
+@c 1998-05-20: 0.5.23 released.
+@heading In 0.5.23 (versus 0.5.22):
@itemize @bullet
@item
This release contains several regressions against
and @samp{-fargument-noalias-global},
and the corresponding alias-analysis code.
-(Version 1.0.1 of @code{egcs} has the alias-analysis
+(@code{egcs} has the alias-analysis
code, but not the @code{__restrict__} keyword.
@code{egcs} @code{g77} users benefit from the alias-analysis
code despite the lack of the @code{__restrict__} keyword,
@samp{-freduce-all-givs},
and @samp{-frerun-loop-opt}.
-(Version 1.0.1 of @code{egcs} supports these options.
+(@code{egcs} supports these options.
@code{g77} users of @code{egcs} benefit from them even if
they are not explicitly specified,
because the defaults are optimized for @code{g77} users.)
as well.
@end itemize
-@heading In 0.5.22:
+@c 1998-03-16: 0.5.22 released.
+@heading In 0.5.22 (versus 0.5.21):
@itemize @bullet
@item
Fix code generation for iterative @code{DO} loops that
@cindex DNRM2
@cindex stack, 387 coprocessor
-@cindex ix86
+@cindex Intel x86
@cindex -O2
@item
Fix a code-generation bug that afflicted
results to integer values (on some systems).
@item
-Fix @code{SIGNAL} intrinsic so it offers portable
+Fix @code{Signal} intrinsic so it offers portable
support for 64-bit systems (such as Digital Alphas
running GNU/Linux).
@item
Use @code{tempnam}, if available, to open scratch files
-(as in @samp{OPEN(STATUS='SCRATCH')}
+(as in @samp{OPEN(STATUS='SCRATCH')})
so that the @code{TMPDIR} environment variable,
if present, is used.
by printing @samp{(I)garbage} as the format string.)
@item
-Improve compilation of FORMAT expressions so that
+Improve compilation of @code{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
(such as Digital Alpha running GNU/Linux).
@end itemize
+@c 1998-03-15: egcs-1.0.2 released.
+@heading In @code{egcs} 1.0.2 (versus @code{egcs} 1.0.1):
+@itemize @bullet
+@item
+Fix @code{g77} crash triggered by @code{CASE} statement with
+an omitted lower or upper bound.
+
+@item
+Fix @code{g77} crash on statements such as
+@samp{PRINT *, (REAL(Z(I)),I=1,2)}, where
+@samp{Z} is @code{DOUBLE COMPLEX}.
+
+@cindex ELF support
+@cindex support, ELF
+@cindex -fPIC option
+@cindex options, -fPIC
+@item
+Fix @samp{-fPIC} (such as compiling for ELF targets)
+on the Intel x86 architecture target
+so invalid assembler code is no longer produced.
+
+@item
+Fix @samp{-fpedantic} to not reject procedure invocations
+such as @samp{I=J()} and @samp{CALL FOO()}.
+
+@item
+Fix @samp{-fugly-comma} to affect invocations of
+only external procedures.
+Restore rejection of gratuitous trailing omitted
+arguments to intrinsics, as in @samp{I=MAX(3,4,,)}.
+
+@item
+Fix compiler so it accepts @samp{-fgnu-intrinsics-*} and
+@samp{-fbadu77-intrinsics-*} options.
+@end itemize
+
+@c 1998-01-02: egcs-1.0.1 released.
+@heading In @code{egcs} 1.0.1 (versus @code{egcs} 1.0):
+@itemize @bullet
+@item
+Fix run-time crash involving @code{NAMELIST} on 64-bit
+machines such as Alphas.
+@end itemize
+
+@c 1997-12-03: egcs-1.0 released.
+@heading In @code{egcs} 1.0 (versus 0.5.21):
+@itemize @bullet
+@item
+Version 1.0 of @code{egcs}
+contains several regressions against
+version 0.5.21 of @code{g77},
+due to using the
+``vanilla'' @code{gcc} back end instead of patching
+it to fix a few bugs and improve performance in a
+few cases.
+
+@xref{Actual Bugs,,Actual Bugs We Haven't Fixed Yet},
+available in plain-text format in @code{gcc/f/BUGS},
+for information on the known bugs in this version,
+including the regressions.
+
+Features that have been dropped from this version
+of @code{g77} due to their being implemented
+via @code{g77}-specific patches to the @code{gcc}
+back end in previous releases include:
+
+@itemize --
+@item
+Support for the C-language @code{restrict} keyword.
+
+@item
+Support for the @samp{-W} option warning about
+integer division by zero.
+
+@item
+The Intel x86-specific option @samp{-malign-double}
+applying to stack-allocated data
+as well as statically-allocate data.
+@end itemize
+
+Note that the @file{gcc/f/gbe/} subdirectory has been removed
+from this distribution as a result of @code{g77}
+being fully integrated with
+the @code{egcs} variant of the @code{gcc} back end.
+
+@item
+Fix code generation for iterative @code{DO} loops that
+have one or more references to the iteration variable,
+or to aliases of it, in their control expressions.
+For example, @samp{DO 10 J=2,J} now is compiled correctly.
+
+@item
+Fix @code{DTime} intrinsic so as not to truncate
+results to integer values (on some systems).
+
+@item
+Remove support for non-@code{egcs} versions of @code{gcc}.
+
+@cindex -@w{}-driver option
+@cindex g77 options, -@w{}-driver
+@cindex options, -@w{}-driver
+@item
+Remove support for the @samp{--driver} option,
+as @code{g77} now does all the driving,
+just like @code{gcc}.
+
+@item
+Allow any numeric argument to intrinsics
+@code{Int2} and @code{Int8}.
+
+@item
+Improve diagnostic messages from @code{libf2c}
+so it is more likely that the printing of the
+active format string is limited to the string,
+with no trailing garbage being printed.
+
+(Unlike @code{f2c}, @code{g77} did not append
+a null byte to its compiled form of every
+format string specified via a @code{FORMAT} statement.
+However, @code{f2c} would exhibit the problem
+anyway for a statement like @samp{PRINT '(I)garbage', 1}
+by printing @samp{(I)garbage} as the format string.)
+
+@item
+Upgrade to @code{libf2c} as of 1997-09-23.
+This fixes a formatted-I/O bug that afflicted
+64-bit systems with 32-bit integers
+(such as Digital Alpha running GNU/Linux).
+@end itemize
+
+@c 1997-09-09: 0.5.21 released.
@heading In 0.5.21:
@itemize @bullet
@item
Reserve @code{INTEGER(KIND=0)} for future use.
@end itemize
+@c 1997-02-28: 0.5.20 released.
@heading In 0.5.20:
@itemize @bullet
@item
the Info documentation.)
@end itemize
+@c 1997-02-01: 0.5.19.1 released.
@heading In 0.5.19.1:
@itemize @bullet
@item
@code{DOUBLE COMPLEX}) have been fixed.
@end itemize
+@c 1996-12-07: 0.5.19 released.
@heading In 0.5.19:
@itemize @bullet
@item
Improvements to documentation and indexing.
@end itemize
+@c 1996-04-01: 0.5.18 released.
@heading In 0.5.18:
@itemize @bullet
@item
maintainer's new address is @email{dmg@@bell-labs.com}.
@end itemize
+@c 1995-11-18: 0.5.17 released.
@heading In 0.5.17:
@itemize @bullet
@item
Upgrade to @code{libf2c} as of 1995-11-15.
@end itemize
+@c 1995-08-30: 0.5.16 released.
@heading In 0.5.16:
@itemize @bullet
@item
smaller library without lots of debugging clutter.
@end itemize
+@c 1995-05-19: 0.5.15 released.
@heading In 0.5.15:
@itemize @bullet
@item