OSDN Git Service

b64ba3d3d1fc420485d7c2e70363191deaa1091e
[pf3gnuchains/gcc-fork.git] / gcc / f / news.texi
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.
4
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.
7
8 @c 1998-05-20
9
10 @ifclear NEWSONLY
11 @node News
12 @chapter News About GNU Fortran
13 @end ifclear
14 @cindex versions, recent
15 @cindex recent versions
16
17 Changes made to recent versions of GNU Fortran are listed
18 below, with the most recent version first.
19
20 The changes are generally listed in order:
21
22 @enumerate
23 @item
24 Code-generation and run-time-library bug-fixes
25
26 @item
27 Compiler and run-time-library crashes involving valid code
28 that have been fixed
29
30 @item
31 New features
32
33 @item
34 Fixes and enhancements to existing features
35
36 @item
37 New diagnostics
38
39 @item
40 Internal improvements
41
42 @item
43 Miscellany
44 @end enumerate
45
46 This order is not strict---for example, some items
47 involve a combination of these elements.
48
49 @heading In 0.5.24:
50 @itemize @bullet
51 @item
52 The @code{g77} driver now ensures that @samp{-lg2c}
53 is specified in the link phase prior to any
54 occurrence of @samp{-lm}.
55 This prevents accidentally linking to a routine
56 in the SunOS4 @samp{-lm} library
57 when the generated code wants to link to the one
58 in @code{libf2c} (@code{libg2c}).
59
60 @item
61 @code{g77} no longer produces incorrect code
62 and initial values
63 for @samp{EQUIVALENCE} and @samp{COMMON}
64 aggregates that, due to ``unnatural'' ordering of members
65 vis-a-vis their types, require initial padding.
66
67 @item
68 @code{g77} no longer crashes when compiling code
69 containing specification statements such as
70 @samp{INTEGER(KIND=7) PTR}.
71
72 @item
73 @code{g77} now treats @samp{%LOC(@var{expr})} and
74 @samp{LOC(@var{expr})} as ``ordinary'' expressions
75 when they are used as arguments in procedure calls.
76 This change applies only to global (filewide) analysis,
77 making it consistent with
78 how @code{g77} actually generates code
79 for these cases.
80
81 Previously, @code{g77} treated these expressions
82 as denoting special ``pointer'' arguments
83 for the purposes of filewide analysis.
84
85 @item
86 Improve documentation and indexing.
87 @end itemize
88
89 @heading In 0.5.23:
90 @itemize @bullet
91 @item
92 This release contains several regressions against
93 version 0.5.22 of @code{g77}, due to using the
94 ``vanilla'' @code{gcc} back end instead of patching
95 it to fix a few bugs and improve performance in a
96 few cases.
97
98 @xref{Actual Bugs,,Actual Bugs We Haven't Fixed Yet},
99 available in plain-text format in @code{gcc/f/BUGS},
100 for information on the known bugs in this version,
101 including the regressions.
102
103 Features that have been dropped from this version
104 of @code{g77} due to their being implemented
105 via @code{g77}-specific patches to the @code{gcc}
106 back end in previous releases include:
107
108 @itemize --
109 @item
110 Support for @code{__restrict__} keyword,
111 the options @samp{-fargument-alias}, @samp{-fargument-noalias},
112 and @samp{-fargument-noalias-global},
113 and the corresponding alias-analysis code.
114
115 (Version 1.0.1 of @code{egcs} has the alias-analysis
116 code, but not the @code{__restrict__} keyword.
117 @code{egcs} @code{g77} users benefit from the alias-analysis
118 code despite the lack of the @code{__restrict__} keyword,
119 which is a C-language construct.)
120
121 @item
122 Support for the GNU compiler options
123 @samp{-fmove-all-movables},
124 @samp{-freduce-all-givs},
125 and @samp{-frerun-loop-opt}.
126
127 (Version 1.0.1 of @code{egcs} supports these options.
128 @code{g77} users of @code{egcs} benefit from them even if
129 they are not explicitly specified,
130 because the defaults are optimized for @code{g77} users.)
131
132 @item
133 Support for the @samp{-W} option warning about
134 integer division by zero.
135
136 @item
137 The Intel x86-specific option @samp{-malign-double}
138 applying to stack-allocated data
139 as well as statically-allocate data.
140 @end itemize
141
142 Note that the @file{gcc/f/gbe/} subdirectory has been removed
143 from this distribution as a result of @code{g77} no longer
144 including patches for the @code{gcc} back end.
145
146 @item
147 Fix bugs in the @code{libU77} intrinsic @samp{HostNm}
148 that wrote one byte beyond the end of its @samp{CHARACTER}
149 argument,
150 and in the @code{libU77} intrinsics
151 @samp{GMTime} and @samp{LTime}
152 that overwrote their arguments.
153
154 @item
155 Support @code{gcc} version 2.8,
156 and remove support for prior versions of @code{gcc}.
157
158 @cindex -@w{}-driver option
159 @cindex g77 options, -@w{}-driver
160 @cindex options, -@w{}-driver
161 @item
162 Remove support for the @samp{--driver} option,
163 as @code{g77} now does all the driving,
164 just like @code{gcc}.
165
166 @item
167 @code{CASE DEFAULT} no longer crashes @code{g77}.
168
169 @item
170 Valid combinations of @code{EXTERNAL},
171 passing that external as a dummy argument
172 without explicitly giving it a type,
173 and, in a subsequent program unit,
174 referencing that external as
175 an external function with a different type
176 no longer crash @code{g77}.
177
178 @item
179 @code{g77} no longer installs the @file{f77} command
180 and @file{f77.1} man page
181 in the @file{/usr} or @file{/usr/local} heirarchy,
182 even if the @file{f77-install-ok} file exists
183 in the source or build directory.
184 See the installation documentation for more information.
185
186 @item
187 @code{g77} no longer installs the @file{libf2c.a} library
188 and @file{f2c.h} include file
189 in the @file{/usr} or @file{/usr/local} heirarchy,
190 even if the @file{f2c-install-ok} or @file{f2c-exists-ok} files exist
191 in the source or build directory.
192 See the installation documentation for more information.
193
194 @item
195 The @file{libf2c.a} library produced by @code{g77} has been
196 renamed to @file{libg2c.a}.
197 It is installed only in the @code{gcc} ``private''
198 directory heirarchy, @file{gcc-lib}.
199 This allows system administrators and users to choose which
200 version of the @code{libf2c} library from @code{netlib} they
201 wish to use on a case-by-case basis.
202 See the installation documentation for more information.
203
204 @item
205 The @file{f2c.h} include (header) file produced by @code{g77}
206 has been renamed to @file{g2c.h}.
207 It is installed only in the @code{gcc} ``private''
208 directory heirarchy, @file{gcc-lib}.
209 This allows system administrators and users to choose which
210 version of the include file from @code{netlib} they
211 wish to use on a case-by-case basis.
212 See the installation documentation for more information.
213
214 @item
215 The @code{g77} command now expects the run-time library
216 to be named @code{libg2c.a} instead of @code{libf2c.a},
217 to ensure that a version other than the one built and
218 installed as part of the same @code{g77} version is picked up.
219
220 @item
221 The @samp{-Wunused} option no longer issues a spurious
222 warning about the ``master'' procedure generated by
223 @code{g77} for procedures containing @code{ENTRY} statements.
224
225 @item
226 @code{g77}'s version of @code{libf2c} separates out
227 the setting of global state
228 (such as command-line arguments and signal handling)
229 from @file{main.o} into distinct, new library
230 archive members.
231
232 This should make it easier to write portable applications
233 that have their own (non-Fortran) @code{main()} routine
234 properly set up the @code{libf2c} environment, even
235 when @code{libf2c} (now @code{libg2c}) is a shared library.
236
237 @item
238 During the configuration and build process,
239 @code{g77} creates subdirectories it needs only as it
240 needs them, thus avoiding unnecessary creation of, for example,
241 @file{stage1/f/runtime} when doing a non-bootstrap build.
242 Other cleaning up of the configuration and build process
243 has been performed as well.
244
245 @item
246 @code{install-info} now used to update the directory of
247 Info documentation to contain an entry for @code{g77}
248 (during installation).
249
250 @item
251 Some diagnostics have been changed from warnings to errors,
252 to prevent inadvertent use of the resulting, probably buggy,
253 programs.
254 These mostly include diagnostics about use of unsupported features
255 in the @code{OPEN}, @code{INQUIRE}, @code{READ}, and
256 @code{WRITE} statements,
257 and about truncations of various sorts of constants.
258
259 @item
260 Improve documentation and indexing.
261
262 @item
263 Upgrade to @code{libf2c} as of 1998-04-20.
264
265 This should fix a variety of problems, including
266 those involving some uses of the @samp{T} format
267 specifier, and perhaps some build (porting) problems
268 as well.
269 @end itemize
270
271 @heading In 0.5.22:
272 @itemize @bullet
273 @item
274 Fix code generation for iterative @code{DO} loops that
275 have one or more references to the iteration variable,
276 or to aliases of it, in their control expressions.
277 For example, @samp{DO 10 J=2,J} now is compiled correctly.
278
279 @cindex DNRM2
280 @cindex stack, 387 coprocessor
281 @cindex ix86
282 @cindex -O2
283 @item
284 Fix a code-generation bug that afflicted
285 Intel x86 targets when @samp{-O2} was specified
286 compiling, for example, an old version of
287 the @samp{DNRM2} routine.
288
289 The x87 coprocessor stack was being
290 mismanaged in cases involving assigned @code{GOTO}
291 and @code{ASSIGN}.
292
293 @item
294 Fix @code{DTime} intrinsic so as not to truncate
295 results to integer values (on some systems).
296
297 @item
298 Fix @code{SIGNAL} intrinsic so it offers portable
299 support for 64-bit systems (such as Digital Alphas
300 running GNU/Linux).
301
302 @item
303 Fix run-time crash involving @code{NAMELIST} on 64-bit
304 machines such as Alphas.
305
306 @item
307 Fix @code{g77} version of @code{libf2c} so it no longer
308 produces a spurious @samp{I/O recursion} diagnostic at run time
309 when an I/O operation (such as @samp{READ *,I}) is interrupted
310 in a manner that causes the program to be terminated
311 via the @samp{f_exit} routine (such as via @kbd{C-c}).
312
313 @item
314 Fix @code{g77} crash triggered by @code{CASE} statement with
315 an omitted lower or upper bound.
316
317 @item
318 Fix @code{g77} crash compiling references to @code{CPU_Time}
319 intrinsic.
320
321 @item
322 Fix @code{g77} crash
323 (or apparently infinite run-time)
324 when compiling certain complicated expressions
325 involving @code{COMPLEX} arithmetic
326 (especially multiplication).
327
328 @item
329 Fix @code{g77} crash on statements such as
330 @samp{PRINT *, (REAL(Z(I)),I=1,2)}, where
331 @samp{Z} is @code{DOUBLE COMPLEX}.
332
333 @item
334 Fix a @code{g++} crash.
335
336 @item
337 Support @samp{FORMAT(I<@var{expr}>)} when @var{expr} is a
338 compile-time constant @code{INTEGER} expression.
339
340 @item
341 Fix @code{g77} @samp{-g} option so procedures that
342 use @samp{ENTRY} can be stepped through, line by line,
343 in @code{gdb}.
344
345 @item
346 Fix a profiling-related bug in @code{gcc} back end for
347 Intel x86 architecture.
348
349 @item
350 Allow any @code{REAL} argument to intrinsics
351 @code{Second} and @code{CPU_Time}.
352
353 @item
354 Allow any numeric argument to intrinsics
355 @code{Int2} and @code{Int8}.
356
357 @item
358 Use @code{tempnam}, if available, to open scratch files
359 (as in @samp{OPEN(STATUS='SCRATCH')}
360 so that the @code{TMPDIR} environment variable,
361 if present, is used.
362
363 @item
364 Rename the @code{gcc} keyword @code{restrict} to
365 @code{__restrict__}, to avoid rejecting valid, existing,
366 C programs.
367 Support for @code{restrict} is now more like support
368 for @code{complex}.
369
370 @item
371 Fix @samp{-fpedantic} to not reject procedure invocations
372 such as @samp{I=J()} and @samp{CALL FOO()}.
373
374 @item
375 Fix @samp{-fugly-comma} to affect invocations of
376 only external procedures.
377 Restore rejection of gratuitous trailing omitted
378 arguments to intrinsics, as in @samp{I=MAX(3,4,,)}.
379
380 @item
381 Fix compiler so it accepts @samp{-fgnu-intrinsics-*} and
382 @samp{-fbadu77-intrinsics-*} options.
383
384 @item
385 Improve diagnostic messages from @code{libf2c}
386 so it is more likely that the printing of the
387 active format string is limited to the string,
388 with no trailing garbage being printed.
389
390 (Unlike @code{f2c}, @code{g77} did not append
391 a null byte to its compiled form of every
392 format string specified via a @code{FORMAT} statement.
393 However, @code{f2c} would exhibit the problem
394 anyway for a statement like @samp{PRINT '(I)garbage', 1}
395 by printing @samp{(I)garbage} as the format string.)
396
397 @item
398 Improve compilation of FORMAT expressions so that
399 a null byte is appended to the last operand if it
400 is a constant.
401 This provides a cleaner run-time diagnostic as provided
402 by @code{libf2c} for statements like @samp{PRINT '(I1', 42}.
403
404 @item
405 Fix various crashes involving code with diagnosed errors.
406
407 @item
408 Fix cross-compilation bug when configuring @code{libf2c}.
409
410 @item
411 Improve diagnostics.
412
413 @item
414 Improve documentation and indexing.
415
416 @item
417 Upgrade to @code{libf2c} as of 1997-09-23.
418 This fixes a formatted-I/O bug that afflicted
419 64-bit systems with 32-bit integers
420 (such as Digital Alpha running GNU/Linux).
421 @end itemize
422
423 @heading In 0.5.21:
424 @itemize @bullet
425 @item
426 Fix a code-generation bug introduced by 0.5.20
427 caused by loop unrolling (by specifying
428 @samp{-funroll-loops} or similar).
429 This bug afflicted all code compiled by
430 version 2.7.2.2.f.2 of @code{gcc} (C, C++,
431 Fortran, and so on).
432
433 @item
434 Fix a code-generation bug manifested when
435 combining local @code{EQUIVALENCE} with a
436 @code{DATA} statement that follows
437 the first executable statement (or is
438 treated as an executable-context statement
439 as a result of using the @samp{-fpedantic}
440 option).
441
442 @item
443 Fix a compiler crash that occured when an
444 integer division by a constant zero is detected.
445 Instead, when the @samp{-W} option is specified,
446 the @code{gcc} back end issues a warning about such a case.
447 This bug afflicted all code compiled by
448 version 2.7.2.2.f.2 of @code{gcc} (C, C++,
449 Fortran, and so on).
450
451 @item
452 Fix a compiler crash that occurred in some cases
453 of procedure inlining.
454 (Such cases became more frequent in 0.5.20.)
455
456 @item
457 Fix a compiler crash resulting from using @code{DATA}
458 or similar to initialize a @code{COMPLEX} variable or
459 array to zero.
460
461 @item
462 Fix compiler crashes involving use of @code{AND}, @code{OR},
463 or @code{XOR} intrinsics.
464
465 @item
466 Fix compiler bug triggered when using a @code{COMMON}
467 or @code{EQUIVALENCE} variable
468 as the target of an @code{ASSIGN}
469 or assigned-@code{GOTO} statement.
470
471 @item
472 Fix compiler crashes due to using the name of a some
473 non-standard intrinsics (such as @samp{FTELL} or
474 @samp{FPUTC}) as such and as the name of a procedure
475 or common block.
476 Such dual use of a name in a program is allowed by
477 the standard.
478
479 @c @code{g77}'s version of @code{libf2c} has been modified
480 @c so that the external names of library's procedures do not
481 @c conflict with names used for Fortran procedures compiled
482 @c by @code{g77}.
483 @c An additional layer of jacket procedures has been added
484 @c to @code{libf2c} to map the old names to the new names,
485 @c for automatic use by programs that interface to the
486 @c library procedures via the external-procedure mechanism.
487 @c 
488 @c For example, the intrinsic @code{FPUTC} previously was
489 @c implemented by @code{g77} as a call to the @code{libf2c}
490 @c routine @samp{fputc_}.
491 @c This would conflict with a Fortran procedure named @code{FPUTC}
492 @c (using default compiler options), and this conflict
493 @c would cause a crash under certain circumstances.
494 @c 
495 @c Now, the intrinsic @code{FPUTC} calls @samp{G77_fputc_0},
496 @c which does not conflict with the @samp{fputc_} external
497 @c that implements a Fortran procedure named @code{FPUTC}.
498 @c 
499 @c Programs that refer to @code{FPUTC} as an external procedure
500 @c without supplying their own implementation will link to
501 @c the new @code{libf2c} routine @samp{fputc_}, which is
502 @c simply a jacket routine that calls @samp{G77_fputc_0}.
503
504 @item
505 Place automatic arrays on the stack, even if
506 @code{SAVE} or the @samp{-fno-automatic} option
507 is in effect.
508 This avoids a compiler crash in some cases.
509
510 @item
511 The @samp{-malign-double} option now reliably aligns
512 @code{DOUBLE PRECISION} optimally on Pentium and
513 Pentium Pro architectures (586 and 686 in @code{gcc}).
514
515 @item
516 New option @samp{-Wno-globals} disables warnings
517 about ``suspicious'' use of a name both as a global
518 name and as the implicit name of an intrinsic, and
519 warnings about disagreements over the number or natures of
520 arguments passed to global procedures, or the
521 natures of the procedures themselves.
522
523 The default is to issue such warnings, which are
524 new as of this version of @code{g77}.
525
526 @item
527 New option @samp{-fno-globals} disables diagnostics
528 about potentially fatal disagreements
529 analysis problems, such as disagreements over the
530 number or natures of arguments passed to global
531 procedures, or the natures of those procedures themselves.
532
533 The default is to issue such diagnostics and flag
534 the compilation as unsuccessful.
535 With this option, the diagnostics are issued as
536 warnings, or, if @samp{-Wno-globals} is specified,
537 are not issued at all.
538
539 This option also disables inlining of global procedures,
540 to avoid compiler crashes resulting from coding errors
541 that these diagnostics normally would identify.
542
543 @item
544 Diagnose cases where a reference to a procedure
545 disagrees with the type of that procedure, or
546 where disagreements about the number or nature
547 of arguments exist.
548 This avoids a compiler crash.
549
550 @item
551 Fix parsing bug whereby @code{g77} rejected a
552 second initialization specification immediately
553 following the first's closing @samp{/} without
554 an intervening comma in a @code{DATA} statement,
555 and the second specification was an implied-DO list.
556
557 @item
558 Improve performance of the @code{gcc} back end so
559 certain complicated expressions involving @code{COMPLEX}
560 arithmetic (especially multiplication) don't appear to
561 take forever to compile.
562
563 @item
564 Fix a couple of profiling-related bugs in @code{gcc}
565 back end.
566
567 @item
568 Integrate GNU Ada's (GNAT's) changes to the back end,
569 which consist almost entirely of bug fixes.
570 These fixes are circa version 3.10p of GNAT.
571
572 @item
573 Include some other @code{gcc} fixes that seem useful in
574 @code{g77}'s version of @code{gcc}.
575 (See @file{gcc/ChangeLog} for details---compare it
576 to that file in the vanilla @code{gcc-2.7.2.3.tar.gz}
577 distribution.)
578
579 @item
580 Fix @code{libU77} routines that accept file and other names
581 to strip trailing blanks from them, for consistency
582 with other implementations.
583 Blanks may be forcibly appended to such names by
584 appending a single null character (@samp{CHAR(0)})
585 to the significant trailing blanks.
586
587 @item
588 Fix @code{CHMOD} intrinsic to work with file names
589 that have embedded blanks, commas, and so on.
590
591 @item
592 Fix @code{SIGNAL} intrinsic so it accepts an
593 optional third @samp{Status} argument.
594
595 @item
596 Fix @code{IDATE()} intrinsic subroutine (VXT form)
597 so it accepts arguments in the correct order.
598 Documentation fixed accordingly, and for
599 @code{GMTIME()} and @code{LTIME()} as well.
600
601 @item
602 Make many changes to @code{libU77} intrinsics to
603 support existing code more directly.
604
605 Such changes include allowing both subroutine and
606 function forms of many routines, changing @code{MCLOCK()}
607 and @code{TIME()} to return @code{INTEGER(KIND=1)} values,
608 introducing @code{MCLOCK8()} and @code{TIME8()} to
609 return @code{INTEGER(KIND=2)} values,
610 and placing functions that are intended to perform
611 side effects in a new intrinsic group, @code{badu77}.
612
613 @item
614 Improve @code{libU77} so it is more portable.
615
616 @item
617 Add options @samp{-fbadu77-intrinsics-delete},
618 @samp{-fbadu77-intrinsics-hide}, and so on.
619
620 @item
621 Fix crashes involving diagnosed or invalid code.
622
623 @item
624 @code{g77} and @code{gcc} now do a somewhat better
625 job detecting and diagnosing arrays that are too
626 large to handle before these cause diagnostics
627 during the assembler or linker phase, a compiler
628 crash, or generation of incorrect code.
629
630 @item
631 Make some fixes to alias analysis code.
632
633 @item
634 Add support for @code{restrict} keyword in @code{gcc}
635 front end.
636
637 @item
638 Support @code{gcc} version 2.7.2.3
639 (modified by @code{g77} into version 2.7.2.3.f.1),
640 and remove
641 support for prior versions of @code{gcc}.
642
643 @item
644 Incorporate GNAT's patches to the @code{gcc} back
645 end into @code{g77}'s, so GNAT users do not need
646 to apply GNAT's patches to build both GNAT and @code{g77}
647 from the same source tree.
648
649 @item
650 Modify @code{make} rules and related code so that
651 generation of Info documentation doesn't require
652 compilation using @code{gcc}.
653 Now, any ANSI C compiler should be adequate to
654 produce the @code{g77} documentation (in particular,
655 the tables of intrinsics) from scratch.
656
657 @item
658 Add @code{INT2} and @code{INT8} intrinsics.
659
660 @item
661 Add @code{CPU_TIME} intrinsic.
662
663 @item
664 Add @code{ALARM} intrinsic.
665
666 @item
667 @code{CTIME} intrinsic now accepts any @code{INTEGER}
668 argument, not just @code{INTEGER(KIND=2)}.
669
670 @item
671 Warn when explicit type declaration disagrees with
672 the type of an intrinsic invocation.
673
674 @item
675 Support @samp{*f771} entry in @code{gcc} @file{specs} file.
676
677 @item
678 Fix typo in @code{make} rule @samp{g77-cross}, used only for
679 cross-compiling.
680
681 @item
682 Fix @code{libf2c} build procedure to re-archive library
683 if previous attempt to archive was interrupted.
684
685 @item
686 Change @code{gcc} to unroll loops only during the last
687 invocation (of as many as two invocations) of loop
688 optimization.
689
690 @item
691 Improve handling of @samp{-fno-f2c} so that code that
692 attempts to pass an intrinsic as an actual argument,
693 such as @samp{CALL FOO(ABS)}, is rejected due to the fact
694 that the run-time-library routine is, effectively,
695 compiled with @samp{-ff2c} in effect.
696
697 @item
698 Fix @code{g77} driver to recognize @samp{-fsyntax-only}
699 as an option that inhibits linking, just like @samp{-c} or
700 @samp{-S}, and to recognize and properly handle the
701 @samp{-nostdlib}, @samp{-M}, @samp{-MM}, @samp{-nodefaultlibs},
702 and @samp{-Xlinker} options.
703
704 @item
705 Upgrade to @code{libf2c} as of 1997-08-16.
706
707 @item
708 Modify @code{libf2c} to consistently and clearly diagnose
709 recursive I/O (at run time).
710
711 @item
712 @code{g77} driver now prints version information (such as produced
713 by @kbd{g77 -v}) to @code{stderr} instead of @code{stdout}.
714
715 @item
716 The @samp{.r} suffix now designates a Ratfor source file,
717 to be preprocessed via the @code{ratfor} command, available
718 separately.
719
720 @item
721 Fix some aspects of how @code{gcc} determines what kind of
722 system is being configured and what kinds are supported.
723 For example, GNU Linux/Alpha ELF systems now are directly
724 supported.
725
726 @item
727 Improve diagnostics.
728
729 @item
730 Improve documentation and indexing.
731
732 @item
733 Include all pertinent files for @code{libf2c} that come
734 from @code{netlib.bell-labs.com}; give any such files
735 that aren't quite accurate in @code{g77}'s version of
736 @code{libf2c} the suffix @samp{.netlib}.
737
738 @item
739 Reserve @code{INTEGER(KIND=0)} for future use.
740 @end itemize
741
742 @heading In 0.5.20:
743 @itemize @bullet
744 @item
745 The @samp{-fno-typeless-boz} option is now the default.
746
747 This option specifies that non-decimal-radix
748 constants using the prefixed-radix form (such as @samp{Z'1234'})
749 are to be interpreted as @code{INTEGER} constants.
750 Specify @samp{-ftypeless-boz} to cause such
751 constants to be interpreted as typeless.
752
753 (Version 0.5.19 introduced @samp{-fno-typeless-boz} and
754 its inverse.)
755
756 @item
757 Options @samp{-ff90-intrinsics-enable} and
758 @samp{-fvxt-intrinsics-enable} now are the
759 defaults.
760
761 Some programs might use names that clash with
762 intrinsic names defined (and now enabled) by these
763 options or by the new @code{libU77} intrinsics.
764 Users of such programs might need to compile them
765 differently (using, for example, @samp{-ff90-intrinsics-disable})
766 or, better yet, insert appropriate @code{EXTERNAL}
767 statements specifying that these names are not intended
768 to be names of intrinsics.
769
770 @item
771 The @samp{ALWAYS_FLUSH} macro is no longer defined when
772 building @code{libf2c}, which should result in improved
773 I/O performance, especially over NFS.
774
775 @emph{Note:} If you have code that depends on the behavior
776 of @code{libf2c} when built with @samp{ALWAYS_FLUSH} defined,
777 you will have to modify @code{libf2c} accordingly before
778 building it from this and future versions of @code{g77}.
779
780 @item
781 Dave Love's implementation of @code{libU77} has been
782 added to the version of @code{libf2c} distributed with
783 and built as part of @code{g77}.
784 @code{g77} now knows about the routines in this library
785 as intrinsics.
786
787 @item
788 New option @samp{-fvxt} specifies that the
789 source file is written in VXT Fortran, instead of GNU Fortran.
790
791 @item
792 The @samp{-fvxt-not-f90} option has been deleted,
793 along with its inverse, @samp{-ff90-not-vxt}.
794
795 If you used one of these deleted options, you should
796 re-read the pertinent documentation to determine which
797 options, if any, are appropriate for compiling your
798 code with this version of @code{g77}.
799
800 @item
801 The @samp{-fugly} option now issues a warning, as it
802 likely will be removed in a future version.
803
804 (Enabling all the @samp{-fugly-*} options is unlikely
805 to be feasible, or sensible, in the future,
806 so users should learn to specify only those
807 @samp{-fugly-*} options they really need for a
808 particular source file.)
809
810 @item
811 The @samp{-fugly-assumed} option, introduced in
812 version 0.5.19, has been changed to
813 better accommodate old and new code.
814
815 @item
816 Make a number of fixes to the @code{g77} front end and
817 the @code{gcc} back end to better support Alpha (AXP)
818 machines.
819 This includes providing at least one bug-fix to the
820 @code{gcc} back end for Alphas.
821
822 @item
823 Related to supporting Alpha (AXP) machines, the @code{LOC()}
824 intrinsic and @code{%LOC()} construct now return
825 values of integer type that is the same width (holds
826 the same number of bits) as the pointer type on the
827 machine.
828
829 On most machines, this won't make a difference, whereas
830 on Alphas, the type these constructs return is
831 @code{INTEGER*8} instead of the more common @code{INTEGER*4}.
832
833 @item
834 Emulate @code{COMPLEX} arithmetic in the @code{g77} front
835 end, to avoid bugs in @code{complex} support in the
836 @code{gcc} back end.
837 New option @samp{-fno-emulate-complex}
838 causes @code{g77} to revert the 0.5.19 behavior.
839
840 @item
841 Fix bug whereby @samp{REAL A(1)}, for example, caused
842 a compiler crash if @samp{-fugly-assumed} was in effect
843 and @var{A} was a local (automatic) array.
844 That case is no longer affected by the new
845 handling of @samp{-fugly-assumed}.
846
847 @item
848 Fix @code{g77} command driver so that @samp{g77 -o foo.f}
849 no longer deletes @file{foo.f} before issuing other
850 diagnostics, and so the @samp{-x} option is properly
851 handled.
852
853 @item
854 Enable inlining of subroutines and functions by the @code{gcc}
855 back end.
856 This works as it does for @code{gcc} itself---program units
857 may be inlined for invocations that follow them in the same
858 program unit, as long as the appropriate compile-time
859 options are specified.
860
861 @item
862 Dummy arguments are no longer assumed to potentially alias
863 (overlap)
864 other dummy arguments or @code{COMMON} areas when any of
865 these are defined (assigned to) by Fortran code.
866
867 This can result in faster and/or smaller programs when
868 compiling with optimization enabled, though on some
869 systems this effect is observed only when @samp{-fforce-addr}
870 also is specified.
871
872 New options @samp{-falias-check}, @samp{-fargument-alias},
873 @samp{-fargument-noalias},
874 and @samp{-fno-argument-noalias-global} control the
875 way @code{g77} handles potential aliasing.
876
877 @item
878 The @code{CONJG()} and @code{DCONJG()} intrinsics now
879 are compiled in-line.
880
881 @item
882 The bug-fix for 0.5.19.1 has been re-done.
883 The @code{g77} compiler has been changed back to
884 assume @code{libf2c} has no aliasing problems in
885 its implementations of the @code{COMPLEX} (and
886 @code{DOUBLE COMPLEX}) intrinsics.
887 The @code{libf2c} has been changed to have no such
888 problems.
889
890 As a result, 0.5.20 is expected to offer improved performance
891 over 0.5.19.1, perhaps as good as 0.5.19 in most
892 or all cases, due to this change alone.
893
894 @emph{Note:} This change requires version 0.5.20 of
895 @code{libf2c}, at least, when linking code produced
896 by any versions of @code{g77} other than 0.5.19.1.
897 Use @samp{g77 -v} to determine the version numbers
898 of the @code{libF77}, @code{libI77}, and @code{libU77}
899 components of the @code{libf2c} library.
900 (If these version numbers are not printed---in
901 particular, if the linker complains about unresolved
902 references to names like @samp{g77__fvers__}---that
903 strongly suggests your installation has an obsolete
904 version of @code{libf2c}.)
905
906 @item
907 New option @samp{-fugly-assign} specifies that the
908 same memory locations are to be used to hold the
909 values assigned by both statements @samp{I = 3} and
910 @samp{ASSIGN 10 TO I}, for example.
911 (Normally, @code{g77} uses a separate memory location
912 to hold assigned statement labels.)
913
914 @item
915 @code{FORMAT} and @code{ENTRY} statements now are allowed to
916 precede @code{IMPLICIT NONE} statements.
917
918 @item
919 Produce diagnostic for unsupported @code{SELECT CASE} on
920 @code{CHARACTER} type, instead of crashing, at compile time.
921
922 @item
923 Fix crashes involving diagnosed or invalid code.
924
925 @item
926 Change approach to building @code{libf2c} archive
927 (@file{libf2c.a}) so that members are added to it
928 only when truly necessary, so the user that installs
929 an already-built @code{g77} doesn't need to have write
930 access to the build tree (whereas the user doing the
931 build might not have access to install new software
932 on the system).
933
934 @item
935 Support @code{gcc} version 2.7.2.2
936 (modified by @code{g77} into version 2.7.2.2.f.2),
937 and remove
938 support for prior versions of @code{gcc}.
939
940 @item
941 Upgrade to @code{libf2c} as of 1997-02-08, and
942 fix up some of the build procedures.
943
944 @item
945 Improve general build procedures for @code{g77},
946 fixing minor bugs (such as deletion of any file
947 named @file{f771} in the parent directory of @code{gcc/}).
948
949 @item
950 Enable full support of @code{INTEGER*8} available in
951 @code{libf2c} and @file{f2c.h} so that @code{f2c} users
952 may make full use of its features via the @code{g77}
953 version of @file{f2c.h} and the @code{INTEGER*8}
954 support routines in the @code{g77} version of @code{libf2c}.
955
956 @item
957 Improve @code{g77} driver and @code{libf2c} so that @samp{g77 -v}
958 yields version information on the library.
959
960 @item
961 The @code{SNGL} and @code{FLOAT} intrinsics now are
962 specific intrinsics, instead of synonyms for the
963 generic intrinsic @code{REAL}.
964
965 @item
966 New intrinsics have been added.
967 These are @code{REALPART}, @code{IMAGPART},
968 @code{COMPLEX},
969 @code{LONG}, and @code{SHORT}.
970
971 @item
972 A new group of intrinsics, @samp{gnu}, has been added
973 to contain the new @code{REALPART}, @code{IMAGPART},
974 and @code{COMPLEX} intrinsics.
975 An old group, @samp{dcp}, has been removed.
976
977 @item
978 Complain about industry-wide ambiguous references
979 @samp{REAL(@var{expr})} and @samp{AIMAG(@var{expr})},
980 where @var{expr} is @code{DOUBLE COMPLEX} (or any
981 complex type other than @code{COMPLEX}), unless
982 @samp{-ff90} option specifies Fortran 90 interpretation
983 or new @samp{-fugly-complex} option, in conjunction with
984 @samp{-fnot-f90}, specifies @code{f2c} interpretation.
985
986 @item
987 Make improvements to diagnostics.
988
989 @item
990 Speed up compiler a bit.
991
992 @item
993 Improvements to documentation and indexing, including
994 a new chapter containing information on one, later
995 more, diagnostics that users are directed to pull
996 up automatically via a message in the diagnostic itself.
997
998 (Hence the menu item @samp{M} for the node
999 @samp{Diagnostics} in the top-level menu of
1000 the Info documentation.)
1001 @end itemize
1002
1003 @heading In 0.5.19.1:
1004 @itemize @bullet
1005 @item
1006 Code-generation bugs afflicting operations on complex
1007 data have been fixed.
1008
1009 These bugs occurred when assigning the result of an
1010 operation to a complex variable (or array element)
1011 that also served as an input to that operation.
1012
1013 The operations affected by this bug were: @samp{CONJG()},
1014 @samp{DCONJG()}, @samp{CCOS()}, @samp{CDCOS()},
1015 @samp{CLOG()}, @samp{CDLOG()}, @samp{CSIN()}, @samp{CDSIN()},
1016 @samp{CSQRT()}, @samp{CDSQRT()}, complex division, and
1017 raising a @code{DOUBLE COMPLEX} operand to an @code{INTEGER}
1018 power.
1019 (The related generic and @samp{Z}-prefixed intrinsics,
1020 such as @samp{ZSIN()}, also were affected.)
1021
1022 For example, @samp{C = CSQRT(C)}, @samp{Z = Z/C}, and @samp{Z = Z**I}
1023 (where @samp{C} is @code{COMPLEX} and @samp{Z} is
1024 @code{DOUBLE COMPLEX}) have been fixed.
1025 @end itemize
1026
1027 @heading In 0.5.19:
1028 @itemize @bullet
1029 @item
1030 Fix @code{FORMAT} statement parsing so negative values for
1031 specifiers such as @samp{P} (e.g. @samp{FORMAT(-1PF8.1)})
1032 are correctly processed as negative.
1033
1034 @item
1035 Fix @code{SIGNAL} intrinsic so it once again accepts a
1036 procedure as its second argument.
1037
1038 @item
1039 A temporary kludge option provides bare-bones information on
1040 @code{COMMON} and @code{EQUIVALENCE} members at debug time.
1041
1042 @item
1043 New @samp{-fonetrip} option specifies FORTRAN-66-style
1044 one-trip @code{DO} loops.
1045
1046 @item
1047 New @samp{-fno-silent} option causes names of program units
1048 to be printed as they are compiled, in a fashion similar to
1049 UNIX @code{f77} and @code{f2c}.
1050
1051 @item
1052 New @samp{-fugly-assumed} option specifies that arrays
1053 dimensioned via @samp{DIMENSION X(1)}, for example, are to be
1054 treated as assumed-size.
1055
1056 @item
1057 New @samp{-fno-typeless-boz} option specifies that non-decimal-radix
1058 constants using the prefixed-radix form (such as @samp{Z'1234'})
1059 are to be interpreted as @code{INTEGER} constants.
1060
1061 @item
1062 New @samp{-ff66} option is a ``shorthand'' option that specifies
1063 behaviors considered appropriate for FORTRAN 66 programs.
1064
1065 @item
1066 New @samp{-ff77} option is a ``shorthand'' option that specifies
1067 behaviors considered appropriate for UNIX @code{f77} programs.
1068
1069 @item
1070 New @samp{-fugly-comma} and @samp{-fugly-logint} options provided
1071 to perform some of what @samp{-fugly} used to do.
1072 @samp{-fugly} and @samp{-fno-ugly} are now ``shorthand'' options,
1073 in that they do nothing more than enable (or disable) other
1074 @samp{-fugly-*} options.
1075
1076 @item
1077 Fix parsing of assignment statements involving targets that
1078 are substrings of elements of @code{CHARACTER} arrays having
1079 names such as @samp{READ}, @samp{WRITE}, @samp{GOTO}, and
1080 @samp{REALFUNCTIONFOO}.
1081
1082 @item
1083 Fix crashes involving diagnosed code.
1084
1085 @item
1086 Fix handling of local @code{EQUIVALENCE} areas so certain cases
1087 of valid Fortran programs are not misdiagnosed as improperly
1088 extending the area backwards.
1089
1090 @item
1091 Support @code{gcc} version 2.7.2.1.
1092
1093 @item
1094 Upgrade to @code{libf2c} as of 1996-09-26, and
1095 fix up some of the build procedures.
1096
1097 @item
1098 Change code generation for list-directed I/O so it allows
1099 for new versions of @code{libf2c} that might return non-zero
1100 status codes for some operations previously assumed to always
1101 return zero.
1102
1103 This change not only affects how @code{IOSTAT=} variables
1104 are set by list-directed I/O, it also affects whether
1105 @code{END=} and @code{ERR=} labels are reached by these
1106 operations.
1107
1108 @item
1109 Add intrinsic support for new @code{FTELL} and @code{FSEEK}
1110 procedures in @code{libf2c}.
1111
1112 @item
1113 Modify @code{fseek_()} in @code{libf2c} to be more portable
1114 (though, in practice, there might be no systems where this
1115 matters) and to catch invalid @samp{whence} arguments.
1116
1117 @item
1118 Some useless warnings from the @samp{-Wunused} option have
1119 been eliminated.
1120
1121 @item
1122 Fix a problem building the @file{f771} executable
1123 on AIX systems by linking with the @samp{-bbigtoc} option.
1124
1125 @item
1126 Abort configuration if @code{gcc} has not been patched
1127 using the patch file provided in the @samp{gcc/f/gbe/}
1128 subdirectory.
1129
1130 @item
1131 Add options @samp{--help} and @samp{--version} to the
1132 @code{g77} command, to conform to GNU coding guidelines.
1133 Also add printing of @code{g77} version number when
1134 the @samp{--verbose} (@samp{-v}) option is used.
1135
1136 @item
1137 Change internally generated name for local @code{EQUIVALENCE}
1138 areas to one based on the alphabetically sorted first name
1139 in the list of names for entities placed at the beginning
1140 of the areas.
1141
1142 @item
1143 Improvements to documentation and indexing.
1144 @end itemize
1145
1146 @heading In 0.5.18:
1147 @itemize @bullet
1148 @item
1149 Add some rudimentary support for @code{INTEGER*1},
1150 @code{INTEGER*2}, @code{INTEGER*8},
1151 and their @code{LOGICAL} equivalents.
1152 (This support works on most, maybe all, @code{gcc} targets.)
1153
1154 Thanks to Scott Snyder (@email{snyder@@d0sgif.fnal.gov})
1155 for providing the patch for this!
1156
1157 Among the missing elements from the support for these
1158 features are full intrinsic support and constants.
1159
1160 @item
1161 Add some rudimentary support for the @code{BYTE} and
1162 @code{WORD} type-declaration statements.
1163 @code{BYTE} corresponds to @code{INTEGER*1},
1164 while @code{WORD} corresponds to @code{INTEGER*2}.
1165
1166 Thanks to Scott Snyder (@email{snyder@@d0sgif.fnal.gov})
1167 for providing the patch for this!
1168
1169 @item
1170 The compiler code handling intrinsics has been largely
1171 rewritten to accommodate the new types.
1172 No new intrinsics or arguments for existing
1173 intrinsics have been added, so there is, at this
1174 point, no intrinsic to convert to @code{INTEGER*8},
1175 for example.
1176
1177 @item
1178 Support automatic arrays in procedures.
1179
1180 @item
1181 Reduce space/time requirements for handling large
1182 @emph{sparsely} initialized aggregate arrays.
1183 This improvement applies to only a subset of
1184 the general problem to be addressed in 0.6.
1185
1186 @item
1187 Treat initial values of zero as if they weren't
1188 specified (in DATA and type-declaration statements).
1189 The initial values will be set to zero anyway, but the amount
1190 of compile time processing them will be reduced,
1191 in some cases significantly (though, again, this
1192 is only a subset of the general problem to be
1193 addressed in 0.6).
1194
1195 A new option, @samp{-fzeros}, is introduced to
1196 enable the traditional treatment of zeros as any
1197 other value.
1198
1199 @item
1200 With @samp{-ff90} in force, @code{g77} incorrectly
1201 interpreted @samp{REAL(Z)} as returning a @code{REAL}
1202 result, instead of as a @code{DOUBLE PRECISION}
1203 result.
1204 (Here, @samp{Z} is @code{DOUBLE COMPLEX}.)
1205
1206 With @samp{-fno-f90} in force, the interpretation remains
1207 unchanged, since this appears to be how at least some
1208 F77 code using the @code{DOUBLE COMPLEX} extension expected
1209 it to work.
1210
1211 Essentially, @samp{REAL(Z)} in F90 is the same as
1212 @samp{DBLE(Z)}, while in extended F77, it appears to
1213 be the same as @samp{REAL(REAL(Z))}.
1214
1215 @item
1216 An expression involving exponentiation, where both operands
1217 were type @code{INTEGER} and the right-hand operand
1218 was negative, was erroneously evaluated.
1219
1220 @item
1221 Fix bugs involving @code{DATA} implied-@code{DO} constructs
1222 (these involved an errant diagnostic and a crash, both on good
1223 code, one involving subsequent statement-function definition).
1224
1225 @item
1226 Close @code{INCLUDE} files after processing them, so compiling source
1227 files with lots of @code{INCLUDE} statements does not result in
1228 being unable to open @code{INCLUDE} files after all the available
1229 file descriptors are used up.
1230
1231 @item
1232 Speed up compiling, especially of larger programs, and perhaps
1233 slightly reduce memory utilization while compiling (this is
1234 @emph{not} the improvement planned for 0.6 involving large aggregate
1235 areas)---these improvements result from simply turning
1236 off some low-level code to do self-checking that hasn't been
1237 triggered in a long time.
1238
1239 @item
1240 Introduce three new options that
1241 implement optimizations in the @code{gcc} back end (GBE).
1242 These options are @samp{-fmove-all-movables}, @samp{-freduce-all-givs},
1243 and @samp{-frerun-loop-opt}, which are enabled, by default,
1244 for Fortran compilations.
1245 These optimizations are intended to help toon Fortran programs.
1246
1247 @item
1248 Patch the GBE to do a better job optimizing certain
1249 kinds of references to array elements.
1250
1251 @item
1252 Due to patches to the GBE, the version number of @code{gcc}
1253 also is patched to make it easier to manage installations,
1254 especially useful if it turns out a @code{g77} change to the
1255 GBE has a bug.
1256
1257 The @code{g77}-modified version number is the @code{gcc}
1258 version number with the string @samp{.f.@var{n}} appended,
1259 where @samp{f} identifies the version as enhanced for
1260 Fortran, and @var{n} is @samp{1} for the first Fortran
1261 patch for that version of @code{gcc}, @samp{2} for the
1262 second, and so on.
1263
1264 So, this introduces version 2.7.2.f.1 of @code{gcc}.
1265
1266 @item
1267 Make several improvements and fixes to diagnostics, including
1268 the removal of two that were inappropriate or inadequate.
1269
1270 @item
1271 Warning about two successive arithmetic operators, produced
1272 by @samp{-Wsurprising}, now produced @emph{only} when both
1273 operators are, indeed, arithmetic (not relational/boolean).
1274
1275 @item
1276 @samp{-Wsurprising} now warns about the remaining cases
1277 of using non-integral variables for implied-@code{DO}
1278 loops, instead of these being rejected unless @samp{-fpedantic}
1279 or @samp{-fugly} specified.
1280
1281 @item
1282 Allow @code{SAVE} of a local variable or array, even after
1283 it has been given an initial value via @code{DATA}, for example.
1284
1285 @item
1286 Introduce an Info version of @code{g77} documentation, which
1287 supercedes @file{gcc/f/CREDITS}, @file{gcc/f/DOC}, and
1288 @file{gcc/f/PROJECTS}.
1289 These files will be removed in a future release.
1290 The files @file{gcc/f/BUGS}, @file{gcc/f/INSTALL}, and
1291 @file{gcc/f/NEWS} now are automatically built from
1292 the texinfo source when distributions are made.
1293
1294 This effort was inspired by a first pass at translating
1295 @file{g77-0.5.16/f/DOC} that was contributed to Craig by
1296 David Ronis (@email{ronis@@onsager.chem.mcgill.ca}).
1297
1298 @item
1299 New @samp{-fno-second-underscore} option to specify
1300 that, when @samp{-funderscoring} is in effect, a second
1301 underscore is not to be appended to Fortran names already
1302 containing an underscore.
1303
1304 @item
1305 Change the way iterative @code{DO} loops work to follow
1306 the F90 standard.
1307 In particular, calculation of the iteration count is
1308 still done by converting the start, end, and increment
1309 parameters to the type of the @code{DO} variable, but
1310 the result of the calculation is always converted to
1311 the default @code{INTEGER} type.
1312
1313 (This should have no effect on existing code compiled
1314 by @code{g77}, but code written to assume that use
1315 of a @emph{wider} type for the @code{DO} variable
1316 will result in an iteration count being fully calculated
1317 using that wider type (wider
1318 than default @code{INTEGER}) must be rewritten.)
1319
1320 @item
1321 Support @code{gcc} version 2.7.2.
1322
1323 @item
1324 Upgrade to @code{libf2c} as of 1996-03-23, and
1325 fix up some of the build procedures.
1326
1327 Note that the email addresses related to @code{f2c}
1328 have changed---the distribution site now is
1329 named @code{netlib.bell-labs.com}, and the
1330 maintainer's new address is @email{dmg@@bell-labs.com}.
1331 @end itemize
1332
1333 @heading In 0.5.17:
1334 @itemize @bullet
1335 @item
1336 @strong{Fix serious bug} in @samp{g77 -v} command that can cause removal of a
1337 system's @file{/dev/null} special file if run by user @samp{root}.
1338
1339 @strong{All users} of version 0.5.16 should ensure that
1340 they have not removed @file{/dev/null} or replaced it with an ordinary
1341 file (e.g. by comparing the output of @samp{ls -l /dev/null} with
1342 @samp{ls -l /dev/zero}.
1343 If the output isn't basically the
1344 same, contact your system
1345 administrator about restoring @file{/dev/null} to its proper status).
1346
1347 This bug is particularly insidious because removing @file{/dev/null} as
1348 a special file can go undetected for quite a while, aside from
1349 various applications and programs exhibiting sudden, strange
1350 behaviors.
1351
1352 I sincerely apologize for not realizing the
1353 implications of the fact that when @samp{g77 -v} runs the @code{ld} command
1354 with @samp{-o /dev/null} that @code{ld} tries to @emph{remove} the executable
1355 it is supposed to build (especially if it reports unresolved
1356 references, which it should in this case)!
1357
1358 @item
1359 Fix crash on @samp{CHARACTER*(*) FOO} in a main or block data program unit.
1360
1361 @item
1362 Fix crash that can occur when diagnostics given outside of any
1363 program unit (such as when input file contains @samp{@@foo}).
1364
1365 @item
1366 Fix crashes, infinite loops (hangs), and such involving diagnosed code.
1367
1368 @item
1369 Fix @code{ASSIGN}'ed variables so they can be @code{SAVE}'d or dummy arguments,
1370 and issue clearer error message in cases where target of @code{ASSIGN}
1371 or @code{ASSIGN}ed @code{GOTO}/@code{FORMAT} is too small (which should
1372 never happen).
1373
1374 @item
1375 Make @code{libf2c} build procedures work on more systems again by
1376 eliminating unnecessary invocations of @samp{ld -r -x} and @samp{mv}.
1377
1378 @item
1379 Fix omission of @samp{-funix-intrinsics-@dots{}} options in list of permitted
1380 options to compiler.
1381
1382 @item
1383 Fix failure to always diagnose missing type declaration for
1384 @code{IMPLICIT NONE}.
1385
1386 @item
1387 Fix compile-time performance problem (which could sometimes
1388 crash the compiler, cause a hang, or whatever, due to a bug
1389 in the back end) involving exponentiation with a large @code{INTEGER}
1390 constant for the right-hand operator (e.g. @samp{I**32767}).
1391
1392 @item
1393 Fix build procedures so cross-compiling @code{g77} (the @code{fini}
1394 utility in particular) is properly built using the host compiler.
1395
1396 @item
1397 Add new @samp{-Wsurprising} option to warn about constructs that are
1398 interpreted by the Fortran standard (and @code{g77}) in ways that
1399 are surprising to many programmers.
1400
1401 @item
1402 Add @code{ERF()} and @code{ERFC()} as generic intrinsics mapping to existing
1403 @code{ERF}/@code{DERF} and @code{ERFC}/@code{DERFC} specific intrinsics.
1404
1405 @emph{Note:} You should
1406 specify @samp{INTRINSIC ERF,ERFC} in any code where you might use
1407 these as generic intrinsics, to improve likelihood of diagnostics
1408 (instead of subtle run-time bugs) when using a compiler that
1409 doesn't support these as intrinsics (e.g. @code{f2c}).
1410
1411 @item
1412 Remove from @samp{-fno-pedantic} the diagnostic about @code{DO}
1413 with non-@code{INTEGER} index variable; issue that under
1414 @samp{-Wsurprising} instead.
1415
1416 @item
1417 Clarify some diagnostics that say things like ``ignored'' when that's
1418 misleading.
1419
1420 @item
1421 Clarify diagnostic on use of @code{.EQ.}/@code{.NE.} on @code{LOGICAL}
1422 operands.
1423
1424 @item
1425 Minor improvements to code generation for various operations on
1426 @code{LOGICAL} operands.
1427
1428 @item
1429 Minor improvement to code generation for some @code{DO} loops on some
1430 machines.
1431
1432 @item
1433 Support @code{gcc} version 2.7.1.
1434
1435 @item
1436 Upgrade to @code{libf2c} as of 1995-11-15.
1437 @end itemize
1438
1439 @heading In 0.5.16:
1440 @itemize @bullet
1441 @item
1442 Fix a code-generation bug involving complicated @code{EQUIVALENCE} statements
1443 not involving @code{COMMON}.
1444
1445 @item
1446 Fix code-generation bugs involving invoking ``gratis'' library procedures
1447 in @code{libf2c} from code compiled with @samp{-fno-f2c} by making these
1448 procedures known to @code{g77} as intrinsics (not affected by -fno-f2c).
1449 This is known to fix code invoking @code{ERF()}, @code{ERFC()},
1450 @code{DERF()}, and @code{DERFC()}.
1451
1452 @item
1453 Update @code{libf2c} to include netlib patches through 1995-08-16, and
1454 @code{#define} @samp{WANT_LEAD_0} to 1 to make @code{g77}-compiled code more
1455 consistent with other Fortran implementations by outputting
1456 leading zeros in formatted and list-directed output.
1457
1458 @item
1459 Fix a code-generation bug involving adjustable dummy arrays with high
1460 bounds whose primaries are changed during procedure execution, and
1461 which might well improve code-generation performance for such arrays
1462 compared to @code{f2c} plus @code{gcc} (but apparently only when using
1463 @file{gcc-2.7.0} or later).
1464
1465 @item
1466 Fix a code-generation bug involving invocation of @code{COMPLEX} and
1467 @code{DOUBLE COMPLEX} @code{FUNCTION}s and doing @code{COMPLEX} and
1468 @code{DOUBLE COMPLEX} divides, when the result
1469 of the invocation or divide is assigned directly to a variable
1470 that overlaps one or more of the arguments to the invocation or divide.
1471
1472 @item
1473 Fix crash by not generating new optimal code for @samp{X**I} if @samp{I} is
1474 nonconstant and the expression is used to dimension a dummy
1475 array, since the @code{gcc} back end does not support the necessary
1476 mechanics (and the @code{gcc} front end rejects the equivalent
1477 construct, as it turns out).
1478
1479 @item
1480 Fix crash on expressions like @samp{COMPLEX**INTEGER}.
1481
1482 @item
1483 Fix crash on expressions like @samp{(1D0,2D0)**2}, i.e. raising a
1484 @code{DOUBLE COMPLEX} constant to an @code{INTEGER} constant power.
1485
1486 @item
1487 Fix crashes and such involving diagnosed code.
1488
1489 @item
1490 Diagnose, instead of crashing on, statement function definitions
1491 having duplicate dummy argument names.
1492
1493 @item
1494 Fix bug causing rejection of good code involving statement function
1495 definitions.
1496
1497 @item
1498 Fix bug resulting in debugger not knowing size of local equivalence
1499 area when any member of area has initial value (via @code{DATA},
1500 for example).
1501
1502 @item
1503 Fix installation bug that prevented installation of @code{g77} driver.
1504 Provide for easy selection of whether to install copy of @code{g77}
1505 as @code{f77} to replace the broken code.
1506
1507 @item
1508 Fix @code{gcc} driver (affects @code{g77} thereby) to not
1509 gratuitously invoke the
1510 @code{f771} program (e.g. when @samp{-E} is specified).
1511
1512 @item
1513 Fix diagnostic to point to correct source line when it immediately
1514 follows an @code{INCLUDE} statement.
1515
1516 @item
1517 Support more compiler options in @code{gcc}/@code{g77} when
1518 compiling Fortran files.
1519 These options include @samp{-p}, @samp{-pg}, @samp{-aux-info}, @samp{-P},
1520 correct setting of version-number macros for preprocessing, full
1521 recognition of @samp{-O0}, and
1522 automatic insertion of configuration-specific linker specs.
1523
1524 @item
1525 Add new intrinsics that interface to existing routines in @code{libf2c}:
1526 @code{ABORT}, @code{DERF}, @code{DERFC}, @code{ERF}, @code{ERFC}, @code{EXIT},
1527 @code{FLUSH}, @code{GETARG}, @code{GETENV}, @code{IARGC},
1528 @code{SIGNAL}, and @code{SYSTEM}.
1529 Note that @code{ABORT}, @code{EXIT}, @code{FLUSH}, @code{SIGNAL}, and
1530 @code{SYSTEM} are intrinsic subroutines, not functions (since they
1531 have side effects), so to get the return values from @code{SIGNAL}
1532 and @code{SYSTEM}, append a final argument specifying an @code{INTEGER}
1533 variable or array element (e.g. @samp{CALL SYSTEM('rm foo',ISTAT)}).
1534
1535 @item
1536 Add new intrinsic group named @samp{unix} to contain the new intrinsics,
1537 and by default enable this new group.
1538
1539 @item
1540 Move @code{LOC()} intrinsic out of the @samp{vxt} group to the new
1541 @samp{unix} group.
1542
1543 @item
1544 Improve @code{g77} so that @samp{g77 -v} by itself (or with
1545 certain other options, including @samp{-B}, @samp{-b}, @samp{-i},
1546 @samp{-nostdlib}, and @samp{-V}) reports lots more useful
1547 version info, and so that long-form options @code{gcc} accepts are
1548 understood by @code{g77} as well (even in truncated, unambiguous forms).
1549
1550 @item
1551 Add new @code{g77} option @samp{--driver=name} to specify driver when
1552 default, @code{gcc}, isn't appropriate.
1553
1554 @item
1555 Add support for @samp{#} directives (as output by the preprocessor) in the
1556 compiler, and enable generation of those directives by the
1557 preprocessor (when compiling @samp{.F} files) so diagnostics and debugging
1558 info are more useful to users of the preprocessor.
1559
1560 @item
1561 Produce better diagnostics, more like @code{gcc}, with info such as
1562 @samp{In function `foo':} and @samp{In file included from...:}.
1563
1564 @item
1565 Support @code{gcc}'s @samp{-fident} and @samp{-fno-ident} options.
1566
1567 @item
1568 When @samp{-Wunused} in effect, don't warn about local variables used as
1569 statement-function dummy arguments or @code{DATA} implied-@code{DO} iteration
1570 variables, even though, strictly speaking, these are not uses
1571 of the variables themselves.
1572
1573 @item
1574 When @samp{-W -Wunused} in effect, don't warn about unused dummy arguments
1575 at all, since there's no way to turn this off for individual
1576 cases (@code{g77} might someday start warning about these)---applies
1577 to @code{gcc} versions 2.7.0 and later, since earlier versions didn't
1578 warn about unused dummy arguments.
1579
1580 @item
1581 New option @samp{-fno-underscoring} that inhibits transformation of names
1582 (by appending one or two underscores) so users may experiment
1583 with implications of such an environment.
1584
1585 @item
1586 Minor improvement to @file{gcc/f/info} module to make it easier to build
1587 @code{g77} using the native (non-@code{gcc}) compiler on certain machines
1588 (but definitely not all machines nor all non-@code{gcc} compilers).
1589 Please
1590 do not report bugs showing problems compilers have with
1591 macros defined in @file{gcc/f/target.h} and used in places like
1592 @file{gcc/f/expr.c}.
1593
1594 @item
1595 Add warning to be printed for each invocation of the compiler
1596 if the target machine @code{INTEGER}, @code{REAL}, or @code{LOGICAL} size
1597 is not 32 bits,
1598 since @code{g77} is known to not work well for such cases (to be
1599 fixed in Version 0.6---@pxref{Actual Bugs,,Actual Bugs We Haven't Fixed Yet}).
1600
1601 @item
1602 Lots of new documentation (though work is still needed to put it into
1603 canonical GNU format).
1604
1605 @item
1606 Build @code{libf2c} with @samp{-g0}, not @samp{-g2}, in effect
1607 (by default), to produce
1608 smaller library without lots of debugging clutter.
1609 @end itemize
1610
1611 @heading In 0.5.15:
1612 @itemize @bullet
1613 @item
1614 Fix bad code generation involving @samp{X**I} and temporary, internal variables
1615 generated by @code{g77} and the back end (such as for @code{DO} loops).
1616
1617 @item
1618 Fix crash given @samp{CHARACTER A;DATA A/.TRUE./}.
1619
1620 @item
1621 Replace crash with diagnostic given @samp{CHARACTER A;DATA A/1.0/}.
1622
1623 @item
1624 Fix crash or other erratic behavior when null character constant
1625 (@samp{''}) is encountered.
1626
1627 @item
1628 Fix crash or other erratic behavior involving diagnosed code.
1629
1630 @item
1631 Fix code generation for external functions returning type @code{REAL} when
1632 the @samp{-ff2c} option is in force (which it is by default) so that
1633 @code{f2c} compatibility is indeed provided.
1634
1635 @item
1636 Disallow @samp{COMMON I(10)} if @samp{I} has previously been specified
1637 with an array declarator.
1638
1639 @item
1640 New @samp{-ffixed-line-length-@var{n}} option, where @var{n} is the
1641 maximum length
1642 of a typical fixed-form line, defaulting to 72 columns, such
1643 that characters beyond column @var{n} are ignored, or @var{n} is @samp{none},
1644 meaning no characters are ignored.
1645 does not affect lines
1646 with @samp{&} in column 1, which are always processed as if
1647 @samp{-ffixed-line-length-none} was in effect.
1648
1649 @item
1650 No longer generate better code for some kinds of array references,
1651 as @code{gcc} back end is to be fixed to do this even better, and it
1652 turned out to slow down some code in some cases after all.
1653
1654 @item
1655 In @code{COMMON} and @code{EQUIVALENCE} areas with any members given initial
1656 values (e.g. via @code{DATA}), uninitialized members now always
1657 initialized to binary zeros (though this is not required by
1658 the standard, and might not be done in future versions
1659 of @code{g77}).
1660 Previously, in some @code{COMMON}/@code{EQUIVALENCE} areas
1661 (essentially those with members of more than one type), the
1662 uninitialized members were initialized to spaces, to
1663 cater to @code{CHARACTER} types, but it seems no existing code expects
1664 that, while much existing code expects binary zeros.
1665 @end itemize
1666
1667 @heading In 0.5.14:
1668 @itemize @bullet
1669 @item
1670 Don't emit bad code when low bound of adjustable array is nonconstant
1671 and thus might vary as an expression at run time.
1672
1673 @item
1674 Emit correct code for calculation of number of trips in @code{DO} loops
1675 for cases
1676 where the loop should not execute at all.
1677 (This bug affected cases
1678 where the difference between the begin and end values was less
1679 than the step count, though probably not for floating-point cases.)
1680
1681 @item
1682 Fix crash when extra parentheses surround item in
1683 @code{DATA} implied-@code{DO} list.
1684
1685 @item
1686 Fix crash over minor internal inconsistencies in handling diagnostics,
1687 just substitute dummy strings where necessary.
1688
1689 @item
1690 Fix crash on some systems when compiling call to @code{MVBITS()} intrinsic.
1691
1692 @item
1693 Fix crash on array assignment @samp{TYPE@var{ddd}(@dots{})=@dots{}}, where @var{ddd}
1694 is a string of one or more digits.
1695
1696 @item
1697 Fix crash on @code{DCMPLX()} with a single @code{INTEGER} argument.
1698
1699 @item
1700 Fix various crashes involving code with diagnosed errors.
1701
1702 @item
1703 Support @samp{-I} option for @code{INCLUDE} statement, plus @code{gcc}'s
1704 @file{header.gcc} facility for handling systems like MS-DOS.
1705
1706 @item
1707 Allow @code{INCLUDE} statement to be continued across multiple lines,
1708 even allow it to coexist with other statements on the same line.
1709
1710 @item
1711 Incorporate Bellcore fixes to @code{libf2c} through 1995-03-15---this
1712 fixes a bug involving infinite loops reading EOF with empty list-directed
1713 I/O list.
1714
1715 @item
1716 Remove all the @code{g77}-specific auto-configuration scripts, code,
1717 and so on,
1718 except for temporary substitutes for bsearch() and strtoul(), as
1719 too many configure/build problems were reported in these areas.
1720 People will have to fix their systems' problems themselves, or at
1721 least somewhere other than @code{g77}, which expects a working ANSI C
1722 environment (and, for now, a GNU C compiler to compile @code{g77} itself).
1723
1724 @item
1725 Complain if initialized common redeclared as larger in subsequent program
1726 unit.
1727
1728 @item
1729 Warn if blank common initialized, since its size can vary and hence
1730 related warnings that might be helpful won't be seen.
1731
1732 @item
1733 New @samp{-fbackslash} option, on by default, that causes @samp{\}
1734 within @code{CHARACTER}
1735 and Hollerith constants to be interpreted a la GNU C.
1736 Note that
1737 this behavior is somewhat different from @code{f2c}'s, which supports only
1738 a limited subset of backslash (escape) sequences.
1739
1740 @item
1741 Make @samp{-fugly-args} the default.
1742
1743 @item
1744 New @samp{-fugly-init} option, on by default, that allows typeless/Hollerith
1745 to be specified as initial values for variables or named constants
1746 (@code{PARAMETER}), and also allows character<->numeric conversion in
1747 those contexts---turn off via @samp{-fno-ugly-init}.
1748
1749 @item
1750 New @samp{-finit-local-zero} option to initialize
1751 local variables to binary zeros.
1752 This does not affect whether they are @code{SAVE}d, i.e. made
1753 automatic or static.
1754
1755 @item
1756 New @samp{-Wimplicit} option to warn about implicitly typed variables, arrays,
1757 and functions.
1758 (Basically causes all program units to default to @code{IMPLICIT NONE}.)
1759
1760 @item
1761 @samp{-Wall} now implies @samp{-Wuninitialized} as with @code{gcc}
1762 (i.e. unless @samp{-O} not specified, since @samp{-Wuninitialized}
1763 requires @samp{-O}), and implies @samp{-Wunused} as well.
1764
1765 @item
1766 @samp{-Wunused} no longer gives spurious messages for unused
1767 @code{EXTERNAL} names (since they are assumed to refer to block data
1768 program units, to make use of libraries more reliable).
1769
1770 @item
1771 Support @code{%LOC()} and @code{LOC()} of character arguments.
1772
1773 @item
1774 Support null (zero-length) character constants and expressions.
1775
1776 @item
1777 Support @code{f2c}'s @code{IMAG()} generic intrinsic.
1778
1779 @item
1780 Support @code{ICHAR()}, @code{IACHAR()}, and @code{LEN()} of
1781 character expressions that are valid in assignments but
1782 not normally as actual arguments.
1783
1784 @item
1785 Support @code{f2c}-style @samp{&} in column 1 to mean continuation line.
1786
1787 @item
1788 Allow @code{NAMELIST}, @code{EXTERNAL}, @code{INTRINSIC}, and @code{VOLATILE}
1789 in @code{BLOCK DATA}, even though these are not allowed by the standard.
1790
1791 @item
1792 Allow @code{RETURN} in main program unit.
1793
1794 @item
1795 Changes to Hollerith-constant support to obey Appendix C of the
1796 standard:
1797
1798 @itemize --
1799 @item
1800 Now padded on the right with zeros, not spaces.
1801
1802 @item
1803 Hollerith ``format specifications'' in the form of arrays of
1804 non-character allowed.
1805
1806 @item
1807 Warnings issued when non-space truncation occurs when converting
1808 to another type.
1809
1810 @item
1811 When specified as actual argument, now passed
1812 by reference to @code{INTEGER} (padded on right with spaces if constant
1813 too small, otherwise fully intact if constant wider the @code{INTEGER}
1814 type) instead of by value.
1815 @end itemize
1816
1817 @strong{Warning:} @code{f2c} differs on the
1818 interpretation of @samp{CALL FOO(1HX)}, which it treats exactly the
1819 same as @samp{CALL FOO('X')}, but which the standard and @code{g77} treat
1820 as @samp{CALL FOO(%REF('X   '))} (padded with as many spaces as necessary
1821 to widen to @code{INTEGER}), essentially.
1822
1823 @item
1824 Changes and fixes to typeless-constant support:
1825
1826 @itemize --
1827 @item
1828 Now treated as a typeless double-length @code{INTEGER} value.
1829
1830 @item
1831 Warnings issued when overflow occurs.
1832
1833 @item
1834 Padded on the left with zeros when converting
1835 to a larger type.
1836
1837 @item
1838 Should be properly aligned and ordered on
1839 the target machine for whatever type it is turned into.
1840
1841 @item
1842 When specified as actual argument, now passed as reference to
1843 a default @code{INTEGER} constant.
1844 @end itemize
1845
1846 @item
1847 @code{%DESCR()} of a non-@code{CHARACTER} expression now passes a pointer to
1848 the expression plus a length for the expression just as if
1849 it were a @code{CHARACTER} expression.
1850 For example, @samp{CALL FOO(%DESCR(D))}, where
1851 @samp{D} is @code{REAL*8}, is the same as @samp{CALL FOO(D,%VAL(8)))}.
1852
1853 @item
1854 Name of multi-entrypoint master function changed to incorporate
1855 the name of the primary entry point instead of a decimal
1856 value, so the name of the master function for @samp{SUBROUTINE X}
1857 with alternate entry points is now @samp{__g77_masterfun_x}.
1858
1859 @item
1860 Remove redundant message about zero-step-count @code{DO} loops.
1861
1862 @item
1863 Clean up diagnostic messages, shortening many of them.
1864
1865 @item
1866 Fix typo in @code{g77} man page.
1867
1868 @item
1869 Clarify implications of constant-handling bugs in @file{f/BUGS}.
1870
1871 @item
1872 Generate better code for @samp{**} operator with a right-hand operand of
1873 type @code{INTEGER}.
1874
1875 @item
1876 Generate better code for @code{SQRT()} and @code{DSQRT()},
1877 also when @samp{-ffast-math}
1878 specified, enable better code generation for @code{SIN()} and @code{COS()}.
1879
1880 @item
1881 Generate better code for some kinds of array references.
1882
1883 @item
1884 Speed up lexing somewhat (this makes the compilation phase noticeably
1885 faster).
1886 @end itemize