This file lists recent changes to the GNU Fortran compiler.
Copyright (C) 1995 Free Software Foundation, Inc.  You may copy,
distribute, and modify it freely as long as you preserve this copyright
notice and permission notice.  Contributed by James Craig Burley
(burley@gnu.ai.mit.edu).

1995-11-18

Changes in 0.5.17:
    FIX SERIOUS BUG in "g77 -v" command that can cause removal of a
        system's "/dev/null" special file if run by user `root' --
        ALL USERS OF VERSION 0.5.16 SHOULD ENSURE THAT THEY HAVE NOT
        REMOVED /dev/null OR REPLACED IT WITH AN ORDINARY FILE (e.g.
        by comparing the output of "ls -l /dev/null" with "ls -l /dev/zero"
        -- if the output isn't basically the same, contact your system
        administrator about restoring /dev/null to its proper status);
        this bug is particular insidious since removing /dev/null as
        a special file can go undetected for quite a while, aside from
        various applications and programs exhibiting sudden, strange
        behaviors...I sincerely apologize for not realizing the
        implications of the fact that when "g77 -v" runs the "ld" command
        with "-o /dev/null" that "ld" tries to _remove_ the executable
        it is supposed to build (especially if it reports unresolved
        references, which it should in this case)!!
    Fix crash on CHARACTER*(*) FOO in a main or block data program unit
    Fix crash that can occur when diagnostics given outside of any
        program unit (such as when input file contains "@foo")
    Fix crashes, infinite loops (hangs), and such involving diagnosed code
    Fix ASSIGN'ed variables so they can be SAVE'd or dummy arguments,
        and issue clearer error message in cases where target of ASSIGN
        or ASSIGNed GOTO/FORMAT is too small (which should never happen)
    Make libf2c build procedures work on more systems again by
        eliminating unnecessary invocations of `ld -r -x' and `mv'
    Fix omission of -funix-intrinsics-* options in list of permitted
        options to compiler
    Fix failure to always diagnose missing type declaration for IMPLICIT NONE
    Fix compile-time performance problem (which could sometimes
        crash the compiler, cause a hang, or whatever, due to a bug
        in the back end) involving exponentiation with a large INTEGER
        constant for the right-hand operator (e.g. I**32767)
    Fix build procedures so cross-compiling g77 (the fini utility in
        particular) is properly built using the host compiler
    Add new -Wsurprising option to warn about constructs that are
        interpreted by the Fortran standard (and g77) in ways that
        are surprising to many programmers
    Add ERF() and ERFC() as generic intrinsics mapping to existing
        ERF/DERF and ERFC/DERFC specific intrinsics -- NOTE: You should
        specify "INTRINSIC ERF,ERFC" in any code where you might use
        these as generic intrinsics, to improve likelihood of diagnostics
        (instead of subtle run-time bugs) when using a compiler that
        doesn't support these as intrinsics (e.g. the f2c converter)
    Remove from -fno-pedantic the diagnostic about DO with non-INTEGER
        index variable; issue that under -Wsurprising instead
    Clarify some diagnostics that say things like "ignored" when that's
        misleading
    Clarify diagnostic on use of .EQ./.NE. on LOGICAL operands
    Minor improvements to code generation for various operations on LOGICAL
        operands
    Minor improvement to code generation for some DO loops on some
        machines
    Support gcc version 2.7.1
    Upgrade to libf2c as of 1995-11-15

Changes in 0.5.16:
    Fix a code-generation bug involving complicated EQUIVALENCE statements
        not involving COMMON
    Fix code-generation bugs involving invoking "gratis" library procedures
        in libf2c from code compiled with -fno-f2c by making these
        procedures known to g77 as intrinsics (not affected by -fno-f2c);
        this is known to fix code invoking ERF(), ERFC(), DERF(), and DERFC()
    Update libf2c to include netlib patches through 950816, and
        define WANT_LEAD_0 to 1 to make g77-compiled code more
        consistent with other Fortran implementations by outputting
        leading zeros in formatted and list-directed output
    Fix a code-generation bug involving adjustable dummy arrays with high
        bounds whose primaries are changed during procedure execution, and
        which might well improve code-generation performance for such arrays
        vis-a-vis f2c|gcc (but apparently only when using gcc-2.7.0 or
        later)
    Fix a code-generation bug involving invocation of [DOUBLE] COMPLEX
        FUNCTIONs and doing [DOUBLE] COMPLEX divides when the result
        of the invocation/divide is assigned directly to a variable
        that overlaps one or more of the arguments to the invocation/divide
    Fix crash by not generating new optimal code for X**I if I is
        nonconstant and the expression is used to dimension a dummy
        array, since the gcc back end does not support the necessary
        mechanics (and the gcc front end rejects the equivalent
        construct, as it turns out)
    Fix crash on expressions like COMPLEX**INTEGER
    Fix crash on expressions like (1D0,2D0)**2, i.e. raising a
        DOUBLE COMPLEX constant to an INTEGER constant power
    Fix crashes and such involving diagnosed code
    Diagnose, instead of crashing on, statement function definitions
        having duplicate dummy argument names
    Fix bug causing rejection of good code involving statement function
        definitions
    Fix bug resulting in debugger not knowing size of local equivalence
        area when any member of area has initial value (via DATA etc.)
    Fix installation bug that prevented installation of `g77' driver;
        provide for easy selection of whether to install copy of `g77'
        as `f77' to replace the broken code
    Fix gcc driver (affects g77 thereby) to not gratuitously invoke the
        f771 compiler (e.g. when -E is specified)
    Fix diagnostic to point to right source line when it immediately
        follows an INCLUDE statement
    Support more compiler options in gcc/g77 when compiling Fortran files
        (such as -p, -pg, -aux-info, -P, correct setting of version-
        number macros for preprocessing, full recognition of -O0,
        automatic insertion of configuration-specific linker specs)
    Add new intrinsics that interface to existing routines in libf2c:
        ABORT, DERF, DERFC, ERF, ERFC, EXIT, FLUSH, GETARG, GETENV, IARGC,
        SIGNAL, and SYSTEM; note that ABORT, EXIT, FLUSH, SIGNAL, and
        SYSTEM are intrinsic subroutines, not functions (since they
        have side effects), so to get the return values from SIGNAL
        and SYSTEM, append a final argument specifying an INTEGER
        variable or array element (e.g. "CALL SYSTEM('rm foo',ISTAT)")
    Add new intrinsic group named `unix' to contain the new intrinsics,
        and by default enable this new group
    Move LOC() intrinsic out of the `vxt' group to the new `unix' group
    Improve g77 so that `g77 -v' by itself (or with certain other options,
        including -B, -b, -i, -nostdlib, and -V) reports lots more useful
        version info, and so that long-form options gcc accepts are
        understood by g77 as well (even in truncated, unambiguous forms);
        add new option --driver=name to specify driver when default, gcc,
        isn't appropriate
    Add support for # directives (as output by the preprocessor) in the
        compiler, and enable generation of those directives by the
        preprocessor (when compiling .F files) so diagnostics and debugging
        info are more useful to users of the preprocessor
    Produce better diagnostics, more like gcc, with info such as
        "In function `foo':" and "In file included from...:"
    Support gcc's -fident and -fno-ident options
    When -Wunused in effect, don't warn about local vars used as
        statement-function dummy arguments or DATA implied-DO iteration
        variables, even though strictly speaking these are not uses
        of the local vars themselves
    When `-W -Wunused' in effect, don't warn about unused dummy arguments
        at all, since there's no way to turn this off for individual
        cases (g77 might someday start warning about these) -- applies
        to gcc versions 2.7.0 and later, since earlier versions didn't
        warn about unused dummy arguments
    New option `-fno-underscoring' that inhibits transformation of names
        (by appending one or two underscores) so users may experiment
        with implications of such an environment
    Minor improvement to gcc/f/info module to make it easier to build
        g77 using the native (non-gcc) compiler on certain machines
        (but definitely not all machines nor all non-gcc compilers; please
        do not report bugs showing problems compilers have with
        macros defined in gcc/f/target.h and used in places like
        gcc/f/expr.c)
    Add warning to be printed for each invocation of the compiler
        if the target machine INTEGER, REAL, or LOGICAL size is not 32 bits,
        since g77 is known to not work well for such cases (to be
        fixed in 0.6 -- see gcc/f/BUGS)
    Lots of new documentation (though work is still needed to put it into
        canonical GNU format)
    Build libf2c with -g0, not -g2, in effect (by default), to produce
        smaller library without lots of debugging clutter

Changes in 0.5.15:
    Fix bad code generation involving X**I and temporary, internal variables
        generated by g77 and the back end (such as for DO loops)
    Fix crash given CHARACTER A;DATA A/.TRUE./
    Replace crash with diagnostic given CHARACTER A;DATA A/1.0/
    Fix crash or other erratic behavior when null character constant
        ('') is encountered
    Fix crash or other erratic behavior involving diagnosed code
    Fix code generation for external functions returning type REAL when
        the -ff2c option is in force (which it is by default) so that
        f2c compatibility is indeed provided
    Disallow COMMON I(10) if I has previously been specified with an
        array declarator
    New -ffixed-line-length-N option, where N is the maximum length
        of a typical fixed-form line, defaulting to 72 columns, such
        that characters beyond column N are ignored, or N is "none",
        meaning no characters are ignored -- does not affect lines
        with "&" in column 1, which are always processed as if
        -ffixed-line-length-none were in effect
    No longer generate better code for some kinds of array references,
        as gcc back end is to be fixed to do this even better, and it
        turned out to slow down some code in some cases after all
    In COMMON and EQUIVALENCE areas with any members given initial
        values (e.g. via DATA), uninitialized members now always
        initialized to binary zeros (though this is not required by
        the F77 standard, and might not be done in future versions
        of g77) -- previously, in some COMMON/EQUIVALENCE areas
        (essentially those with members of more than one type), the
        uninitialized members were initialized to spaces, to
        cater to CHARACTER types, but it seems no existing code expects
        that, while much existing code expects binary zeros

Changes in 0.5.14:
    Don't emit bad code when low bound of adjustable array is nonconstant
        and thus might vary as an expression at run time
    Emit correct code for calculation of # trips in DO loops for cases
        where the loop should not execute at all (bug affected cases
        where the difference between the begin and end values was less
        than the step count, though probably not for floating-point cases)
    Fix crash when extra parentheses surround item in DATA implied-DO list
    Fix crash over minor internal inconsistencies in handling diagnostics,
        just substitute dummy strings where necessary
    Fix crash on some systems when compiling call to MVBITS() intrinsic
    Fix crash on array assignment "TYPEddd(...)=...", where ddd is a
        string of digits (at least one)
    Fix crash on DCMPLX() with a single INTEGER argument
    Fix various crashes involving code with diagnosed errors
    Support -I option for INCLUDE statement, plus gcc's `header.gcc'
        facility for handling systems like MS-DOS
    Allow INCLUDE statement to be continued across multiple lines,
        even allow it to coexist with other statements on the same line
    Incorporate Bellcore fixes to libf2c through 950315 -- this fixes a
        bug involving infinite loops reading EOF with empty list-directed
        I/O list
    Remove all the g77-specific auto-configuration scripts, code, &c,
        except for temporary substitutes for bsearch() and strtoul(), as
        too many configure/build problems were reported in these areas --
        people will have to fix their systems' problems themselves, or at
        least somewhere other than g77, which expects a working ANSI C
        environment (and, for now, a GNU C compiler to compile g77 itself)
    Complain if initialized common redeclared as larger in subsequent program
        unit
    Warn if blank common initialized, since its size can vary and hence
        related warnings that might be helpful won't be seen
    New -fbackslash option, on by default, that causes `\' within CHARACTER
        and Hollerith constants to be interpreted a la GNU C -- NOTE that
        this behavior is somewhat different from f2c's, which supports only
        a limited subset of backslash (escape) sequences
    Make -fugly-args the default
    New -fugly-init option, on by default, that allows typeless/hollerith
        to be specified as initial values for variables or named constants
        (PARAMETER), and also allows character<->numeric conversion in
        those contexts -- turn off via -fno-ugly-init
    New -finit-local-zero option to initialize local variables to binary zeros
        (does not affect whether they are SAVEd, i.e. made automatic or static)
    New -Wimplicit option to warn about implicitly typed variables, arrays,
        and functions -- like IMPLICIT NONE but doesn't produce errors
    -Wall now implies -Wuninitialized as with gcc (i.e. unless -O not
        specified, since -Wuninitialized requires -O), and implies
        -Wunused as well
    -Wunused no longer gives spurious messages for unused EXTERNAL names
        (since they are assumed to refer to BLOCK DATA program units,
        to make use of libraries more reliable)
    Support %LOC() and LOC() of character arguments
    Support null (zero-length) character constants and expressions
    Support f2c's IMAG() generic intrinsic
    Support ICHAR(), IACHAR(), and LEN() of character expressions that
        are valid in assignments but not normally as actual arguments
    Support f2c-style '&' in column 1 to mean continuation line
    Allow NAMELIST, EXTERNAL, INTRINSIC, and VOLATILE in BLOCK DATA, even
        though these are not allowed by the standard
    Allow RETURN in main program unit
    Changes to Hollerith-constant support to obey F77 Appendix C: now
        padded on the right with zeros, not spaces; hollerith "format
        specifications" in the form of arrays of non-character allowed;
        warnings issued when non-blank truncation occurs when converting
        to another type; when specified as actual argument, now passed
        by reference to INTEGER (padded on right with spaces if constant
        too small, otherwise fully intact if constant wider the INTEGER
        type) instead of by value; WARNING: f2c differs on the
        interpretation of CALL FOO(1HX), which it treats exactly the
        same as CALL FOO('X'), but which the standard and g77 treat
        as CALL FOO(%REF('X   ')) (padded with as many blanks as necessary
        to widen to INTEGER), essentially
    Changes and fixes to typeless-constant support: now treated as
        a typeless double-length INTEGER value; warnings issued when
        overflow occurs; padded on the left with zeros when converting
        to a larger type; should be properly aligned and ordered on
        the target machine for whatever type it is turned into; when
        specified as actual argument, now passed as reference to
        a default INTEGER constant
    %DESCR() of a non-CHARACTER expression now passes a pointer to
        the expression plus a length for the expression just as if
        it were a CHARACTER expression (so CALL FOO(%DESCR(D)), where
        D is REAL*8, is the same as CALL FOO(D,%VAL(8)))
    Name of multi-entrypoint master function changed to incorporate
        the name of the primary entry point instead of a decimal
        value, so the name of the master function for SUBROUTINE X
        with alternate entry points is now "__g77_masterfun_x"
    Remove redundant message about zero-step-count DO loops
    Clean up diagnostic messages, shortening many of them
    Fix typo in g77.1 documentation
    Clarify implications of constant-handling bugs in BUGS
    Generate better code for ** operator with a right-hand operand of
        type INTEGER
    Generate better code for SQRT() and DSQRT(), also when -ffast-math
        specified, enable better code generation for SIN() and COS()
    Generate better code for some kinds of array references
    Speed up lexing somewhat (this makes the compilation phase noticably
        faster)

Changes in 0.5.13:
    Fix crash compiling calls to functions passed as dummy arguments
    Fix crash compiling CHARACTER comparison when either operand involves
        concatenation
    Fix crash when initialized COMMON area's size is smaller than
        size of area in previously compiled program unit
    Fix crash involving assigning to 3+-dimensional array having a
        name like TYPE or PRINT
    Fix crash when DATA statement after first executable statement
        makes first use of a variable name as an iterative-DO variable
    Fix various crashes involving code with diagnosed errors
    Fix dumb bug introduced in 0.5.9 that resulted in columns 73 and
        beyond being treated as real code unless a tab was present,
        instead of the other way 'round (fixed-form source)
    Unless -fpedantic, don't complain about "SAVE" by itself conflicting
        with any other occurrence of SAVE as statement or attribute,
        since there are solid reasons to write such code even though
        it is strictly non-standard-conforming (and only warn if
        -fpedantic)

Changes in 0.5.12:
    Don't crash when DO loop iteration variable isn't INTEGER
    Don't crash when DO loop end expression has an error
    Fix a couple of Makefile shell "if" commands to have "else true;"

Changes in 0.5.11:
    Compile-time conversion of negative INTEGER constant to REAL,
        DOUBLE PRECISION, COMPLEX, or DOUBLE COMPLEX is now fixed
    DFLOAT() is now recognized as an f2c intrinsic
    New compiler option -fugly-args allows passing of hollerith and
        typeless constants as actual arguments (a very specific
        version of -fugly); diagnostic when option not specified
        has more helpful information
    %VAL() now works when given a hollerith or typeless argument,
        as do other things like %REF()
    Help FreeBSD users build g77 driver out of the box

Changes in 0.5.10:
    Fix invocation of DOUBLE COMPLEX (aka COMPLEX*16) external functions
    Minor fixes and changes to Makefiles

Changes in 0.5.9:
    Treatment of source lines with tabs is slightly different than before
    Carriage returns (^M) in source lines now ignored
    Fix character-compare and other operations
    Change to using ANSI-C-approved techniques in a few places so non-gcc
        compilers can compile g77
    Fix crash when trying to output warning about slow compile
    Fix crash combining COMPLEX and ENTRY
    Fix use of COMPLEX operators/functions within statement-function
        definitions
    Support ASSIGN on any machine gcc supports
    Don't put build files in source directory when separate
