aboutsummaryrefslogtreecommitdiff
path: root/gcc/f
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/f')
-rw-r--r--gcc/f/BUGS10
-rw-r--r--gcc/f/ChangeLog138
-rw-r--r--gcc/f/INSTALL29
-rw-r--r--gcc/f/Make-lang.in52
-rw-r--r--gcc/f/NEWS188
-rw-r--r--gcc/f/bugs.texi4
-rw-r--r--gcc/f/com.c16
-rw-r--r--gcc/f/ffe.texi1141
-rw-r--r--gcc/f/g77.texi210
-rw-r--r--gcc/f/g77install.texi58
-rw-r--r--gcc/f/g77spec.c6
-rw-r--r--gcc/f/lang-options.h8
-rw-r--r--gcc/f/lang-specs.h6
-rw-r--r--gcc/f/news.texi196
-rw-r--r--gcc/f/root.texi36
-rw-r--r--gcc/f/stw.h2
-rw-r--r--gcc/f/top.c8
-rw-r--r--gcc/f/version.c2
18 files changed, 1816 insertions, 294 deletions
diff --git a/gcc/f/BUGS b/gcc/f/BUGS
index f97b75e3949..6f04b2b08f7 100644
--- a/gcc/f/BUGS
+++ b/gcc/f/BUGS
@@ -2,7 +2,7 @@
`bugs0.texi' and `bugs.texi'. `BUGS' is *not* a source file, although
it is normally included within source distributions.
- This file lists known bugs in the EGCS-1.2 version of the GNU
+ This file lists known bugs in the GCC-2.95 version of the GNU
Fortran compiler. Copyright (C) 1995-1999 Free Software Foundation,
Inc. You may copy, distribute, and modify it freely as long as you
preserve this copyright notice and permission notice.
@@ -11,7 +11,7 @@ Known Bugs In GNU Fortran
*************************
This section identifies bugs that `g77' *users* might run into in
-the EGCS-1.2 version of `g77'. This includes bugs that are actually in
+the GCC-2.95 version of `g77'. This includes bugs that are actually in
the `gcc' back end (GBE) or in `libf2c', because those sets of code are
at least somewhat under the control of (and necessarily intertwined
with) `g77', so it isn't worth separating them out.
@@ -27,20 +27,20 @@ particularly concentrated on any version of this information that is
distributed as part of a *released* `g77'.
In particular, while this information is intended to apply to the
-EGCS-1.2 version of `g77', only an official *release* of that version
+GCC-2.95 version of `g77', only an official *release* of that version
is expected to contain documentation that is most consistent with the
`g77' product in that version.
An online, "live" version of this document (derived directly from
the mainline, development version of `g77' within `egcs') is available
-via `http://egcs.cygnus.com/onlinedocs/g77_bugs.html'. Follow the
+via `http://www.gnu.org/software/gcc/onlinedocs/g77_bugs.html'. Follow the
"Known Bugs" link.
For information on bugs that might afflict people who configure,
port, build, and install `g77', see "Problems Installing" in
`egcs/gcc/f/INSTALL'.
- The following information was last updated on 1999-05-06:
+ The following information was last updated on 1999-06-29:
* `g77' fails to warn about use of a "live" iterative-DO variable as
an implied-DO variable in a `WRITE' or `PRINT' statement (although
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog
index 92de51ab922..47a745e70ff 100644
--- a/gcc/f/ChangeLog
+++ b/gcc/f/ChangeLog
@@ -1,3 +1,141 @@
+Mon Mar 13 01:00:55 2000 Toon Moene <toon@moene.indiv.nluug.nl>
+
+ * stw.h (struct _ffestw_): Change type of uses_ to int.
+
+Fri Feb 18 13:36:50 2000 Martin von Loewis <loewis@informatik.hu-berlin.de>
+
+ * g77spec.c (lang_specific_driver): Use GCCBUGURL.
+
+Sun Oct 24 23:54:10 PDT 1999 Jeff Law (law@cygnus.com)
+
+ * gcc-2.95.2 Released.
+
+Mon Aug 16 01:29:24 PDT 1999 Jeff Law (law@cygnus.com)
+
+ * gcc-2.95.1 Released.
+
+Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
+
+ * g77spec.c: Update URLS and mail addresses.
+ * root.texi: Update URLS and mail addresses.
+
+Wed Jul 28 21:39:31 PDT 1999 Jeff Law (law@cygnus.com)
+
+ * gcc-2.95 Released.
+
+ * version.c: No longer a prerelease.
+
+Sat Jul 17 21:57:07 1999 Jeffrey A Law (law@cygnus.com)
+
+ * root.texi: Clear DEVEOPMENT per Craig's instructions.
+
+1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
+
+ * root.texi: Update e-mail addresses to gcc.gnu.org.
+ * g77spec.c (lang_specific_driver): Updated URL with bug reporting
+ instructions to gcc.gnu.org. Removed e-mail address.
+
+Sat Jul 17 11:28:43 1999 Craig Burley <craig@jcb-sc.com>
+
+ * root.texi, g77install.texi: Switchover to GCC terminology.
+ Also, FSF-G77 had been mistakenly set at some point.
+
+Thu Jul 8 15:38:50 1999 Craig Burley <craig@jcb-sc.com>
+
+ * news.texi: Describe DATE intrinsic fix.
+
+Tue Jun 29 10:10:25 1999 Craig Burley <craig@jcb-sc.com>
+
+ * bugs.texi: Undo Friday's change, as there's now a fix
+ available from netlib.
+ * news.texi: Document the fix.
+
+Mon Jun 28 10:43:11 1999 Craig Burley <craig@jcb-sc.com>
+
+ * com.c (ffecom_prepare_expr_): A COMPLEX intrinsic needs
+ a temp even if -fno-f2c.
+
+ * version.c: Bump version.
+
+Fri Jun 25 11:06:32 1999 Craig Burley <craig@jcb-sc.com>
+
+ * bugs.texi: Describe K(5)=10*3 NAMELIST-read bug.
+
+Mon Jun 21 12:40:17 1999 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
+
+ * g77.texi: Update links.
+
+Wed Jun 16 11:43:02 1999 Craig Burley <craig@jcb-sc.com>
+
+ * news.texi: Mention BACKSPACE fix to libg2c.
+
+Mon Jun 7 08:42:40 1999 Craig Burley <craig@jcb-sc.com>
+
+ * Make-lang.in: Any target using libsubdir must depend
+ on installdirs.
+
+Sat Jun 5 23:50:36 1999 Craig Burley <craig@jcb-sc.com>
+
+ * g77.texi: Describe a few more missing features people
+ have emailed me about.
+
+Sat Jun 5 17:03:23 1999 Craig Burley <craig@jcb-sc.com>
+
+ From Dave Love to egcs-patches on 20 May 1999 17:38:38 +0100:
+ * g77.texi: Clean up fossil text vis-a-vis Intel CPUs.
+
+Fri Jun 4 13:56:56 1999 Craig Burley <craig@jcb-sc.com>
+
+ * Make-lang.in: Use libsubdir, not prefix, to store
+ temporary lang-f77 `flag' file.
+
+Fri Jun 4 10:26:04 1999 Craig Burley <craig@jcb-sc.com>
+
+ * news.texi (News): Mention GCC 2.95 in favor of EGCS 1.2.
+ Mention that libg2c is multilibbed.
+
+Fri Jun 4 10:09:50 1999 Craig Burley <craig@jcb-sc.com>
+
+ * g77.texi (Missing Features): Add `Better Warnings'
+ item.
+
+Fri May 28 16:51:41 1999 Craig Burley <craig@jcb-sc.com>
+
+ * g77.texi: Fix thinko.
+
+Wed May 26 14:43:27 1999 Craig Burley <craig@jcb-sc.com>
+
+ * news.texi: Document Tue May 18 03:52:04 1999 patch.
+ Fix a grammo.
+
+Wed May 26 14:25:07 1999 Craig Burley <craig@jcb-sc.com>
+
+ * g77.texi, news.texi, root.texi, version.c: Start renaming
+ EGCS 1.2 to GCC 2.95, and start using 0.5.25 to designate
+ the version of g77 within GCC 2.95.
+
+Wed May 26 11:45:21 1999 Craig Burley <craig@jcb-sc.com>
+
+ Rename -fsubscript-check to -fbounds-check and
+ -ff2c-subscript-check to -ffortran-bounds-check:
+ * g77.texi: Rename options in docs, clarify usage.
+ * lang-options.h: Rename options, clarify doclets.
+ * news.texi: Rename options, don't bother with fortran-specific
+ option.
+ * top.c (ffe_decode_option): Rename recognized strings.
+
+Tue May 25 18:21:09 1999 Craig Burley <craig@jcb-sc.com>
+
+ * com.c (FFECOM_FASTER_ARRAY_REFS): Delete this vestige,
+ now that -fflatten-arrays exists.
+
+Tue May 25 17:48:34 1999 Craig Burley <craig@jcb-sc.com>
+
+ Fix 19990525-0.f:
+ * com.c (ffecom_arg_ptr_to_expr): Strip off parens around
+ CHARACTER expression.
+ (ffecom_prepare_expr_): Ditto.
+
Tue May 18 03:52:04 1999 Craig Burley <craig@jcb-sc.com>
Support use of back end's improved open-coding of complex divide:
diff --git a/gcc/f/INSTALL b/gcc/f/INSTALL
index b8c24dbdb8a..91858800958 100644
--- a/gcc/f/INSTALL
+++ b/gcc/f/INSTALL
@@ -13,9 +13,10 @@ Installing GNU Fortran
The following information describes how to install `g77'.
- Note that, for `egcs' users, much of the information is obsolete,
-and is superceded by the `egcs' installation procedures. Such
-information is accordingly omitted and flagged as such.
+ Note that, for users of the GCC-2.95 version of `g77', much of the
+information is obsolete, and is superceded by the GCC installation
+procedures. Such information is accordingly omitted and flagged as
+such.
*Warning:* The information below is still under development, and
might not accurately reflect the `g77' code base of which it is a part.
@@ -24,17 +25,17 @@ particularly concentrated on any version of this information that is
distributed as part of a *released* `g77'.
In particular, while this information is intended to apply to the
-EGCS-1.2 version of `g77', only an official *release* of that version
+GCC-2.95 version of `g77', only an official *release* of that version
is expected to contain documentation that is most consistent with the
`g77' product in that version.
- The following information was last updated on 1999-05-10:
+ The following information was last updated on 1999-07-17:
Prerequisites
=============
- For `egcs' users, this information is superceded by the `egcs'
-installation instructions.
+ For users of the GCC-2.95 version of `g77', this information is
+superceded by the GCC installation instructions.
Problems Installing
===================
@@ -83,7 +84,7 @@ not yet established.
Missing strtoul or bsearch
..........................
- This information does not apply to the `egcs' version of `g77'.
+ This information does not apply to the GCC-2.95 version of `g77',
Cleanup Kills Stage Directories
...............................
@@ -334,18 +335,18 @@ support 64-bit systems.
Quick Start
===========
- For `egcs' users, this information is superceded by the `egcs'
-installation instructions.
+ For users of the GCC-2.95 version of `g77', this information is
+superceded by the GCC installation instructions.
Complete Installation
=====================
- For `egcs' users, this information is superceded by the `egcs'
-installation instructions.
+ For users of the GCC-2.95 version of `g77', this information is
+superceded by the GCC installation instructions.
Distributing Binaries
=====================
- For `egcs' users, this information is superceded by the `egcs'
-installation instructions.
+ For users of the GCC-2.95 version of `g77', this information is
+superceded by the GCC installation instructions.
diff --git a/gcc/f/Make-lang.in b/gcc/f/Make-lang.in
index 39c9cc2087d..a531abb5707 100644
--- a/gcc/f/Make-lang.in
+++ b/gcc/f/Make-lang.in
@@ -308,12 +308,14 @@ f77.install-normal:
# Install the driver program as $(target)-g77
# and also as either g77 (if native) or $(tooldir)/bin/g77.
-f77.install-common:
+# Make sure `installdirs' target (from gcc Makefile) has been
+# run, since we use libsubdir to store our `flag' file, lang-f77.
+f77.install-common: installdirs
case "$(LANGUAGES)" in \
- *[fF]77*) touch $(prefix)/lang-f77;; \
- *) rm -f $(prefix)/lang-f77;; \
+ *[fF]77*) touch $(libsubdir)/lang-f77;; \
+ *) rm -f $(libsubdir)/lang-f77;; \
esac
- -if [ -f $(prefix)/lang-f77 -a -f f771$(exeext) ] ; then \
+ -if [ -f $(libsubdir)/lang-f77 -a -f f771$(exeext) ] ; then \
if [ -f g77-cross$(exeext) ] ; then \
rm -f $(bindir)/$(G77_CROSS_NAME)$(exeext); \
$(INSTALL_PROGRAM) g77-cross$(exeext) $(bindir)/$(G77_CROSS_NAME)$(exeext); \
@@ -333,16 +335,18 @@ f77.install-common:
echo ' f77-install-ok in the source or build directory.)'; \
echo ''; \
else true; fi
- rm -f $(prefix)/lang-f77
+ rm -f $(libsubdir)/lang-f77
# $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
# to do the install. The sed rule was copied from stmp-int-hdrs.
-f77.install-info: f77.info
+# Make sure `installdirs' target (from gcc Makefile) has been
+# run, since we use libsubdir to store our `flag' file, lang-f77.
+f77.install-info: f77.info installdirs
case "$(LANGUAGES)" in \
- *[fF]77*) touch $(prefix)/lang-f77;; \
- *) rm -f $(prefix)/lang-f77;; \
+ *[fF]77*) touch $(libsubdir)/lang-f77;; \
+ *) rm -f $(libsubdir)/lang-f77;; \
esac
- if [ -f $(prefix)/lang-f77 -a -f f/g77.info ] ; then \
+ if [ -f $(libsubdir)/lang-f77 -a -f f/g77.info ] ; then \
rm -f $(infodir)/g77.info*; \
for f in f/g77.info*; do \
realfile=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
@@ -350,20 +354,22 @@ f77.install-info: f77.info
done; \
chmod a-x $(infodir)/g77.info*; \
else true; fi
- @if [ -f $(prefix)/lang-f77 -a -f $(srcdir)/f/g77.info ] ; then \
+ @if [ -f $(libsubdir)/lang-f77 -a -f $(srcdir)/f/g77.info ] ; then \
if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
echo " install-info --info-dir=$(infodir) $(infodir)/g77.info"; \
install-info --info-dir=$(infodir) $(infodir)/g77.info || : ; \
else : ; fi; \
else : ; fi
- rm -f $(prefix)/lang-f77
+ rm -f $(libsubdir)/lang-f77
-f77.install-man: $(srcdir)/f/g77.1
+# Make sure `installdirs' target (from gcc Makefile) has been
+# run, since we use libsubdir to store our `flag' file, lang-f77.
+f77.install-man: $(srcdir)/f/g77.1 installdirs
case "$(LANGUAGES)" in \
- *[fF]77*) touch $(prefix)/lang-f77;; \
- *) rm -f $(prefix)/lang-f77;; \
+ *[fF]77*) touch $(libsubdir)/lang-f77;; \
+ *) rm -f $(libsubdir)/lang-f77;; \
esac
- -if [ -f $(prefix)/lang-f77 -a -f f771$(exeext) ] ; then \
+ -if [ -f $(libsubdir)/lang-f77 -a -f f771$(exeext) ] ; then \
if [ -f g77-cross$(exeext) ] ; then \
rm -f $(man1dir)/$(G77_CROSS_NAME)$(manext); \
$(INSTALL_DATA) $(srcdir)/f/g77.1 $(man1dir)/$(G77_CROSS_NAME)$(manext); \
@@ -374,27 +380,29 @@ f77.install-man: $(srcdir)/f/g77.1
chmod a-x $(man1dir)/$(G77_INSTALL_NAME)$(manext); \
fi; \
else true; fi
- rm -f $(prefix)/lang-f77
+ rm -f $(libsubdir)/lang-f77
-f77.uninstall:
+# Make sure `installdirs' target (from gcc Makefile) has been
+# run, since we use libsubdir to store our `flag' file, lang-f77.
+f77.uninstall: installdirs
case "$(LANGUAGES)" in \
- *[fF]77*) touch $(prefix)/lang-f77;; \
- *) rm -f $(prefix)/lang-f77;; \
+ *[fF]77*) touch $(libsubdir)/lang-f77;; \
+ *) rm -f $(libsubdir)/lang-f77;; \
esac
- @if [ -f $(prefix)/lang-f77 ] ; then \
+ @if [ -f $(libsubdir)/lang-f77 ] ; then \
if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
echo " install-info --delete --info-dir=$(infodir) $(infodir)/g77.info"; \
install-info --delete --info-dir=$(infodir) $(infodir)/g77.info || : ; \
else : ; fi; \
else : ; fi
- -if [ -f $(prefix)/lang-f77 ]; then \
+ -if [ -f $(libsubdir)/lang-f77 ]; then \
rm -rf $(bindir)/$(G77_INSTALL_NAME)$(exeext); \
rm -rf $(bindir)/$(G77_CROSS_NAME)$(exeext); \
rm -rf $(man1dir)/$(G77_INSTALL_NAME)$(manext); \
rm -rf $(man1dir)/$(G77_CROSS_NAME)$(manext); \
rm -rf $(infodir)/g77.info*; \
fi
- rm -f $(prefix)/lang-f77
+ rm -f $(libsubdir)/lang-f77
#
# Clean hooks:
# A lot of the ancillary files are deleted by the main makefile.
diff --git a/gcc/f/NEWS b/gcc/f/NEWS
index 2cde7928341..b8b524309ca 100644
--- a/gcc/f/NEWS
+++ b/gcc/f/NEWS
@@ -2,7 +2,7 @@
`news0.texi' and `news.texi'. `NEWS' is *not* a source file, although
it is normally included within source distributions.
- This file lists news about the EGCS-1.2 version (and some other
+ This file lists news about the GCC-2.95 version (and some other
versions) of the GNU Fortran compiler. Copyright (C) 1995-1999 Free
Software Foundation, Inc. You may copy, distribute, and modify it
freely as long as you preserve this copyright notice and permission
@@ -50,7 +50,7 @@ particularly concentrated on any version of this information that is
distributed as part of a *released* `g77'.
In particular, while this information is intended to apply to the
-EGCS-1.2 version of `g77', only an official *release* of that version
+GCC-2.95 version of `g77', only an official *release* of that version
is expected to contain documentation that is most consistent with the
`g77' product in that version.
@@ -64,12 +64,12 @@ about previous `g77' versions up-to-date.
An online, "live" version of this document (derived directly from
the mainline, development version of `g77' within `egcs') is available
-at `http://egcs.cygnus.com/onlinedocs/g77_news.html'.
+at `http://www.gnu.org/software/gcc/onlinedocs/g77_news.html'.
- The following information was last updated on 1999-05-13:
+ The following information was last updated on 1999-07-08:
-In `egcs' 1.2 (versus 1.1.2):
-=============================
+In 0.5.25, `GCC' 2.95 (`EGCS' 1.2) versus `EGCS' 1.1.2:
+=======================================================
1. `g77' no longer generates bad code for assignments, or other
conversions, of `REAL' or `COMPLEX' constant expressions to type
@@ -87,30 +87,40 @@ In `egcs' 1.2 (versus 1.1.2):
now assigns through a temporary, in cases where such partial
overlap is deemed possible.
- 4. Automatic arrays now seem to be working on HP-UX systems.
+ 4. `libg2c' (`libf2c') no longer loses track of the file being worked
+ on during a `BACKSPACE' operation.
- 5. Fix `g77' so it no longer crashes when compiling I/O statements
+ 5. `libg2c' (`libf2c') fixes a bug whereby input to a `NAMELIST' read
+ involving a repeat count, such as `K(5)=10*3', was not properly
+ handled by `libf2c'. The first item was written to `K(5)', but
+ the remaining nine were written elsewhere (still within the array),
+ not necessarily starting at `K(6)'.
+
+ 6. Automatic arrays now seem to be working on HP-UX systems.
+
+ 7. The `Date' intrinsic now returns the correct result on big-endian
+ systems.
+
+ 8. Fix `g77' so it no longer crashes when compiling I/O statements
using keywords that define `INTEGER' values, such as `IOSTAT=J',
where J is other than default `INTEGER' (such as `INTEGER*2').
Instead, it issues a diagnostic.
- 6. Fix `g77' so it properly handles `DATA A/RPT*VAL/', where RPT is
+ 9. Fix `g77' so it properly handles `DATA A/RPT*VAL/', where RPT is
not default `INTEGER', such as `INTEGER*2', instead of producing a
spurious diagnostic. Also fix `DATA (A(I),I=1,N)', where `N' is
not default `INTEGER' to work instead of crashing `g77'.
- 7. The `-ax' option is now obeyed when compiling Fortran programs.
+ 10. The `-ax' option is now obeyed when compiling Fortran programs.
(It is passed to the `f771' driver.)
- * The new `-fsubscript-check' option causes `g77' to compile
- run-time bounds checks of array subscripts, as well as of
- substring start and end points.
+ * The new `-fbounds-check' option causes `g77' to compile run-time
+ bounds checks of array subscripts, as well as of substring start
+ and end points.
- The current implementation uses the `libf2c' library routine
- `s_rnge' to print the diagnostic. Since a future version of `g77'
- might use a different implementation, use the new
- `-ff2c-subscript-check' option if your application requires use of
- `s_rnge' or a compile-time diagnostic.
+ * `libg2c' now supports building as multilibbed library, which
+ provides better support for systems that require options such as
+ `-mieee' to work properly.
* Source file names with the suffixes `.FOR' and `.FPP' now are
recognized by `g77' as if they ended in `.for' and `.fpp',
@@ -123,12 +133,12 @@ In `egcs' 1.2 (versus 1.1.2):
consistent with the other subroutine forms of `libU77' intrinsics.
* `g77' now warns about a reference to an intrinsic that has an
- interface that is not Year 2000 (Y2K) compliant. Also, the
- `libg2c' has been changed to increase the likelihood of catching
- references to the implementations of these intrinsics using the
- `EXTERNAL' mechanism (which would avoid the new warnings).
+ interface that is not Year 2000 (Y2K) compliant. Also, `libg2c'
+ has been changed to increase the likelihood of catching references
+ to the implementations of these intrinsics using the `EXTERNAL'
+ mechanism (which would avoid the new warnings).
- 8. `g77' now warns about a reference to a function when the
+ 11. `g77' now warns about a reference to a function when the
corresponding *subsequent* function program unit disagrees with
the reference concerning the type of the function.
@@ -139,19 +149,23 @@ In `egcs' 1.2 (versus 1.1.2):
* The `-malign-double' option now reliably aligns *all*
double-precision variables and arrays on Intel x86 targets.
- 9. Even without the `-malign-double' option, `g77' reliably aligns
+ 12. Even without the `-malign-double' option, `g77' reliably aligns
local double-precision variables that are not in `EQUIVALENCE'
areas and not `SAVE''d.
+ 13. `g77' now open-codes ("inlines") division of `COMPLEX' operands
+ instead of generating a run-time call to the `libf2c' routines
+ `c_div' or `z_div', unless the `-Os' option is specified.
+
* `g77' no longer generates code to maintain `errno', a C-language
concept, when performing operations such as the `SqRt' intrinsic.
- 10. `g77' developers can temporarily use the `-fflatten-arrays' option
+ 14. `g77' developers can temporarily use the `-fflatten-arrays' option
to compare how the compiler handles code generation using C-like
constructs as compared to the Fortran-like method constructs
normally used.
- 11. A substantial portion of the `g77' front end's code-generation
+ 15. A substantial portion of the `g77' front end's code-generation
component was rewritten. It now generates code using facilities
more robustly supported by the `gcc' back end. One effect of this
rewrite is that some codes no longer produce a spurious "label LAB
@@ -159,14 +173,35 @@ In `egcs' 1.2 (versus 1.1.2):
* Support for the `-fugly' option has been removed.
- 12. Improve documentation and indexing, including information on Year
+ 16. Improve documentation and indexing, including information on Year
2000 (Y2K) compliance, and providing more information on internals
of the front end.
- 13. Upgrade to `libf2c' as of 1999-05-10.
+ 17. Upgrade to `libf2c' as of 1999-05-10.
+
+In 0.5.24 versus 0.5.23:
+========================
+
+ There is no `g77' version 0.5.24 at this time, or planned. 0.5.24
+is the version number designated for bug fixes and, perhaps, some new
+features added, to 0.5.23. Version 0.5.23 requires `gcc' 2.8.1, as
+0.5.24 was planned to require.
-In 0.5.24 and `egcs' 1.1.2 (versus 0.5.23 and 1.1.1):
-=====================================================
+ Due to `EGCS' becoming `GCC' (which is now an acronym for "GNU
+Compiler Collection"), and `EGCS' 1.2 becoming officially designated
+`GCC' 2.95, there seems to be no need for an actual 0.5.24 release.
+
+ To reduce the confusion already resulting from use of 0.5.24 to
+designate `g77' versions within `EGCS' versions 1.0 and 1.1, as well as
+in versions of `g77' documentation and notices during that period,
+"mainline" `g77' version numbering resumes at 0.5.25 with `GCC' 2.95
+(`EGCS' 1.2), skipping over 0.5.24 as a placeholder version number.
+
+ To repeat, there is no `g77' 0.5.24, but there is now a 0.5.25.
+Please remain calm and return to your keypunch units.
+
+In `EGCS' 1.1.2 versus `EGCS' 1.1.1:
+====================================
* Fix the `IDate' intrinsic (VXT) (in `libg2c') so the returned year
is in the documented, non-Y2K-compliant range of 0-99, instead of
@@ -180,8 +215,8 @@ In 0.5.24 and `egcs' 1.1.2 (versus 0.5.23 and 1.1.1):
* Improve documentation.
-In 0.5.24 and `egcs' 1.1.1 (versus 0.5.23 and 1.1):
-===================================================
+In `EGCS' 1.1.1 versus `EGCS' 1.1:
+==================================
* Fix `libg2c' so it performs an implicit `ENDFILE' operation (as
appropriate) whenever a `REWIND' is done.
@@ -202,51 +237,28 @@ In 0.5.24 and `egcs' 1.1.1 (versus 0.5.23 and 1.1):
some systems (those with shells requiring `else true' clauses on
`if' constructs for the completion code to be set properly).
-In `egcs' 1.1 (versus 0.5.24):
-==============================
-
- 14. Fix `g77' crash compiling code containing the construct
- `CMPLX(0.)' or similar.
-
- 15. Fix `g77' crash (or apparently infinite run-time) when compiling
- certain complicated expressions involving `COMPLEX' arithmetic
- (especially multiplication).
-
- 16. Fix a code-generation bug that afflicted Intel x86 targets when
- `-O2' was specified compiling, for example, an old version of the
- `DNRM2' routine.
-
- The x87 coprocessor stack was being mismanaged in cases involving
- assigned `GOTO' and `ASSIGN'.
-
- * Align static double-precision variables and arrays on Intel x86
- targets regardless of whether `-malign-double' is specified.
-
- Generally, this affects only local variables and arrays having the
- `SAVE' attribute or given initial values via `DATA'.
-
-In `egcs' 1.1 (versus `egcs' 1.0.3):
-====================================
+In `EGCS' 1.1 versus `EGCS' 1.0.3:
+==================================
- 17. Fix bugs in the `libU77' intrinsic `HostNm' that wrote one byte
+ 18. Fix bugs in the `libU77' intrinsic `HostNm' that wrote one byte
beyond the end of its `CHARACTER' argument, and in the `libU77'
intrinsics `GMTime' and `LTime' that overwrote their arguments.
- 18. Assumed arrays with negative bounds (such as `REAL A(-1:*)') no
+ 19. Assumed arrays with negative bounds (such as `REAL A(-1:*)') no
longer elicit spurious diagnostics from `g77', even on systems
with pointers having different sizes than integers.
This bug is not known to have existed in any recent version of
`gcc'. It was introduced in an early release of `egcs'.
- 19. Valid combinations of `EXTERNAL', passing that external as a dummy
+ 20. Valid combinations of `EXTERNAL', passing that external as a dummy
argument without explicitly giving it a type, and, in a subsequent
program unit, referencing that external as an external function
with a different type no longer crash `g77'.
- 20. `CASE DEFAULT' no longer crashes `g77'.
+ 21. `CASE DEFAULT' no longer crashes `g77'.
- 21. The `-Wunused' option no longer issues a spurious warning about
+ 22. The `-Wunused' option no longer issues a spurious warning about
the "master" procedure generated by `g77' for procedures
containing `ENTRY' statements.
@@ -271,25 +283,25 @@ In `egcs' 1.1 (versus `egcs' 1.0.3):
`libf2c' environment, even when `libf2c' (now `libg2c') is a
shared library.
- 22. `g77' no longer installs the `f77' command and `f77.1' man page in
+ 23. `g77' no longer installs the `f77' command and `f77.1' man page in
the `/usr' or `/usr/local' heirarchy, even if the `f77-install-ok'
file exists in the source or build directory. See the
installation documentation for more information.
- 23. `g77' no longer installs the `libf2c.a' library and `f2c.h'
+ 24. `g77' no longer installs the `libf2c.a' library and `f2c.h'
include file in the `/usr' or `/usr/local' heirarchy, even if the
`f2c-install-ok' or `f2c-exists-ok' files exist in the source or
build directory. See the installation documentation for more
information.
- 24. The `libf2c.a' library produced by `g77' has been renamed to
+ 25. The `libf2c.a' library produced by `g77' has been renamed to
`libg2c.a'. It is installed only in the `gcc' "private" directory
heirarchy, `gcc-lib'. This allows system administrators and users
to choose which version of the `libf2c' library from `netlib' they
wish to use on a case-by-case basis. See the installation
documentation for more information.
- 25. The `f2c.h' include (header) file produced by `g77' has been
+ 26. The `f2c.h' include (header) file produced by `g77' has been
renamed to `g2c.h'. It is installed only in the `gcc' "private"
directory heirarchy, `gcc-lib'. This allows system administrators
and users to choose which version of the include file from
@@ -301,11 +313,11 @@ In `egcs' 1.1 (versus `egcs' 1.0.3):
than the one built and installed as part of the same `g77' version
is picked up.
- 26. During the configuration and build process, `g77' creates
+ 27. During the configuration and build process, `g77' creates
subdirectories it needs only as it needs them. Other cleaning up
of the configuration and build process has been performed as well.
- 27. `install-info' now used to update the directory of Info
+ 28. `install-info' now used to update the directory of Info
documentation to contain an entry for `g77' (during installation).
* Some diagnostics have been changed from warnings to errors, to
@@ -314,28 +326,38 @@ In `egcs' 1.1 (versus `egcs' 1.0.3):
in the `OPEN', `INQUIRE', `READ', and `WRITE' statements, and
about truncations of various sorts of constants.
- 28. Improve compilation of `FORMAT' expressions so that a null byte is
+ 29. Improve compilation of `FORMAT' expressions so that a null byte is
appended to the last operand if it is a constant. This provides a
cleaner run-time diagnostic as provided by `libf2c' for statements
like `PRINT '(I1', 42'.
- 29. Improve documentation and indexing.
+ 30. Improve documentation and indexing.
- 30. The upgrade to `libf2c' as of 1998-06-18 should fix a variety of
+ 31. The upgrade to `libf2c' as of 1998-06-18 should fix a variety of
problems, including those involving some uses of the `T' format
specifier, and perhaps some build (porting) problems as well.
-In 0.5.24 and `egcs' 1.1 (versus 0.5.23):
-=========================================
+In `EGCS' 1.1 versus `g77' 0.5.23:
+==================================
+
+ 32. Fix a code-generation bug that afflicted Intel x86 targets when
+ `-O2' was specified compiling, for example, an old version of the
+ `DNRM2' routine.
+
+ The x87 coprocessor stack was being mismanaged in cases involving
+ assigned `GOTO' and `ASSIGN'.
- 31. `g77' no longer produces incorrect code and initial values for
+ 33. `g77' no longer produces incorrect code and initial values for
`EQUIVALENCE' and `COMMON' aggregates that, due to "unnatural"
ordering of members vis-a-vis their types, require initial padding.
- 32. `g77' no longer crashes when compiling code containing
+ 34. Fix `g77' crash compiling code containing the construct
+ `CMPLX(0.)' or similar.
+
+ 35. `g77' no longer crashes when compiling code containing
specification statements such as `INTEGER(KIND=7) PTR'.
- 33. `g77' no longer crashes when compiling code such as `J = SIGNAL(1,
+ 36. `g77' no longer crashes when compiling code such as `J = SIGNAL(1,
2)'.
* `g77' now treats `%LOC(EXPR)' and `LOC(EXPR)' as "ordinary"
@@ -346,6 +368,16 @@ In 0.5.24 and `egcs' 1.1 (versus 0.5.23):
Previously, `g77' treated these expressions as denoting special
"pointer" arguments for the purposes of filewide analysis.
+ 37. Fix `g77' crash (or apparently infinite run-time) when compiling
+ certain complicated expressions involving `COMPLEX' arithmetic
+ (especially multiplication).
+
+ * Align static double-precision variables and arrays on Intel x86
+ targets regardless of whether `-malign-double' is specified.
+
+ Generally, this affects only local variables and arrays having the
+ `SAVE' attribute or given initial values via `DATA'.
+
* The `g77' driver now ensures that `-lg2c' is specified in the link
phase prior to any occurrence of `-lm'. This prevents
accidentally linking to a routine in the SunOS4 `-lm' library when
@@ -366,9 +398,9 @@ In 0.5.24 and `egcs' 1.1 (versus 0.5.23):
* The F90 `System_Clock' intrinsic allows the optional arguments
(except for the `Count' argument) to be omitted.
- 34. Upgrade to `libf2c' as of 1998-06-18.
+ 38. Upgrade to `libf2c' as of 1998-06-18.
- 35. Improve documentation and indexing.
+ 39. Improve documentation and indexing.
In previous versions:
=====================
diff --git a/gcc/f/bugs.texi b/gcc/f/bugs.texi
index 643a221c98c..3f4cd903920 100644
--- a/gcc/f/bugs.texi
+++ b/gcc/f/bugs.texi
@@ -9,7 +9,7 @@
@c in the standalone derivations of this file (e.g. BUGS).
@set copyrights-bugs 1995-1999
-@set last-update-bugs 1999-05-06
+@set last-update-bugs 1999-06-29
@include root.texi
@@ -79,7 +79,7 @@ An online, ``live'' version of this document
(derived directly from the mainline, development version
of @code{g77} within @code{egcs})
is available via
-@uref{http://egcs.cygnus.com/onlinedocs/g77_bugs.html}.
+@uref{http://www.gnu.org/software/gcc/onlinedocs/g77_bugs.html}.
Follow the ``Known Bugs'' link.
@ifset DOC-G77
diff --git a/gcc/f/com.c b/gcc/f/com.c
index c04c4a77089..c326fedaae7 100644
--- a/gcc/f/com.c
+++ b/gcc/f/com.c
@@ -213,8 +213,6 @@ typedef struct { unsigned :16, :16, :16; } vms_ino_t;
/* Externals defined here. */
-#define FFECOM_FASTER_ARRAY_REFS 0 /* Generates faster code? */
-
#if FFECOM_targetCURRENT == FFECOM_targetGCC
/* tree.h declares a bunch of stuff that it expects the front end to
@@ -10600,6 +10598,9 @@ ffecom_arg_ptr_to_expr (ffebld expr, tree *length)
assert (ffeinfo_kindtype (ffebld_info (expr))
== FFEINFO_kindtypeCHARACTER1);
+ while (ffebld_op (expr) == FFEBLD_opPAREN)
+ expr = ffebld_left (expr);
+
catlist = ffecom_concat_list_new_ (expr, FFETARGET_charactersizeNONE);
switch (ffecom_concat_list_count_ (catlist))
{
@@ -13042,6 +13043,12 @@ ffecom_prepare_expr_ (ffebld expr, ffebld dest UNUSED)
/* Generate whatever temporaries are needed to represent the result
of the expression. */
+ if (bt == FFEINFO_basictypeCHARACTER)
+ {
+ while (ffebld_op (expr) == FFEBLD_opPAREN)
+ expr = ffebld_left (expr);
+ }
+
switch (ffebld_op (expr))
{
default:
@@ -13061,7 +13068,10 @@ ffecom_prepare_expr_ (ffebld expr, ffebld dest UNUSED)
s = ffebld_symter (ffebld_left (expr));
if (ffesymbol_where (s) == FFEINFO_whereCONSTANT
- || ! ffesymbol_is_f2c (s))
+ || (ffesymbol_where (s) != FFEINFO_whereINTRINSIC
+ && ! ffesymbol_is_f2c (s))
+ || (ffesymbol_where (s) == FFEINFO_whereINTRINSIC
+ && ! ffe_is_f2c_library ()))
break;
}
else if (ffebld_op (expr) == FFEBLD_opPOWER)
diff --git a/gcc/f/ffe.texi b/gcc/f/ffe.texi
index 4108bb850bc..e30333280d1 100644
--- a/gcc/f/ffe.texi
+++ b/gcc/f/ffe.texi
@@ -11,15 +11,1047 @@
This chapter describes some aspects of the design and implementation
of the @code{g77} front end.
+Much of the information below applies not to current
+releases of @code{g77},
+but to the 0.6 rewrite being designed and implemented
+as of late May, 1999.
+
+To find about things that are ``To Be Determined'' or ``To Be Done'',
+search for the string TBD.
+If you want to help by working on one or more of these items,
+email me at @email{@value{email-burley}}.
+If you're planning to do more than just research issues and offer comments,
+see @uref{http://www.gnu.org/software/contribute.html} for steps you might
+need to take first.
@menu
+* Overview of Sources::
+* Overview of Translation Process::
* Philosophy of Code Generation::
* Two-pass Design::
* Challenges Posed::
* Transforming Statements::
* Transforming Expressions::
+* Internal Naming Conventions::
@end menu
+@node Overview of Sources
+@section Overview of Sources
+
+The current directory layout includes the following:
+
+@table @file
+@item @value{srcdir}/gcc/
+Non-g77 files in gcc
+
+@item @value{srcdir}/gcc/f/
+GNU Fortran front end sources
+
+@item @value{srcdir}/libf2c/
+@code{libg2c} configuration and @code{g2c.h} file generation
+
+@item @value{srcdir}/libf2c/libF77/
+General support and math portion of @code{libg2c}
+
+@item @value{srcdir}/libf2c/libI77/
+I/O portion of @code{libg2c}
+
+@item @value{srcdir}/libf2c/libU77/
+Additional interfaces to Unix @code{libc} for @code{libg2c}
+@end table
+
+Components of note in @code{g77} are described below.
+
+@file{f/} as a whole contains the source for @code{g77},
+while @file{libf2c/} contains a portion of the separate program
+@code{f2c}.
+Note that the @code{libf2c} code is not part of the program @code{g77},
+just distributed with it.
+
+@file{f/} contains text files that document the Fortran compiler, source
+files for the GNU Fortran Front End (FFE), and some other stuff.
+The @code{g77} compiler code is placed in @file{f/} because it,
+along with its contents,
+is designed to be a subdirectory of a @code{gcc} source directory,
+@file{gcc/},
+which is structured so that language-specific front ends can be ``dropped
+in'' as subdirectories.
+The C++ front end (@code{g++}), is an example of this---it resides in
+the @file{cp/} subdirectory.
+Note that the C front end (also referred to as @code{gcc})
+is an exception to this, as its source files reside
+in the @file{gcc/} directory itself.
+
+@file{libf2c/} contains the run-time libraries for the @code{f2c} program,
+also used by @code{g77}.
+These libraries normally referred to collectively as @code{libf2c}.
+When built as part of @code{g77},
+@code{libf2c} is installed under the name @code{libg2c} to avoid
+conflict with any existing version of @code{libf2c},
+and thus is often referred to as @code{libg2c} when the
+@code{g77} version is specifically being referred to.
+
+The @code{netlib} version of @code{libf2c/}
+contains two distinct libraries,
+@code{libF77} and @code{libI77},
+each in their own subdirectories.
+In @code{g77}, this distinction is not made,
+beyond maintaining the subdirectory structure in the source-code tree.
+
+@file{libf2c/} is not part of the program @code{g77},
+just distributed with it.
+It contains files not present
+in the official (@code{netlib}) version of @code{libf2c},
+and also contains some minor changes made from @code{libf2c},
+to fix some bugs,
+and to facilitate automatic configuration, building, and installation of
+@code{libf2c} (as @code{libg2c}) for use by @code{g77} users.
+See @file{libf2c/README} for more information,
+including licensing conditions
+governing distribution of programs containing code from @code{libg2c}.
+
+@code{libg2c}, @code{g77}'s version of @code{libf2c},
+adds Dave Love's implementation of @code{libU77},
+in the @file{libf2c/libU77/} directory.
+This library is distributed under the
+GNU Library General Public License (LGPL)---see the
+file @file{libf2c/libU77/COPYING.LIB}
+for more information,
+as this license
+governs distribution conditions for programs containing code
+from this portion of the library.
+
+Files of note in @file{f/} and @file{libf2c/} are described below:
+
+@table @file
+@item f/BUGS
+Lists some important bugs known to be in g77.
+Or use Info (or GNU Emacs Info mode) to read
+the ``Actual Bugs'' node of the @code{g77} documentation:
+
+@smallexample
+info -f f/g77.info -n "Actual Bugs"
+@end smallexample
+
+@item f/ChangeLog
+Lists recent changes to @code{g77} internals.
+
+@item libf2c/ChangeLog
+Lists recent changes to @code{libg2c} internals.
+
+@item f/NEWS
+Contains the per-release changes.
+These include the user-visible
+changes described in the node ``Changes''
+in the @code{g77} documentation, plus internal
+changes of import.
+Or use:
+
+@smallexample
+info -f f/g77.info -n News
+@end smallexample
+
+@item f/g77.info*
+The @code{g77} documentation, in Info format,
+produced by building @code{g77}.
+
+All users of @code{g77} (not just installers) should read this,
+using the @code{more} command if neither the @code{info} command,
+nor GNU Emacs (with its Info mode), are available, or if users
+aren't yet accustomed to using these tools.
+All of these files are readable as ``plain text'' files,
+though they're easier to navigate using Info readers
+such as @code{info} and GNU Emacs Info mode.
+@end table
+
+If you want to explore the FFE code, which lives entirely in @file{f/},
+here are a few clues.
+The file @file{g77spec.c} contains the @code{g77}-specific source code
+for the @code{g77} command only---this just forms a variant of the
+@code{gcc} command, so,
+just as the @code{gcc} command itself does not contain the C front end,
+the @code{g77} command does not contain the Fortran front end (FFE).
+The FFE code ends up in an executable named @file{f771},
+which does the actual compiling,
+so it contains the FFE plus the @code{gcc} back end (GBE),
+the latter to do most of the optimization, and the code generation.
+
+The file @file{parse.c} is the source file for @code{yyparse()},
+which is invoked by the GBE to start the compilation process,
+for @file{f771}.
+
+The file @file{top.c} contains the top-level FFE function @code{ffe_file}
+and it (along with top.h) define all @samp{ffe_[a-z].*}, @samp{ffe[A-Z].*},
+and @samp{FFE_[A-Za-z].*} symbols.
+
+The file @file{fini.c} is a @code{main()} program that is used when building
+the FFE to generate C header and source files for recognizing keywords.
+The files @file{malloc.c} and @file{malloc.h} comprise a memory manager
+that defines all @samp{malloc_[a-z].*}, @samp{malloc[A-Z].*}, and
+@samp{MALLOC_[A-Za-z].*} symbols.
+
+All other modules named @var{xyz}
+are comprised of all files named @samp{@var{xyz}*.@var{ext}}
+and define all @samp{ffe@var{xyz}_[a-z].*}, @samp{ffe@var{xyz}[A-Z].*},
+and @samp{FFE@var{XYZ}_[A-Za-z].*} symbols.
+If you understand all this, congratulations---it's easier for me to remember
+how it works than to type in these regular expressions.
+But it does make it easy to find where a symbol is defined.
+For example, the symbol @samp{ffexyz_set_something} would be defined
+in @file{xyz.h} and implemented there (if it's a macro) or in @file{xyz.c}.
+
+The ``porting'' files of note currently are:
+
+@table @file
+@item proj.c
+@itemx proj.h
+This defines the ``language'' used by all the other source files,
+the language being Standard C plus some useful things
+like @code{ARRAY_SIZE} and such.
+
+@item target.c
+@itemx target.h
+These describe the target machine
+in terms of what data types are supported,
+how they are denoted
+(to what C type does an @code{INTEGER*8} map, for example),
+how to convert between them,
+and so on.
+Over time, versions of @code{g77} rely less on this file
+and more on run-time configuration based on GBE info
+in @file{com.c}.
+
+@item com.c
+@itemx com.h
+These are the primary interface to the GBE.
+
+@item ste.c
+@itemx ste.h
+This contains code for implementing recognized executable statements
+in the GBE.
+
+@item src.c
+@itemx src.h
+These contain information on the format(s) of source files
+(such as whether they are never to be processed as case-insensitive
+with regard to Fortran keywords).
+@end table
+
+If you want to debug the @file{f771} executable,
+for example if it crashes,
+note that the global variables @code{lineno} and @code{input_filename}
+are usually set to reflect the current line being read by the lexer
+during the first-pass analysis of a program unit and to reflect
+the current line being processed during the second-pass compilation
+of a program unit.
+
+If an invocation of the function @code{ffestd_exec_end} is on the stack,
+the compiler is in the second pass, otherwise it is in the first.
+
+(This information might help you reduce a test case and/or work around
+a bug in @code{g77} until a fix is available.)
+
+@node Overview of Translation Process
+@section Overview of Translation Process
+
+The order of phases translating source code to the form accepted
+by the GBE is:
+
+@enumerate
+@item
+Stripping punched-card sources (@file{g77stripcard.c})
+
+@item
+Lexing (@file{lex.c})
+
+@item
+Stand-alone statement identification (@file{sta.c})
+
+@item
+Parsing (@file{stb.c} and @file{expr.c})
+
+@item
+Constructing (@file{stc.c})
+
+@item
+Collecting (@file{std.c})
+
+@item
+Expanding (@file{ste.c})
+@end enumerate
+
+To get a rough idea of how a particularly twisted Fortran statement
+gets treated by the passes, consider:
+
+@smallexample
+ FORMAT(I2 4H)=(J/
+ & I3)
+@end smallexample
+
+The job of @file{lex.c} is to know enough about Fortran syntax rules
+to break the statement up into distinct lexemes without requiring
+any feedback from subsequent phases:
+
+@smallexample
+`FORMAT'
+`('
+`I24H'
+`)'
+`='
+`('
+`J'
+`/'
+`I3'
+`)'
+@end smallexample
+
+The job of @file{sta.c} is to figure out the kind of statement,
+or, at least, statement form, that sequence of lexemes represent.
+
+The sooner it can do this (in terms of using the smallest number of
+lexemes, starting with the first for each statement), the better,
+because that leaves diagnostics for problems beyond the recognition
+of the statement form to subsequent phases,
+which can usually better describe the nature of the problem.
+
+In this case, the @samp{=} at ``level zero''
+(not nested within parentheses)
+tells @file{sta.c} that this is an @emph{assignment-form},
+not @code{FORMAT}, statement.
+
+An assignment-form statement might be a statement-function
+definition or an executable assignment statement.
+
+To make that determination,
+@file{sta.c} looks at the first two lexemes.
+
+Since the second lexeme is @samp{(},
+the first must represent an array for this to be an assignment statement,
+else it's a statement function.
+
+Either way, @file{sta.c} hands off the statement to @file{stb.c}
+(either its statement-function parser or its assignment-statement parser).
+
+@file{stb.c} forms a
+statement-specific record containing the pertinent information.
+That information includes a source expression and,
+for an assignment statement, a destination expression.
+Expressions are parsed by @file{expr.c}.
+
+This record is passed to @file{stc.c},
+which copes with the implications of the statement
+within the context established by previous statements.
+
+For example, if it's the first statement in the file
+or after an @code{END} statement,
+@file{stc.c} recognizes that, first of all,
+a main program unit is now being lexed
+(and tells that to @file{std.c}
+before telling it about the current statement).
+
+@file{stc.c} attaches whatever information it can,
+usually derived from the context established by the preceding statements,
+and passes the information to @file{std.c}.
+
+@file{std.c} saves this information away,
+since the GBE cannot cope with information
+that might be incomplete at this stage.
+
+For example, @samp{I3} might later be determined
+to be an argument to an alternate @code{ENTRY} point.
+
+When @file{std.c} is told about the end of an external (top-level)
+program unit,
+it passes all the information it has saved away
+on statements in that program unit
+to @file{ste.c}.
+
+@file{ste.c} ``expands'' each statement, in sequence, by
+constructing the appropriate GBE information and calling
+the appropriate GBE routines.
+
+Details on the transformational phases follow.
+Keep in mind that Fortran numbering is used,
+so the first character on a line is column 1,
+decimal numbering is used, and so on.
+
+@menu
+* g77stripcard::
+* lex.c::
+* sta.c::
+* stb.c::
+* expr.c::
+* stc.c::
+* std.c::
+* ste.c::
+
+* Gotchas (Transforming)::
+* TBD (Transforming)::
+@end menu
+
+@node g77stripcard
+@subsection g77stripcard
+
+The @code{g77stripcard} program handles removing content beyond
+column 72 (adjustable via a command-line option),
+optionally warning about that content being something other
+than trailing whitespace or Fortran commentary.
+
+This program is needed because @code{lex.c} doesn't pay attention
+to maximum line lengths at all, to make it easier to maintain,
+as well as faster (for sources that don't depend on the maximum
+column length vis-a-vis trailing non-blank non-commentary content).
+
+Just how this program will be run---whether automatically for
+old source (perhaps as the default for @file{.f} files?)---is not
+yet determined.
+
+In the meantime, it might as well be implemented as a typical UNIX pipe.
+
+It should accept a @samp{-fline-length-@var{n}} option,
+with the default line length set to 72.
+
+When the text it strips off the end of a line is not blank
+(not spaces and tabs),
+it should insert an additional comment line
+(beginning with @samp{!},
+so it works for both fixed-form and free-form files)
+containing the text,
+following the stripped line.
+The inserted comment should have a prefix of some kind,
+TBD, that distinguishes the comment as representing stripped text.
+Users could use that to @code{sed} out such lines, if they wished---it
+seems silly to provide a command-line option to delete information
+when it can be so easily filtered out by another program.
+
+(This inserted comment should be designed to ``fit in'' well
+with whatever the Fortran community is using these days for
+preprocessor, translator, and other such products, like OpenMP.
+What that's all about, and how @code{g77} can elegantly fit its
+special comment conventions into it all, is TBD as well.
+We don't want to reinvent the wheel here, but if there turn out
+to be too many conflicting conventions, we might have to invent
+one that looks nothing like the others, but which offers their
+host products a better infrastructure in which to fit and coexist
+peacefully.)
+
+@code{g77stripcard} probably shouldn't do any tab expansion or other
+fancy stuff.
+People can use @code{expand} or other pre-filtering if they like.
+The idea here is to keep each stage quite simple, while providing
+excellent performance for ``normal'' code.
+
+(Code with junk beyond column 73 is not really ``normal'',
+as it comes from a card-punch heritage,
+and will be increasingly hard for tomorrow's Fortran programmers to read.)
+
+@node lex.c
+@subsection lex.c
+
+To help make the lexer simple, fast, and easy to maintain,
+while also having @code{g77} generally encourage Fortran programmers
+to write simple, maintainable, portable code by maximizing the
+performance of compiling that kind of code:
+
+@itemize @bullet
+@item
+There'll be just one lexer, for both fixed-form and free-form source.
+
+@item
+It'll care about the form only when handling the first 7 columns of
+text, stuff like spaces between strings of alphanumerics, and
+how lines are continued.
+
+Some other distinctions will be handled by subsequent phases,
+so at least one of them will have to know which form is involved.
+
+For example, @samp{I = 2 . 4} is acceptable in fixed form,
+and works in free form as well given the implementation @code{g77}
+presently uses.
+But the standard requires a diagnostic for it in free form,
+so the parser has to be able to recognize that
+the lexemes aren't contiguous
+(information the lexer @emph{does} have to provide)
+and that free-form source is being parsed,
+so it can provide the diagnostic.
+
+The @code{g77} lexer doesn't try to gather @samp{2 . 4} into a single lexeme.
+Otherwise, it'd have to know a whole lot more about how to parse Fortran,
+or subsequent phases (mainly parsing) would have two paths through
+lots of critical code---one to handle the lexeme @samp{2}, @samp{.},
+and @samp{4} in sequence, another to handle the lexeme @samp{2.4}.
+
+@item
+It won't worry about line lengths
+(beyond the first 7 columns for fixed-form source).
+
+That is, once it starts parsing the ``statement'' part of a line
+(column 7 for fixed-form, column 1 for free-form),
+it'll keep going until it finds a newline,
+rather than ignoring everything past a particular column
+(72 or 132).
+
+The implication here is that there shouldn't @emph{be}
+anything past that last column, other than whitespace or
+commentary, because users using typical editors
+(or viewing output as typically printed)
+won't necessarily know just where the last column is.
+
+Code that has ``garbage'' beyond the last column
+(almost certainly only fixed-form code with a punched-card legacy,
+such as code using columns 73-80 for ``sequence numbers'')
+will have to be run through @code{g77stripcard} first.
+
+Also, keeping track of the maximum column position while also watching out
+for the end of a line @emph{and} while reading from a file
+just makes things slower.
+Since a file must be read, and watching for the end of the line
+is necessary (unless the typical input file was preprocessed to
+include the necessary number of trailing spaces),
+dropping the tracking of the maximum column position
+is the only way to reduce the complexity of the pertinent code
+while maintaining high performance.
+
+@item
+ASCII encoding is assumed for the input file.
+
+Code written in other character sets will have to be converted first.
+
+@item
+Tabs (ASCII code 9)
+will be converted to spaces via the straightforward
+approach.
+
+Specifically, a tab is converted to between one and eight spaces
+as necessary to reach column @var{n},
+where dividing @samp{(@var{n} - 1)} by eight
+results in a remainder of zero.
+
+@item
+Linefeeds (ASCII code 10)
+mark the ends of lines.
+
+@item
+A carriage return (ASCII code 13)
+is accept if it immediately precedes a linefeed,
+in which case it is ignored.
+
+Otherwise, it is rejected (with a diagnostic).
+
+@item
+Any other characters other than the above
+that are not part of the GNU Fortran Character Set
+(@pxref{Character Set})
+are rejected with a diagnostic.
+
+This includes backspaces, form feeds, and the like.
+
+(It might make sense to allow a form feed in column 1
+as long as that's the only character on a line.
+It certainly wouldn't seem to cost much in terms of performance.)
+
+@item
+The end of the input stream (EOF)
+ends the current line.
+
+@item
+The distinction between uppercase and lowercase letters
+will be preserved.
+
+It will be up to subsequent phases to decide to fold case.
+
+Current plans are to permit any casing for Fortran (reserved) keywords
+while preserving casing for user-defined names.
+(This might not be made the default for @file{.f} files, though.)
+
+Preserving case seems necessary to provide more direct access
+to facilities outside of @code{g77}, such as to C or Pascal code.
+
+Names of intrinsics will probably be matchable in any case,
+However, there probably won't be any option to require
+a particular mixed-case appearance of intrinsics
+(as there was for @code{g77} prior to version 0.6),
+because that's painful to maintain,
+and probably nobody uses it.
+
+(How @samp{external SiN; r = sin(x)} would be handled is TBD.
+I think old @code{g77} might already handle that pretty elegantly,
+but whether we can cope with allowing the same fragment to reference
+a @emph{different} procedure, even with the same interface,
+via @samp{s = SiN(r)}, needs to be determined.
+If it can't, we need to make sure that when code introduces
+a user-defined name, any intrinsic matching that name
+using a case-insensitive comparison
+is ``turned off''.)
+
+@item
+Backslashes in @code{CHARACTER} and Hollerith constants
+are not allowed.
+
+This avoids the confusion introduced by some Fortran compiler vendors
+providing C-like interpretation of backslashes,
+while others provide straight-through interpretation.
+
+Some kind of lexical construct (TBD) will be provided to allow
+flagging of a @code{CHARACTER}
+(but probably not a Hollerith)
+constant that permits backslashes.
+It'll necessarily be a prefix, such as:
+
+@smallexample
+PRINT *, C'This line has a backspace \b here.'
+PRINT *, F'This line has a straight backslash \ here.'
+@end smallexample
+
+Further, command-line options might be provided to specify that
+one prefix or the other is to be assumed as the default
+for @code{CHARACTER} constants.
+
+However, it seems more helpful for @code{g77} to provide a program
+that converts prefix all constants
+(or just those containing backslashes)
+with the desired designation,
+so printouts of code can be read
+without knowing the compile-time options used when compiling it.
+
+If such a program is provided
+(let's name it @code{g77slash} for now),
+then a command-line option to @code{g77} should not be provided.
+(Though, given that it'll be easy to implement, it might be hard
+to resist user requests for it ``to compile faster than if we
+have to invoke another filter''.)
+
+This program would take a command-line option to specify the
+default interpretation of slashes,
+affecting which prefix it uses for constants.
+
+@code{g77slash} probably should automatically convert Hollerith
+constants that contain slashes
+to the appropriate @code{CHARACTER} constants.
+Then @code{g77} wouldn't have to define a prefix syntax for Hollerith
+constants specifying whether they want C-style or straight-through
+backslashes.
+@end itemize
+
+The above implements nearly exactly what is specified by
+@ref{Character Set},
+and
+@ref{Lines},
+except it also provides automatic conversion of tabs
+and ignoring of newline-related carriage returns.
+
+It also effects the ``pure visual'' model,
+by which is meant that a user viewing his code
+in a typical text editor
+(assuming it's not preprocessed via @code{g77stripcard} or similar)
+doesn't need any special knowledge
+of whether spaces on the screen are really tabs,
+whether lines end immediately after the last visible non-space character
+or after a number of spaces and tabs that follow it,
+or whether the last line in the file is ended by a newline.
+
+Most editors don't make these distinctions,
+the ANSI FORTRAN 77 standard doesn't require them to,
+and it permits a standard-conforming compiler
+to define a method for transforming source code to
+``standard form'' however it wants.
+
+So, GNU Fortran defines it such that users have the best chance
+of having the code be interpreted the way it looks on the screen
+of the typical editor.
+
+(Fancy editors should @emph{never} be required to correctly read code
+written in classic two-dimensional-plaintext form.
+By correct reading I mean ability to read it, book-like, without
+mistaking text ignored by the compiler for program code and vice versa,
+and without having to count beyond the first several columns.
+The vague meaning of ASCII TAB, among other things, complicates
+this somewhat, but as long as ``everyone'', including the editor,
+other tools, and printer, agrees about the every-eighth-column convention,
+the GNU Fortran ``pure visual'' model meets these requirements.
+Any language or user-visible source form
+requiring special tagging of tabs,
+the ends of lines after spaces/tabs,
+and so on, is broken by this definition.
+Fortunately, Fortran @emph{itself} is not broken,
+even if most vendor-supplied defaults for their Fortran compilers @emph{are}
+in this regard.)
+
+Further, this model provides a clean interface
+to whatever preprocessors or code-generators are used
+to produce input to this phase of @code{g77}.
+Mainly, they need not worry about long lines.
+
+@node sta.c
+@subsection sta.c
+
+@node stb.c
+@subsection stb.c
+
+@node expr.c
+@subsection expr.c
+
+@node stc.c
+@subsection stc.c
+
+@node std.c
+@subsection std.c
+
+@node ste.c
+@subsection ste.c
+
+@node Gotchas (Transforming)
+@subsection Gotchas (Transforming)
+
+This section is not about transforming ``gotchas'' into something else.
+It is about the weirder aspects of transforming Fortran,
+however that's defined,
+into a more modern, canonical form.
+
+@subsubsection Multi-character Lexemes
+
+Each lexeme carries with it a pointer to where it appears in the source.
+
+To provide the ability for diagnostics to point to column numbers,
+in addition to line numbers and names,
+lexemes that represent more than one (significant) character
+in the source code need, generally,
+to provide pointers to where each @emph{character} appears in the source.
+
+This provides the ability to properly identify the precise location
+of the problem in code like
+
+@smallexample
+SUBROUTINE X
+END
+BLOCK DATA X
+END
+@end smallexample
+
+which, in fixed-form source, would result in single lexemes
+consisting of the strings @samp{SUBROUTINEX} and @samp{BLOCKDATAX}.
+(The problem is that @samp{X} is defined twice,
+so a pointer to the @samp{X} in the second definition,
+as well as a follow-up pointer to the corresponding pointer in the first,
+would be preferable to pointing to the beginnings of the statements.)
+
+This need also arises when parsing (and diagnosing) @code{FORMAT}
+statements.
+
+Further, it arises when diagnosing
+@code{FMT=} specifiers that contain constants
+(or partial constants, or even propagated constants!)
+in I/O statements, as in:
+
+@smallexample
+PRINT '(I2, 3HAB)', J
+@end smallexample
+
+(A pointer to the beginning of the prematurely-terminated Hollerith
+constant, and/or to the close parenthese, is preferable to a pointer
+to the open-parenthese or the apostrophe that precedes it.)
+
+Multi-character lexemes, which would seem to naturally include
+at least digit strings, alphanumeric strings, @code{CHARACTER}
+constants, and Hollerith constants, therefore need to provide
+location information on each character.
+(Maybe Hollerith constants don't, but it's unnecessary to except them.)
+
+The question then arises, what about @emph{other} multi-character lexemes,
+such as @samp{**} and @samp{//},
+and Fortran 90's @samp{(/}, @samp{/)}, @samp{::}, and so on?
+
+Turns out there's a need to identify the location of the second character
+of these two-character lexemes.
+For example, in @samp{I(/J) = K}, the slash needs to be diagnosed
+as the problem, not the open parenthese.
+Similarly, it is preferable to diagnose the second slash in
+@samp{I = J // K} rather than the first, given the implicit typing
+rules, which would result in the compiler disallowing the attempted
+concatenation of two integers.
+(Though, since that's more of a semantic issue,
+it's not @emph{that} much preferable.)
+
+Even sequences that could be parsed as digit strings could use location info,
+for example, to diagnose the @samp{9} in the octal constant @samp{O'129'}.
+(This probably will be parsed as a character string,
+to be consistent with the parsing of @samp{Z'129A'}.)
+
+To avoid the hassle of recording the location of the second character,
+while also preserving the general rule that each significant character
+is distinctly pointed to by the lexeme that contains it,
+it's best to simply not have any fixed-size lexemes
+larger than one character.
+
+This new design is expected to make checking for two
+@samp{*} lexemes in a row much easier than the old design,
+so this is not much of a sacrifice.
+It probably makes the lexer much easier to implement
+than it makes the parser harder.
+
+@subsubsection Space-padding Lexemes
+
+Certain lexemes need to be padded with virtual spaces when the
+end of the line (or file) is encountered.
+
+This is necessary in fixed form, to handle lines that don't
+extend to column 72, assuming that's the line length in effect.
+
+@subsubsection Bizarre Free-form Hollerith Constants
+
+Last I checked, the Fortran 90 standard actually required the compiler
+to silently accept something like
+
+@smallexample
+FORMAT ( 1 2 Htwelve chars )
+@end smallexample
+
+as a valid @code{FORMAT} statement specifying a twelve-character
+Hollerith constant.
+
+The implication here is that, since the new lexer is a zero-feedback one,
+it won't know that the special case of a @code{FORMAT} statement being parsed
+requires apparently distinct lexemes @samp{1} and @samp{2} to be treated as
+a single lexeme.
+
+(This is a horrible misfeature of the Fortran 90 language.
+It's one of many such misfeatures that almost make me want
+to not support them, and forge ahead with designing a new
+``GNU Fortran'' language that has the features,
+but not the misfeatures, of Fortran 90,
+and provide utility programs to do the conversion automatically.)
+
+So, the lexer must gather distinct chunks of decimal strings into
+a single lexeme in contexts where a single decimal lexeme might
+start a Hollerith constant.
+
+(Which probably means it might as well do that all the time
+for all multi-character lexemes, even in free-form mode,
+leaving it to subsequent phases to pull them apart as they see fit.)
+
+Compare the treatment of this to how
+
+@smallexample
+CHARACTER * 4 5 HEY
+@end smallexample
+
+and
+
+@smallexample
+CHARACTER * 12 HEY
+@end smallexample
+
+must be treated---the former must be diagnosed, due to the separation
+between lexemes, the latter must be accepted as a proper declaration.
+
+@subsubsection Hollerith Constants
+
+Recognizing a Hollerith constant---specifically,
+that an @samp{H} or @samp{h} after a digit string begins
+such a constant---requires some knowledge of context.
+
+Hollerith constants (such as @samp{2HAB}) can appear after:
+
+@itemize @bullet
+@item
+@samp{(}
+
+@item
+@samp{,}
+
+@item
+@samp{=}
+
+@item
+@samp{+}, @samp{-}, @samp{/}
+
+@item
+@samp{*}, except as noted below
+@end itemize
+
+Hollerith constants don't appear after:
+
+@itemize @bullet
+@item
+@samp{CHARACTER*},
+which can be treated generally as
+any @samp{*} that is the second lexeme of a statement
+@end itemize
+
+@subsubsection Confusing Function Keyword
+
+While
+
+@smallexample
+REAL FUNCTION FOO ()
+@end smallexample
+
+must be a @code{FUNCTION} statement and
+
+@smallexample
+REAL FUNCTION FOO (5)
+@end smallexample
+
+must be a type-definition statement,
+
+@smallexample
+REAL FUNCTION FOO (@var{names})
+@end smallexample
+
+where @var{names} is a comma-separated list of names,
+can be one or the other.
+
+The only way to disambiguate that statement
+(short of mandating free-form source or a short maximum
+length for name for external procedures)
+is based on the context of the statement.
+
+In particular, the statement is known to be within an
+already-started program unit
+(but not at the outer level of the @code{CONTAINS} block),
+it is a type-declaration statement.
+
+Otherwise, the statement is a @code{FUNCTION} statement,
+in that it begins a function program unit
+(external, or, within @code{CONTAINS}, nested).
+
+@subsubsection Weird READ
+
+The statement
+
+@smallexample
+READ (N)
+@end smallexample
+
+is equivalent to either
+
+@smallexample
+READ (UNIT=(N))
+@end smallexample
+
+or
+
+@smallexample
+READ (FMT=(N))
+@end smallexample
+
+depending on which would be valid in context.
+
+Specifically, if @samp{N} is type @code{INTEGER},
+@samp{READ (FMT=(N))} would not be valid,
+because parentheses may not be used around @samp{N},
+whereas they may around it in @samp{READ (UNIT=(N))}.
+
+Further, if @samp{N} is type @code{CHARACTER},
+the opposite is true---@samp{READ (UNIT=(N))} is not valid,
+but @samp{READ (FMT=(N))} is.
+
+Strictly speaking, if anything follows
+
+@smallexample
+READ (N)
+@end smallexample
+
+in the statement, whether the first lexeme after the close
+parenthese is a comma could be used to disambiguate the two cases,
+without looking at the type of @samp{N},
+because the comma is required for the @samp{READ (FMT=(N))}
+interpretation and disallowed for the @samp{READ (UNIT=(N))}
+interpretation.
+
+However, in practice, many Fortran compilers allow
+the comma for the @samp{READ (UNIT=(N))}
+interpretation anyway
+(in that they generally allow a leading comma before
+an I/O list in an I/O statement),
+and much code takes advantage of this allowance.
+
+(This is quite a reasonable allowance, since the
+juxtaposition of a comma-separated list immediately
+after an I/O control-specification list, which is also comma-separated,
+without an intervening comma,
+looks sufficiently ``wrong'' to programmers
+that they can't resist the itch to insert the comma.
+@samp{READ (I, J), K, L} simply looks cleaner than
+@samp{READ (I, J) K, L}.)
+
+So, type-based disambiguation is needed unless strict adherence
+to the standard is always assumed, and we're not going to assume that.
+
+@node TBD (Transforming)
+@subsection TBD (Transforming)
+
+Continue researching gotchas, designing the transformational process,
+and implementing it.
+
+Specific issues to resolve:
+
+@itemize @bullet
+@item
+Just where should @code{INCLUDE} processing take place?
+
+Clearly before (or part of) statement identification (@file{sta.c}),
+since determining whether @samp{I(J)=K} is a statement-function
+definition or an assignment statement requires knowing the context,
+which in turn requires having processed @code{INCLUDE} files.
+
+@item
+Just where should (if it was implemented) @code{USE} processing take place?
+
+This gets into the whole issue of how @code{g77} should handle the concept
+of modules.
+I think GNAT already takes on this issue, but don't know more than that.
+Jim Giles has written extensively on @code{comp.lang.fortran}
+about his opinions on module handling, as have others.
+Jim's views should be taken into account.
+
+Actually, Richard M. Stallman (RMS) also has written up
+some guidelines for implementing such things,
+but I'm not sure where I read them.
+Perhaps the old @email{gcc2@@cygnus.com} list.
+
+If someone could dig references to these up and get them to me,
+that would be much appreciated!
+Even though modules are not on the short-term list for implementation,
+it'd be helpful to know @emph{now} how to avoid making them harder to
+implement them @emph{later}.
+
+@item
+Should the @code{g77} command become just a script that invokes
+all the various preprocessing that might be needed,
+thus making it seem slower than necessary for legacy code
+that people are unwilling to convert,
+or should we provide a separate script for that,
+thus encouraging people to convert their code once and for all?
+
+At least, a separate script to behave as old @code{g77} did,
+perhaps named @code{g77old}, might ease the transition,
+as might a corresponding one that converts source codes
+named @code{g77oldnew}.
+
+These scripts would take all the pertinent options @code{g77} used
+to take and run the appropriate filters,
+passing the results to @code{g77} or just making new sources out of them
+(in a subdirectory, leaving the user to do the dirty deed of
+moving or copying them over the old sources).
+
+@item
+Do other Fortran compilers provide a prefix syntax
+to govern the treatment of backslashes in @code{CHARACTER}
+(or Hollerith) constants?
+
+Knowing what other compilers provide would help.
+
+@item
+Is it okay to drop support for the @samp{-fintrin-case-initcap},
+@samp{-fmatch-case-initcap}, @samp{-fsymbol-case-initcap},
+and @samp{-fcase-initcap} options?
+
+I've asked @email{info-gnu-fortran@@gnu.org} for input on this.
+Not having to support these makes it easier to write the new front end,
+and might also avoid complicated its design.
+@end itemize
+
@node Philosophy of Code Generation
@section Philosophy of Code Generation
@@ -476,7 +1508,7 @@ Further, after the @code{SYSTEM_CLOCK} library routine returns,
the compiler must ensure that the temporary variable it wrote
is copied into the appropriate element of the @samp{CLOCKS} array.
(This assumes the compiler doesn't just reject the code,
-which it should if it is compiling under some kind of a "strict" option.)
+which it should if it is compiling under some kind of a ``strict'' option.)
@item
To determine the correct index into the @samp{CLOCKS} array,
@@ -882,6 +1914,111 @@ to hold the value of the expression.
@item
Other stuff???
+@end itemize
+@node Internal Naming Conventions
+@section Internal Naming Conventions
-@end itemize
+Names exported by FFE modules have the following (regular-expression) forms.
+Note that all names beginning @code{ffe@var{mod}} or @code{FFE@var{mod}},
+where @var{mod} is lowercase or uppercase alphanumerics, respectively,
+are exported by the module @code{ffe@var{mod}},
+with the source code doing the exporting in @file{@var{mod}.h}.
+(Usually, the source code for the implementation is in @file{@var{mod}.c}.)
+
+Identifiers that don't fit the following forms
+are not considered exported,
+even if they are according to the C language.
+(For example, they might be made available to other modules
+solely for use within expansions of exported macros,
+not for use within any source code in those other modules.)
+
+@table @code
+@item ffe@var{mod}
+The single typedef exported by the module.
+
+@item FFE@var{umod}_[A-Z][A-Z0-9_]*
+(Where @var{umod} is the uppercase for of @var{mod}.)
+
+A @code{#define} or @code{enum} constant of the type @code{ffe@var{mod}}.
+
+@item ffe@var{mod}[A-Z][A-Z][a-z0-9]*
+A typedef exported by the module.
+
+The portion of the identifier after @code{ffe@var{mod}} is
+referred to as @code{ctype}, a capitalized (mixed-case) form
+of @code{type}.
+
+@item FFE@var{umod}_@var{type}[A-Z][A-Z0-9_]*[A-Z0-9]?
+(Where @var{umod} is the uppercase for of @var{mod}.)
+
+A @code{#define} or @code{enum} constant of the type
+@code{ffe@var{mod}@var{type}},
+where @var{type} is the lowercase form of @var{ctype}
+in an exported typedef.
+
+@item ffe@var{mod}_@var{value}
+A function that does or returns something,
+as described by @var{value} (see below).
+
+@item ffe@var{mod}_@var{value}_@var{input}
+A function that does or returns something based
+primarily on the thing described by @var{input} (see below).
+@end table
+
+Below are names used for @var{value} and @var{input},
+along with their definitions.
+
+@table @code
+@item col
+A column number within a line (first column is number 1).
+
+@item file
+An encapsulation of a file's name.
+
+@item find
+Looks up an instance of some type that matches specified criteria,
+and returns that, even if it has to create a new instance or
+crash trying to find it (as appropriate).
+
+@item initialize
+Initializes, usually a module. No type.
+
+@item int
+A generic integer of type @code{int}.
+
+@item is
+A generic integer that contains a true (non-zero) or false (zero) value.
+
+@item len
+A generic integer that contains the length of something.
+
+@item line
+A line number within a source file,
+or a global line number.
+
+@item lookup
+Looks up an instance of some type that matches specified criteria,
+and returns that, or returns nil.
+
+@item name
+A @code{text} that points to a name of something.
+
+@item new
+Makes a new instance of the indicated type.
+Might return an existing one if appropriate---if so,
+similar to @code{find} without crashing.
+
+@item pt
+Pointer to a particular character (line, column pairs)
+in the input file (source code being compiled).
+
+@item run
+Performs some herculean task. No type.
+
+@item terminate
+Terminates, usually a module. No type.
+
+@item text
+A @code{char *} that points to generic text.
+@end table
diff --git a/gcc/f/g77.texi b/gcc/f/g77.texi
index 25070dbd5f8..eaab2543e6b 100644
--- a/gcc/f/g77.texi
+++ b/gcc/f/g77.texi
@@ -2,7 +2,7 @@
@c %**start of header
@setfilename g77.info
-@set last-update 1999-05-13
+@set last-update 1999-06-06
@set copyrights-g77 1995-1999
@include root.texi
@@ -1471,7 +1471,7 @@ by type. Explanations are in the following sections.
-falias-check -fargument-alias
-fargument-noalias -fno-argument-noalias-global
-fno-globals -fflatten-arrays
--fsubscript-check -ff2c-subscript-check
+-fbounds-check -ffortran-bounds-check
@end smallexample
@end table
@@ -3386,10 +3386,10 @@ It is intended for use only by @code{g77} developers,
to evaluate code-generation issues.
It might be removed at any time.
-@cindex -fsubscript-check option
-@cindex -ff2c-subscript-check option
-@item -fsubscript-check
-@itemx -ff2c-subscript-check
+@cindex -fbounds-check option
+@cindex -ffortran-bounds-check option
+@item -fbounds-check
+@itemx -ffortran-bounds-check
@cindex bounds checking
@cindex range checking
@cindex array bounds checking
@@ -3414,12 +3414,12 @@ such as references to below the beginning of an assumed-size array.
@code{g77} also generates checks for @code{CHARACTER} substring references,
something @code{f2c} currently does not do.
-Since a future version of @code{g77} might use a different implementation,
-use the new @samp{-ff2c-subscript-check} option
-if your application requires use of @code{s_rnge} or a compile-time diagnostic.
+Use the new @samp{-ffortran-bounds-check} option
+to specify bounds-checking for only the Fortran code you are compiling,
+not necessarily for code written in other languages.
@emph{Note:} To provide more detailed information on the offending subscript,
-@code{g77} provides @code{s_rnge}
+@code{g77} provides the @code{libg2c} run-time library routine @code{s_rnge}
with somewhat differently-formatted information.
Here's a sample diagnostic:
@@ -4243,7 +4243,7 @@ stream-based text file is translated to GNU Fortran lines as follows:
A newline in the file is the character that represents the end of
a line of text to the underlying system.
For example, on ASCII-based systems, a newline is the @key{NL}
-character, which has ASCII value 12 (decimal).
+character, which has ASCII value 10 (decimal).
@item
Each newline in the file serves to end the line of text that precedes
@@ -10774,30 +10774,25 @@ compiler, typically @code{gcc}.)
@node Use Submodel Options
@subsection Use Submodel Options
-@cindex Pentium optimizations
-@cindex optimization, for Pentium
-@cindex 586/686 CPUs
@cindex submodels
Using an appropriate @samp{-m} option to generate specific code for your
CPU may be worthwhile, though it may mean the executable won't run on
other versions of the CPU that don't support the same instruction set.
@xref{Submodel Options,,Hardware Models and Configurations,gcc,Using and
-Porting GNU CC}.
+Porting GNU CC}. For instance on an x86 system the compiler might have
+been built---as shown by @samp{g77 -v}---for the target
+@samp{i386-pc-linux-gnu}, i.e.@: an @samp{i386} CPU@. In that case to
+generate code best optimized for a Pentium you could use the option
+@samp{-march=pentium}.
-For recent CPUs that don't have explicit support in
-the released version of @code{gcc}, it may still be possible to get
-improvements.
-For instance, the flags recommended for 586/686
-(Pentium(Pro)) chips for building the Linux kernel are:
+For recent CPUs that don't have explicit support in the released version
+of @code{gcc}, it @emph{might} still be possible to get improvements
+with certain @samp{-m} options.
-@smallexample
--m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2
--fomit-frame-pointer
-@end smallexample
-
-@noindent @samp{-fomit-frame-pointer} will, however, inhibit debugging
-on x86 systems.
+@samp{-fomit-frame-pointer} can help performance on x86 systems and
+others. It will, however, inhibit debugging on the systems on which it
+is not turned on anyway by @samp{-O}.
@node Trouble
@chapter Known Causes of Trouble with GNU Fortran
@@ -10926,7 +10921,7 @@ How to cope with such problems is well beyond the scope
of this manual.
However, users of Linux-based systems (such as GNU/Linux)
-should review @uref{http://www.bitwizard.nl/sig11}, a source
+should review @uref{http://www.bitwizard.nl/sig11/}, a source
of detailed information on diagnosing hardware problems,
by recognizing their common symptoms.
@@ -11178,7 +11173,7 @@ themselves as @emph{visible} problems some time later.
Overflowing the bounds of an array---usually by writing beyond
the end of it---is one of two kinds of bug that often occurs
in Fortran code.
-(Compile your code with the @samp{-fsubscript-check} option
+(Compile your code with the @samp{-fbounds-check} option
to catch many of these kinds of errors at program run time.)
The other kind of bug is a mismatch between the actual arguments
@@ -11340,13 +11335,13 @@ Goldberg, `What Every Computer Scientist Should Know About
Floating-Point Arithmetic', Computing Surveys, 23, March 1991, pp.@:
5-48.
An online version is available at
-@uref{http://docs.sun.com},
+@uref{http://docs.sun.com/},
and there is a supplemented version, in PostScript form, at
@uref{http://www.validgh.com/goldberg/paper.ps}.
Information related to the IEEE 754
floating-point standard by a leading light can be found at
-@uref{http://http.cs.berkeley.edu/%7Ewkahan/ieee754status};
+@uref{http://http.cs.berkeley.edu/%7Ewkahan/ieee754status/};
see also slides from the short course referenced from
@uref{http://http.cs.berkeley.edu/%7Efateman/}.
@uref{http://www.linuxsupportline.com/%7Ebillm/} has a brief
@@ -11418,6 +11413,7 @@ GNU Fortran dialects:
* Suppressing Space Padding::
* Fortran Preprocessor::
* Bit Operations on Floating-point Data::
+* Really Ugly Character Assignments::
New facilities:
* POSIX Standard::
@@ -11426,8 +11422,10 @@ New facilities:
* Large Automatic Arrays::
* Support for Threads::
* Increasing Precision/Range::
+* Enabling Debug Lines::
Better diagnostics:
+* Better Warnings::
* Gracefully Handle Sensible Bad Code::
* Non-standard Conversions::
* Non-standard Intrinsics::
@@ -11444,6 +11442,8 @@ Better diagnostics:
Run-time facilities:
* Uninitialized Variables at Run Time::
* Portable Unformatted Files::
+* Better List-directed I/O::
+* Default to Console I/O::
Debugging:
* Labels Visible to Debugger::
@@ -12094,6 +12094,24 @@ PRINT *, IAND(A, B)
END
@end smallexample
+@node Really Ugly Character Assignments
+@subsection Really Ugly Character Assignments
+
+An option such as @samp{-fugly-char} should be provided
+to allow
+
+@smallexample
+REAL*8 A1
+DATA A1 / '12345678' /
+@end smallexample
+
+and:
+
+@smallexample
+REAL*8 A1
+A1 = 'ABCDEFGH'
+@end smallexample
+
@node POSIX Standard
@subsection @code{POSIX} Standard
@@ -12174,6 +12192,73 @@ are thread-safe, nor does @code{g77} have support for parallel processing
processors).
A package such as PVM might help here.
+@node Enabling Debug Lines
+@subsection Enabling Debug Lines
+@cindex debug line
+@cindex comment line, debug
+
+An option such as @samp{-fdebug-lines} should be provided
+to turn fixed-form lines beginning with @samp{D}
+to be treated as if they began with a space,
+instead of as if they began with a @samp{C}
+(as comment lines).
+
+@node Better Warnings
+@subsection Better Warnings
+
+Because of how @code{g77} generates code via the back end,
+it doesn't always provide warnings the user wants.
+Consider:
+
+@smallexample
+PROGRAM X
+PRINT *, A
+END
+@end smallexample
+
+Currently, the above is not flagged as a case of
+using an uninitialized variable,
+because @code{g77} generates a run-time library call that looks,
+to the GBE, like it might actually @emph{modify} @samp{A} at run time.
+(And, in fact, depending on the previous run-time library call,
+it would!)
+
+Fixing this requires one of the following:
+
+@itemize @bullet
+@item
+Switch to new library, @code{libg77}, that provides
+a more ``clean'' interface,
+vis-a-vis input, output, and modified arguments,
+so the GBE can tell what's going on.
+
+This would provide a pretty big performance improvement,
+at least theoretically, and, ultimately, in practice,
+for some types of code.
+
+@item
+Have @code{g77} pass a pointer to a temporary
+containing a copy of @samp{A},
+instead of to @samp{A} itself.
+The GBE would then complain about the copy operation
+involving a potentially uninitialized variable.
+
+This might also provide a performance boost for some code,
+because @samp{A} might then end up living in a register,
+which could help with inner loops.
+
+@item
+Have @code{g77} use a GBE construct similar to @code{ADDR_EXPR}
+but with extra information on the fact that the
+item pointed to won't be modified
+(a la @code{const} in C).
+
+Probably the best solution for now, but not quite trivial
+to implement in the general case.
+Worth considering after @code{g77} 0.6 is considered
+pretty solid.
+@end itemize
+
@node Gracefully Handle Sensible Bad Code
@subsection Gracefully Handle Sensible Bad Code
@@ -12413,6 +12498,49 @@ only incur overhead when they are read on a system with a different
format.) A future @code{g77} runtime library should use such
techniques.
+@node Better List-directed I/O
+@subsection Better List-directed I/O
+
+Values output using list-directed I/O
+(@samp{PRINT *, R, D})
+should be written with a field width, precision, and so on
+appropriate for the type (precision) of each value.
+
+(Currently, no distinction is made between single-precision
+and double-precision values
+by @code{libf2c}.)
+
+It is likely this item will require the @code{libg77} project
+to be undertaken.
+
+In the meantime, use of formatted I/O is recommended.
+While it might be of little consolation,
+@code{g77} does support @samp{FORMAT(F<WIDTH>.4)}, for example,
+as long as @samp{WIDTH} is defined as a named constant
+(via @code{PARAMETER}).
+That at least allows some compile-time specification
+of the precision of a data type,
+perhaps controlled by preprocessing directives.
+
+@node Default to Console I/O
+@subsection Default to Console I/O
+
+The default I/O units,
+specified by @samp{READ @var{fmt}},
+@samp{READ (UNIT=*)},
+@samp{WRITE (UNIT=*)}, and
+@samp{PRINT @var{fmt}},
+should not be units 5 (input) and 6 (output),
+but, rather, unit numbers not normally available
+for use in statements such as @code{OPEN} and @code{CLOSE}.
+
+Changing this would allow a program to connect units 5 and 6
+to files via @code{OPEN},
+but still use @samp{READ (UNIT=*)} and @samp{PRINT}
+to do I/O to the ``console''.
+
+This change probably requires the @code{libg77} project.
+
@node Labels Visible to Debugger
@subsection Labels Visible to Debugger
@@ -13808,8 +13936,16 @@ the source code of @code{g77} and rebuilding.
How to do this depends on the version of @code{g77}:
@table @code
-@item EGCS-1.0
-@itemx FSF
+@item G77 0.5.24 (EGCS 1.1)
+@itemx G77 0.5.25 (EGCS 1.2)
+Change the @code{lang_init_options} routine in @file{egcs/gcc/f/com.c}.
+
+(Note that these versions of @code{g77}
+perform internal consistency checking automatically
+when the @samp{-fversion} option is specified.)
+
+@item G77 0.5.23
+@itemx G77 0.5.24 (EGCS 1.0)
Change the way @code{f771} handles the @samp{-fset-g77-defaults}
option, which is always provided as the first option when
called by @code{g77} or @code{gcc}.
@@ -13833,14 +13969,6 @@ It is in @file{@value{path-g77}/lang-specs.h} that @samp{-fset-g77-defaults},
even when the user has not explicitly specified them.
Other ``internal'' options such as @samp{-quiet} also
are passed via this mechanism.
-
-@item EGCS-1.1
-@itemx EGCS-1.2
-Change the @code{lang_init_options} routine in @file{egcs/gcc/f/com.c}.
-
-(Note that these versions of @code{g77}
-perform internal consistency checking automatically
-when the @samp{-fversion} option is specified.)
@end table
@node Projects
diff --git a/gcc/f/g77install.texi b/gcc/f/g77install.texi
index 440829736c8..abc63963554 100644
--- a/gcc/f/g77install.texi
+++ b/gcc/f/g77install.texi
@@ -9,7 +9,7 @@
@c in the standalone derivations of this file (e.g. INSTALL).
@set copyrights 1995-1999
-@set last-update-install 1999-05-10
+@set last-update-install 1999-07-17
@include root.texi
@@ -30,7 +30,6 @@ this copyright notice and permission notice.
@chapter Installing GNU Fortran
@end ifset
-@set version-gcc 2.8.1
@set version-autoconf 2.12
@set version-bison 1.25
@set version-gperf 2.5
@@ -50,21 +49,22 @@ this copyright notice and permission notice.
The following information describes how to install @code{g77}.
+@clear OMIT-FSF-G77
+
@ifset EGCS-G77
@set OMIT-FSF-G77
-Note that, for @code{egcs} users,
+@end ifset
+
+@ifset GCC-G77
+@set OMIT-FSF-G77
+@end ifset
+
+@ifset OMIT-FSF-G77
+Note that, for users of the @value{which-g77} version of @code{g77},
much of the information is obsolete,
and is superceded by the
-@code{egcs} installation procedures.
+@value{which-gcc} installation procedures.
Such information is accordingly omitted and flagged as such.
-@ifset DEVELOPMENT
-@ifclear DOC-INSTALL
-@clear OMIT-FSF-G77
-(It is not actually omitted from the development version of this documentation,
-so the @code{g77} developers can easily find all the documentation
-for all versions of @code{g77} in one place.)
-@end ifclear
-@end ifset
@end ifset
@ifclear OMIT-FSF-G77
@@ -112,9 +112,10 @@ The following information was last updated on @value{last-update-install}:
@section Prerequisites
@cindex prerequisites
-@ifset EGCS-G77
-For @code{egcs} users, this information is
-superceded by the @code{egcs} installation instructions.
+@ifset OMIT-FSF-G77
+For users of the @value{which-g77} version of @code{g77},
+this information is superceded by the
+@value{which-gcc} installation instructions.
@end ifset
@ifclear OMIT-FSF-G77
@@ -482,9 +483,9 @@ is not yet established.
@cindex @code{ld}, can't find _strtoul
@cindex SunOS4
-@ifset EGCS-G77
-This information does not apply to the
-@code{egcs} version of @code{g77}.
+@ifset OMIT-FSF-G77
+This information does not apply to
+the @value{which-g77} version of @code{g77},
@end ifset
@ifclear OMIT-FSF-G77
@@ -890,9 +891,10 @@ systems.
@section Quick Start
@cindex quick start
-@ifset EGCS-G77
-For @code{egcs} users, this information is
-superceded by the @code{egcs} installation instructions.
+@ifset OMIT-FSF-G77
+For users of the @value{which-g77} version of @code{g77},
+this information is superceded by the
+@value{which-gcc} installation instructions.
@end ifset
@ifclear OMIT-FSF-G77
@@ -1178,9 +1180,10 @@ Removing them can free up a lot of disk space.
@node Complete Installation
@section Complete Installation
-@ifset EGCS-G77
-For @code{egcs} users, this information is
-superceded by the @code{egcs} installation instructions.
+@ifset OMIT-FSF-G77
+For users of the @value{which-g77} version of @code{g77},
+this information is superceded by the
+@value{which-gcc} installation instructions.
@end ifset
@ifclear OMIT-FSF-G77
@@ -2048,9 +2051,10 @@ sh#
@cindex binaries, distributing
@cindex code, distributing
-@ifset EGCS-G77
-For @code{egcs} users, this information is
-superceded by the @code{egcs} installation instructions.
+@ifset OMIT-FSF-G77
+For users of the @value{which-g77} version of @code{g77},
+this information is superceded by the
+@value{which-gcc} installation instructions.
@end ifset
@ifclear OMIT-FSF-G77
diff --git a/gcc/f/g77spec.c b/gcc/f/g77spec.c
index 4bf318d4399..93a363cddb8 100644
--- a/gcc/f/g77spec.c
+++ b/gcc/f/g77spec.c
@@ -1,5 +1,5 @@
/* Specific flags and argument handling of the Fortran front-end.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -427,8 +427,8 @@ code-generation methodology, and so on.\n\
For more information on g77 and gcc, type the commands `info -f g77'\n\
and `info -f gcc' to read the Info documentation.\n\
\n\
-Report bugs to <egcs-bugs@egcs.cygnus.com>.\n\
-See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.\n");
+For bug reporting instructions, please see:\n\
+%s.\n", GCCBUGURL);
exit (0);
break;
#endif
diff --git a/gcc/f/lang-options.h b/gcc/f/lang-options.h
index 417159cd4b4..f9bb90d3227 100644
--- a/gcc/f/lang-options.h
+++ b/gcc/f/lang-options.h
@@ -149,10 +149,10 @@ FTNOPT( "-fglobals", "" )
FTNOPT( "-fno-globals", "Disable fatal diagnostics about inter-procedural problems" )
FTNOPT( "-ftypeless-boz", "Make prefix-radix non-decimal constants be typeless" )
FTNOPT( "-fno-typeless-boz", "" )
-FTNOPT( "-fsubscript-check", "Generate code to check array-subscript ranges" )
-FTNOPT( "-fno-subscript-check", "" )
-FTNOPT( "-ff2c-subscript-check", "Generate f2c-like code to check array-subscript ranges")
-FTNOPT( "-fno-f2c-subscript-check", "" )
+FTNOPT( "-fbounds-check", "Generate code to check subscript and substring bounds" )
+FTNOPT( "-fno-bounds-check", "" )
+FTNOPT( "-ffortran-bounds-check", "Fortran-specific form of -fbounds-check")
+FTNOPT( "-fno-fortran-bounds-check", "" )
FTNOPT( "-Wglobals", "" )
FTNOPT( "-Wno-globals", "Disable warnings about inter-procedural problems" )
/*"-Wimplicit",*/
diff --git a/gcc/f/lang-specs.h b/gcc/f/lang-specs.h
index b4492a6327d..f37d14d648e 100644
--- a/gcc/f/lang-specs.h
+++ b/gcc/f/lang-specs.h
@@ -1,5 +1,5 @@
/* lang-specs.h file for Fortran
- Copyright (C) 1995-1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -35,7 +35,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
Sun f77, at least) so you test `__unix' rather than `unix'.
-D_LANGUAGE_FORTRAN is used by some compilers like SGI and
might as well be in there. */
- {"cpp -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
+ {"cpp0 -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\
@@ -85,7 +85,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
%{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
%{!pipe:%g.s} %A\n }}}}"}},
{"@f77-version",
- {"cpp -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I \
+ {"cpp0 -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I \
%{C:%{!E:%eGNU C does not support -C without using -E}} \
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG} \
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2} \
diff --git a/gcc/f/news.texi b/gcc/f/news.texi
index 0a4b8e4e137..a4b6d6837ad 100644
--- a/gcc/f/news.texi
+++ b/gcc/f/news.texi
@@ -9,7 +9,7 @@
@c in the standalone derivations of this file (e.g. NEWS).
@set copyrights-news 1995-1999
-@set last-update-news 1999-05-13
+@set last-update-news 1999-07-08
@include root.texi
@@ -146,12 +146,12 @@ An online, ``live'' version of this document
(derived directly from the mainline, development version
of @code{g77} within @code{egcs})
is available at
-@uref{http://egcs.cygnus.com/onlinedocs/g77_news.html}.
+@uref{http://www.gnu.org/software/gcc/onlinedocs/g77_news.html}.
@end ifclear
The following information was last updated on @value{last-update-news}:
-@heading In @code{egcs} 1.2 (versus 1.1.2):
+@heading In 0.5.25, @code{GCC} 2.95 (@code{EGCS} 1.2) versus @code{EGCS} 1.1.2:
@itemize @bullet
@ifclear USERVISONLY
@item
@@ -186,12 +186,36 @@ in cases where such partial overlap is deemed possible.
@ifclear USERVISONLY
@item
+@code{libg2c} (@code{libf2c}) no longer loses track
+of the file being worked on
+during a @code{BACKSPACE} operation.
+@end ifclear
+
+@ifclear USERVISONLY
+@item
+@code{libg2c} (@code{libf2c}) fixes a bug whereby
+input to a @code{NAMELIST} read involving a repeat count,
+such as @samp{K(5)=10*3},
+was not properly handled by @code{libf2c}.
+The first item was written to @samp{K(5)},
+but the remaining nine were written elsewhere (still within the array),
+not necessarily starting at @samp{K(6)}.
+@end ifclear
+
+@ifclear USERVISONLY
+@item
@c Tim Prince reported this, regarding the TEST_FPU benchmark.
Automatic arrays now seem to be working on HP-UX systems.
@end ifclear
@ifclear USERVISONLY
@item
+The @code{Date} intrinsic now returns the correct result
+on big-endian systems.
+@end ifclear
+
+@ifclear USERVISONLY
+@item
Fix @code{g77} so it no longer crashes when compiling
I/O statements using keywords that define @code{INTEGER} values,
such as @samp{IOSTAT=@var{j}},
@@ -217,15 +241,15 @@ The @samp{-ax} option is now obeyed when compiling Fortran programs.
@end ifclear
@item
-The new @samp{-fsubscript-check} option
+The new @samp{-fbounds-check} option
causes @code{g77} to compile run-time bounds checks
of array subscripts, as well as of substring start and end points.
-The current implementation uses the @code{libf2c}
-library routine @code{s_rnge} to print the diagnostic.
-Since a future version of @code{g77} might use a different implementation,
-use the new @samp{-ff2c-subscript-check} option
-if your application requires use of @code{s_rnge} or a compile-time diagnostic.
+@item
+@code{libg2c} now supports building as multilibbed library,
+which provides better support for systems
+that require options such as @samp{-mieee}
+to work properly.
@item
Source file names with the suffixes @samp{.FOR} and @samp{.FPP}
@@ -245,7 +269,7 @@ of @code{libU77} intrinsics.
@item
@code{g77} now warns about a reference to an intrinsic
that has an interface that is not Year 2000 (Y2K) compliant.
-Also, the @code{libg2c} has been changed to increase the likelihood
+Also, @code{libg2c} has been changed to increase the likelihood
of catching references to the implementations of these intrinsics
using the @code{EXTERNAL} mechanism
(which would avoid the new warnings).
@@ -282,6 +306,14 @@ that are not in @code{EQUIVALENCE} areas
and not @code{SAVE}'d.
@end ifclear
+@ifclear USERVISONLY
+@item
+@code{g77} now open-codes (``inlines'') division of @code{COMPLEX} operands
+instead of generating a run-time call to
+the @code{libf2c} routines @code{c_div} or @code{z_div},
+unless the @samp{-Os} option is specified.
+@end ifclear
+
@item
@code{g77} no longer generates code to maintain @code{errno},
a C-language concept,
@@ -323,7 +355,34 @@ Upgrade to @code{libf2c} as of 1999-05-10.
@end ifclear
@end itemize
-@heading In 0.5.24 and @code{egcs} 1.1.2 (versus 0.5.23 and 1.1.1):
+@heading In 0.5.24 versus 0.5.23:
+
+There is no @code{g77} version 0.5.24 at this time,
+or planned.
+0.5.24 is the version number designated for bug fixes and,
+perhaps, some new features added,
+to 0.5.23.
+Version 0.5.23 requires @code{gcc} 2.8.1,
+as 0.5.24 was planned to require.
+
+Due to @code{EGCS} becoming @code{GCC}
+(which is now an acronym for ``GNU Compiler Collection''),
+and @code{EGCS} 1.2 becoming officially designated @code{GCC} 2.95,
+there seems to be no need for an actual 0.5.24 release.
+
+To reduce the confusion already resulting from use of 0.5.24
+to designate @code{g77} versions within @code{EGCS} versions 1.0 and 1.1,
+as well as in versions of @code{g77} documentation and notices
+during that period,
+``mainline'' @code{g77} version numbering resumes
+at 0.5.25 with @code{GCC} 2.95 (@code{EGCS} 1.2),
+skipping over 0.5.24 as a placeholder version number.
+
+To repeat, there is no @code{g77} 0.5.24, but there is now a 0.5.25.
+Please remain calm and return to your keypunch units.
+
+@c 1999-03-15: EGCS 1.1.2 released.
+@heading In @code{EGCS} 1.1.2 versus @code{EGCS} 1.1.1:
@ifclear USERVISONLY
@itemize @bullet
@item
@@ -352,7 +411,8 @@ Improve documentation.
@end itemize
@end ifclear
-@heading In 0.5.24 and @code{egcs} 1.1.1 (versus 0.5.23 and 1.1):
+@c 1998-12-04: EGCS 1.1.1 released.
+@heading In @code{EGCS} 1.1.1 versus @code{EGCS} 1.1:
@ifclear USERVISONLY
@itemize @bullet
@item
@@ -383,54 +443,8 @@ for the completion code to be set properly).
@end itemize
@end ifclear
-@heading In @code{egcs} 1.1 (versus 0.5.24):
-@itemize @bullet
-@ifclear USERVISONLY
-@item
-Fix @code{g77} crash compiling code
-containing the construct @samp{CMPLX(0.)} or similar.
-@end ifclear
-
-@ifclear USERVISONLY
-@item
-Fix @code{g77} crash
-(or apparently infinite run-time)
-when compiling certain complicated expressions
-involving @code{COMPLEX} arithmetic
-(especially multiplication).
-@end ifclear
-
-@ifclear USERVISONLY
-@cindex DNRM2
-@cindex stack, 387 coprocessor
-@cindex Intel x86
-@cindex -O2
-@item
-Fix a code-generation bug that afflicted
-Intel x86 targets when @samp{-O2} was specified
-compiling, for example, an old version of
-the @code{DNRM2} routine.
-
-The x87 coprocessor stack was being
-mismanaged in cases involving assigned @code{GOTO}
-and @code{ASSIGN}.
-@end ifclear
-
-@cindex alignment
-@cindex double-precision performance
-@cindex -malign-double
-@item
-Align static double-precision variables and arrays
-on Intel x86 targets
-regardless of whether @samp{-malign-double} is specified.
-
-Generally, this affects only local variables and arrays
-having the @code{SAVE} attribute
-or given initial values via @code{DATA}.
-@end itemize
-
-@c 1998-09-01: egcs-1.1 released.
-@heading In @code{egcs} 1.1 (versus @code{egcs} 1.0.3):
+@c 1998-09-03: EGCS 1.1 released.
+@heading In @code{EGCS} 1.1 versus @code{EGCS} 1.0.3:
@itemize @bullet
@ifclear USERVISONLY
@item
@@ -608,9 +622,26 @@ as well.
@end ifclear
@end itemize
-@heading In 0.5.24 and @code{egcs} 1.1 (versus 0.5.23):
+@c 1998-09-03: EGCS 1.1 released.
+@heading In @code{EGCS} 1.1 versus @code{g77} 0.5.23:
@itemize @bullet
@ifclear USERVISONLY
+@cindex DNRM2
+@cindex stack, 387 coprocessor
+@cindex Intel x86
+@cindex -O2
+@item
+Fix a code-generation bug that afflicted
+Intel x86 targets when @samp{-O2} was specified
+compiling, for example, an old version of
+the @code{DNRM2} routine.
+
+The x87 coprocessor stack was being
+mismanaged in cases involving assigned @code{GOTO}
+and @code{ASSIGN}.
+@end ifclear
+
+@ifclear USERVISONLY
@item
@code{g77} no longer produces incorrect code
and initial values
@@ -621,6 +652,12 @@ vis-a-vis their types, require initial padding.
@ifclear USERVISONLY
@item
+Fix @code{g77} crash compiling code
+containing the construct @samp{CMPLX(0.)} or similar.
+@end ifclear
+
+@ifclear USERVISONLY
+@item
@code{g77} no longer crashes when compiling code
containing specification statements such as
@samp{INTEGER(KIND=7) PTR}.
@@ -645,6 +682,27 @@ Previously, @code{g77} treated these expressions
as denoting special ``pointer'' arguments
for the purposes of filewide analysis.
+@ifclear USERVISONLY
+@item
+Fix @code{g77} crash
+(or apparently infinite run-time)
+when compiling certain complicated expressions
+involving @code{COMPLEX} arithmetic
+(especially multiplication).
+@end ifclear
+
+@cindex alignment
+@cindex double-precision performance
+@cindex -malign-double
+@item
+Align static double-precision variables and arrays
+on Intel x86 targets
+regardless of whether @samp{-malign-double} is specified.
+
+Generally, this affects only local variables and arrays
+having the @code{SAVE} attribute
+or given initial values via @code{DATA}.
+
@item
The @code{g77} driver now ensures that @samp{-lg2c}
is specified in the link phase prior to any
@@ -702,7 +760,7 @@ for such information.
@ifclear DOC-NEWS
@c 1998-05-20: 0.5.23 released.
-@heading In 0.5.23 (versus 0.5.22):
+@heading In 0.5.23 versus 0.5.22:
@itemize @bullet
@item
This release contains several regressions against
@@ -906,7 +964,7 @@ as well.
@end itemize
@c 1998-03-16: 0.5.22 released.
-@heading In 0.5.22 (versus 0.5.21):
+@heading In 0.5.22 versus 0.5.21:
@itemize @bullet
@ifclear USERVISONLY
@item
@@ -1096,8 +1154,8 @@ This fixes a formatted-I/O bug that afflicted
@end ifclear
@end itemize
-@c 1998-03-15: egcs-1.0.2 released.
-@heading In @code{egcs} 1.0.2 (versus @code{egcs} 1.0.1):
+@c 1998-03-18: EGCS 1.0.2 released.
+@heading In @code{EGCS} 1.0.2 versus @code{EGCS} 1.0.1:
@itemize @bullet
@ifclear USERVISONLY
@item
@@ -1142,8 +1200,8 @@ Fix compiler so it accepts @samp{-fgnu-intrinsics-*} and
@samp{-fbadu77-intrinsics-*} options.
@end itemize
-@c 1998-01-02: egcs-1.0.1 released.
-@heading In @code{egcs} 1.0.1 (versus @code{egcs} 1.0):
+@c 1998-01-06: EGCS 1.0.1 released.
+@heading In @code{EGCS} 1.0.1 versus @code{EGCS} 1.0:
@ifclear USERVISONLY
@itemize @bullet
@item
@@ -1152,8 +1210,8 @@ machines such as Alphas.
@end itemize
@end ifclear
-@c 1997-12-03: egcs-1.0 released.
-@heading In @code{egcs} 1.0 (versus 0.5.21):
+@c 1997-12-03: EGCS 1.0 released.
+@heading In @code{EGCS} 1.0 versus @code{g77} 0.5.21:
@itemize @bullet
@item
Version 1.0 of @code{egcs}
diff --git a/gcc/f/root.texi b/gcc/f/root.texi
index fd21eb76381..dce97c07d43 100644
--- a/gcc/f/root.texi
+++ b/gcc/f/root.texi
@@ -2,32 +2,38 @@
@c as compared to a release version. When making a release
@c (e.g. a release branch in the CVS repository for egcs),
@c clear this and set the version information correctly.
-@set DEVELOPMENT
-@set version-g77 0.5.24
+@clear DEVELOPMENT
+@set version-g77 0.5.25
@set version-egcs 1.2
+@set version-gcc 2.95
-@c EGCS-G77 is set to indicate this is the EGCS version of g77.
-@set EGCS-G77
+@c GCC-G77 indicates this is the GCC (2.95 or later) version of g77.
+@set GCC-G77
-@ifclear EGCS-G77
-@c FSF-G77 is set to indicate this is the FSF version of g77.
-@set FSF-G77
-@end ifclear
+@c EGCS-G77 indicates this is the EGCS (1.0 or 1.1) version of g77.
+@clear EGCS-G77
-@ifset EGCS-G77
-@set email-general egcs@@egcs.cygnus.com
-@set email-bugs egcs-bugs@@egcs.cygnus.com
+@c FSF-G77 indicates this is the FSF (0.5.23 or earlier) version of g77.
+@clear FSF-G77
+
+@set email-general gcc@@gcc.gnu.org
+@set email-bugs gcc-bugs@@gcc.gnu.org or bug-gcc@@gnu.org
@set path-g77 egcs/gcc/f
@set path-libf2c egcs/libf2c
+
+@ifset GCC-G77
+@set which-g77 GCC-@value{version-gcc}
+@set which-gcc GCC
+@end ifset
+
+@ifset EGCS-G77
@set which-g77 EGCS-@value{version-egcs}
+@set which-gcc EGCS
@end ifset
@ifset FSF-G77
-@set email-general fortran@@gnu.org
-@set email-bugs fortran@@gnu.org
-@set path-g77 gcc/f
-@set path-libf2c gcc/f/runtime
@set which-g77 FSF-@value{version-g77}
+@set which-gcc GCC
@end ifset
@set email-burley craig@@jcb-sc.com
diff --git a/gcc/f/stw.h b/gcc/f/stw.h
index 58818a61bf2..554d047e611 100644
--- a/gcc/f/stw.h
+++ b/gcc/f/stw.h
@@ -70,7 +70,7 @@ struct _ffestw_
ffewhereLine line_; /* Where first token of statement triggering
state */
ffewhereColumn col_; /* was seen in source file. */
- char uses_; /* # uses (new+use-kill calls). */
+ int uses_; /* # uses (new+use-kill calls). */
ffestvState state_;
int substate_; /* Used on a per-block-state basis. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
diff --git a/gcc/f/top.c b/gcc/f/top.c
index 0d6fb35e214..07ddd83740c 100644
--- a/gcc/f/top.c
+++ b/gcc/f/top.c
@@ -323,13 +323,13 @@ ffe_decode_option (argc, argv)
ffe_set_is_globals (TRUE);
else if (strcmp (&opt[2], "no-globals") == 0)
ffe_set_is_globals (FALSE);
- else if (strcmp (&opt[2], "subscript-check") == 0)
+ else if (strcmp (&opt[2], "bounds-check") == 0)
ffe_set_is_subscript_check (TRUE);
- else if (strcmp (&opt[2], "no-subscript-check") == 0)
+ else if (strcmp (&opt[2], "no-bounds-check") == 0)
ffe_set_is_subscript_check (FALSE);
- else if (strcmp (&opt[2], "f2c-subscript-check") == 0)
+ else if (strcmp (&opt[2], "fortran-bounds-check") == 0)
ffe_set_is_subscript_check (TRUE);
- else if (strcmp (&opt[2], "no-f2c-subscript-check") == 0)
+ else if (strcmp (&opt[2], "no-fortran-bounds-check") == 0)
ffe_set_is_subscript_check (FALSE);
else if (strcmp (&opt[2], "typeless-boz") == 0)
ffe_set_is_typeless_boz (TRUE);
diff --git a/gcc/f/version.c b/gcc/f/version.c
index 3d7362ad843..1b1cfd2bf96 100644
--- a/gcc/f/version.c
+++ b/gcc/f/version.c
@@ -1 +1 @@
-const char *ffe_version_string = "0.5.24-19990515";
+const char *ffe_version_string = "0.5.25 19991030 (prerelease)";