home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / g77doc.zip / news.tex < prev    next >
Text File  |  1998-03-24  |  54KB  |  1,664 lines

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