1 @c Copyright (C) 1995-1997 Free Software Foundation, Inc.
2 @c This is part of the G77 manual.
3 @c For copying conditions, see the file g77.texi.
5 @c The text of this file appears in the file BUGS
6 @c in the G77 distribution, as well as in the G77 manual.
12 @chapter News About GNU Fortran
14 @cindex versions, recent
15 @cindex recent versions
17 Changes made to recent versions of GNU Fortran are listed
18 below, with the most recent version first.
20 The changes are generally listed in order:
24 Code-generation and run-time-library bug-fixes
27 Compiler and run-time-library crashes involving valid code
34 Fixes and enhancements to existing features
46 This order is not strict---for example, some items
47 involve a combination of these elements.
49 Note that two variants of @code{g77} are tracked below.
50 The @code{egcs} variant is described vis-a-vis
51 previous versions of @code{egcs} and/or
52 an official FSF version,
55 Therefore, @code{egcs} versions sometimes have multiple listings
56 to help clarify how they differ from other versions,
57 though this can make getting a complete picture
58 of what a particular @code{egcs} version contains
59 somewhat more difficult.
61 @heading In @code{egcs} 1.2:
64 Fix @code{g77} so it no longer crashes when compiling
65 I/O statements with @samp{IOSTAT=@var{j}},
66 where @var{j} is other than default @code{INTEGER}
67 (such as @code{INTEGER*2}).
68 Instead, it issues a diagnostic.
71 Source file names with the suffixes @samp{.FOR} and @samp{.FPP}
72 now are recognized by @code{g77}
73 as if they ended in @samp{.for} and @samp{.fpp}, respectively.
76 Improve documentation and indexing,
77 including information on Year 2000 (Y2K) compliance.
80 @heading In 0.5.24 and @code{egcs} 1.1.1 (versus 0.5.23 and 1.1):
83 Fix @code{libg2c} so it performs an implicit @code{ENDFILE} operation
85 whenever a @code{REWIND} is done.
87 (This bug was introduced in 0.5.23 and @code{egcs} 1.1 in
88 @code{g77}'s version of @code{libf2c}.)
91 Fix @code{libg2c} so it no longer crashes with a spurious diagnostic
92 upon doing any I/O following a direct formatted write.
94 (This bug was introduced in 0.5.23 and @code{egcs} 1.1 in
95 @code{g77}'s version of @code{libf2c}.)
98 Fix @code{g77} so it no longer crashes compiling references
99 to the @samp{Rand} intrinsic on some systems.
102 Fix @code{g77} portion of installation process so it works
103 better on some systems
104 (those with shells requiring @samp{else true} clauses
105 on @samp{if} constructs
106 for the completion code to be set properly).
109 @heading In @code{egcs} 1.1 (versus 0.5.24):
112 Fix @code{g77} crash compiling code
113 containing the construct @samp{CMPLX(0.)} or similar.
117 (or apparently infinite run-time)
118 when compiling certain complicated expressions
119 involving @code{COMPLEX} arithmetic
120 (especially multiplication).
123 @cindex stack, 387 coprocessor
127 Fix a code-generation bug that afflicted
128 Intel x86 targets when @samp{-O2} was specified
129 compiling, for example, an old version of
130 the @samp{DNRM2} routine.
132 The x87 coprocessor stack was being
133 mismanaged in cases involving assigned @code{GOTO}
137 @cindex double-precision performance
138 @cindex -malign-double
140 Align static double-precision variables and arrays
142 regardless of whether @samp{-malign-double} is specified.
144 Generally, this affects only local variables and arrays
145 having the @code{SAVE} attribute
146 or given initial values via @code{DATA}.
149 @c 1998-09-01: egcs-1.1 released.
150 @heading In @code{egcs} 1.1 (versus @code{egcs} 1.0.3):
153 Fix bugs in the @code{libU77} intrinsic @samp{HostNm}
154 that wrote one byte beyond the end of its @samp{CHARACTER}
156 and in the @code{libU77} intrinsics
157 @samp{GMTime} and @samp{LTime}
158 that overwrote their arguments.
161 Assumed arrays with negative bounds
162 (such as @samp{REAL A(-1:*)})
163 no longer elicit spurious diagnostics from @code{g77},
164 even on systems with pointers having
165 different sizes than integers.
167 This bug is not known to have existed in any
168 recent version of @code{gcc}.
169 It was introduced in an early release of @code{egcs}.
172 Valid combinations of @code{EXTERNAL},
173 passing that external as a dummy argument
174 without explicitly giving it a type,
175 and, in a subsequent program unit,
176 referencing that external as
177 an external function with a different type
178 no longer crash @code{g77}.
181 @code{CASE DEFAULT} no longer crashes @code{g77}.
184 The @samp{-Wunused} option no longer issues a spurious
185 warning about the ``master'' procedure generated by
186 @code{g77} for procedures containing @code{ENTRY} statements.
189 Support @samp{FORMAT(I<@var{expr}>)} when @var{expr} is a
190 compile-time constant @code{INTEGER} expression.
193 Fix @code{g77} @samp{-g} option so procedures that
194 use @samp{ENTRY} can be stepped through, line by line,
198 Allow any @code{REAL} argument to intrinsics
199 @code{Second} and @code{CPU_Time}.
202 Use @code{tempnam}, if available, to open scratch files
203 (as in @samp{OPEN(STATUS='SCRATCH')})
204 so that the @code{TMPDIR} environment variable,
208 @code{g77}'s version of @code{libf2c} separates out
209 the setting of global state
210 (such as command-line arguments and signal handling)
211 from @file{main.o} into distinct, new library
214 This should make it easier to write portable applications
215 that have their own (non-Fortran) @code{main()} routine
216 properly set up the @code{libf2c} environment, even
217 when @code{libf2c} (now @code{libg2c}) is a shared library.
220 @code{g77} no longer installs the @file{f77} command
221 and @file{f77.1} man page
222 in the @file{/usr} or @file{/usr/local} heirarchy,
223 even if the @file{f77-install-ok} file exists
224 in the source or build directory.
225 See the installation documentation for more information.
228 @code{g77} no longer installs the @file{libf2c.a} library
229 and @file{f2c.h} include file
230 in the @file{/usr} or @file{/usr/local} heirarchy,
231 even if the @file{f2c-install-ok} or @file{f2c-exists-ok} files exist
232 in the source or build directory.
233 See the installation documentation for more information.
236 The @file{libf2c.a} library produced by @code{g77} has been
237 renamed to @file{libg2c.a}.
238 It is installed only in the @code{gcc} ``private''
239 directory heirarchy, @file{gcc-lib}.
240 This allows system administrators and users to choose which
241 version of the @code{libf2c} library from @code{netlib} they
242 wish to use on a case-by-case basis.
243 See the installation documentation for more information.
246 The @file{f2c.h} include (header) file produced by @code{g77}
247 has been renamed to @file{g2c.h}.
248 It is installed only in the @code{gcc} ``private''
249 directory heirarchy, @file{gcc-lib}.
250 This allows system administrators and users to choose which
251 version of the include file from @code{netlib} they
252 wish to use on a case-by-case basis.
253 See the installation documentation for more information.
256 The @code{g77} command now expects the run-time library
257 to be named @code{libg2c.a} instead of @code{libf2c.a},
258 to ensure that a version other than the one built and
259 installed as part of the same @code{g77} version is picked up.
262 During the configuration and build process,
263 @code{g77} creates subdirectories it needs only as it
265 Other cleaning up of the configuration and build process
266 has been performed as well.
269 @code{install-info} now used to update the directory of
270 Info documentation to contain an entry for @code{g77}
271 (during installation).
274 Some diagnostics have been changed from warnings to errors,
275 to prevent inadvertent use of the resulting, probably buggy,
277 These mostly include diagnostics about use of unsupported features
278 in the @code{OPEN}, @code{INQUIRE}, @code{READ}, and
279 @code{WRITE} statements,
280 and about truncations of various sorts of constants.
283 Improve compilation of @code{FORMAT} expressions so that
284 a null byte is appended to the last operand if it
286 This provides a cleaner run-time diagnostic as provided
287 by @code{libf2c} for statements like @samp{PRINT '(I1', 42}.
290 Improve documentation and indexing.
293 The upgrade to @code{libf2c} as of 1998-06-18
294 should fix a variety of problems, including
295 those involving some uses of the @samp{T} format
296 specifier, and perhaps some build (porting) problems
300 @heading In 0.5.24 and @code{egcs} 1.1 (versus 0.5.23):
303 @code{g77} no longer produces incorrect code
305 for @samp{EQUIVALENCE} and @samp{COMMON}
306 aggregates that, due to ``unnatural'' ordering of members
307 vis-a-vis their types, require initial padding.
310 @code{g77} no longer crashes when compiling code
311 containing specification statements such as
312 @samp{INTEGER(KIND=7) PTR}.
315 @code{g77} no longer crashes when compiling code
316 such as @samp{J = SIGNAL(1, 2)}.
319 @code{g77} now treats @samp{%LOC(@var{expr})} and
320 @samp{LOC(@var{expr})} as ``ordinary'' expressions
321 when they are used as arguments in procedure calls.
322 This change applies only to global (filewide) analysis,
323 making it consistent with
324 how @code{g77} actually generates code
327 Previously, @code{g77} treated these expressions
328 as denoting special ``pointer'' arguments
329 for the purposes of filewide analysis.
332 The @code{g77} driver now ensures that @samp{-lg2c}
333 is specified in the link phase prior to any
334 occurrence of @samp{-lm}.
335 This prevents accidentally linking to a routine
336 in the SunOS4 @samp{-lm} library
337 when the generated code wants to link to the one
338 in @code{libf2c} (@code{libg2c}).
341 @code{g77} emits more debugging information when
344 This new information allows, for example,
345 @kbd{which __g77_length_a} to be used in @code{gdb}
346 to determine the type of the phantom length argument
347 supplied with @samp{CHARACTER} variables.
349 This information pertains to internally-generated
350 type, variable, and other information,
351 not to the longstanding deficiencies vis-a-vis
352 @samp{COMMON} and @samp{EQUIVALENCE}.
355 The F90 @samp{Date_and_Time} intrinsic now is
359 The F90 @samp{System_Clock} intrinsic allows
360 the optional arguments (except for the @samp{Count}
361 argument) to be omitted.
364 Upgrade to @code{libf2c} as of 1998-06-18.
367 Improve documentation and indexing.
370 @c 1998-05-20: 0.5.23 released.
371 @heading In 0.5.23 (versus 0.5.22):
374 This release contains several regressions against
375 version 0.5.22 of @code{g77}, due to using the
376 ``vanilla'' @code{gcc} back end instead of patching
377 it to fix a few bugs and improve performance in a
380 @xref{Actual Bugs,,Actual Bugs We Haven't Fixed Yet},
381 available in plain-text format in @code{gcc/f/BUGS},
382 for information on the known bugs in this version,
383 including the regressions.
385 Features that have been dropped from this version
386 of @code{g77} due to their being implemented
387 via @code{g77}-specific patches to the @code{gcc}
388 back end in previous releases include:
392 Support for @code{__restrict__} keyword,
393 the options @samp{-fargument-alias}, @samp{-fargument-noalias},
394 and @samp{-fargument-noalias-global},
395 and the corresponding alias-analysis code.
397 (@code{egcs} has the alias-analysis
398 code, but not the @code{__restrict__} keyword.
399 @code{egcs} @code{g77} users benefit from the alias-analysis
400 code despite the lack of the @code{__restrict__} keyword,
401 which is a C-language construct.)
404 Support for the GNU compiler options
405 @samp{-fmove-all-movables},
406 @samp{-freduce-all-givs},
407 and @samp{-frerun-loop-opt}.
409 (@code{egcs} supports these options.
410 @code{g77} users of @code{egcs} benefit from them even if
411 they are not explicitly specified,
412 because the defaults are optimized for @code{g77} users.)
415 Support for the @samp{-W} option warning about
416 integer division by zero.
419 The Intel x86-specific option @samp{-malign-double}
420 applying to stack-allocated data
421 as well as statically-allocate data.
424 Note that the @file{gcc/f/gbe/} subdirectory has been removed
425 from this distribution as a result of @code{g77} no longer
426 including patches for the @code{gcc} back end.
429 Fix bugs in the @code{libU77} intrinsic @samp{HostNm}
430 that wrote one byte beyond the end of its @samp{CHARACTER}
432 and in the @code{libU77} intrinsics
433 @samp{GMTime} and @samp{LTime}
434 that overwrote their arguments.
437 Support @code{gcc} version 2.8,
438 and remove support for prior versions of @code{gcc}.
440 @cindex -@w{}-driver option
441 @cindex g77 options, -@w{}-driver
442 @cindex options, -@w{}-driver
444 Remove support for the @samp{--driver} option,
445 as @code{g77} now does all the driving,
446 just like @code{gcc}.
449 @code{CASE DEFAULT} no longer crashes @code{g77}.
452 Valid combinations of @code{EXTERNAL},
453 passing that external as a dummy argument
454 without explicitly giving it a type,
455 and, in a subsequent program unit,
456 referencing that external as
457 an external function with a different type
458 no longer crash @code{g77}.
461 @code{g77} no longer installs the @file{f77} command
462 and @file{f77.1} man page
463 in the @file{/usr} or @file{/usr/local} heirarchy,
464 even if the @file{f77-install-ok} file exists
465 in the source or build directory.
466 See the installation documentation for more information.
469 @code{g77} no longer installs the @file{libf2c.a} library
470 and @file{f2c.h} include file
471 in the @file{/usr} or @file{/usr/local} heirarchy,
472 even if the @file{f2c-install-ok} or @file{f2c-exists-ok} files exist
473 in the source or build directory.
474 See the installation documentation for more information.
477 The @file{libf2c.a} library produced by @code{g77} has been
478 renamed to @file{libg2c.a}.
479 It is installed only in the @code{gcc} ``private''
480 directory heirarchy, @file{gcc-lib}.
481 This allows system administrators and users to choose which
482 version of the @code{libf2c} library from @code{netlib} they
483 wish to use on a case-by-case basis.
484 See the installation documentation for more information.
487 The @file{f2c.h} include (header) file produced by @code{g77}
488 has been renamed to @file{g2c.h}.
489 It is installed only in the @code{gcc} ``private''
490 directory heirarchy, @file{gcc-lib}.
491 This allows system administrators and users to choose which
492 version of the include file from @code{netlib} they
493 wish to use on a case-by-case basis.
494 See the installation documentation for more information.
497 The @code{g77} command now expects the run-time library
498 to be named @code{libg2c.a} instead of @code{libf2c.a},
499 to ensure that a version other than the one built and
500 installed as part of the same @code{g77} version is picked up.
503 The @samp{-Wunused} option no longer issues a spurious
504 warning about the ``master'' procedure generated by
505 @code{g77} for procedures containing @code{ENTRY} statements.
508 @code{g77}'s version of @code{libf2c} separates out
509 the setting of global state
510 (such as command-line arguments and signal handling)
511 from @file{main.o} into distinct, new library
514 This should make it easier to write portable applications
515 that have their own (non-Fortran) @code{main()} routine
516 properly set up the @code{libf2c} environment, even
517 when @code{libf2c} (now @code{libg2c}) is a shared library.
520 During the configuration and build process,
521 @code{g77} creates subdirectories it needs only as it
522 needs them, thus avoiding unnecessary creation of, for example,
523 @file{stage1/f/runtime} when doing a non-bootstrap build.
524 Other cleaning up of the configuration and build process
525 has been performed as well.
528 @code{install-info} now used to update the directory of
529 Info documentation to contain an entry for @code{g77}
530 (during installation).
533 Some diagnostics have been changed from warnings to errors,
534 to prevent inadvertent use of the resulting, probably buggy,
536 These mostly include diagnostics about use of unsupported features
537 in the @code{OPEN}, @code{INQUIRE}, @code{READ}, and
538 @code{WRITE} statements,
539 and about truncations of various sorts of constants.
542 Improve documentation and indexing.
545 Upgrade to @code{libf2c} as of 1998-04-20.
547 This should fix a variety of problems, including
548 those involving some uses of the @samp{T} format
549 specifier, and perhaps some build (porting) problems
553 @c 1998-03-16: 0.5.22 released.
554 @heading In 0.5.22 (versus 0.5.21):
557 Fix code generation for iterative @code{DO} loops that
558 have one or more references to the iteration variable,
559 or to aliases of it, in their control expressions.
560 For example, @samp{DO 10 J=2,J} now is compiled correctly.
563 @cindex stack, 387 coprocessor
567 Fix a code-generation bug that afflicted
568 Intel x86 targets when @samp{-O2} was specified
569 compiling, for example, an old version of
570 the @samp{DNRM2} routine.
572 The x87 coprocessor stack was being
573 mismanaged in cases involving assigned @code{GOTO}
577 Fix @code{DTime} intrinsic so as not to truncate
578 results to integer values (on some systems).
581 Fix @code{Signal} intrinsic so it offers portable
582 support for 64-bit systems (such as Digital Alphas
586 Fix run-time crash involving @code{NAMELIST} on 64-bit
587 machines such as Alphas.
590 Fix @code{g77} version of @code{libf2c} so it no longer
591 produces a spurious @samp{I/O recursion} diagnostic at run time
592 when an I/O operation (such as @samp{READ *,I}) is interrupted
593 in a manner that causes the program to be terminated
594 via the @samp{f_exit} routine (such as via @kbd{C-c}).
597 Fix @code{g77} crash triggered by @code{CASE} statement with
598 an omitted lower or upper bound.
601 Fix @code{g77} crash compiling references to @code{CPU_Time}
606 (or apparently infinite run-time)
607 when compiling certain complicated expressions
608 involving @code{COMPLEX} arithmetic
609 (especially multiplication).
612 Fix @code{g77} crash on statements such as
613 @samp{PRINT *, (REAL(Z(I)),I=1,2)}, where
614 @samp{Z} is @code{DOUBLE COMPLEX}.
617 Fix a @code{g++} crash.
620 Support @samp{FORMAT(I<@var{expr}>)} when @var{expr} is a
621 compile-time constant @code{INTEGER} expression.
624 Fix @code{g77} @samp{-g} option so procedures that
625 use @samp{ENTRY} can be stepped through, line by line,
629 Fix a profiling-related bug in @code{gcc} back end for
630 Intel x86 architecture.
633 Allow any @code{REAL} argument to intrinsics
634 @code{Second} and @code{CPU_Time}.
637 Allow any numeric argument to intrinsics
638 @code{Int2} and @code{Int8}.
641 Use @code{tempnam}, if available, to open scratch files
642 (as in @samp{OPEN(STATUS='SCRATCH')})
643 so that the @code{TMPDIR} environment variable,
647 Rename the @code{gcc} keyword @code{restrict} to
648 @code{__restrict__}, to avoid rejecting valid, existing,
650 Support for @code{restrict} is now more like support
654 Fix @samp{-fpedantic} to not reject procedure invocations
655 such as @samp{I=J()} and @samp{CALL FOO()}.
658 Fix @samp{-fugly-comma} to affect invocations of
659 only external procedures.
660 Restore rejection of gratuitous trailing omitted
661 arguments to intrinsics, as in @samp{I=MAX(3,4,,)}.
664 Fix compiler so it accepts @samp{-fgnu-intrinsics-*} and
665 @samp{-fbadu77-intrinsics-*} options.
668 Improve diagnostic messages from @code{libf2c}
669 so it is more likely that the printing of the
670 active format string is limited to the string,
671 with no trailing garbage being printed.
673 (Unlike @code{f2c}, @code{g77} did not append
674 a null byte to its compiled form of every
675 format string specified via a @code{FORMAT} statement.
676 However, @code{f2c} would exhibit the problem
677 anyway for a statement like @samp{PRINT '(I)garbage', 1}
678 by printing @samp{(I)garbage} as the format string.)
681 Improve compilation of @code{FORMAT} expressions so that
682 a null byte is appended to the last operand if it
684 This provides a cleaner run-time diagnostic as provided
685 by @code{libf2c} for statements like @samp{PRINT '(I1', 42}.
688 Fix various crashes involving code with diagnosed errors.
691 Fix cross-compilation bug when configuring @code{libf2c}.
697 Improve documentation and indexing.
700 Upgrade to @code{libf2c} as of 1997-09-23.
701 This fixes a formatted-I/O bug that afflicted
702 64-bit systems with 32-bit integers
703 (such as Digital Alpha running GNU/Linux).
706 @c 1998-03-15: egcs-1.0.2 released.
707 @heading In @code{egcs} 1.0.2 (versus @code{egcs} 1.0.1):
710 Fix @code{g77} crash triggered by @code{CASE} statement with
711 an omitted lower or upper bound.
714 Fix @code{g77} crash on statements such as
715 @samp{PRINT *, (REAL(Z(I)),I=1,2)}, where
716 @samp{Z} is @code{DOUBLE COMPLEX}.
721 @cindex options, -fPIC
723 Fix @samp{-fPIC} (such as compiling for ELF targets)
724 on the Intel x86 architecture target
725 so invalid assembler code is no longer produced.
728 Fix @samp{-fpedantic} to not reject procedure invocations
729 such as @samp{I=J()} and @samp{CALL FOO()}.
732 Fix @samp{-fugly-comma} to affect invocations of
733 only external procedures.
734 Restore rejection of gratuitous trailing omitted
735 arguments to intrinsics, as in @samp{I=MAX(3,4,,)}.
738 Fix compiler so it accepts @samp{-fgnu-intrinsics-*} and
739 @samp{-fbadu77-intrinsics-*} options.
742 @c 1998-01-02: egcs-1.0.1 released.
743 @heading In @code{egcs} 1.0.1 (versus @code{egcs} 1.0):
746 Fix run-time crash involving @code{NAMELIST} on 64-bit
747 machines such as Alphas.
750 @c 1997-12-03: egcs-1.0 released.
751 @heading In @code{egcs} 1.0 (versus 0.5.21):
754 Version 1.0 of @code{egcs}
755 contains several regressions against
756 version 0.5.21 of @code{g77},
758 ``vanilla'' @code{gcc} back end instead of patching
759 it to fix a few bugs and improve performance in a
762 @xref{Actual Bugs,,Actual Bugs We Haven't Fixed Yet},
763 available in plain-text format in @code{gcc/f/BUGS},
764 for information on the known bugs in this version,
765 including the regressions.
767 Features that have been dropped from this version
768 of @code{g77} due to their being implemented
769 via @code{g77}-specific patches to the @code{gcc}
770 back end in previous releases include:
774 Support for the C-language @code{restrict} keyword.
777 Support for the @samp{-W} option warning about
778 integer division by zero.
781 The Intel x86-specific option @samp{-malign-double}
782 applying to stack-allocated data
783 as well as statically-allocate data.
786 Note that the @file{gcc/f/gbe/} subdirectory has been removed
787 from this distribution as a result of @code{g77}
788 being fully integrated with
789 the @code{egcs} variant of the @code{gcc} back end.
792 Fix code generation for iterative @code{DO} loops that
793 have one or more references to the iteration variable,
794 or to aliases of it, in their control expressions.
795 For example, @samp{DO 10 J=2,J} now is compiled correctly.
798 Fix @code{DTime} intrinsic so as not to truncate
799 results to integer values (on some systems).
802 Remove support for non-@code{egcs} versions of @code{gcc}.
804 @cindex -@w{}-driver option
805 @cindex g77 options, -@w{}-driver
806 @cindex options, -@w{}-driver
808 Remove support for the @samp{--driver} option,
809 as @code{g77} now does all the driving,
810 just like @code{gcc}.
813 Allow any numeric argument to intrinsics
814 @code{Int2} and @code{Int8}.
817 Improve diagnostic messages from @code{libf2c}
818 so it is more likely that the printing of the
819 active format string is limited to the string,
820 with no trailing garbage being printed.
822 (Unlike @code{f2c}, @code{g77} did not append
823 a null byte to its compiled form of every
824 format string specified via a @code{FORMAT} statement.
825 However, @code{f2c} would exhibit the problem
826 anyway for a statement like @samp{PRINT '(I)garbage', 1}
827 by printing @samp{(I)garbage} as the format string.)
830 Upgrade to @code{libf2c} as of 1997-09-23.
831 This fixes a formatted-I/O bug that afflicted
832 64-bit systems with 32-bit integers
833 (such as Digital Alpha running GNU/Linux).
836 @c 1997-09-09: 0.5.21 released.
840 Fix a code-generation bug introduced by 0.5.20
841 caused by loop unrolling (by specifying
842 @samp{-funroll-loops} or similar).
843 This bug afflicted all code compiled by
844 version 2.7.2.2.f.2 of @code{gcc} (C, C++,
848 Fix a code-generation bug manifested when
849 combining local @code{EQUIVALENCE} with a
850 @code{DATA} statement that follows
851 the first executable statement (or is
852 treated as an executable-context statement
853 as a result of using the @samp{-fpedantic}
857 Fix a compiler crash that occured when an
858 integer division by a constant zero is detected.
859 Instead, when the @samp{-W} option is specified,
860 the @code{gcc} back end issues a warning about such a case.
861 This bug afflicted all code compiled by
862 version 2.7.2.2.f.2 of @code{gcc} (C, C++,
866 Fix a compiler crash that occurred in some cases
867 of procedure inlining.
868 (Such cases became more frequent in 0.5.20.)
871 Fix a compiler crash resulting from using @code{DATA}
872 or similar to initialize a @code{COMPLEX} variable or
876 Fix compiler crashes involving use of @code{AND}, @code{OR},
877 or @code{XOR} intrinsics.
880 Fix compiler bug triggered when using a @code{COMMON}
881 or @code{EQUIVALENCE} variable
882 as the target of an @code{ASSIGN}
883 or assigned-@code{GOTO} statement.
886 Fix compiler crashes due to using the name of a some
887 non-standard intrinsics (such as @samp{FTELL} or
888 @samp{FPUTC}) as such and as the name of a procedure
890 Such dual use of a name in a program is allowed by
893 @c @code{g77}'s version of @code{libf2c} has been modified
894 @c so that the external names of library's procedures do not
895 @c conflict with names used for Fortran procedures compiled
897 @c An additional layer of jacket procedures has been added
898 @c to @code{libf2c} to map the old names to the new names,
899 @c for automatic use by programs that interface to the
900 @c library procedures via the external-procedure mechanism.
902 @c For example, the intrinsic @code{FPUTC} previously was
903 @c implemented by @code{g77} as a call to the @code{libf2c}
904 @c routine @samp{fputc_}.
905 @c This would conflict with a Fortran procedure named @code{FPUTC}
906 @c (using default compiler options), and this conflict
907 @c would cause a crash under certain circumstances.
909 @c Now, the intrinsic @code{FPUTC} calls @samp{G77_fputc_0},
910 @c which does not conflict with the @samp{fputc_} external
911 @c that implements a Fortran procedure named @code{FPUTC}.
913 @c Programs that refer to @code{FPUTC} as an external procedure
914 @c without supplying their own implementation will link to
915 @c the new @code{libf2c} routine @samp{fputc_}, which is
916 @c simply a jacket routine that calls @samp{G77_fputc_0}.
919 Place automatic arrays on the stack, even if
920 @code{SAVE} or the @samp{-fno-automatic} option
922 This avoids a compiler crash in some cases.
925 The @samp{-malign-double} option now reliably aligns
926 @code{DOUBLE PRECISION} optimally on Pentium and
927 Pentium Pro architectures (586 and 686 in @code{gcc}).
930 New option @samp{-Wno-globals} disables warnings
931 about ``suspicious'' use of a name both as a global
932 name and as the implicit name of an intrinsic, and
933 warnings about disagreements over the number or natures of
934 arguments passed to global procedures, or the
935 natures of the procedures themselves.
937 The default is to issue such warnings, which are
938 new as of this version of @code{g77}.
941 New option @samp{-fno-globals} disables diagnostics
942 about potentially fatal disagreements
943 analysis problems, such as disagreements over the
944 number or natures of arguments passed to global
945 procedures, or the natures of those procedures themselves.
947 The default is to issue such diagnostics and flag
948 the compilation as unsuccessful.
949 With this option, the diagnostics are issued as
950 warnings, or, if @samp{-Wno-globals} is specified,
951 are not issued at all.
953 This option also disables inlining of global procedures,
954 to avoid compiler crashes resulting from coding errors
955 that these diagnostics normally would identify.
958 Diagnose cases where a reference to a procedure
959 disagrees with the type of that procedure, or
960 where disagreements about the number or nature
962 This avoids a compiler crash.
965 Fix parsing bug whereby @code{g77} rejected a
966 second initialization specification immediately
967 following the first's closing @samp{/} without
968 an intervening comma in a @code{DATA} statement,
969 and the second specification was an implied-DO list.
972 Improve performance of the @code{gcc} back end so
973 certain complicated expressions involving @code{COMPLEX}
974 arithmetic (especially multiplication) don't appear to
975 take forever to compile.
978 Fix a couple of profiling-related bugs in @code{gcc}
982 Integrate GNU Ada's (GNAT's) changes to the back end,
983 which consist almost entirely of bug fixes.
984 These fixes are circa version 3.10p of GNAT.
987 Include some other @code{gcc} fixes that seem useful in
988 @code{g77}'s version of @code{gcc}.
989 (See @file{gcc/ChangeLog} for details---compare it
990 to that file in the vanilla @code{gcc-2.7.2.3.tar.gz}
994 Fix @code{libU77} routines that accept file and other names
995 to strip trailing blanks from them, for consistency
996 with other implementations.
997 Blanks may be forcibly appended to such names by
998 appending a single null character (@samp{CHAR(0)})
999 to the significant trailing blanks.
1002 Fix @code{CHMOD} intrinsic to work with file names
1003 that have embedded blanks, commas, and so on.
1006 Fix @code{SIGNAL} intrinsic so it accepts an
1007 optional third @samp{Status} argument.
1010 Fix @code{IDATE()} intrinsic subroutine (VXT form)
1011 so it accepts arguments in the correct order.
1012 Documentation fixed accordingly, and for
1013 @code{GMTIME()} and @code{LTIME()} as well.
1016 Make many changes to @code{libU77} intrinsics to
1017 support existing code more directly.
1019 Such changes include allowing both subroutine and
1020 function forms of many routines, changing @code{MCLOCK()}
1021 and @code{TIME()} to return @code{INTEGER(KIND=1)} values,
1022 introducing @code{MCLOCK8()} and @code{TIME8()} to
1023 return @code{INTEGER(KIND=2)} values,
1024 and placing functions that are intended to perform
1025 side effects in a new intrinsic group, @code{badu77}.
1028 Improve @code{libU77} so it is more portable.
1031 Add options @samp{-fbadu77-intrinsics-delete},
1032 @samp{-fbadu77-intrinsics-hide}, and so on.
1035 Fix crashes involving diagnosed or invalid code.
1038 @code{g77} and @code{gcc} now do a somewhat better
1039 job detecting and diagnosing arrays that are too
1040 large to handle before these cause diagnostics
1041 during the assembler or linker phase, a compiler
1042 crash, or generation of incorrect code.
1045 Make some fixes to alias analysis code.
1048 Add support for @code{restrict} keyword in @code{gcc}
1052 Support @code{gcc} version 2.7.2.3
1053 (modified by @code{g77} into version 2.7.2.3.f.1),
1055 support for prior versions of @code{gcc}.
1058 Incorporate GNAT's patches to the @code{gcc} back
1059 end into @code{g77}'s, so GNAT users do not need
1060 to apply GNAT's patches to build both GNAT and @code{g77}
1061 from the same source tree.
1064 Modify @code{make} rules and related code so that
1065 generation of Info documentation doesn't require
1066 compilation using @code{gcc}.
1067 Now, any ANSI C compiler should be adequate to
1068 produce the @code{g77} documentation (in particular,
1069 the tables of intrinsics) from scratch.
1072 Add @code{INT2} and @code{INT8} intrinsics.
1075 Add @code{CPU_TIME} intrinsic.
1078 Add @code{ALARM} intrinsic.
1081 @code{CTIME} intrinsic now accepts any @code{INTEGER}
1082 argument, not just @code{INTEGER(KIND=2)}.
1085 Warn when explicit type declaration disagrees with
1086 the type of an intrinsic invocation.
1089 Support @samp{*f771} entry in @code{gcc} @file{specs} file.
1092 Fix typo in @code{make} rule @samp{g77-cross}, used only for
1096 Fix @code{libf2c} build procedure to re-archive library
1097 if previous attempt to archive was interrupted.
1100 Change @code{gcc} to unroll loops only during the last
1101 invocation (of as many as two invocations) of loop
1105 Improve handling of @samp{-fno-f2c} so that code that
1106 attempts to pass an intrinsic as an actual argument,
1107 such as @samp{CALL FOO(ABS)}, is rejected due to the fact
1108 that the run-time-library routine is, effectively,
1109 compiled with @samp{-ff2c} in effect.
1112 Fix @code{g77} driver to recognize @samp{-fsyntax-only}
1113 as an option that inhibits linking, just like @samp{-c} or
1114 @samp{-S}, and to recognize and properly handle the
1115 @samp{-nostdlib}, @samp{-M}, @samp{-MM}, @samp{-nodefaultlibs},
1116 and @samp{-Xlinker} options.
1119 Upgrade to @code{libf2c} as of 1997-08-16.
1122 Modify @code{libf2c} to consistently and clearly diagnose
1123 recursive I/O (at run time).
1126 @code{g77} driver now prints version information (such as produced
1127 by @kbd{g77 -v}) to @code{stderr} instead of @code{stdout}.
1130 The @samp{.r} suffix now designates a Ratfor source file,
1131 to be preprocessed via the @code{ratfor} command, available
1135 Fix some aspects of how @code{gcc} determines what kind of
1136 system is being configured and what kinds are supported.
1137 For example, GNU Linux/Alpha ELF systems now are directly
1141 Improve diagnostics.
1144 Improve documentation and indexing.
1147 Include all pertinent files for @code{libf2c} that come
1148 from @code{netlib.bell-labs.com}; give any such files
1149 that aren't quite accurate in @code{g77}'s version of
1150 @code{libf2c} the suffix @samp{.netlib}.
1153 Reserve @code{INTEGER(KIND=0)} for future use.
1156 @c 1997-02-28: 0.5.20 released.
1160 The @samp{-fno-typeless-boz} option is now the default.
1162 This option specifies that non-decimal-radix
1163 constants using the prefixed-radix form (such as @samp{Z'1234'})
1164 are to be interpreted as @code{INTEGER} constants.
1165 Specify @samp{-ftypeless-boz} to cause such
1166 constants to be interpreted as typeless.
1168 (Version 0.5.19 introduced @samp{-fno-typeless-boz} and
1172 Options @samp{-ff90-intrinsics-enable} and
1173 @samp{-fvxt-intrinsics-enable} now are the
1176 Some programs might use names that clash with
1177 intrinsic names defined (and now enabled) by these
1178 options or by the new @code{libU77} intrinsics.
1179 Users of such programs might need to compile them
1180 differently (using, for example, @samp{-ff90-intrinsics-disable})
1181 or, better yet, insert appropriate @code{EXTERNAL}
1182 statements specifying that these names are not intended
1183 to be names of intrinsics.
1186 The @samp{ALWAYS_FLUSH} macro is no longer defined when
1187 building @code{libf2c}, which should result in improved
1188 I/O performance, especially over NFS.
1190 @emph{Note:} If you have code that depends on the behavior
1191 of @code{libf2c} when built with @samp{ALWAYS_FLUSH} defined,
1192 you will have to modify @code{libf2c} accordingly before
1193 building it from this and future versions of @code{g77}.
1196 Dave Love's implementation of @code{libU77} has been
1197 added to the version of @code{libf2c} distributed with
1198 and built as part of @code{g77}.
1199 @code{g77} now knows about the routines in this library
1203 New option @samp{-fvxt} specifies that the
1204 source file is written in VXT Fortran, instead of GNU Fortran.
1207 The @samp{-fvxt-not-f90} option has been deleted,
1208 along with its inverse, @samp{-ff90-not-vxt}.
1210 If you used one of these deleted options, you should
1211 re-read the pertinent documentation to determine which
1212 options, if any, are appropriate for compiling your
1213 code with this version of @code{g77}.
1216 The @samp{-fugly} option now issues a warning, as it
1217 likely will be removed in a future version.
1219 (Enabling all the @samp{-fugly-*} options is unlikely
1220 to be feasible, or sensible, in the future,
1221 so users should learn to specify only those
1222 @samp{-fugly-*} options they really need for a
1223 particular source file.)
1226 The @samp{-fugly-assumed} option, introduced in
1227 version 0.5.19, has been changed to
1228 better accommodate old and new code.
1231 Make a number of fixes to the @code{g77} front end and
1232 the @code{gcc} back end to better support Alpha (AXP)
1234 This includes providing at least one bug-fix to the
1235 @code{gcc} back end for Alphas.
1238 Related to supporting Alpha (AXP) machines, the @code{LOC()}
1239 intrinsic and @code{%LOC()} construct now return
1240 values of integer type that is the same width (holds
1241 the same number of bits) as the pointer type on the
1244 On most machines, this won't make a difference, whereas
1245 on Alphas, the type these constructs return is
1246 @code{INTEGER*8} instead of the more common @code{INTEGER*4}.
1249 Emulate @code{COMPLEX} arithmetic in the @code{g77} front
1250 end, to avoid bugs in @code{complex} support in the
1251 @code{gcc} back end.
1252 New option @samp{-fno-emulate-complex}
1253 causes @code{g77} to revert the 0.5.19 behavior.
1256 Fix bug whereby @samp{REAL A(1)}, for example, caused
1257 a compiler crash if @samp{-fugly-assumed} was in effect
1258 and @var{A} was a local (automatic) array.
1259 That case is no longer affected by the new
1260 handling of @samp{-fugly-assumed}.
1263 Fix @code{g77} command driver so that @samp{g77 -o foo.f}
1264 no longer deletes @file{foo.f} before issuing other
1265 diagnostics, and so the @samp{-x} option is properly
1269 Enable inlining of subroutines and functions by the @code{gcc}
1271 This works as it does for @code{gcc} itself---program units
1272 may be inlined for invocations that follow them in the same
1273 program unit, as long as the appropriate compile-time
1274 options are specified.
1277 Dummy arguments are no longer assumed to potentially alias
1279 other dummy arguments or @code{COMMON} areas when any of
1280 these are defined (assigned to) by Fortran code.
1282 This can result in faster and/or smaller programs when
1283 compiling with optimization enabled, though on some
1284 systems this effect is observed only when @samp{-fforce-addr}
1287 New options @samp{-falias-check}, @samp{-fargument-alias},
1288 @samp{-fargument-noalias},
1289 and @samp{-fno-argument-noalias-global} control the
1290 way @code{g77} handles potential aliasing.
1293 The @code{CONJG()} and @code{DCONJG()} intrinsics now
1294 are compiled in-line.
1297 The bug-fix for 0.5.19.1 has been re-done.
1298 The @code{g77} compiler has been changed back to
1299 assume @code{libf2c} has no aliasing problems in
1300 its implementations of the @code{COMPLEX} (and
1301 @code{DOUBLE COMPLEX}) intrinsics.
1302 The @code{libf2c} has been changed to have no such
1305 As a result, 0.5.20 is expected to offer improved performance
1306 over 0.5.19.1, perhaps as good as 0.5.19 in most
1307 or all cases, due to this change alone.
1309 @emph{Note:} This change requires version 0.5.20 of
1310 @code{libf2c}, at least, when linking code produced
1311 by any versions of @code{g77} other than 0.5.19.1.
1312 Use @samp{g77 -v} to determine the version numbers
1313 of the @code{libF77}, @code{libI77}, and @code{libU77}
1314 components of the @code{libf2c} library.
1315 (If these version numbers are not printed---in
1316 particular, if the linker complains about unresolved
1317 references to names like @samp{g77__fvers__}---that
1318 strongly suggests your installation has an obsolete
1319 version of @code{libf2c}.)
1322 New option @samp{-fugly-assign} specifies that the
1323 same memory locations are to be used to hold the
1324 values assigned by both statements @samp{I = 3} and
1325 @samp{ASSIGN 10 TO I}, for example.
1326 (Normally, @code{g77} uses a separate memory location
1327 to hold assigned statement labels.)
1330 @code{FORMAT} and @code{ENTRY} statements now are allowed to
1331 precede @code{IMPLICIT NONE} statements.
1334 Produce diagnostic for unsupported @code{SELECT CASE} on
1335 @code{CHARACTER} type, instead of crashing, at compile time.
1338 Fix crashes involving diagnosed or invalid code.
1341 Change approach to building @code{libf2c} archive
1342 (@file{libf2c.a}) so that members are added to it
1343 only when truly necessary, so the user that installs
1344 an already-built @code{g77} doesn't need to have write
1345 access to the build tree (whereas the user doing the
1346 build might not have access to install new software
1350 Support @code{gcc} version 2.7.2.2
1351 (modified by @code{g77} into version 2.7.2.2.f.2),
1353 support for prior versions of @code{gcc}.
1356 Upgrade to @code{libf2c} as of 1997-02-08, and
1357 fix up some of the build procedures.
1360 Improve general build procedures for @code{g77},
1361 fixing minor bugs (such as deletion of any file
1362 named @file{f771} in the parent directory of @code{gcc/}).
1365 Enable full support of @code{INTEGER*8} available in
1366 @code{libf2c} and @file{f2c.h} so that @code{f2c} users
1367 may make full use of its features via the @code{g77}
1368 version of @file{f2c.h} and the @code{INTEGER*8}
1369 support routines in the @code{g77} version of @code{libf2c}.
1372 Improve @code{g77} driver and @code{libf2c} so that @samp{g77 -v}
1373 yields version information on the library.
1376 The @code{SNGL} and @code{FLOAT} intrinsics now are
1377 specific intrinsics, instead of synonyms for the
1378 generic intrinsic @code{REAL}.
1381 New intrinsics have been added.
1382 These are @code{REALPART}, @code{IMAGPART},
1384 @code{LONG}, and @code{SHORT}.
1387 A new group of intrinsics, @samp{gnu}, has been added
1388 to contain the new @code{REALPART}, @code{IMAGPART},
1389 and @code{COMPLEX} intrinsics.
1390 An old group, @samp{dcp}, has been removed.
1393 Complain about industry-wide ambiguous references
1394 @samp{REAL(@var{expr})} and @samp{AIMAG(@var{expr})},
1395 where @var{expr} is @code{DOUBLE COMPLEX} (or any
1396 complex type other than @code{COMPLEX}), unless
1397 @samp{-ff90} option specifies Fortran 90 interpretation
1398 or new @samp{-fugly-complex} option, in conjunction with
1399 @samp{-fnot-f90}, specifies @code{f2c} interpretation.
1402 Make improvements to diagnostics.
1405 Speed up compiler a bit.
1408 Improvements to documentation and indexing, including
1409 a new chapter containing information on one, later
1410 more, diagnostics that users are directed to pull
1411 up automatically via a message in the diagnostic itself.
1413 (Hence the menu item @samp{M} for the node
1414 @samp{Diagnostics} in the top-level menu of
1415 the Info documentation.)
1418 @c 1997-02-01: 0.5.19.1 released.
1419 @heading In 0.5.19.1:
1422 Code-generation bugs afflicting operations on complex
1423 data have been fixed.
1425 These bugs occurred when assigning the result of an
1426 operation to a complex variable (or array element)
1427 that also served as an input to that operation.
1429 The operations affected by this bug were: @samp{CONJG()},
1430 @samp{DCONJG()}, @samp{CCOS()}, @samp{CDCOS()},
1431 @samp{CLOG()}, @samp{CDLOG()}, @samp{CSIN()}, @samp{CDSIN()},
1432 @samp{CSQRT()}, @samp{CDSQRT()}, complex division, and
1433 raising a @code{DOUBLE COMPLEX} operand to an @code{INTEGER}
1435 (The related generic and @samp{Z}-prefixed intrinsics,
1436 such as @samp{ZSIN()}, also were affected.)
1438 For example, @samp{C = CSQRT(C)}, @samp{Z = Z/C}, and @samp{Z = Z**I}
1439 (where @samp{C} is @code{COMPLEX} and @samp{Z} is
1440 @code{DOUBLE COMPLEX}) have been fixed.
1443 @c 1996-12-07: 0.5.19 released.
1447 Fix @code{FORMAT} statement parsing so negative values for
1448 specifiers such as @samp{P} (e.g. @samp{FORMAT(-1PF8.1)})
1449 are correctly processed as negative.
1452 Fix @code{SIGNAL} intrinsic so it once again accepts a
1453 procedure as its second argument.
1456 A temporary kludge option provides bare-bones information on
1457 @code{COMMON} and @code{EQUIVALENCE} members at debug time.
1460 New @samp{-fonetrip} option specifies FORTRAN-66-style
1461 one-trip @code{DO} loops.
1464 New @samp{-fno-silent} option causes names of program units
1465 to be printed as they are compiled, in a fashion similar to
1466 UNIX @code{f77} and @code{f2c}.
1469 New @samp{-fugly-assumed} option specifies that arrays
1470 dimensioned via @samp{DIMENSION X(1)}, for example, are to be
1471 treated as assumed-size.
1474 New @samp{-fno-typeless-boz} option specifies that non-decimal-radix
1475 constants using the prefixed-radix form (such as @samp{Z'1234'})
1476 are to be interpreted as @code{INTEGER} constants.
1479 New @samp{-ff66} option is a ``shorthand'' option that specifies
1480 behaviors considered appropriate for FORTRAN 66 programs.
1483 New @samp{-ff77} option is a ``shorthand'' option that specifies
1484 behaviors considered appropriate for UNIX @code{f77} programs.
1487 New @samp{-fugly-comma} and @samp{-fugly-logint} options provided
1488 to perform some of what @samp{-fugly} used to do.
1489 @samp{-fugly} and @samp{-fno-ugly} are now ``shorthand'' options,
1490 in that they do nothing more than enable (or disable) other
1491 @samp{-fugly-*} options.
1494 Fix parsing of assignment statements involving targets that
1495 are substrings of elements of @code{CHARACTER} arrays having
1496 names such as @samp{READ}, @samp{WRITE}, @samp{GOTO}, and
1497 @samp{REALFUNCTIONFOO}.
1500 Fix crashes involving diagnosed code.
1503 Fix handling of local @code{EQUIVALENCE} areas so certain cases
1504 of valid Fortran programs are not misdiagnosed as improperly
1505 extending the area backwards.
1508 Support @code{gcc} version 2.7.2.1.
1511 Upgrade to @code{libf2c} as of 1996-09-26, and
1512 fix up some of the build procedures.
1515 Change code generation for list-directed I/O so it allows
1516 for new versions of @code{libf2c} that might return non-zero
1517 status codes for some operations previously assumed to always
1520 This change not only affects how @code{IOSTAT=} variables
1521 are set by list-directed I/O, it also affects whether
1522 @code{END=} and @code{ERR=} labels are reached by these
1526 Add intrinsic support for new @code{FTELL} and @code{FSEEK}
1527 procedures in @code{libf2c}.
1530 Modify @code{fseek_()} in @code{libf2c} to be more portable
1531 (though, in practice, there might be no systems where this
1532 matters) and to catch invalid @samp{whence} arguments.
1535 Some useless warnings from the @samp{-Wunused} option have
1539 Fix a problem building the @file{f771} executable
1540 on AIX systems by linking with the @samp{-bbigtoc} option.
1543 Abort configuration if @code{gcc} has not been patched
1544 using the patch file provided in the @samp{gcc/f/gbe/}
1548 Add options @samp{--help} and @samp{--version} to the
1549 @code{g77} command, to conform to GNU coding guidelines.
1550 Also add printing of @code{g77} version number when
1551 the @samp{--verbose} (@samp{-v}) option is used.
1554 Change internally generated name for local @code{EQUIVALENCE}
1555 areas to one based on the alphabetically sorted first name
1556 in the list of names for entities placed at the beginning
1560 Improvements to documentation and indexing.
1563 @c 1996-04-01: 0.5.18 released.
1567 Add some rudimentary support for @code{INTEGER*1},
1568 @code{INTEGER*2}, @code{INTEGER*8},
1569 and their @code{LOGICAL} equivalents.
1570 (This support works on most, maybe all, @code{gcc} targets.)
1572 Thanks to Scott Snyder (@email{snyder@@d0sgif.fnal.gov})
1573 for providing the patch for this!
1575 Among the missing elements from the support for these
1576 features are full intrinsic support and constants.
1579 Add some rudimentary support for the @code{BYTE} and
1580 @code{WORD} type-declaration statements.
1581 @code{BYTE} corresponds to @code{INTEGER*1},
1582 while @code{WORD} corresponds to @code{INTEGER*2}.
1584 Thanks to Scott Snyder (@email{snyder@@d0sgif.fnal.gov})
1585 for providing the patch for this!
1588 The compiler code handling intrinsics has been largely
1589 rewritten to accommodate the new types.
1590 No new intrinsics or arguments for existing
1591 intrinsics have been added, so there is, at this
1592 point, no intrinsic to convert to @code{INTEGER*8},
1596 Support automatic arrays in procedures.
1599 Reduce space/time requirements for handling large
1600 @emph{sparsely} initialized aggregate arrays.
1601 This improvement applies to only a subset of
1602 the general problem to be addressed in 0.6.
1605 Treat initial values of zero as if they weren't
1606 specified (in DATA and type-declaration statements).
1607 The initial values will be set to zero anyway, but the amount
1608 of compile time processing them will be reduced,
1609 in some cases significantly (though, again, this
1610 is only a subset of the general problem to be
1613 A new option, @samp{-fzeros}, is introduced to
1614 enable the traditional treatment of zeros as any
1618 With @samp{-ff90} in force, @code{g77} incorrectly
1619 interpreted @samp{REAL(Z)} as returning a @code{REAL}
1620 result, instead of as a @code{DOUBLE PRECISION}
1622 (Here, @samp{Z} is @code{DOUBLE COMPLEX}.)
1624 With @samp{-fno-f90} in force, the interpretation remains
1625 unchanged, since this appears to be how at least some
1626 F77 code using the @code{DOUBLE COMPLEX} extension expected
1629 Essentially, @samp{REAL(Z)} in F90 is the same as
1630 @samp{DBLE(Z)}, while in extended F77, it appears to
1631 be the same as @samp{REAL(REAL(Z))}.
1634 An expression involving exponentiation, where both operands
1635 were type @code{INTEGER} and the right-hand operand
1636 was negative, was erroneously evaluated.
1639 Fix bugs involving @code{DATA} implied-@code{DO} constructs
1640 (these involved an errant diagnostic and a crash, both on good
1641 code, one involving subsequent statement-function definition).
1644 Close @code{INCLUDE} files after processing them, so compiling source
1645 files with lots of @code{INCLUDE} statements does not result in
1646 being unable to open @code{INCLUDE} files after all the available
1647 file descriptors are used up.
1650 Speed up compiling, especially of larger programs, and perhaps
1651 slightly reduce memory utilization while compiling (this is
1652 @emph{not} the improvement planned for 0.6 involving large aggregate
1653 areas)---these improvements result from simply turning
1654 off some low-level code to do self-checking that hasn't been
1655 triggered in a long time.
1658 Introduce three new options that
1659 implement optimizations in the @code{gcc} back end (GBE).
1660 These options are @samp{-fmove-all-movables}, @samp{-freduce-all-givs},
1661 and @samp{-frerun-loop-opt}, which are enabled, by default,
1662 for Fortran compilations.
1663 These optimizations are intended to help toon Fortran programs.
1666 Patch the GBE to do a better job optimizing certain
1667 kinds of references to array elements.
1670 Due to patches to the GBE, the version number of @code{gcc}
1671 also is patched to make it easier to manage installations,
1672 especially useful if it turns out a @code{g77} change to the
1675 The @code{g77}-modified version number is the @code{gcc}
1676 version number with the string @samp{.f.@var{n}} appended,
1677 where @samp{f} identifies the version as enhanced for
1678 Fortran, and @var{n} is @samp{1} for the first Fortran
1679 patch for that version of @code{gcc}, @samp{2} for the
1682 So, this introduces version 2.7.2.f.1 of @code{gcc}.
1685 Make several improvements and fixes to diagnostics, including
1686 the removal of two that were inappropriate or inadequate.
1689 Warning about two successive arithmetic operators, produced
1690 by @samp{-Wsurprising}, now produced @emph{only} when both
1691 operators are, indeed, arithmetic (not relational/boolean).
1694 @samp{-Wsurprising} now warns about the remaining cases
1695 of using non-integral variables for implied-@code{DO}
1696 loops, instead of these being rejected unless @samp{-fpedantic}
1697 or @samp{-fugly} specified.
1700 Allow @code{SAVE} of a local variable or array, even after
1701 it has been given an initial value via @code{DATA}, for example.
1704 Introduce an Info version of @code{g77} documentation, which
1705 supercedes @file{gcc/f/CREDITS}, @file{gcc/f/DOC}, and
1706 @file{gcc/f/PROJECTS}.
1707 These files will be removed in a future release.
1708 The files @file{gcc/f/BUGS}, @file{gcc/f/INSTALL}, and
1709 @file{gcc/f/NEWS} now are automatically built from
1710 the texinfo source when distributions are made.
1712 This effort was inspired by a first pass at translating
1713 @file{g77-0.5.16/f/DOC} that was contributed to Craig by
1714 David Ronis (@email{ronis@@onsager.chem.mcgill.ca}).
1717 New @samp{-fno-second-underscore} option to specify
1718 that, when @samp{-funderscoring} is in effect, a second
1719 underscore is not to be appended to Fortran names already
1720 containing an underscore.
1723 Change the way iterative @code{DO} loops work to follow
1725 In particular, calculation of the iteration count is
1726 still done by converting the start, end, and increment
1727 parameters to the type of the @code{DO} variable, but
1728 the result of the calculation is always converted to
1729 the default @code{INTEGER} type.
1731 (This should have no effect on existing code compiled
1732 by @code{g77}, but code written to assume that use
1733 of a @emph{wider} type for the @code{DO} variable
1734 will result in an iteration count being fully calculated
1735 using that wider type (wider
1736 than default @code{INTEGER}) must be rewritten.)
1739 Support @code{gcc} version 2.7.2.
1742 Upgrade to @code{libf2c} as of 1996-03-23, and
1743 fix up some of the build procedures.
1745 Note that the email addresses related to @code{f2c}
1746 have changed---the distribution site now is
1747 named @code{netlib.bell-labs.com}, and the
1748 maintainer's new address is @email{dmg@@bell-labs.com}.
1751 @c 1995-11-18: 0.5.17 released.
1755 @strong{Fix serious bug} in @samp{g77 -v} command that can cause removal of a
1756 system's @file{/dev/null} special file if run by user @samp{root}.
1758 @strong{All users} of version 0.5.16 should ensure that
1759 they have not removed @file{/dev/null} or replaced it with an ordinary
1760 file (e.g. by comparing the output of @samp{ls -l /dev/null} with
1761 @samp{ls -l /dev/zero}.
1762 If the output isn't basically the
1763 same, contact your system
1764 administrator about restoring @file{/dev/null} to its proper status).
1766 This bug is particularly insidious because removing @file{/dev/null} as
1767 a special file can go undetected for quite a while, aside from
1768 various applications and programs exhibiting sudden, strange
1771 I sincerely apologize for not realizing the
1772 implications of the fact that when @samp{g77 -v} runs the @code{ld} command
1773 with @samp{-o /dev/null} that @code{ld} tries to @emph{remove} the executable
1774 it is supposed to build (especially if it reports unresolved
1775 references, which it should in this case)!
1778 Fix crash on @samp{CHARACTER*(*) FOO} in a main or block data program unit.
1781 Fix crash that can occur when diagnostics given outside of any
1782 program unit (such as when input file contains @samp{@@foo}).
1785 Fix crashes, infinite loops (hangs), and such involving diagnosed code.
1788 Fix @code{ASSIGN}'ed variables so they can be @code{SAVE}'d or dummy arguments,
1789 and issue clearer error message in cases where target of @code{ASSIGN}
1790 or @code{ASSIGN}ed @code{GOTO}/@code{FORMAT} is too small (which should
1794 Make @code{libf2c} build procedures work on more systems again by
1795 eliminating unnecessary invocations of @samp{ld -r -x} and @samp{mv}.
1798 Fix omission of @samp{-funix-intrinsics-@dots{}} options in list of permitted
1799 options to compiler.
1802 Fix failure to always diagnose missing type declaration for
1803 @code{IMPLICIT NONE}.
1806 Fix compile-time performance problem (which could sometimes
1807 crash the compiler, cause a hang, or whatever, due to a bug
1808 in the back end) involving exponentiation with a large @code{INTEGER}
1809 constant for the right-hand operator (e.g. @samp{I**32767}).
1812 Fix build procedures so cross-compiling @code{g77} (the @code{fini}
1813 utility in particular) is properly built using the host compiler.
1816 Add new @samp{-Wsurprising} option to warn about constructs that are
1817 interpreted by the Fortran standard (and @code{g77}) in ways that
1818 are surprising to many programmers.
1821 Add @code{ERF()} and @code{ERFC()} as generic intrinsics mapping to existing
1822 @code{ERF}/@code{DERF} and @code{ERFC}/@code{DERFC} specific intrinsics.
1824 @emph{Note:} You should
1825 specify @samp{INTRINSIC ERF,ERFC} in any code where you might use
1826 these as generic intrinsics, to improve likelihood of diagnostics
1827 (instead of subtle run-time bugs) when using a compiler that
1828 doesn't support these as intrinsics (e.g. @code{f2c}).
1831 Remove from @samp{-fno-pedantic} the diagnostic about @code{DO}
1832 with non-@code{INTEGER} index variable; issue that under
1833 @samp{-Wsurprising} instead.
1836 Clarify some diagnostics that say things like ``ignored'' when that's
1840 Clarify diagnostic on use of @code{.EQ.}/@code{.NE.} on @code{LOGICAL}
1844 Minor improvements to code generation for various operations on
1845 @code{LOGICAL} operands.
1848 Minor improvement to code generation for some @code{DO} loops on some
1852 Support @code{gcc} version 2.7.1.
1855 Upgrade to @code{libf2c} as of 1995-11-15.
1858 @c 1995-08-30: 0.5.16 released.
1862 Fix a code-generation bug involving complicated @code{EQUIVALENCE} statements
1863 not involving @code{COMMON}.
1866 Fix code-generation bugs involving invoking ``gratis'' library procedures
1867 in @code{libf2c} from code compiled with @samp{-fno-f2c} by making these
1868 procedures known to @code{g77} as intrinsics (not affected by -fno-f2c).
1869 This is known to fix code invoking @code{ERF()}, @code{ERFC()},
1870 @code{DERF()}, and @code{DERFC()}.
1873 Update @code{libf2c} to include netlib patches through 1995-08-16, and
1874 @code{#define} @samp{WANT_LEAD_0} to 1 to make @code{g77}-compiled code more
1875 consistent with other Fortran implementations by outputting
1876 leading zeros in formatted and list-directed output.
1879 Fix a code-generation bug involving adjustable dummy arrays with high
1880 bounds whose primaries are changed during procedure execution, and
1881 which might well improve code-generation performance for such arrays
1882 compared to @code{f2c} plus @code{gcc} (but apparently only when using
1883 @file{gcc-2.7.0} or later).
1886 Fix a code-generation bug involving invocation of @code{COMPLEX} and
1887 @code{DOUBLE COMPLEX} @code{FUNCTION}s and doing @code{COMPLEX} and
1888 @code{DOUBLE COMPLEX} divides, when the result
1889 of the invocation or divide is assigned directly to a variable
1890 that overlaps one or more of the arguments to the invocation or divide.
1893 Fix crash by not generating new optimal code for @samp{X**I} if @samp{I} is
1894 nonconstant and the expression is used to dimension a dummy
1895 array, since the @code{gcc} back end does not support the necessary
1896 mechanics (and the @code{gcc} front end rejects the equivalent
1897 construct, as it turns out).
1900 Fix crash on expressions like @samp{COMPLEX**INTEGER}.
1903 Fix crash on expressions like @samp{(1D0,2D0)**2}, i.e. raising a
1904 @code{DOUBLE COMPLEX} constant to an @code{INTEGER} constant power.
1907 Fix crashes and such involving diagnosed code.
1910 Diagnose, instead of crashing on, statement function definitions
1911 having duplicate dummy argument names.
1914 Fix bug causing rejection of good code involving statement function
1918 Fix bug resulting in debugger not knowing size of local equivalence
1919 area when any member of area has initial value (via @code{DATA},
1923 Fix installation bug that prevented installation of @code{g77} driver.
1924 Provide for easy selection of whether to install copy of @code{g77}
1925 as @code{f77} to replace the broken code.
1928 Fix @code{gcc} driver (affects @code{g77} thereby) to not
1929 gratuitously invoke the
1930 @code{f771} program (e.g. when @samp{-E} is specified).
1933 Fix diagnostic to point to correct source line when it immediately
1934 follows an @code{INCLUDE} statement.
1937 Support more compiler options in @code{gcc}/@code{g77} when
1938 compiling Fortran files.
1939 These options include @samp{-p}, @samp{-pg}, @samp{-aux-info}, @samp{-P},
1940 correct setting of version-number macros for preprocessing, full
1941 recognition of @samp{-O0}, and
1942 automatic insertion of configuration-specific linker specs.
1945 Add new intrinsics that interface to existing routines in @code{libf2c}:
1946 @code{ABORT}, @code{DERF}, @code{DERFC}, @code{ERF}, @code{ERFC}, @code{EXIT},
1947 @code{FLUSH}, @code{GETARG}, @code{GETENV}, @code{IARGC},
1948 @code{SIGNAL}, and @code{SYSTEM}.
1949 Note that @code{ABORT}, @code{EXIT}, @code{FLUSH}, @code{SIGNAL}, and
1950 @code{SYSTEM} are intrinsic subroutines, not functions (since they
1951 have side effects), so to get the return values from @code{SIGNAL}
1952 and @code{SYSTEM}, append a final argument specifying an @code{INTEGER}
1953 variable or array element (e.g. @samp{CALL SYSTEM('rm foo',ISTAT)}).
1956 Add new intrinsic group named @samp{unix} to contain the new intrinsics,
1957 and by default enable this new group.
1960 Move @code{LOC()} intrinsic out of the @samp{vxt} group to the new
1964 Improve @code{g77} so that @samp{g77 -v} by itself (or with
1965 certain other options, including @samp{-B}, @samp{-b}, @samp{-i},
1966 @samp{-nostdlib}, and @samp{-V}) reports lots more useful
1967 version info, and so that long-form options @code{gcc} accepts are
1968 understood by @code{g77} as well (even in truncated, unambiguous forms).
1971 Add new @code{g77} option @samp{--driver=name} to specify driver when
1972 default, @code{gcc}, isn't appropriate.
1975 Add support for @samp{#} directives (as output by the preprocessor) in the
1976 compiler, and enable generation of those directives by the
1977 preprocessor (when compiling @samp{.F} files) so diagnostics and debugging
1978 info are more useful to users of the preprocessor.
1981 Produce better diagnostics, more like @code{gcc}, with info such as
1982 @samp{In function `foo':} and @samp{In file included from...:}.
1985 Support @code{gcc}'s @samp{-fident} and @samp{-fno-ident} options.
1988 When @samp{-Wunused} in effect, don't warn about local variables used as
1989 statement-function dummy arguments or @code{DATA} implied-@code{DO} iteration
1990 variables, even though, strictly speaking, these are not uses
1991 of the variables themselves.
1994 When @samp{-W -Wunused} in effect, don't warn about unused dummy arguments
1995 at all, since there's no way to turn this off for individual
1996 cases (@code{g77} might someday start warning about these)---applies
1997 to @code{gcc} versions 2.7.0 and later, since earlier versions didn't
1998 warn about unused dummy arguments.
2001 New option @samp{-fno-underscoring} that inhibits transformation of names
2002 (by appending one or two underscores) so users may experiment
2003 with implications of such an environment.
2006 Minor improvement to @file{gcc/f/info} module to make it easier to build
2007 @code{g77} using the native (non-@code{gcc}) compiler on certain machines
2008 (but definitely not all machines nor all non-@code{gcc} compilers).
2010 do not report bugs showing problems compilers have with
2011 macros defined in @file{gcc/f/target.h} and used in places like
2012 @file{gcc/f/expr.c}.
2015 Add warning to be printed for each invocation of the compiler
2016 if the target machine @code{INTEGER}, @code{REAL}, or @code{LOGICAL} size
2018 since @code{g77} is known to not work well for such cases (to be
2019 fixed in Version 0.6---@pxref{Actual Bugs,,Actual Bugs We Haven't Fixed Yet}).
2022 Lots of new documentation (though work is still needed to put it into
2023 canonical GNU format).
2026 Build @code{libf2c} with @samp{-g0}, not @samp{-g2}, in effect
2027 (by default), to produce
2028 smaller library without lots of debugging clutter.
2031 @c 1995-05-19: 0.5.15 released.
2035 Fix bad code generation involving @samp{X**I} and temporary, internal variables
2036 generated by @code{g77} and the back end (such as for @code{DO} loops).
2039 Fix crash given @samp{CHARACTER A;DATA A/.TRUE./}.
2042 Replace crash with diagnostic given @samp{CHARACTER A;DATA A/1.0/}.
2045 Fix crash or other erratic behavior when null character constant
2046 (@samp{''}) is encountered.
2049 Fix crash or other erratic behavior involving diagnosed code.
2052 Fix code generation for external functions returning type @code{REAL} when
2053 the @samp{-ff2c} option is in force (which it is by default) so that
2054 @code{f2c} compatibility is indeed provided.
2057 Disallow @samp{COMMON I(10)} if @samp{I} has previously been specified
2058 with an array declarator.
2061 New @samp{-ffixed-line-length-@var{n}} option, where @var{n} is the
2063 of a typical fixed-form line, defaulting to 72 columns, such
2064 that characters beyond column @var{n} are ignored, or @var{n} is @samp{none},
2065 meaning no characters are ignored.
2066 does not affect lines
2067 with @samp{&} in column 1, which are always processed as if
2068 @samp{-ffixed-line-length-none} was in effect.
2071 No longer generate better code for some kinds of array references,
2072 as @code{gcc} back end is to be fixed to do this even better, and it
2073 turned out to slow down some code in some cases after all.
2076 In @code{COMMON} and @code{EQUIVALENCE} areas with any members given initial
2077 values (e.g. via @code{DATA}), uninitialized members now always
2078 initialized to binary zeros (though this is not required by
2079 the standard, and might not be done in future versions
2081 Previously, in some @code{COMMON}/@code{EQUIVALENCE} areas
2082 (essentially those with members of more than one type), the
2083 uninitialized members were initialized to spaces, to
2084 cater to @code{CHARACTER} types, but it seems no existing code expects
2085 that, while much existing code expects binary zeros.
2091 Don't emit bad code when low bound of adjustable array is nonconstant
2092 and thus might vary as an expression at run time.
2095 Emit correct code for calculation of number of trips in @code{DO} loops
2097 where the loop should not execute at all.
2098 (This bug affected cases
2099 where the difference between the begin and end values was less
2100 than the step count, though probably not for floating-point cases.)
2103 Fix crash when extra parentheses surround item in
2104 @code{DATA} implied-@code{DO} list.
2107 Fix crash over minor internal inconsistencies in handling diagnostics,
2108 just substitute dummy strings where necessary.
2111 Fix crash on some systems when compiling call to @code{MVBITS()} intrinsic.
2114 Fix crash on array assignment @samp{TYPE@var{ddd}(@dots{})=@dots{}}, where @var{ddd}
2115 is a string of one or more digits.
2118 Fix crash on @code{DCMPLX()} with a single @code{INTEGER} argument.
2121 Fix various crashes involving code with diagnosed errors.
2124 Support @samp{-I} option for @code{INCLUDE} statement, plus @code{gcc}'s
2125 @file{header.gcc} facility for handling systems like MS-DOS.
2128 Allow @code{INCLUDE} statement to be continued across multiple lines,
2129 even allow it to coexist with other statements on the same line.
2132 Incorporate Bellcore fixes to @code{libf2c} through 1995-03-15---this
2133 fixes a bug involving infinite loops reading EOF with empty list-directed
2137 Remove all the @code{g77}-specific auto-configuration scripts, code,
2139 except for temporary substitutes for bsearch() and strtoul(), as
2140 too many configure/build problems were reported in these areas.
2141 People will have to fix their systems' problems themselves, or at
2142 least somewhere other than @code{g77}, which expects a working ANSI C
2143 environment (and, for now, a GNU C compiler to compile @code{g77} itself).
2146 Complain if initialized common redeclared as larger in subsequent program
2150 Warn if blank common initialized, since its size can vary and hence
2151 related warnings that might be helpful won't be seen.
2154 New @samp{-fbackslash} option, on by default, that causes @samp{\}
2155 within @code{CHARACTER}
2156 and Hollerith constants to be interpreted a la GNU C.
2158 this behavior is somewhat different from @code{f2c}'s, which supports only
2159 a limited subset of backslash (escape) sequences.
2162 Make @samp{-fugly-args} the default.
2165 New @samp{-fugly-init} option, on by default, that allows typeless/Hollerith
2166 to be specified as initial values for variables or named constants
2167 (@code{PARAMETER}), and also allows character<->numeric conversion in
2168 those contexts---turn off via @samp{-fno-ugly-init}.
2171 New @samp{-finit-local-zero} option to initialize
2172 local variables to binary zeros.
2173 This does not affect whether they are @code{SAVE}d, i.e. made
2174 automatic or static.
2177 New @samp{-Wimplicit} option to warn about implicitly typed variables, arrays,
2179 (Basically causes all program units to default to @code{IMPLICIT NONE}.)
2182 @samp{-Wall} now implies @samp{-Wuninitialized} as with @code{gcc}
2183 (i.e. unless @samp{-O} not specified, since @samp{-Wuninitialized}
2184 requires @samp{-O}), and implies @samp{-Wunused} as well.
2187 @samp{-Wunused} no longer gives spurious messages for unused
2188 @code{EXTERNAL} names (since they are assumed to refer to block data
2189 program units, to make use of libraries more reliable).
2192 Support @code{%LOC()} and @code{LOC()} of character arguments.
2195 Support null (zero-length) character constants and expressions.
2198 Support @code{f2c}'s @code{IMAG()} generic intrinsic.
2201 Support @code{ICHAR()}, @code{IACHAR()}, and @code{LEN()} of
2202 character expressions that are valid in assignments but
2203 not normally as actual arguments.
2206 Support @code{f2c}-style @samp{&} in column 1 to mean continuation line.
2209 Allow @code{NAMELIST}, @code{EXTERNAL}, @code{INTRINSIC}, and @code{VOLATILE}
2210 in @code{BLOCK DATA}, even though these are not allowed by the standard.
2213 Allow @code{RETURN} in main program unit.
2216 Changes to Hollerith-constant support to obey Appendix C of the
2221 Now padded on the right with zeros, not spaces.
2224 Hollerith ``format specifications'' in the form of arrays of
2225 non-character allowed.
2228 Warnings issued when non-space truncation occurs when converting
2232 When specified as actual argument, now passed
2233 by reference to @code{INTEGER} (padded on right with spaces if constant
2234 too small, otherwise fully intact if constant wider the @code{INTEGER}
2235 type) instead of by value.
2238 @strong{Warning:} @code{f2c} differs on the
2239 interpretation of @samp{CALL FOO(1HX)}, which it treats exactly the
2240 same as @samp{CALL FOO('X')}, but which the standard and @code{g77} treat
2241 as @samp{CALL FOO(%REF('X '))} (padded with as many spaces as necessary
2242 to widen to @code{INTEGER}), essentially.
2245 Changes and fixes to typeless-constant support:
2249 Now treated as a typeless double-length @code{INTEGER} value.
2252 Warnings issued when overflow occurs.
2255 Padded on the left with zeros when converting
2259 Should be properly aligned and ordered on
2260 the target machine for whatever type it is turned into.
2263 When specified as actual argument, now passed as reference to
2264 a default @code{INTEGER} constant.
2268 @code{%DESCR()} of a non-@code{CHARACTER} expression now passes a pointer to
2269 the expression plus a length for the expression just as if
2270 it were a @code{CHARACTER} expression.
2271 For example, @samp{CALL FOO(%DESCR(D))}, where
2272 @samp{D} is @code{REAL*8}, is the same as @samp{CALL FOO(D,%VAL(8)))}.
2275 Name of multi-entrypoint master function changed to incorporate
2276 the name of the primary entry point instead of a decimal
2277 value, so the name of the master function for @samp{SUBROUTINE X}
2278 with alternate entry points is now @samp{__g77_masterfun_x}.
2281 Remove redundant message about zero-step-count @code{DO} loops.
2284 Clean up diagnostic messages, shortening many of them.
2287 Fix typo in @code{g77} man page.
2290 Clarify implications of constant-handling bugs in @file{f/BUGS}.
2293 Generate better code for @samp{**} operator with a right-hand operand of
2294 type @code{INTEGER}.
2297 Generate better code for @code{SQRT()} and @code{DSQRT()},
2298 also when @samp{-ffast-math}
2299 specified, enable better code generation for @code{SIN()} and @code{COS()}.
2302 Generate better code for some kinds of array references.
2305 Speed up lexing somewhat (this makes the compilation phase noticeably