summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/f
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1999-10-16 06:09:09 +0000
committerobrien <obrien@FreeBSD.org>1999-10-16 06:09:09 +0000
commitcae8fa8120c70195f34a2456f18c4c848a2d3e0c (patch)
treef7d3a3ab9c32694206552e767626366f016f2062 /contrib/gcc/f
parent84656b55b6e25e30322dc903a05de53706361d3d (diff)
downloadFreeBSD-src-cae8fa8120c70195f34a2456f18c4c848a2d3e0c.zip
FreeBSD-src-cae8fa8120c70195f34a2456f18c4c848a2d3e0c.tar.gz
Virgin import of the GCC 2.95.1 compilers
Diffstat (limited to 'contrib/gcc/f')
-rw-r--r--contrib/gcc/f/BUGS114
-rw-r--r--contrib/gcc/f/ChangeLog5324
-rw-r--r--contrib/gcc/f/INSTALL352
-rw-r--r--contrib/gcc/f/Make-lang.in115
-rw-r--r--contrib/gcc/f/Makefile.in21
-rw-r--r--contrib/gcc/f/NEWS1651
-rw-r--r--contrib/gcc/f/RELEASE-PREP5
-rw-r--r--contrib/gcc/f/ansify.c4
-rw-r--r--contrib/gcc/f/assert.j2
-rw-r--r--contrib/gcc/f/bad.c26
-rw-r--r--contrib/gcc/f/bad.def6
-rw-r--r--contrib/gcc/f/bad.h6
-rw-r--r--contrib/gcc/f/bit.c2
-rw-r--r--contrib/gcc/f/bit.h2
-rw-r--r--contrib/gcc/f/bld-op.def2
-rw-r--r--contrib/gcc/f/bld.c15
-rw-r--r--contrib/gcc/f/bld.h23
-rw-r--r--contrib/gcc/f/bugs.texi204
-rw-r--r--contrib/gcc/f/bugs0.texi14
-rw-r--r--contrib/gcc/f/com-rt.def7
-rw-r--r--contrib/gcc/f/com.c4047
-rw-r--r--contrib/gcc/f/com.h37
-rw-r--r--contrib/gcc/f/config.j2
-rw-r--r--contrib/gcc/f/convert.j2
-rw-r--r--contrib/gcc/f/data.c6
-rw-r--r--contrib/gcc/f/data.h2
-rw-r--r--contrib/gcc/f/equiv.c2
-rw-r--r--contrib/gcc/f/equiv.h2
-rw-r--r--contrib/gcc/f/expr.c189
-rw-r--r--contrib/gcc/f/expr.h2
-rw-r--r--contrib/gcc/f/ffe.texi2024
-rw-r--r--contrib/gcc/f/fini.c39
-rw-r--r--contrib/gcc/f/flags.j2
-rw-r--r--contrib/gcc/f/g77.114
-rw-r--r--contrib/gcc/f/g77.texi2774
-rw-r--r--contrib/gcc/f/g77spec.c18
-rw-r--r--contrib/gcc/f/glimits.j2
-rw-r--r--contrib/gcc/f/global.c165
-rw-r--r--contrib/gcc/f/global.h6
-rw-r--r--contrib/gcc/f/hconfig.j2
-rw-r--r--contrib/gcc/f/implic.c10
-rw-r--r--contrib/gcc/f/implic.h4
-rw-r--r--contrib/gcc/f/info-b.def2
-rw-r--r--contrib/gcc/f/info-k.def2
-rw-r--r--contrib/gcc/f/info-w.def2
-rw-r--r--contrib/gcc/f/info.c22
-rw-r--r--contrib/gcc/f/info.h12
-rw-r--r--contrib/gcc/f/input.j2
-rw-r--r--contrib/gcc/f/intdoc.c101
-rw-r--r--contrib/gcc/f/intdoc.in229
-rw-r--r--contrib/gcc/f/intdoc.texi289
-rw-r--r--contrib/gcc/f/intrin.c84
-rw-r--r--contrib/gcc/f/intrin.def22
-rw-r--r--contrib/gcc/f/intrin.h17
-rw-r--r--contrib/gcc/f/lab.c2
-rw-r--r--contrib/gcc/f/lab.h2
-rw-r--r--contrib/gcc/f/lang-options.h253
-rw-r--r--contrib/gcc/f/lang-specs.h30
-rw-r--r--contrib/gcc/f/lex.c84
-rw-r--r--contrib/gcc/f/lex.h10
-rw-r--r--contrib/gcc/f/malloc.c16
-rw-r--r--contrib/gcc/f/malloc.h8
-rw-r--r--contrib/gcc/f/name.c6
-rw-r--r--contrib/gcc/f/name.h6
-rw-r--r--contrib/gcc/f/news.texi933
-rw-r--r--contrib/gcc/f/news0.texi17
-rw-r--r--contrib/gcc/f/output.j3
-rw-r--r--contrib/gcc/f/parse.c2
-rw-r--r--contrib/gcc/f/proj.c2
-rw-r--r--contrib/gcc/f/proj.h2
-rw-r--r--contrib/gcc/f/root.texi40
-rw-r--r--contrib/gcc/f/rtl.j2
-rw-r--r--contrib/gcc/f/src.c2
-rw-r--r--contrib/gcc/f/src.h2
-rw-r--r--contrib/gcc/f/st.c2
-rw-r--r--contrib/gcc/f/st.h2
-rw-r--r--contrib/gcc/f/sta.c8
-rw-r--r--contrib/gcc/f/sta.h8
-rw-r--r--contrib/gcc/f/stb.c122
-rw-r--r--contrib/gcc/f/stb.h16
-rw-r--r--contrib/gcc/f/stc.c50
-rw-r--r--contrib/gcc/f/stc.h2
-rw-r--r--contrib/gcc/f/std.c129
-rw-r--r--contrib/gcc/f/std.h2
-rw-r--r--contrib/gcc/f/ste.c3020
-rw-r--r--contrib/gcc/f/ste.h14
-rw-r--r--contrib/gcc/f/storag.c2
-rw-r--r--contrib/gcc/f/storag.h2
-rw-r--r--contrib/gcc/f/stp.c2
-rw-r--r--contrib/gcc/f/stp.h2
-rw-r--r--contrib/gcc/f/str-1t.fin2
-rw-r--r--contrib/gcc/f/str-2t.fin2
-rw-r--r--contrib/gcc/f/str-fo.fin2
-rw-r--r--contrib/gcc/f/str-io.fin2
-rw-r--r--contrib/gcc/f/str-nq.fin2
-rw-r--r--contrib/gcc/f/str-op.fin2
-rw-r--r--contrib/gcc/f/str-ot.fin2
-rw-r--r--contrib/gcc/f/str.c2
-rw-r--r--contrib/gcc/f/str.h2
-rw-r--r--contrib/gcc/f/sts.c14
-rw-r--r--contrib/gcc/f/sts.h16
-rw-r--r--contrib/gcc/f/stt.c8
-rw-r--r--contrib/gcc/f/stt.h8
-rw-r--r--contrib/gcc/f/stu.c8
-rw-r--r--contrib/gcc/f/stu.h2
-rw-r--r--contrib/gcc/f/stv.c2
-rw-r--r--contrib/gcc/f/stv.h2
-rw-r--r--contrib/gcc/f/stw.c8
-rw-r--r--contrib/gcc/f/stw.h11
-rw-r--r--contrib/gcc/f/symbol.c15
-rw-r--r--contrib/gcc/f/symbol.def2
-rw-r--r--contrib/gcc/f/symbol.h13
-rw-r--r--contrib/gcc/f/system.j2
-rw-r--r--contrib/gcc/f/target.c4
-rw-r--r--contrib/gcc/f/target.h30
-rw-r--r--contrib/gcc/f/tconfig.j2
-rw-r--r--contrib/gcc/f/tm.j2
-rw-r--r--contrib/gcc/f/top.c37
-rw-r--r--contrib/gcc/f/top.h11
-rw-r--r--contrib/gcc/f/toplev.j2
-rw-r--r--contrib/gcc/f/tree.j2
-rw-r--r--contrib/gcc/f/type.c2
-rw-r--r--contrib/gcc/f/type.h2
-rw-r--r--contrib/gcc/f/version.c2
-rw-r--r--contrib/gcc/f/version.h2
-rw-r--r--contrib/gcc/f/where.c4
-rw-r--r--contrib/gcc/f/where.h2
127 files changed, 11697 insertions, 11371 deletions
diff --git a/contrib/gcc/f/BUGS b/contrib/gcc/f/BUGS
index ae6efd9..6f04b2b 100644
--- a/contrib/gcc/f/BUGS
+++ b/contrib/gcc/f/BUGS
@@ -1,59 +1,46 @@
-This file lists known bugs in the GNU Fortran compiler. Copyright (C)
-1995, 1996 Free Software Foundation, Inc. You may copy, distribute,
-and modify it freely as long as you preserve this copyright notice and
-permission notice.
+*Note:* This file is automatically generated from the files
+`bugs0.texi' and `bugs.texi'. `BUGS' is *not* a source file, although
+it is normally included within source distributions.
-Bugs in GNU Fortran
-*******************
+ 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.
+
+Known Bugs In GNU Fortran
+*************************
This section identifies bugs that `g77' *users* might run into in
-the `egcs'-1.1.2 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.
+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.
For information on bugs in *other* versions of `g77', see
-`egcs/gcc/f/NEWS'.
+`egcs/gcc/f/NEWS'. There, lists of bugs fixed in various versions of
+`g77' can help determine what bugs existed in prior versions.
+
+ *Warning:* The information below is still under development, and
+might not accurately reflect the `g77' code base of which it is a part.
+Efforts are made to keep it somewhat up-to-date, but they are
+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
+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 up-to-date mainline version of `g77' within `egcs') is available at
-`http://egcs.cygnus.com/onlinedocs/g77_bugs.html'.
+the mainline, development version of `g77' within `egcs') is available
+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'.
- * `g77' generates bad code for assignments, or other conversions, of
- `REAL' or `COMPLEX' constant expressions to type `INTEGER(KIND=2)'
- (often referred to as `INTEGER*8').
-
- For example, `INTEGER*8 J; J = 4E10' is miscompiled on some
- systems--the wrong value is stored in J.
-
- * The `IDate' Intrinsic (VXT) fails to return the year in the
- documented, non-Y2K-compliant range of 0-99, instead returning 100
- for the year 2000.
-
- * Year 2000 (Y2K) compliance information is missing from the
- documentation.
-
- * `g77' 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').
-
- * The `-ax' option is not obeyed when compiling Fortran programs.
- (It is not passed to the `f771' driver.)
-
- * `g77' fails to warn about a reference to a function when the
- corresponding *subsequent* function program unit disagrees with
- the reference concerning the type of the function.
-
- * Automatic arrays possibly aren't working on HP-UX systems, at
- least in HP-UX version 10.20. Writing into them apparently causes
- over-writing of statically declared data in the main program.
- This probably means the arrays themselves are being
- under-allocated, or pointers to them being improperly handled,
- e.g. not passed to other procedures as they should be.
+ 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
@@ -147,18 +134,6 @@ port, build, and install `g77', see "Problems Installing" in
0.6 should solve most or all remaining problems (such as
cross-compiling involving 64-bit machines).
- * Maintainers of gcc report that the back end definitely has "broken"
- support for `COMPLEX' types. Based on their input, it seems many
- of the problems affect only the more-general facilities for gcc's
- `__complex__' type, such as `__complex__ int' (where the real and
- imaginary parts are integers) that GNU Fortran does not use.
-
- Version 0.5.20 of `g77' works around this problem by not using the
- back end's support for `COMPLEX'. The new option
- `-fno-emulate-complex' avoids the work-around, reverting to using
- the same "broken" mechanism as that used by versions of `g77'
- prior to 0.5.20.
-
* `g77' currently inserts needless padding for things like `COMMON
A,IPAD' where `A' is `CHARACTER*1' and `IPAD' is `INTEGER(KIND=1)'
on machines like x86, because the back end insists that `IPAD' be
@@ -170,33 +145,6 @@ port, build, and install `g77', see "Problems Installing" in
targets, and front ends like `g77' should take advantage of this
when it becomes available.
- * The x86 target's `-malign-double' option no longer reliably aligns
- double-precision variables and arrays when they are placed in the
- stack frame.
-
- This can significantly reduce the performance of some applications,
- even on a run-to-run basis (that is, performance measurements can
- vary fairly widely depending on whether frequently used variables
- are properly aligned, and that can change from one program run to
- the next, even from one procedure call to the next).
-
- Versions 0.5.22 and earlier of `g77' included a patch to `gcc'
- that enabled this, but that patch has been deemed an improper
- (probably buggy) one for version 2.8 of `gcc' and for `egcs'.
-
- Note that version 1.1 of `egcs' aligns double-precision variables
- and arrays when they are in static storage even if
- `-malign-double' is not specified.
-
- There is ongoing investigation into how to make `-malign-double'
- work properly, also into how to make it unnecessary to get all
- double-precision variables and arrays aligned when such alignment
- would not violate the relevant specifications for processor and
- inter-procedural interfaces.
-
- For a suite of programs to test double-precision alignment, see
- `ftp://alpha.gnu.org/gnu/g77/align/'.
-
* The `libf2c' routines that perform some run-time arithmetic on
`COMPLEX' operands were modified circa version 0.5.20 of `g77' to
work properly even in the presence of aliased operands.
diff --git a/contrib/gcc/f/ChangeLog b/contrib/gcc/f/ChangeLog
index bc8637d..a3755f4 100644
--- a/contrib/gcc/f/ChangeLog
+++ b/contrib/gcc/f/ChangeLog
@@ -1,4804 +1,1266 @@
-Sun Mar 14 02:38:07 PST 1999 Jeff Law (law@cygnus.com)
+Mon Aug 16 01:29:24 PDT 1999 Jeff Law (law@cygnus.com)
- * egcs-1.1.2 Released.
+ * gcc-2.95.1 Released.
-1999-03-13 Craig Burley <craig@jcb-sc.com>
+Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
- * bugs.texi: Document newly discovered bug (19990313-*.f tests).
+ * g77spec.c: Update URLS and mail addresses.
+ * root.texi: Update URLS and mail addresses.
-1999-03-13 Craig Burley <craig@jcb-sc.com>
+Wed Jul 28 21:39:31 PDT 1999 Jeff Law (law@cygnus.com)
- * bugs.texi: Editorial fixes.
+ * gcc-2.95 Released.
-1999-03-11 Craig Burley <craig@jcb-sc.com>
+ * version.c: No longer a prerelease.
- * bugs.texi, g77.texi, news.texi: Point to URLs for live
- versions of docs.
- Clarify which versions to which these docs apply.
- Other minor fix-ups.
+Sat Jul 17 21:57:07 1999 Jeffrey A Law (law@cygnus.com)
-1999-03-05 Craig Burley <craig@jcb-sc.com>
+ * root.texi: Clear DEVEOPMENT per Craig's instructions.
- * news.texi: IDATE (VXT) fixed to return year as 0..99.
-
-1999-03-03 Craig Burley <craig@jcb-sc.com>
-
- * bugs.texi: Update with latest bug-fixes from 1.2.
- Remove fixed bugs.
-
-1999-02-26 Craig Burley <craig@jcb-sc.com>
-
- * news.texi: List fixes to Date_and_Time and LStat, plus
- the docs, under a new heading for egcs 1.1.2.
-
-1999-02-26 Craig Burley <craig@jcb-sc.com>
-
- * intdoc.in (STAT_func, STAT_subr,
- FSTAT_func, FSTAT_subr, LSTAT_func, LSTAT_subr):
- Properly order array elements. Specify N/A return values.
-
-1999-02-26 Craig Burley <craig@jcb-sc.com>
-
- * intdoc.in (DATE_AND_TIME): Explain that VALUES(7) holds
- seconds, and VALUES(8), therefore, the milliseconds.
-
-1999-02-26 Craig Burley <craig@jcb-sc.com>
-
- * bugs.texi: Mention bugs known fixed in egcs 1.2 as of now.
-
-1999-02-26 Craig Burley <craig@jcb-sc.com>
-
- Fix what evidently remains of these, for 4.4bsd:
- Tue Aug 18 21:41:31 1998 Jeffrey A Law (law@cygnus.com)
- * Make-lang.in: Add several "else true" clauses to deal with lame
- systems.
-
-1999-02-25 Andreas Jaeger <aj@arthur.rhein-neckar.de>
-
- * f/intdoc.in: Add missing `,' after cross references.
-
-1999-02-20 Craig Burley <craig@jcb-sc.com>
-
- * g77.texi: Properly attribute Priest document; clarify
- that it is in the .ps version of the Goldberg document.
-
-1999-02-18 Craig Burley <craig@jcb-sc.com>
-
- * intdoc.in (LOG10): Fix typo.
-
-1999-02-17 Dave Love <fx@gnu.org>
-
- * intdoc.in: Say `common' logarithm for log10.
-
-1999-02-15 Craig Burley <craig@jcb-sc.com>
-
- * g77.texi: Change my email address in a couple of places.
-
-1999-02-14 Craig Burley <craig@jcb-sc.com>
-
- * version.c: Bump for 1998-10-02 change (forgot to do this
- before).
-
-1999-02-14 Craig Burley <craig@jcb-sc.com>
-
- * intdoc.in (LOG10): Fix description.
-
-1999-02-14 Craig Burley <craig@jcb-sc.com>
-
- * news.texi: Mention fix for SIGNAL invocation circa egcs-1.1.
-
-1999-02-14 Craig Burley <craig@jcb-sc.com>
-
- * intdoc.in (MCLOCK8, TIME8): Warn about lower range on
- 32-bit systems.
-
-Sat Feb 6 17:17:09 1999 Jeffrey A Law (law@cygnus.com)
-
- * g77.texi: Update email addresses.
-
-1998-11-20 Dave Love <d.love@dl.ac.uk>
-
- * g77.texi: Assorted minor changes.
-
-1998-11-19 Dave Love <d.love@dl.ac.uk>
-
- * intdoc.in: Terminate some @xrefs with `,'.
-
-Mon Nov 9 23:13:30 1998 Jeffrey A Law (law@cygnus.com)
-
- * g77.texi: Updates from Craig.
-
-1998-10-09 Dave Love <d.love@dl.ac.uk>
-
- * g77.texi: Various updates.
-
-1998-10-02 Dave Love <d.love@dl.ac.uk>
-
- * com.c (ffecom_expr_intrinsic_): Fix return type for RAND.
-
-Fri Oct 2 01:27:06 1998 Kamil Iskra <iskra@student.uci.agh.edu.pl>
-
- * Make-lang.in (f77.install-common): Add missing "else true;".
-
-Sat Sep 5 23:55:15 1998 Jeffrey A Law (law@cygnus.com)
-
- * news.texi: Tweaks from Craig.
-
-Tue Sep 1 10:00:21 1998 Craig Burley <burley@gnu.org>
-
- * bugs.texi, g77.1, g77.texi, intdoc.in, news.texi: Doc updates
- from Craig.
-
-1998-08-23 Dave Love <d.love@dl.ac.uk>
+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.
- * g77.texi: Increment `version-g77' and fix a few typos.
-
-Tue Aug 11 08:12:14 1998 H.J. Lu (hjl@gnu.org)
-
- * Make-lang.in (g77.o): Touch lang-f77 before checking it.
-
-1998-08-09 Dave Love <d.love@dl.ac.uk>
-
- * Make-lang.in (f/g77.dvi): Replace non-working use of texi2dvi
- with explicit use of tex.
- (f77.mostlyclean): Remove TeX index files.
-
- * g77install.texi (Prerequisites): Kluge round TeX lossage with
- hyphen in @value in @code.
+Sat Jul 17 11:28:43 1999 Craig Burley <craig@jcb-sc.com>
-Tue Aug 4 16:59:39 1998 Craig Burley <burley@gnu.org>
+ * root.texi, g77install.texi: Switchover to GCC terminology.
+ Also, FSF-G77 had been mistakenly set at some point.
- * com.c (ffecom_convert_narrow_, ffecom_convert_widen_):
- Allow conversion from pointer to same-sized integer,
- to fix invoking SIGNAL as a function.
+Thu Jul 8 15:38:50 1999 Craig Burley <craig@jcb-sc.com>
-1998-07-26 Dave Love <d.love@dl.ac.uk>
+ * news.texi: Describe DATE intrinsic fix.
- * BUGS, INSTALL, NEWS: Rebuilt.
+Tue Jun 29 10:10:25 1999 Craig Burley <craig@jcb-sc.com>
-Sat Jul 25 17:23:55 1998 Craig Burley <burley@gnu.org>
+ * bugs.texi: Undo Friday's change, as there's now a fix
+ available from netlib.
+ * news.texi: Document the fix.
- Fix 980615-0.f:
- * stc.c (ffestc_R1229_start): Set info to ANY as well.
+Mon Jun 28 10:43:11 1999 Craig Burley <craig@jcb-sc.com>
-Tue Jul 21 04:33:37 1998 Craig Burley <burley@gnu.org>
-
- * g77spec.c (lang_specific_driver): Return unmolested
- command line when --help seen.
- Comment out code that printed g77-specific --help info.
-
-Sat Jul 18 19:16:48 1998 Craig Burley <burley@gnu.org>
-
- * lang-options.h: Fix up doc strings.
- Remove the unimplemented -fdcp-intrinsics-* options.
-
- * str-1t.fin: Change mixed-case spelling of `GoTo' from
- `Goto'.
-
-Thu Jul 16 13:26:36 1998 Craig Burley <burley@gnu.org>
-
- * com.c (ffecom_finish_symbol_transform_): Revert change
- of 1998-05-23, as it was too aggressive, in that it
- prevented transformation of (used) functions before
- primary code generation.
-
-1998-07-15 Dave Love <d.love@dl.ac.uk>
-
- * intdoc.texi: Regenerated.
-
-Mon Jul 13 18:45:06 1998 Craig Burley <burley@gnu.org>
-
- * Make-lang.in (f77.rebuilt): Fix to depend on
- build-dir-based, not source-based, g77.info.
-
- * g77.texi: Merge docs with 0.5.24.
- * g77install.texi: Ditto.
-
-Mon Jul 13 18:02:29 1998 Craig Burley <burley@gnu.org>
-
- Cleanups vis-a-vis g77-0.5.24:
- * g77spec.c (lang_specific_driver): Tabify source.
- * top.c (ffe_decode_option): Use fixed macro to set
- internal-checking flag.
- * top.h (ffe_set_is_do_internal_checks): Fix macro.
-
-Mon Jul 13 17:33:44 1998 Craig Burley <burley@gnu.org>
-
- Cleanups vis-a-vis system.h cutover and g77-0.5.24:
- * Makefile.in (fini.o): Define USE_HCONFIG macro
- so source code doesn't have to.
- * fini.c: Don't define USE_HCONFIG here, since
- source code usually shouldn't care about this.
- * ansify.c: Include stddef.h only if we have it.
- * intdoc.c: Ditto.
- * proj.h: Ditto.
-
-Mon Jul 13 17:30:29 1998 Nick Clifton <nickc@cygnus.com>
-
- * lang-options.h: Format changed to work with --help support added
- to gcc/toplev.c
-
-Mon Jul 13 11:54:03 1998 Craig Burley <burley@gnu.org>
-
- * com.c (ffecom_push_tempvar): Replace kludge that
- munged back-end globals directly with proper calls
- to push_topmost_sequence and pop_topmost_sequence.
-
-1998-07-12 Dave Love <d.love@dl.ac.uk>
+ * com.c (ffecom_prepare_expr_): A COMPLEX intrinsic needs
+ a temp even if -fno-f2c.
* version.c: Bump version.
-Sat Jul 11 19:24:32 1998 Craig Burley <burley@gnu.org>
-
- Fix 980616-0.f:
- * equiv.c (ffeequiv_offset_): Don't crash on various
- possible ANY operands.
-
-Sat Jul 11 18:24:37 1998 Craig Burley <burley@gnu.org>
-
- * com.c (ffecom_expr_) [FFEBLD_opCONTER]: Die if padding
- for constant is non-zero.
-
- * com.c (__eprintf): Delete this function, it is obsolete.
-
-1998-07-09 Dave Love <d.love@dl.ac.uk>
-
- * intdoc.in (HOSTNM_func, HOSTNM_subr): Update last change.
-
-Thu Jul 9 00:45:59 1998 Craig Burley <burley@gnu.org>
-
- Fix debugging of CHARACTER*(*), etc., which requires
- emitting debug info on types like `ftnlen':
- * com.c (ffecom_start_progunit_): Don't bother
- resetting "invented" flag for identifier.
- (ffecom_transform_equiv_): Don't bother zeroing
- "ignored" flag for decl.
- (pushdecl): No longer set "ignored", "used", or
- "suppressed debug" flags for decls having "invented"
- identifiers.
-
-1998-07-06 Mike Stump <mrs@wrs.com>
-
- * Make-lang.in (f77.stage?): Use mv -f instead of just mv so that
- we can move g77.c.
-
-1998-07-06 Dave Love <d.love@dl.ac.uk>
-
- * intdoc.in (HOSTNM_func, HOSTNM_subr): Note possible need for
- -lsocket.
-
-1998-07-05 Dave Love <d.love@dl.ac.uk>
-
- * intdoc.in: Add entry for DATE_AND_TIME.
-
- * intrin.def: Add implementation for DATE_AND_TIME. Make second
- and third args of SYSTEM_CLOCK optional.
-
- * com.c (ffecom_expr_intrinsic_): New case for DATE_AND_TIME.
-
- * com-rt.def (FFECOM_gfrtSYSTEM_CLOCK): Call G77_system_clock_0,
- not system_clock_.
- (FFECOM_gfrtDATE_AND_TIME): New DEFGFRT.
-
-Wed Jul 1 11:19:13 1998 Craig Burley <burley@gnu.org>
-
- Fix 980701-1.f (which was producing "unaligned trap"
- on an Alpha running GNU/Linux, as predicted):
- * equiv.c (ffeequiv_layout_local_): Don't bother
- coping with pre-padding of entire area while building
- it; do that instead after the building is done, and
- do it by modifying only the modulo field. This covers
- the case of alignment stringency being increased without
- lowering the starting offset, unlike the previous changes,
- and even more elegantly than those.
-
- * target.c (ffetarget_align): Make sure alignments
- are non-zero, just in case.
-
-Mon Jun 29 09:47:33 1998 Craig Burley <burley@gnu.org>
-
- Fix 980628-*.f:
- * bld.h: New `pad' field and accessor macros for
- ACCTER, ARRTER, and CONTER ops.
- * bld.c (ffebld_new_accter, ffebld_new_arrter,
- ffebld_new_conter_with_orig): Initialize `pad' field
- to zero.
- * com.c (ffecom_transform_common_): Include initial
- padding (aka modulo aka offset) in size calculation.
- Copy initial padding value into FFE initialization expression
- so the GBE transformation of that expression includes it.
- Make array low bound 0 instead of 1, for consistency.
- (ffecom_transform_equiv_): Include initial
- padding (aka modulo aka offset) in size calculation.
- Copy initial padding value into FFE initialization expression
- so the GBE transformation of that expression includes it.
- Make array low bound 0 instead of 1, for consistency.
- (ffecom_expr_, case FFEBLD_opACCTER): Delete unused `size'
- variable.
- Track destination offset separately, allowing for
- initial padding.
- Don't bother setting initial PURPOSE offset if zero.
- Include initial padding in size calculation.
- (ffecom_expr_, case FFEBLD_opARRTER): Allow for
- initial padding.
- Include initial padding in size calculation.
- Make array low bound 0 instead of 1, for consistency.
- (ffecom_finish_global_): Make array low bound 0 instead
- of 1, for consistency.
- (ffecom_notify_init_storage): Copy `pad' field from old
- ACCTER to new ARRTER.
- (ffecom_notify_init_symbol): Ditto.
- * data.c (ffedata_gather_): Initialize `pad' field in new
- ARRTER to 0.
- (ffedata_value_): Ditto.
- * equiv.c (ffeequiv_layout_local_): When lowering start
- of equiv area, extend lowering to maintain needed alignment.
- * target.c (ffetarget_align): Handle negative offset correctly.
-
- * global.c (ffeglobal_pad_common): Warn about non-zero
- padding only the first time its seen.
- If new padding larger than old, update old.
- (ffeglobal_save_common): Use correct type for size throughout.
- * global.h: Use correct type for size throughout.
- (ffeglobal_common_pad): New macro.
- (ffeglobal_pad): Delete this unused and broken macro.
-
-Fri Jun 26 11:54:19 1998 Craig Burley <burley@gnu.org>
-
- * g77spec.c (lang_specific_driver): Put `-lg2c' in
- front of any `-lm' that is seen.
-
-Mon Jun 22 23:12:05 1998 H.J. Lu (hjl@gnu.org)
-
- * Make-lang.in (G77STAGESTUFF): Add g77.c.
-
-Mon Jun 15 23:39:24 1998 Craig Burley <burley@gnu.org>
-
- * Make-lang.in (f/g77.info): Use -f when removing
- pre-existing Info files, if any. (This rm command
- can go away once makeinfo has been changed to delete
- .info-N files beyond the last one it creates.)
-
- * Make-lang.in ($(srcdir)/f/intdoc.texi): Compile
- using $(INCLUDES) macro to get the new hconfig.h
- and system.h headers.
-
-Mon Jun 15 22:21:57 1998 Craig Burley <burley@gnu.org>
-
- Cutover to system.h:
- * Make-lang.in:
- * Makefile.in:
- * ansify.c:
- * bad.c:
- * bld.c:
- * com.c:
- * com.h:
- * expr.c:
- * fini.c:
- * g77spec.c:
- * implic.c:
- * intdoc.c:
- * intrin.c:
- * lex.c:
- * lex.h:
- * parse.c:
- * proj.c:
- * proj.h:
- * src.c:
- * src.h:
- * stb.c:
- * ste.c:
- * target.c:
- * top.c:
- * system.j: New file.
-
- Use toplev.h where appropriate:
- * Make-lang.in:
- * Makefile.in:
- * bad.c:
- * bld.c:
- * com.c:
- * lex.c:
- * ste.c:
- * top.c:
- * toplev.j: New file.
-
- Conditionalize all dumping/reporting routines so they don't
- get built for gcc/egcs:
- * bld.c:
- * bld.h:
- * com.c:
- * equiv.c:
- * equiv.h:
- * sta.c:
- * stt.c:
- * stt.h:
- * symbol.c:
- * symbol.h:
-
- Use hconfig.h instead of config.h where appropriate:
- * Makefile.in (proj-h.o): Compile with -DUSE_HCONFIG.
- * fini.c: Define USE_HCONFIG before including proj.h.
-
- * Makefile.in (deps-kinda): Redirect stderr to stdout,
- to eliminate diagnostics vis-a-vis g77spec.c.
-
- * Makefile.in: Regenerate dependencies via deps-kinda.
-
- * lex.c (ffelex_file_fixed, ffelex_file_free): Eliminate
- apparently spurious warnings about uninitialized variables
- `c', `column', and so on.
-
-Sat Jun 13 03:13:18 1998 Craig Burley <burley@gnu.org>
-
- * g77spec.c (lang_specific_driver): Print out egcs
- version info first, to be compatible with what some
- test facilities expect.
-
-Wed Jun 10 13:17:32 1998 Dave Brolley <brolley@cygnus.com>
-
- * top.h (ffe_decode_option): New argc/argv interface.
- * top.c (ffe_decode_option): New argc/argv interface.
- * parse.c (yyparse): New argc/argv interface for ffe_decode_option.
- * com.c (lang_decode_option): New argc/argv interface.
-
-Mon Jun 1 19:37:42 1998 Craig Burley <burley@gnu.org>
-
- * com.c (ffecom_init_0): Fix setup of INTEGER(KIND=7)
- pointer type.
- * info.c (ffeinfo_type): Don't crash on null type.
- * expr.c (ffeexpr_fulfill_call_): Don't special-case
- %LOC(expr) or LOC(expr).
- Delete FFEGLOBAL_argsummaryPTR.
- * global.c, global.h: Delete FFEGLOBAL_argsummaryPTR.
-
-Thu May 28 21:32:18 1998 Craig Burley <burley@gnu.org>
-
- Restore circa-0.5.22 capabilities of `g77' driver:
- * Make-lang.in (g77spec.o): Depend on f/version.h.
- (g77version.o): New rule to compile g77 version info.
- (g77$(exeext)): Depend on and link in g77version.o.
- * g77spec.c: Rewrite to be more like 0.5.22 version
- of g77.c, making filtering of command line smarter
- so mixed Fortran and C (etc.) can be compiled, verbose
- version info can be obtained, etc.
- * lang-specs.h (f77-version): New "language" to support
- "g77 -v" command under new gcc 2.8 regime.
- * lex.c (ffelex_file_fixed): If -fnull-version, just
- substitute a "source file" that prints out version info.
- * top.c, top.h: Support -fnull-version.
-
- * lang-specs.h: Use "%O" instead of OO macro to specify
- object extension. Remove old stringizing cruft.
-
- * Make-lang.in (g77.c, g77spec.o, g77.o, g77$(exeext),
- g77-cross$(exeext), f771,
- $(srcdir)/f/g77.info, $(srcdir)/f/g77.dvi,
- $(srcdir)/f/intdoc.texi,
- f77.install-common, f77.install-info, f77.install-man,
- f77.uninstall, $(G77STAGESTUFF), f77.stage1, f77.stage2,
- f77.stage3, f77.stage4, f77.distdir): Don't do anything
- unless user specified "f77" or "F77" in $LANGUAGES either
- during configuration or explicitly. For convenience of
- various tests and to work around lack of the assignment
- "LANGUAGES=$(BOOT_LANGUAGES)" in the "make stage1" command
- of "make bootstrap" in gcc, use a touch file named "lang-f77"
- to communicate whether this is the case.
-
- * Make-lang.in (F77_FLAGS_TO_PASS): Delete this macro,
- replace with minimal expansion of its former self in
- each of the two instances where it was used.
-
- * Makefile.in (HOST_CC): Delete this definition.
-
- * com.c (index, rindex): Delete these declarations.
-
- * proj.h: (isascii): Delete this.
-
- * Make-lang.in (f77.install-common): Warn if `f77-install-ok'
- flag-file exists, since it no longer triggers any activity.
-
- Rename libf2c.a and f2c.h to libg2c.a and g2c.h,
- normalize and simplify g77/libg2c build process:
- * Make-lang.in: Remove all support for overwriting
- /usr/bin/f77 etc., or whatever the actual names are
- via $(prefix) and $(local_prefix). (g++ overwrites
- /usr/bin/c++, but then it's often the only C++ compiler
- on the system; f77 often exists on systems that are
- installing g77.)
- (f77.realclean): Remove obsolete target.
- (g77.c, g77$(exeext)): Minor changes to look more like g++'s
- stuff.
- (f771): Now built with srcdir=gcc/f, not srcdir=gcc, to be
- more like g++ and such.
- (f/Makefile): Removed, as g++ doesn't need this rule.
- (f77.install-common): No longer install f77, etc.
- (f77.install-man): No longer install f77.1.
- (f77.uninstall): No longer uninstall f77, f77.1, etc.
- (f77.stage1, f77.stage2, f77.stage3, f77.stage4): Do work
- only if "f77" appears in $(LANGUAGES).
- (Note: gcc's Makefile.in's bootstrap target should set
- LANGUAGES=$(BOOT_LANGUAGES) when making the stage1 target.)
- * Makefile.in: Update vis-a-vis gcc/cp/Makefile.in.
- (none): Remove.
- (g77-only): Relocate.
- (all.indirect, f771, *.o): Now assumes current directory
- is this dir (gcc/f), not the parent directory.
- (TAGS): Remove "echo 'parse.y,0' >> TAGS ;" line.
- * config-lang.in: Delete commented-out code.
- Fix stagestuff definition. Add more stuff to
- diff_excludes definition. Don't create any directories.
- Set outputs to f/Makefile, to get variable substition
- to happen (what does that really do, anyway?!).
- * g77spec.c: Rename libf2c to libg2c.
-
- * com.h: Remove all of the gcc back-end decls,
- since egcs should have all of them correct.
-
- * com.c: Include "proj.h" before anything else,
- as that's how things are supposed to work.
- * ste.c: Ditto.
-
- * bad.c: Include "flags.j" here, since some diagnostics
- check flag_pedantic_errors.
-
- * Makefile.in (f/*.o): Rebuild dependencies via
- deps-kinda.
-
- * output.j: New source file.
- * Make-lang.in (F77_SRCS): Update accordingly.
- * Makefile.in (OUTPUT_H): Ditto.
- (deps-kinda): Ditto.
- * com.c: Include "output.j" here.
- * lex.c: Ditto.
-
-Mon May 25 03:34:42 1998 Craig Burley <burley@gnu.org>
-
- * com.c (ffecom_expr_): Fix D**I and Z**I cases to
- not convert (DOUBLE PRECISION) D and (DOUBLE COMPLEX) Z
- to INTEGER. (This is dead code here anyway.)
-
-Sat May 23 06:32:52 1998 Craig Burley <burley@gnu.org>
-
- * com.c (ffecom_finish_symbol_transform_): Don't transform
- statement (nested) functions, to avoid gcc compiling them
- and thus producing linker errors if they refer to undefined
- external functions. But warn if they're unused and -Wunused.
- * bad.def (FFEBAD_SFUNC_UNUSED): New diagnostic.
-
-Wed May 20 12:12:55 1998 Craig Burley <burley@gnu.org>
-
- * Version 0.5.23 released.
-
-Tue May 19 14:52:41 1998 Craig Burley <burley@gnu.org>
-
- * bad.def (FFEBAD_OPEN_UNSUPPORTED, FFEBAD_INQUIRE_UNSUPPORTED,
- FFEBAD_READ_UNSUPPORTED, FFEBAD_WRITE_UNSUPPORTED,
- FFEBAD_QUAD_UNSUPPORTED, FFEBAD_BLOCKDATA_STMT,
- FFEBAD_TRUNCATING_CHARACTER, FFEBAD_TRUNCATING_HOLLERITH,
- FFEBAD_TRUNCATING_NUMERIC, FFEBAD_TRUNCATING_TYPELESS,
- FFEBAD_TYPELESS_OVERFLOW): Change these from warnings
- to errors.
-
-Tue May 19 14:51:59 1998 Craig Burley <burley@gnu.org>
-
- * Make-lang.in (f77.install-info, f77.uninstall):
- Use install-info as appropriate.
-
-Tue May 19 12:56:54 1998 Craig Burley <burley@gnu.org>
-
- * com.c (ffecom_init_0): Rename xargc to f__xargc,
- in accord with same-dated change to f/runtime.
-
-Fri May 15 10:52:49 1998 Craig Burley <burley@gnu.org>
-
- * com.c (ffecom_convert_narrow_, ffecom_convert_widen_):
- Be even more persnickety in checking for internal bugs.
- Also, if precision isn't changing, just return the expr.
-
- * expr.c (ffeexpr_token_number_): Call
- ffeexpr_make_float_const_ to make an integer.
- (ffeexpr_make_float_const_): Handle making an integer.
-
- * intrin.c (ffeintrin_init_0): Distinguish between
- crashes on bad arg base and kind types.
-
-Thu May 14 13:30:59 1998 Craig Burley <burley@gnu.org>
-
- * Make-lang.in (f/expr.c): Now depends on f/stamp-str.
- * expr.c: Use ffestrOther in place of ffeexprDotdot_.
- * str-ot.fin: Add more keywords for expr.c.
-
- * intdoc.c (dumpimp): Trivial fix.
-
- * com.c (ffecom_expr_): Add ltkt variable for clarity.
-
-Wed May 13 13:05:34 1998 Craig Burley <burley@gnu.org>
-
- * Make-lang.in (G77STAGESTUFF): Add g77.o, g77spec.o,
- and g77version.o.
- (f77.clean): Add removal of g77.c, g77.o, g77spec.o,
- and g77version.o.
- (f77.distclean): Delete removal of g77.c.
-
-Thu Apr 30 18:59:43 1998 Jim Wilson <wilson@cygnus.com>
-
- * Make-lang.in (g77.info, g77.dvi, BUGS, INSTALL, NEWS): Put -o
- option before input file.
-
-Tue Apr 28 09:23:10 1998 Craig Burley <burley@gnu.org>
-
- Fix 980427-0.f:
- * global.c (ffeglobal_ref_progunit_): When transitioning
- from EXT to FUNC, discard hook, since the decl, if any, is
- probably wrong.
-
-Sun Apr 26 09:05:50 1998 Craig Burley <burley@gnu.org>
-
- * com.c (ffecom_char_enhance_arg_): Wrap the upper bound
- (the PARM_DECL specifying the length of the CHARACTER*(*)
- dummy arg) in a variable_size invocation, to prevent
- dwarf2out.c crashing when compiling code with -g.
-
-Sat Apr 18 05:03:21 1998 Craig Burley <burley@gnu.org>
-
- * com.c (ffecom_check_size_overflow_): Ignore overflow
- as well if dummy argument.
-
-Fri Apr 17 17:18:04 1998 Craig Burley <burley@gnu.org>
-
- * version.h: Get rid of the overly large headers
- here too, as done in version.c.
-
-Tue Apr 14 14:40:40 1998 Craig Burley <burley@gnu.org>
-
- * com.c (ffecom_start_progunit_): Mark function decl
- as used, to avoid spurious warning (-Wunused) for ENTRY.
-
-Tue Apr 14 14:19:34 1998 Craig Burley <burley@gnu.org>
-
- * sta.c (ffesta_second_): Check for CASE DEFAULT
- as well as CASE, or it won't be recognized.
-
-Mon Mar 23 21:20:35 1998 Craig Burley <burley@gnu.org>
-
- * version.c: Reduce to a one-line file, like
- gcc's version.c, since there's really no content
- there.
-
-Mon Mar 23 11:58:43 1998 Craig Burley <burley@gnu.org>
-
- * bugs.texi: Various updates.
-
- * com.c (ffecom_tree_canonize_ptr_): Fix up spacing a bit.
-
-Mon Mar 16 21:20:35 1998 Craig Burley <burley@gnu.org>
-
- * expr.c (ffeexpr_sym_impdoitem_): Don't blindly
- reset symbol info after calling ffesymbol_error,
- to avoid crash.
-
-Mon Mar 16 15:38:50 1998 Craig Burley <burley@gnu.org>
-
- * Version 0.5.22 released.
-
-Mon Mar 16 14:36:02 1998 Craig Burley <burley@gnu.org>
-
- Make -g work better for ENTRY:
- * com.c (ffecom_start_progunit_): Master function
- for ENTRY-laden procedure is not really invented,
- so it can be debugged.
- (ffecom_do_entry_): Push/set/pop lineno for each
- entry point.
-
-Sun Mar 15 05:48:49 1998 Craig Burley <burley@gnu.org>
-
- * intrin.def: Fix spelling of mixed-case form
- of `CPU_Time' (was `Cpu_Time').
-
-Thu Mar 12 13:50:21 1998 Craig Burley <burley@gnu.org>
-
- * lang-options.h: Sort all -f*-intrinsics-* options,
- for consistency with other g77 versions.
-
-1998-03-09 Dave Love <d.love@dl.ac.uk>
-
- * Make-lang.in: Set CONFIG_SITE to a non-existent file since
- /dev/null loses with bash 2.0/autoconf 2.12. Put
- F77_FLAGS_TO_PASS before CC.
-
-Sun Mar 8 16:35:34 1998 Craig Burley <burley@gnu.org>
-
- * intrin.def: Use tabs instead of blanks more
- consistently (excepting DEFGEN section for now).
-
-Sat Feb 28 15:24:38 1998 Craig Burley <burley@gnu.org>
-
- * intrin.def: Make CPU_TIME's arg generic real to be just
- like SECOND_subr.
-
-Fri Feb 20 12:45:53 1998 Craig Burley <burley@gnu.org>
-
- * expr.c (ffeexpr_token_arguments_): Make sure
- outer exprstack isn't null.
-
-1998-02-16 Dave Love <d.love@dl.ac.uk>
-
- * Makefile.in (f/fini): Don't use -W -Wall with HOST_CC.
-
-Fri Feb 13 00:14:56 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * com.c (type_for_mode): Add explicit braces to avoid ambiguous `else'.
-
- * expr.c (ffeexpr_type_combine): Likewise.
- (ffeexpr_reduce_): Likewise.
- (ffeexpr_declare_parenthesized_): Likewise.
-
- * src.c (ffesrc_strcmp_1ns2i): Likewise.
- (ffesrc_strcmp_2c): Likewise.
- (ffesrc_strncmp_2c): Likewise.
-
- * stb.c (ffestb_halt1_): Likewise.
- (ffestb_R90910_): Likewise.
- (ffestb_R9109_): Likewise.
-
- * stc.c (ffestc_R544_equiv_): Likewise.
-
- * std.c (ffestd_subr_copy_easy_): Likewise.
- (ffestd_R1001dump_): Likewise.
- (ffestd_R1001dump_1005_1_): Likewise.
- (ffestd_R1001dump_1005_2_): Likewise.
- (ffestd_R1001dump_1005_3_): Likewise.
- (ffestd_R1001dump_1005_4_): Likewise.
- (ffestd_R1001dump_1005_5_): Likewise.
- (ffestd_R1001dump_1010_2_): Likewise.
-
- * ste.c (ffeste_R840): Likewise.
-
- * sts.c (ffests_puttext): Likewise.
-
- * symbol.c (ffesymbol_check_token_): Likewise.
-
- * target.c (ffetarget_real1): Likewise.
- (ffetarget_real2): Likewise.
-
-Sun Jan 25 12:32:15 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * Make-lang.in (f77.stage1): Depend on stage1-start so parallel
- make works better.
- * (f77.stage2): Likewise for stage2-start.
- * (f77.stage3): Likewise for stage3-start.
- * (f77.stage4): Likewise for stage4-start.
-
-Sun Jan 11 02:14:47 1998 Craig Burley <burley@gnu.org>
-
- Support FORMAT(I<1+2>) (constant variable-FORMAT
- expressions):
- * bad.def (FFEBAD_FORMAT_VARIABLE): New diagnostic.
- * std.c (ffestd_R1001rtexpr_): New function.
- (ffestd_R1001dump_, ffestd_R1001dump_1005_1_,
- ffestd_R1001dump_1005_2_, ffestd_R1001dump_1005_3_,
- ffestd_R1001dump_1005_4_, ffestd_R1001dump_1005_5_,
- ffestd_R1001dump_1010_2_, ffestd_R1001dump_1010_3_,
- ffestd_R1001dump_1010_4_, ffestd_R1001dump_1010_5_):
- Use new function instead of ffestd_R1001error_.
-
- * stb.c (ffestb_R10014_, ffestb_R10016_, ffestb_R10018_,
- ffestb_R100110_): Restructure `for' loop for style.
-
- Fix 970626-2.f by not doing most back-end processing
- when current_function_decl is an ERROR_MARK, and by
- making that the case when its type would be an ERROR_MARK:
- * com.c (ffecom_start_progunit_, finish_function,
- lang_printable_name, start_function,
- ffecom_finish_symbol_transform_): Test for ERROR_MARK.
- * std.c (ffestd_stmt_pass_): Don't do any downstream
- processing if ERROR_MARK.
-
- * Make-lang.in (f77.install-common): Don't install, and
- don't uninstall existing, Info files if f/g77.info
- doesn't exit. (This is a somewhat modified version
- of an egcs patch on 1998-01-07 12:05:51 by Bruno Haible
- <bruno@linuix.mathematik.uni-karlsruhe.de>.)
-
-Fri Jan 9 19:09:07 1998 Craig Burley <burley@gnu.org>
-
- Fix -fpedantic combined with `F()' invocation,
- also -fugly-comma combined with `IARGC()' invocation:
- * bad.def (FFEBAD_NULL_ARGUMENT_W): New diagnostic.
- * expr.c (ffeexpr_finished_): Don't reject null expressions
- in the argument-expression context -- let outer context
- handle that.
- (ffeexpr_token_arguments_): Warn about null expressions
- here if -fpedantic (as appropriate).
- Obey -fugly-comma for only external-procedure invocations.
- * intrin.c (ffeintrin_check_): No longer ignore explicit
- omitted trailing args.
-
-Tue Dec 23 14:58:04 1997 Craig Burley <burley@gnu.org>
-
- * intrin.c (ffeintrin_fulfill_generic): Don't generate
- FFEBAD_INTRINSIC_TYPE for CHARACTER*(*) intrinsic.
-
- * com.c (ffecom_gfrt_basictype):
- (ffecom_gfrt_kindtype):
- (ffecom_make_gfrt_):
- (FFECOM_rttypeVOIDSTAR_): New return type `void *', for
- the SIGNAL intrinsic.
- * com-rt.def (FFECOM_rttypeSIGNAL): Now returns `void *'.
- * intdoc.c: Replace `p' kind specifier with `7'.
- * intrin.c (ffeintrin_check_, ffeintrin_init_0): Replace
- `p' kind specifier with `7'.
- * intrin.def (FFEINTRIN_impLOC, FFEINTRIN_impSIGNAL_func,
- FFEINTRIN_impSIGNAL_subr): Replace `p' specifier with `7'.
- Also, SIGNAL now returns a `void *' status, not `int'.
-
- Improve run-time diagnostic for "PRINT '(I1', 42":
- * com.c (ffecom_char_args_x_): Renamed from ffecom_char_args_,
- which is now a macro (to avoid lots of changes to other code)
- with new arg, ffecom_char_args_with_null_ being another new
- macro to call same function with different value for new arg.
- This function now appends a null byte to opCONTER expression
- if the new arg is TRUE.
- (ffecom_arg_ptr_to_expr): Support NULL length pointer.
- * ste.c (ffeste_io_cilist_):
- (ffeste_io_icilist_): Pass NULL length ptr for
- FORMAT expression, so null byte gets appended where
- feasible.
- * target.c (ffetarget_character1):
- (ffetarget_concatenate_character1):
- (ffetarget_substr_character1):
- (ffetarget_convert_character1_character1):
- (ffetarget_convert_character1_hollerith):
- (ffetarget_convert_character1_integer4):
- (ffetarget_convert_character1_logical4):
- (ffetarget_convert_character1_typeless):
- (ffetarget_hollerith): Append extra phantom null byte as
- part of FFETARGET-NULL-BYTE kludge.
-
- * intrin.def (FFEINTRIN_impCPU_TIME): Point to
- FFECOM_gfrtSECOND as primary run-time routine.
-
-Mon Dec 22 12:41:07 1997 Craig Burley <burley@gnu.org>
-
- * intrin.c (ffeintrin_init_0): Remove duplicate
- check for `!'.
-
-Sun Dec 14 02:49:58 1997 Craig Burley <burley@gnu.org>
-
- * intrin.c (ffeintrin_init_0): Fix up indentation a bit.
- Fix bug that prevented checking of arguments other
- than the first.
-
- * intdoc.c: Fix up indentation a bit.
-
-Tue Dec 9 16:20:57 1997 Richard Henderson <rth@cygnus.com>
-
- * com.c (ffecom_type_vardesc_): Vardesc.dims is a `ftnlen*'.
-
-Mon Dec 1 19:12:36 1997 Craig Burley <burley@gnu.org>
-
- * intrin.c (ffeintrin_check_): Fix up indentation a bit more.
-
-Mon Dec 1 16:21:08 1997 Craig Burley <burley@gnu.org>
-
- * com.c (ffecom_arglist_expr_): Crash if non-supplied
- optional arg isn't passed as an address.
- Pass null pointer explicitly, instead of via ffecom routine.
- If incoming argstring is NULL, substitute pointer to "0".
- Recognize '0' as ending the usual arg stuff, just like '\0'.
-
-Sun Nov 30 22:22:22 1997 Craig Burley <burley@gnu.org>
-
- * intdoc.c: Minor fix-ups.
-
- * intrin.c (ffeintrin_check_): Fix up indentation a bit.
-
- * intrin.def: Fix up spacing a bit.
-
-1997-11-17 Dave Love <d.love@dl.ac.uk>
-
- * com.c (ffecom_arglist_expr_): Pass null pointers for optional
- args which aren't supplied.
-
-Sun Nov 16 21:45:43 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
-
- * Make-lang.in (f77.install-info): Depend on f77.info.
-
-1997-11-06 Dave Love <d.love@dl.ac.uk>
-
- * intrin.def: Allow non-integer args for INT2 and INT8 (per
- documentation).
-
-Tue Oct 28 02:21:25 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * lang-options.h: Add -fgnu-intrinsics-* and
- -fbadu77-intrinsics-* options.
-
-Sun Oct 26 02:36:21 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (lang_print_error_function): Fix to more
- reliably notice when the diagnosed region changes.
-
-Sat Oct 25 23:43:36 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- Fix 950327-0.f:
- * sta.c, sta.h (ffesta_outpooldisp): New function.
- * std.c (ffestd_stmt_pass_): Don't kill NULL pool.
- (ffestd_R842): If pool already preserved, save NULL
- for pool, because it should be killed only once.
-
- * malloc.c [MALLOC_DEBUG]: Put initializer for `name'
- component in braces, to avoid compiler warning.
-
-Fri Oct 10 13:00:48 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * ste.c (ffeste_begin_iterdo_): Fix loop setup so iteration
- variable is modified only after the #iterations is calculated;
- otherwise if the iteration variable is aliased to any of the
- operands in the start, end, or increment expressions, the
- wrong #iterations might be calculated.
-
- * com.c (ffecom_save_tree): Fix indentation.
-
-1997-10-05 Dave Love <d.love@dl.ac.uk>
-
- * intrin.def: Make SECOND_subr's arg generic real for people
- porting from Cray and making everything double precision.
-
-Mon Sep 29 16:18:21 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * stu.c (ffestu_list_exec_transition_,
- ffestu_dummies_transition_): Specify `bool' type for
- `in_progress' variables.
-
- * com.h (assemble_string): Declare this routine (instead
- of #include'ing "output.h" from gcc) to eliminate warnings
- from lex.c.
-
-Fri Sep 19 01:12:27 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * expr.c (ffeexpr_reduced_eqop2_):
- (ffeexpr_reduced_relop2_): Minor fixes to diagnostic code.
-
- * fini.c (main): Change return type to `int'.
-
-Wed Sep 17 10:47:08 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com-rt.def (FFECOM_gfrtDSIGN, FFECOM_gfrtISIGN,
- FFECOM_gfrtSIGN): Add second argument.
-
- * expr.c (ffeexpr_cb_comma_c_): Trivial fixes.
-
-Tue Sep 9 01:59:35 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * Version 0.5.21 released.
-
-Tue Sep 9 00:31:01 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * intdoc.c (dumpem): Put appropriate commentary in
- output file, so readers know it isn't source.
-
-Wed Aug 27 08:08:25 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * proj.h: Always #include "config.j" first, to pick up
- gcc's configuration.
- * com.c: Change bcopy() and bzero() calls to memcpy()
- and memset() calls, to make more of g77 ANSI C.
-
-1997-08-26 Dave Love <d.love@dl.ac.uk>
-
- * Make-lang.in ($(srcdir)/f/runtime/configure,
- $(srcdir)/f/runtime/libU77/configure): Fix for when srcdir isn't
- relative.
+Fri Jun 25 11:06:32 1999 Craig Burley <craig@jcb-sc.com>
-Tue Aug 26 05:59:21 1997 Craig Burley <burley@gnu.ai.mit.edu>
+ * bugs.texi: Describe K(5)=10*3 NAMELIST-read bug.
- * ansify.c (main): Make sure readers of stdout know
- it's derived from stdin; omit comment text; get source
- line numbers in future stderr output to be correct.
+Mon Jun 21 12:40:17 1999 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
-Tue Aug 26 01:36:01 1997 Craig Burley <burley@gnu.ai.mit.edu>
+ * g77.texi: Update links.
- Fix 970825-0.f:
- * stb.c (ffestb_R5284_): Allow OPEN_PAREN after closing
- SLASH as well as NAME.
+Wed Jun 16 11:43:02 1999 Craig Burley <craig@jcb-sc.com>
-Mon Aug 25 23:48:17 1997 Craig Burley <burley@gnu.ai.mit.edu>
+ * news.texi: Mention BACKSPACE fix to libg2c.
- Changes to allow g77 docs to be built entirely from scratch
- using any ANSI C compiler, not requiring GNU C:
- * Make-lang.in ($(srcdir)/f/intdoc.texi): "Pipe" new
- location of intrinsic documentation data base, f/intdoc.in,
- through new `ansify' program to append `\n\' to quoted
- newlines, into f/intdoc.h0. Do appropriate cleanups. Explain.
- (f77.mostlyclean): Add f/ansify and f/intdoc.h0 to cleanups.
- * f/ansify.c: New program.
- * f/intdoc.c: Fix so it conforms to ANSI C.
- #include f/intdoc.h0 instead of f/intdoc.h.
- Avoid some warnings.
- * f/intdoc.h, f/intdoc.in: Rename the former to the latter; no
- changes made to the content in this patch!
- * f/intrin.h (ffeintrinFamily): Fix to conform to ANSI C.
+Mon Jun 7 08:42:40 1999 Craig Burley <craig@jcb-sc.com>
-Sun Aug 24 06:52:48 1997 Craig Burley <burley@gnu.ai.mit.edu>
+ * Make-lang.in: Any target using libsubdir must depend
+ on installdirs.
- Fix up g77 compiler data base for libf2c routines:
- * com-rt.def (FFECOM_gfrtSIGNAL): Change return type to
- FTNINT to match actual code.
+Sat Jun 5 23:50:36 1999 Craig Burley <craig@jcb-sc.com>
- * com.c (ffecomRttype_): Replace FFECOM_rttypeINT_ with
- FFECOM_rttypeFTNINT_.
- Add and fix up comments.
- (ffecom_make_gfrt_, ffecom_gfrt_basictype,
- ffecom_gfrt_kindtype): Replace FFECOM_rttypeINT_ with
- FFECOM_rttypeFTNINT_; add FFECOM_rttypeDOUBLEREAL_.
+ * g77.texi: Describe a few more missing features people
+ have emailed me about.
-Wed Aug 20 17:18:40 1997 Craig Burley <burley@gnu.ai.mit.edu>
+Sat Jun 5 17:03:23 1999 Craig Burley <craig@jcb-sc.com>
- * global.c (ffeglobal_ref_progunit_): It's okay to have
- a different CHARACTER*n length for a reference if the
- existing length is for another reference, not a definition.
+ 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.
-Mon Aug 18 14:27:18 1997 Craig Burley <burley@gnu.ai.mit.edu>
+Fri Jun 4 13:56:56 1999 Craig Burley <craig@jcb-sc.com>
- Fix 970814-0.f:
- * global.c (ffeglobal_new_progunit_): Distinguish
- between previously defined, versus inferred, filewide
- when it comes to diagnostics.
-
- Fix 970816-1.f:
- * global.c (ffeglobal_ref_progunit_): Change BDATA into EXT
- right at the beginning, so EXTERNAL FOO followed later
- by SUBROUTINE FOO is not diagnosed.
+ * Make-lang.in: Use libsubdir, not prefix, to store
+ temporary lang-f77 `flag' file.
- Fix 970813-0.f:
- * com-rt.def (FFECOM_gfrtALARM): Returns `integer', not
- `void'.
+Fri Jun 4 10:26:04 1999 Craig Burley <craig@jcb-sc.com>
-Sun Aug 17 03:32:44 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- Fix up problems when virtual memory exhausted:
- * malloc.c (malloc_new_): Use gcc's xmalloc(), so we
- print a nicer message when malloc returns no memory.
- (malloc_resize_): Ditto for xrealloc().
-
- * Make-lang.in, Makefile.in: Comment out lines containing
- just formfeeds.
-
-Sat Aug 16 19:41:33 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_make_gfrt_): For rttypeREAL_F2C_, return
- double_type_node; for rttypeREAL_GNU_, return
- _real_type_node.
-
-1997-08-13 Dave Love <d.love@dl.ac.uk>
-
- * config-lang.in (diff_excludes): Add some hints about known
- problematic platforms.
-
-1997-08-13 Dave Love <d.love@dl.ac.uk>
-
- * intdoc.h: Document `alarm'.
-
-Mon Aug 11 21:19:22 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * Make-lang.in ($(RUNTIMESTAGESTUFF)): Add
- f/runtime/stamp-lib.
-
-Mon Aug 11 01:52:03 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_build_complex_constant_): Go with the
- new build_complex() approach used in gcc-2.8.
-
- * com.c (ffecom_sym_transform_): Don't set
- DECL_IN_SYSTEM_HEADER for a tree node that isn't
- a VAR_DECL, which happens when var is in common!
-
- * com.c (ffecom_expr_intrinsic_) (case FFEINTRIN_impALARM):
- No need to test codegen_imp -- there's only one valid here.
-
- * intrin.def (FFEINTRIN_impALARM): Specify `Status' argument
- as write-only.
-
-Fri Aug 8 05:40:23 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- Substantial changes to accommodate distinctions among
- run-time routines that support intrinsics, and between
- routines that compute and return the same type vs. those
- that compute one type and return another (or `void'):
- * com-rt.def: Specify new return type REAL_F2C_ instead
- of many DOUBLE_, COMPLEX_F2C_ instead of COMPLEX_, and
- so on.
- Clear up the *BES* routines "once and for all".
- * com.c: New return types.
- (ffecom_convert_narrow_, ffecom_convert_widen_):
- New functions that are "safe" variants of convert(),
- to catch errors that ffecom_expr_intrinsic_() now
- no longer catches.
- (ffecom_arglist_expr_): Ensure arguments are not
- converted to narrower types.
- (ffecom_call_): Ensure return value is not converted
- to a wider type.
- (ffecom_char_args_): Use new ffeintrin_gfrt_direct()
- routine.
- (ffecom_expr_intrinsic_): Simplify how run-time
- routine is selected (via `gfrt' only now; lose the
- redundant `ix' variable).
- Eliminate the `library' label; any code that doesn't
- return directly just `break's out now with `gfrt'
- set appropriately.
- Set `gfrt' to default choice initially, either a
- fast direct form or, if not available, a slower
- indirect-callable form.
- (ffecom_make_gfrt_): No longer need to do special
- check for complex; it's built into the new return-type
- regime.
- (ffecom_ptr_to_expr): Use new ffeintrin_gfrt_indirect()
- routine.
- * intrin.c, intrin.h: `gfrt' field replaced with three fields,
- so it is easier to provide faster direct-callable and
- GNU-convention indirect-callable routines in the future.
- DEFIMP macro adjusted accordingly, along with all its uses.
- (ffeintrin_gfrt_direct): New function.
- (ffeintrin_gfrt_indirect): Ditto.
- (ffeintrin_is_actualarg): If `-fno-f2c' is in effect,
- require a GNU-callable version of intrinsic instead of
- an f2c-callable version, so indirect calling is still checked.
- * intrin.def: Replace one GFRT field with the three new fields,
- as appropriate for each DEFIMP intrinsic.
-
- * com.c (ffecom_stabilize_aggregate_,
- ffecom_convert_to_complex_): Make these `static'.
-
-Thu Aug 7 11:24:34 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- Provide means for front end to determine actual
- "standard" return type for an intrinsic if it is
- passed as an actual argument:
- * com.h, com.c (ffecom_gfrt_basictype,
- ffecom_gfrt_kindtype): New functions.
- (ffecom_gfrt_kind_type_): Replaced with new function.
- All callers updated.
- (ffecom_make_gfrt_): No longer need do anything
- with kind type.
-
- * intrin.c (ffeintrin_basictype, ffeintrin_kindtype):
- Now returns correct type info for specific intrinsic
- (based on type of run-time-library implementation).
-
-Wed Aug 6 23:08:46 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * global.c (ffeglobal_ref_progunit_): Don't reset
- number of arguments just due to new type info,
- so useful warnings can be issued.
-
-1997-08-06 Dave Love <d.love@dl.ac.uk>
-
- * intrin.def: Fix IDATE_vxt argument order.
- * intdoc.h: Likewise.
-
-Thu Jul 31 22:22:03 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * global.c (ffeglobal_proc_ref_arg): If REF/DESCR
- disagreement, DESCR is CHARACTER, and types disagree,
- pretend the argsummary agrees so the message ends up
- being about type disagreement.
- (ffeglobal_proc_def_arg): Ditto.
-
- * expr.c (ffeexpr_token_first_rhs_3_): Set info for LABTOK
- to NONE of everything, to avoid misdiagnosing filewide
- usage of alternate returns.
-
-Sun Jul 20 23:07:47 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_sym_transform_): If type gets set
- to error_mark_node, just return that for transformed symbol.
- (ffecom_member_phase2_): If type gets set to error_mark_node,
- just return.
- (ffecom_check_size_overflow_): Add `dummy' argument to
- flag that type is for a dummy, update all callers.
-
-Sun Jul 13 17:40:53 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- Fix 970712-1.f:
- * where.c (ffewhere_set_from_track): If start point
- is too large, just use initial start point. 0.6 should
- fix all this properly.
-
- Fix 970712-2.f:
- * com.c (ffecom_sym_transform_): Preserve error_mark_node for type.
- (ffecom_type_localvar_): Ditto.
- (ffecom_sym_transform_): If type is error_mark_node,
- don't error-check decl size, because back end responds by
- setting that to an integer 0 instead of error_mark_node.
- (ffecom_transform_common_): Same as earlier fix to _transform_
- in that size is checked by dividing BITS_PER_UNIT instead of
- multiplying.
- (ffecom_transform_equiv_): Ditto.
-
- Fix 970712-3.f:
- * stb.c (ffestb_R10014_): Fix flaky fall-through in error
- test for FFELEX_typeCONCAT by just replicating the code,
- and do FFELEX_typeCOLONCOLON while at it.
-
-1997-07-07 Dave Love <d.love@dl.ac.uk>
-
- * intdoc.h: Add various missing pieces; correct GMTIME, LTIME
- result ordering.
-
- * intrin.def, com-rt.def: Add alarm.
-
- * com.c (ffecom_expr_intrinsic_): Add case for alarm.
-
-Thu Jun 26 04:19:40 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- Fix 970302-3.f:
- * com.c (ffecom_sym_transform_): For sanity-check compare
- of gbe size of local variable to g77 expectation,
- use varasm.c/assemble_variable technique of dividing
- BITS_PER_UNIT out of gbe info instead of multiplying
- g77 info up, to avoid crash when size in bytes is very
- large, and overflows an `int' or similar when multiplied.
-
- Fix 970626-2.f:
- * com.c (ffecom_finish_symbol_transform_): Don't bother
- transforming a dummy argument, to avoid a crash.
- * ste.c (ffeste_R1227): Don't return a value if the
- result decl, or its type, is error_mark_node.
-
- Fix 970626-4.f:
- * lex.c (ffelex_splice_tokens): `-fdollar-ok' is
- irrelevant to whether a DOLLAR token should be made
- from an initial character of `$'.
-
- Fix 970626-6.f:
- * stb.c (ffestb_do3_): DO iteration variable is an
- lhs, not rhs, expression.
-
- Fix 970626-7.f and 970626-8.f:
- * expr.c (ffeexpr_cb_comma_i_1_): Set IMPDO expression
- to have clean info, because undefined rank, for example,
- caused crash on mangled source on UltraSPARC but not
- on Alpha for a series of weird reasons.
- (ffeexpr_cb_close_paren_): If not CLOSE_PAREN, push
- opANY expression onto stack instead of attempting
- to mimic what program might have wanted.
- (ffeexpr_cb_close_paren_): Don't wrap opPAREN around
- opIMPDO, just warn that it's gratuitous.
- * bad.def (FFEBAD_IMPDO_PAREN): New warning.
-
- Fix 970626-9.f:
- * expr.c (ffeexpr_declare_parenthesized_): Must shut down
- parsing in kindANY case, otherwise the parsing engine might
- decide there's an ambiguity.
- (ffeexpr_token_name_rhs_): Eliminate parentypeSUBROUTINE_
- case, so we crash right away if it comes through.
- * st.c, st.h, sta.c, sta.h (ffest_shutdown, ffesta_shutdown):
- New functions.
-
-Tue Jun 24 19:47:29 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_check_size_overflow_): New function
- catches some cases of the size of a type getting
- too large. varasm.c must catch the rest.
- (ffecom_sym_transform_): Use new function.
- (ffecom_type_localvar_): Ditto.
-
-Mon Jun 23 01:09:28 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * global.c (ffeglobal_proc_def_arg): Fix comparison
- of argno to #args.
- (ffeglobal_proc_ref_arg): Ditto.
-
- * lang-options.h, top.c: Rename `-fdebug' to `-fxyzzy',
- since it's an unsupported internals option and some
- poor user might guess that it does something.
-
- * bad.def: Make a warning for each filewide diagnostic.
- Put all filewides together.
- * com.c (ffecom_sym_transform_): Don't substitute
- known global tree for global entities when `-fno-globals'.
- * global.c (ffeglobal_new_progunit_): Don't produce
- fatal diagnostics about globals when `-fno-globals'.
- Instead, produce equivalent warning when `-Wglobals'.
- (ffeglobal_proc_ref_arg): Ditto.
- (ffeglobal_proc_ref_nargs): Ditto.
- (ffeglobal_ref_progunit_): Ditto.
- * lang-options.h, top.c, top.h: New `-fno-globals' option.
-
-Sat Jun 21 12:32:54 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * expr.c (ffeexpr_fulfill_call_): Set array variable
- to avoid warning about uninitialized variable.
-
- * Make-lang.in: Get rid of any setting of HOST_* macros,
- since these will break gcc's build!
- * makefile: New file to make building derived files
- easier.
-
-Thu Jun 19 18:19:28 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * g77.c (main): Install Emilio Lopes' patch to support
- Ratfor, and to fix the printing of the version string
- to go to stderr, not stdout.
- * lang-specs.h: Install Emilio Lopes' patch to support
- Ratfor, and patch the result to support picking up
- `*f771' from the `specs' file.
-
-Thu Jun 12 14:36:25 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * storag.c (ffestorag_update_init, ffestorag_update_save):
- Also update parent, in case equivalence processing
- has already eliminated pointers to it via the
- local equivalence info.
-
-Tue Jun 10 14:08:26 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * intdoc.c: Add cross-reference to end of description
- of any generic intrinsic pointing to other intrinsics
- with the same name.
-
- Warn about explicit type declaration for intrinsic
- that disagrees with invocation:
- * expr.c (ffeexpr_paren_rhs_let_): Preserve type info
- for intrinsic functions.
- (ffeexpr_token_funsubstr_): Ditto.
- * intrin.c (ffeintrin_fulfill_generic): Warn if type
- info of fulfilled intrinsic invocation disagrees with
- explicit type info given symbol.
- (ffeintrin_fulfill_specific): Ditto.
- * stc.c (ffestc_R1208_item): Preserve type info
- for intrinsics.
- (ffestc_R501_item): Ditto.
-
-Mon Jun 9 17:45:44 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_expr_intrinsic_): Fix several of the
- libU77/libF77-unix handlers to properly convert their
- arguments.
-
- * com-rt.def (FFECOM_gfrtFSTAT): Append missing "i" to
- arg string.
-
-Fri Jun 6 14:37:30 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_expr_intrinsic_): Have a case statement
- for every intrinsic implementation, so missing ones
- are caught via gcc warnings.
- Don't call ffeintrin_codegen_imp anymore.
- * intrin.c (ffeintrin_fulfill_generic): Remove cg_imp
- stuff from here.
- (ffeintrin_codegen_imp): Delete this function.
- * intrin.def, intrin.h: Remove DEFIMQ stuff from here
- as well.
-
-Thu Jun 5 13:03:07 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * top.c (ffe_decode_option): New -fbadu77-intrinsics-*
- options.
- * top.h: Ditto.
- * intrin.h: New BADU77 family.
- * intrin.c (ffeintrin_state_family): Ditto.
-
- Implement new scheme to track intrinsic names vs. forms:
- * intrin.c (ffeintrin_fulfill_generic),
- (ffeintrin_fulfill_specific), (ffeintrin_is_intrinsic),
- intrin.def: The documented name is now either in the
- generic info or, if no generic, in the specific info.
- For a generic, the specific info contains merely the
- distinguishing form (usually "function" or "subroutine"),
- used for diagnostics about ambiguous references and
- in the documentation.
-
- * intrin.def: Clean up formatting of DEFNAME block.
- Convert many libU77 intrinsics into generics that
- support both subroutine and function forms.
- Put the function forms of side-effect routines into
- the new BADU77 family.
- Make MCLOCK and TIME return INTEGER*4 again, and add
- INTEGER*8 equivalents called MCLOCK8 and TIME8.
- Fix up more status return values to be written and
- insist on them being I1 as well.
- * com.c (ffecom_expr_intrinsic_): Lots of changes to
- support new libU77 intrinsic interfaces.
-
-Mon Jun 2 00:37:53 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_init_0): Pointer type is now INTEGER(KIND=7),
- not INTEGER(KIND=0), since we want to reserve KIND=0 for
- future use.
-
-Thu May 29 14:30:33 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- Fix bugs preventing CTIME(I*4) from working correctly:
- * com.c (ffecom_char_args_): For FUNCREF case, process
- args to intrinsic just as they would be in
- ffecom_expr_intrinsic_.
- * com-rt.def (FFECOM_gfrtCTIME, FFECOM_gfrtTTYNAM): Fix
- argument decls to specify `&'.
-
-Wed May 28 22:19:49 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- Fix gratuitous warnings exposed by dophot aka 970528-1:
- * global.c (ffeglobal_proc_def_arg, ffeglobal_proc_ref_arg):
- Support distinct function/subroutine arguments instead of
- just procedures.
- * global.h: Ditto.
- * expr.c (ffeexpr_fulfill_call_): A SYMTER with kindNONE
- also is a procedure (either function or subroutine).
-
-Mon May 26 20:25:31 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * bad.def: Have several lexer diagnostics refer to
- documentation for people who need more info on what Fortran
- source code is supposed to look like.
-
- * expr.c (ffeexpr_reduced_bool1_), bad.def: New diagnostics
- specific to .NOT. now mention only one operand instead
- of two.
-
- * g77.c: Recognize -fsyntax-only, similar to -c etc.
- (lookup_option): Fix bug that prevented non-`--' options
- from being recognized.
-
-Sun May 25 04:29:04 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * intrin.def (FFEINTRIN_impCTIME): Accept `I*' expression
- for STime instead of requiring `I2'.
-
-Tue May 20 16:14:40 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * symbol.c (ffesymbol_reference): All references to
- standard intrinsics are considered explicit, so as
- to avoid generating basically useless warnings.
- * intrin.c, intrin.h (ffeintrin_is_standard): Returns TRUE
- if intrinsic is standard.
-
-Sun May 18 21:14:59 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com-rt.def: Changed all external names of the
- form `"\([a-z0-9]*\)_' to `"G77_\1_0"' so as to
- allow any name valid as an intrinsic to be used
- as such and as a user-defined external procedure
- name or common block as well.
-
-Thu May 8 13:07:10 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * expr.c (ffeexpr_cb_end_notloc_): For %VAL, %REF, and
- %DESCR, copy arg info into new node.
-
-Mon May 5 14:42:17 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- From Uwe F. Mayer <mayer@math.Vanderbilt.Edu>:
- * Make-lang.in (g77-cross): Fix typo in g77.c path.
-
- From Brian McIlwrath <bkm@star.rl.ac.uk>:
- * lang-specs.h: Have g77 pick up options from a section
- labeled `*f771' of the `specs' file.
-
-Sat May 3 02:46:08 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * intrin.def (FFEINTRIN_defSIGNAL): Add optional `Status'
- argument that com.c already expects (per Dave Love).
-
- More changes to support better tracking of (filewide)
- globals, in particular, the arguments to procedures:
- * bad.def (FFEBAD_FILEWIDE_NARGS, FFEBAD_FILEWIDE_NARGS_W,
- FFEBAD_FILEWIDE_ARG, FFEBAD_FILEWIDE_ARG_W): New diagnostics.
- * expr.c (ffebad_fulfill_call_): Provide info on each
- argument to ffeglobal.
- * global.c, global.h (ffeglobal_proc_def_arg,
- ffeglobal_proc_def_nargs, ffeglobal_proc_ref_arg,
- ffeglobal_proc_ref_args): New functions.
- (ffeglobalArgSummary, ffeglobalArgInfo_): New types.
-
-Tue Apr 29 18:35:41 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- More changes to support better tracking of (filewide)
- globals:
- * expr.c (ffeexpr_fulfill_call_): New function.
- (ffeexpr_token_name_lhs_): Call after building procedure
- reference expression. Also leave info field for ANY-ized
- expression alone.
- (ffeexpr_token_arguments_): Ditto.
-
-Mon Apr 28 20:04:18 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- Changes to support better tracking of (filewide)
- globals, mainly to avoid crashes due to inlining:
- * bad.def: Go back to quoting intrinsic names,
- (FFEBAD_FILEWIDE_DISAGREEMENT, FFEBAD_FILEWIDE_TIFF,
- FFEBAD_FILEWIDE_TYPE_MISMATCH): New diagnostics.
- (FFEBAD_INTRINSIC_EXPIMP, FFEBAD_INTRINSIC_GLOBAL): Reword
- for clarity.
- * com.c (ffecom_do_entry_, ffecom_start_progunit_,
- ffecom_sym_transform_): Accommodate new FFEGLOBAL_typeEXT
- possibility.
- * expr.c (ffeexpr_sym_lhs_call_, ffeexpr_sym_lhs_extfunc_,
- ffeexpr_sym_rhs_actualarg_, ffeexpr_declare_parenthesized_,
- ffeexpr_paren_rhs_let_, ffeexpr_token_funsubstr_):
- Fill in real kind info instead of leaving NONE where
- appropriate.
- Register references to intrinsics and globals with ffesymbol
- using new ffesymbol_reference function instead of
- ffesymbol_globalize.
- * global.c (ffeglobal_type_string_): New array for
- new diagnostics.
- * global.h, global.c:
- Replace ->init mechanism with ->tick mechanism.
- Move other common-related members into a substructure of
- a union, so the proc substructure can be introduced
- to include members related to externals other than commons.
- Don't complain about ANY-ized globals; ANY-ize globals
- once they're complained about, in any case where code
- generation could become a problem.
- Handle global entries that have NONE type (seen as
- intrinsics), EXT type (seen as EXTERNAL), and so on.
- Keep track of kind and type of externals, both via
- definition and via reference.
- Diagnose disagreements about kind or type of externals
- (such as functions).
- (ffeglobal_ref_intrinsic, ffeglobal_ref_progunit_): New
- functions.
- * stc.c (ffestc_R1207_item, ffestc_R1208_item,
- ffestc_R1219, ffestc_R1226):
- Call ffesymbol_reference, not ffesymbol_globalize.
- * stu.c (ffestu_sym_end_transition,
- ffestu_sym_exec_transition):
- Call ffesymbol_reference, not ffesymbol_globalize.
- * symbol.c (ffesymbol_globalize): Removed...
- (ffesymbol_reference): ...to this new function,
- which more generally registers references to symbols,
- globalizes globals, and calls on the ffeglobal module
- to check globals filewide.
-
- * global.h, global.c: Rename some macros and functions
- to more clearly distinguish common from other globals.
- All callers changed.
-
- * com.c (ffecom_sym_transform_): Trees describing
- filewide globals must be allocated on permanent obstack.
-
- * expr.c (ffeexpr_token_name_lhs_): Don't generate
- gratuitous diagnostics for FFEINFO_whereANY case.
-
-Thu Apr 17 03:27:18 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * global.c: Add support for flagging intrinsic/global
- confusion via warnings.
- * bad.def (FFEBAD_INTRINSIC_EXPIMP,
- FFEBAD_INTRINSIC_GLOBAL): New diagnostics.
- * expr.c (ffeexpr_token_funsubstr_): Ditto.
- (ffeexpr_sym_lhs_call_): Ditto.
- (ffeexpr_paren_rhs_let_): Ditto.
- * stc.c (ffestc_R1208_item): Ditto.
-
-Wed Apr 16 22:40:56 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * expr.c (ffeexpr_declare_parenthesized_): INCLUDE
- context can't be an intrinsic invocation either.
-
-Fri Mar 28 10:43:28 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * expr.c (ffeexpr_token_arguments_): Make sure top of
- exprstack is operand before dereferencing operand field.
-
- * lex.c (ffelex_prepare_eos_): Fill up truncated
- hollerith token, so crash on null ->text field doesn't
- happen later.
-
- * stb.c (ffestb_R10014_): If NAMES isn't recognized (or
- the recognized part is followed in the token by a
- non-digit), don't try and collect digits, as there
- might be more than FFEWHERE_indexMAX letters to skip
- past to do so -- and the code is diagnosed anyway.
-
-Thu Mar 27 00:02:48 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_sym_transform_): Force local
- adjustable array onto stack.
-
- * stc.c (ffestc_R547_item_object): Don't actually put
- the symbol in COMMON if the symbol has already been
- EQUIVALENCE'd to a different COMMON area.
-
- * equiv.c (ffeequiv_add): Don't actually do anything
- if there's a disagreement over which COMMON area is
- involved.
-
-Tue Mar 25 03:35:19 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_transform_common_): If no explicit init
- of COMMON area, don't actually init it even though
- storage area suggests it.
-
-Mon Mar 24 12:10:08 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * lex.c (ffelex_image_char_): Avoid overflowing the
- column counter itself, as well as the card image.
-
- * where.c (ffewhere_line_new): Cast ffelex_line_length()
- to (size_t) so 255 doesn't overflow to 0!
-
- * stc.c (ffestc_labeldef_notloop_begin_): Don't gratuitously
- terminate loop before processing statement, so block
- doesn't disappear out from under EXIT/CYCLE processing.
- (ffestc_labeldef_notloop_): Has old code from above
- function, instead of just calling it.
-
- * expr.c (ffeexpr_cb_comma_i_4_): Don't skip over
- arbitrary token (such as EOS).
-
- * com.c (ffecom_init_zero_): Handle RECORD_TYPE and
- UNION_TYPE so -fno-zeros works with -femulated-complex.
-
-1997-03-12 Dave Love <d.love@dl.ac.uk>
-
- * intrin.def: New intrinsics INT2, INT8, CPU_TIME. Fix AND, OR,
- XOR. [Integrated by burley, AND/OR/XOR already fixed, INT8
- implementation changed/fixed.]
-
-Wed Mar 12 10:40:08 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * Make-lang.in ($(srcdir)/f/intdoc.texi): Simplify rules
- so building f/intdoc is not always necessary; remove
- f/intdoc after running it if it is built.
-
-Tue Mar 11 23:42:00 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * intrin.def (FFEINTRIN_impAND, FFEINTRIN_impOR,
- FFEINTRIN_impXOR): Use the IAND, IOR, and IEOR implementations
- of these, instead of crashing in ffecom_expr_intrinsic_
- or adding case labels there.
-
-Mon Mar 10 22:51:23 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * intdoc.c: Fix so any C compiler can compile this.
-
-Fri Feb 28 13:16:50 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * Version 0.5.20 released.
-
-Fri Feb 28 01:45:25 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * Make-lang.in (RUNTIMESTAGESTUFF, LIBU77STAGESTUFF):
- Move some files incorrectly in the former to the latter,
- and add another file or two to the latter.
-
- New meanings for (KIND=n), and new denotations in the
- little language describing intrinsics:
- * com.c (ffecom_init_0): Assign new meanings.
- * intdoc.c: Document new meanings.
- Support the new denotations.
- * intrin.c: Employ new meanings, mapping them to internal
- values (which are the same as they ever were for now).
- Support the new denotations.
- * intrin.def: Switch DEFIMP table to the new denotations.
-
- * intrin.c (ffeintrin_check_): Fix bug that was leaving
- LOC() and %LOC() returning INTEGER*4 on systems where
- it should return INTEGER*8.
-
- * type.c: Canonicalize function definitions, for etags
- and such.
-
-Wed Feb 26 20:43:03 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_init_0): Choose INTEGER(KIND=n) types,
- where n is 2, 3, and 4, according to the new docs
- instead of according to the old C correspondences
- (which seem less useful at this point).
-
- * equiv.c (ffeequiv_destroy_): New function.
- (ffeequiv_layout_local_): Use this new function
- whenever the laying out of a local equivalence chain
- is aborted for any reason.
- Otherwise ensure that symbols no longer reference
- the stale ffeequiv entries that result when they
- are killed off in this procedure.
- Also, the rooted symbol is one that has storage,
- it really is irrelevant whether it has an equiv entry
- at this point (though the code to remove the equiv
- entry was put in at the end, just in case).
- (ffeequiv_kill): When doing internal checks, make
- sure the victim isn't named by any symbols it points
- to. Not as complete a check as looking through the
- entire symbol table (which does matter, since some
- code in equiv.c used to remove symbols from the lists
- for an ffeequiv victim but not remove that victim as the
- symbol's equiv info), but this check did find some
- real bugs in the code (that were fixed).
-
-Mon Feb 24 16:42:13 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_expr_intrinsic_): Fix a couple of
- warnings about uninitialized variables.
- * intrin.c (ffeintrin_check_): Ditto, but there were
- a couple of _real_ uninitialized-variable _bugs_ here!
- (ffeintrin_fulfill_specific): Ditto, no real bug here.
-
-Sun Feb 23 15:01:20 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- Clean up diagnostics (especially about intrinsics):
- * bad.def (FFEBAD_UNIMPL_STMT): Remove.
- (FFEBAD_INTRINSIC_*, FFEBAD_NEED_INTRINSIC): Clean these
- up so they're friendlier.
- (FFEBAD_INTRINSIC_CMPAMBIG): New.
- * intrin.c (ffeintrin_fulfill_generic,
- ffeintrin_fulfill_specific, ffeintrin_is_intrinsic):
- Always choose
- generic or specific name text (which is for doc purposes
- anyway) over implementation name text (which is for
- internal use).
- * intrin.def: Use more descriptive name texts for generics
- and specifics in cases where the names themselves are not
- enough (e.g. IDATE, which has two forms).
-
- Fix some intrinsic mappings:
- * intrin.def (FFEINTRIN_specIDINT, FFEINTRIN_specAND,
- FFEINTRIN_specDFLOAT, FFEINTRIN_specDREAL, FFEINTRIN_specOR,
- FFEINTRIN_specXOR): Now have their own implementations,
- instead of borrowing from others.
- (FFEINTRIN_specAJMAX0, FFEINTRIN_specAJMIN0, FFEINTRIN_specBJTEST,
- FFEINTRIN_specDFLOTJ, FFEINTRIN_specFLOATJ, FFEINTRIN_specJIABS,
- FFEINTRIN_specJIAND, FFEINTRIN_specJIBCLR, FFEINTRIN_specJIBITS,
- FFEINTRIN_specJIBSET, FFEINTRIN_specJIDIM, FFEINTRIN_specJIDINT,
- FFEINTRIN_specJIDNNT, FFEINTRIN_specJIEOR, FFEINTRIN_specJIFIX,
- FFEINTRIN_specJINT, FFEINTRIN_specJIOR, FFEINTRIN_specJISHFT,
- FFEINTRIN_specJISHFTC, FFEINTRIN_specJISIN, FFEINTRIN_specJMAX0,
- FFEINTRIN_specJMAX1, FFEINTRIN_specJMIN0, FFEINTRIN_specJMIN1,
- FFEINTRIN_specJMOD, FFEINTRIN_specJNINT, FFEINTRIN_specJNOT,):
- Turn these implementations off, since it's not clear
- just what types they expect in the context of portable Fortran.
- (DFLOAT): Now in FVZ family, since f2c supports them
-
- Support intrinsic inquiry functions (BIT_SIZE, LEN):
- * intrin.c: Allow `i' in <arg_extra>.
- * intrin.def (FFEINTRIN_impBIT_SIZE, FFEINTRIN_impLEN):
- Mark args with `i'.
-
-Sat Feb 22 13:34:09 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- Only warn, don't error, for reference to unimplemented
- intrinsic:
- * bad.def (FFEBAD_INTRINSIC_UNIMPLW): Warning version
- of _UNIMPL.
- * intrin.c (ffeintrin_is_intrinsic): Use new warning
- version of _UNIMPL (FFEBAD_INTRINSIC_UNIMPLW).
-
- Complain about REAL(Z) and AIMAG(Z) (Z is DOUBLE COMPLEX):
- * bad.def (FFEBAD_INTRINSIC_CMPAMBIG): New diagnostic.
- * expr.c: Needed #include "intrin.h" anyway.
- (ffeexpr_token_intrincheck_): New function handles delayed
- diagnostic for "REAL(REAL(expr)" if next token isn't ")".
- (ffeexpr_token_arguments_): Do most of the actual checking here.
- * intrin.h, intrin.c (ffeintrin_fulfill_specific): New
- argument, check_intrin, to tell caller that intrin is REAL(Z)
- or AIMAG(Z). All callers updated, mostly to pass NULL in
- for this.
- (ffeintrin_check_): Also has new arg check_intrin for same
- purpose. All callers updated the same way.
- * intrin.def (FFEINTRIN_impAIMAG): Change return type
- from "R0" to "RC", to accommodate f2c (and perhaps other
- non-F90 F77 compilers).
- * top.h, top.c: New option -fugly-complex.
-
- New GNU intrinsics REALPART, IMAGPART, and COMPLEX:
- * com.c (ffecom_expr_intrinsic_): Implement impCOMPLEX
- and impREALPART here. (specIMAGPART => specAIMAG.)
- * intrin.def: Add the intrinsics here.
-
- Rename implementations of VXTIDATE and VXTTIME to IDATEVXT
- and TIMEVXT, so they sort more consistently:
- * com.c (ffecom_expr_intrinsic_):
- * intrin.def:
-
- Delete intrinsic group `dcp', add `gnu', etc.:
- * intrin.c (ffeintrin_state_family): FFEINTRIN_familyGNU
- replaces FFEINTRIN_familyDCP, and gets state from `gnu'
- group.
- Get rid of FFEINTRIN_familyF2Z, nobody needs it.
- Move FFEINTRIN_specDCMPLX from DCP family to FVZ family,
- as f2c has it.
- Move FFEINTRIN_specDFLOAT from F2C family to FVZ family.
- (FFEINTRIN_specZABS, FFEINTRIN_specZCOS, FFEINTRIN_specZEXP,
- FFEINTRIN_specZLOG, FFEINTRIN_specZSIN, FFEINTRIN_specZSQRT):
- Move these from F2Z family to F2C family.
- * intrin.h (FFEINTRIN_familyF2Z, FFEINTRIN_familyDCP): Remove.
- (FFEINTRIN_familyGNU): Add.
- * top.h, top.c: Replace `dcp' with `gnu'.
-
- * com.c (ffecom_expr_intrinsic_): Clean up by collecting
- simple conversions into one nice, conceptual place.
- Fix up some intrinsic subroutines (MVBITS, KILL, UMASK) to
- properly push and pop call temps, to avoid wasting temp
- registers.
-
- * g77.c (doit): Toon says variables should be defined
- before being referenced. Spoilsport.
-
- * intrin.c (ffeintrin_check_): Now Dave's worried about
- warnings about uninitialized variables. Okay, so for
- basic return values 'g' and 's', they _were_
- uninitialized -- is determinism really _that_ useful?
-
- * intrin.def (FFEINTRIN_impFGETC): Fix STATUS argument
- so that it is INTENT(OUT) instead of INTENT(IN).
-
-1997-02-21 Dave Love <d.love@dl.ac.uk>
-
- * intrin.def, com.c: Support Sun-type `short' and `long'
- intrinsics. Perhaps should also do Microcruft-style `int2'.
-
-Thu Feb 20 15:16:53 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_expr_intrinsic_): Clean up indentation.
- Support SECONDSUBR intrinsic implementation.
- Rename SECOND to SECONDFUNC for direct support via library.
-
- * g77.c: Fix to return proper status value to shell,
- by obtaining it from processes it spawns.
-
- * intdoc.c: Fix minor typo.
-
- * intrin.def: Turn SECOND into generic that maps into
- function and subroutine forms.
-
- * intrin.def: Make FLOAT and SNGL into specific intrinsics.
-
- * intrin.def, intrin.h: Change the way DEFGEN and DEFSPEC
- macros work, to save on verbage.
-
-Mon Feb 17 02:08:04 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- New subsystem to automatically generate documentation
- on intrinsics:
- * Make-lang.in ($(srcdir)/f/g77.info,
- $(srcdir)/f/g77.dvi): Move g77 doc rules around.
- Add to g77 doc rules the new subsystem.
- (f77.mostlyclean, f77.maintainer-clean): Also clean up
- after new doc subsystem.
- * intdoc.c, intdoc.h: New doc subsystem code.
- * intrin.h [FFEINTRIN_DOC]: When 1, don't pull in
- stuff not needed by doc subsystem.
-
- Improve on intrinsics mechanism to both be more
- self-documenting and to catch more user errors:
- * intrin.c (ffeintrin_check_): Recognize new arg-len
- and arg-rank information, and check it.
- Move goto and signal indicators to the basic type.
- Permit reference to arbitrary argument number, not
- just first argument (for BESJN and BESYN).
- (ffeintrin_init_0): Check and accept new notations.
- * intrin.c, intrin.def: Value in COL now identifies
- arguments starting with number 0 being the first.
-
- Some minor intrinsics cleanups (resulting from doc work):
- * com.c (ffecom_expr_intrinsic_): Implement FLUSH
- directly once again, handle its optional argument,
- so it need not be a generic (awkward to handle in docs).
- * intrin.def (BESJ0, BESJ1, BESJN, BESY0, BESY1, BESYN,
- CHDIR, CHMOD, CTIME, DBESJ0, DBESJ1, DBESJN, DBESY0,
- DBESY1, DBESYN, DDIM, ETIME, FGETC, FNUM, FPUTC, FSTAT,
- GERROR, GETCWD, GETGID, GETLOG, GETPID, GETUID, GMTIME,
- HOSTNM, IDATE, IERRNO, IIDINT, IRAND, ISATTY, ITIME, JIDINT,
- LNBLNK, LSTAT, LTIME, MCLOCK, PERROR, SRAND, SYMLNK, TTYNAM,
- UMASK): Change capitalization of initcaps (official) name
- to be consistent with Burley's somewhat arbitrary rules.
- (BESJN, BESYN): These have return arguments of same type
- as their _second_ argument.
- (FLUSH): Now a specific, not generic, intrinsic, with one
- optional argument.
- (FLUSH1): Eliminated.
- Add arg-len and arg-rank info to several intrinsics.
- (ITIME): Change argument type from REAL to INTEGER.
-
-Tue Feb 11 14:04:42 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * Make-lang.in (f771): Invocation of Makefile now done
- with $(srcdir)=gcc to go along with $(VPATH)=gcc.
- ($(srcdir)/f/runtime/configure,
- $(srcdir)/f/runtime/libU77/configure): Break these out
- so spurious triggers of this rule don't happen (as when
- configure.in is more recent than libU77/configure).
- (f77.rebuilt): Distinguish source versus build files,
- so this target can be invoked from build directory and
- still work.
- * Makefile.in: This now expects $(srcdir) to be the gcc
- source directory, not gcc/f, to agree with $(VPATH).
- Accordingly, $(INCLUDES) has been fixed, various cruft
- removed, the removal of f771 has been fixed to remove
- the _real_ f771 (not the one in gcc's parent directory),
- and so on.
-
- * lex.c: Part of ffelex_finish_statement_() now done
- by new function ffelex_prepare_eos_(), so that, in one
- popular case, the EOS can be prepared while the pointer
- is at the end of the non-continued line instead of the
- end of the line that marks no continuation. This improves
- the appearance of diagnostics substantially.
-
-Mon Feb 10 12:44:06 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * Make-lang.in: runtime Makefile's, and include/f2c.h,
- also depend on f/runtime/configure and f/runtime/libU77/configure.
-
- Fix various libU77 routines:
- * com-rt.def (FFECOM_gfrtCTIME, FFECOM_gfrtMCLOCK,
- FFECOM_gfrtTIME): These now use INTEGER*8 for time values,
- for compatibility with systems like Alpha.
- (FFECOM_gfrtSYSTEM_CLOCK, FFECOM_gfrtTTYNAM): Delete incorrect
- trailing underscore in routine names.
- * intrin.c, intrin.def: Support INTEGER*8 return values and
- arguments ('4'). Change FFEINTRIN_impCTIME, FFEINTRIN_impMCLOCK,
- and FFEINTRIN_impTIME accordingly.
- (ffeintrin_is_intrinsic): Don't give caller a clue about
- form of intrinsic -- shouldn't be needed at this point.
-
- Cope with generic intrinsics that are subroutines and functions:
- * com.c (ffecom_finish_symbol_transform_, ffecom_expr_transform_):
- Don't transform an intrinsic that is not known to be a subroutine
- or a function. (Maybe someday have to avoid transforming
- any intrinsic with an undecided or unknown implementation.)
- * expr.c (ffeexpr_declare_unadorned_,
- ffeexpr_declare_parenthesized_): Ok to invoke generic
- intrinsic that has at least one subroutine form as a
- subroutine.
- Ok to pass intrinsic as actual arg if it has a known specific
- intrinsic form that is valid as actual arg.
- (ffeexpr_declare_parenthesized_): An unknown kind of
- intrinsic has a paren_type chosen based on context.
- (ffeexpr_token_arguments_): Build funcref/subrref based
- on context, not on kind of procedure being called.
- * intrin.h, intrin.c (ffeintrin_is_intrinsic): Undo changes of
- Tue Feb 4 23:12:04 1997 by me, change all callers to leave
- intrinsics as FFEINFO_kindNONE at this point. (Some callers
- also had unused variables deleted as a result.)
-
- Enable all intrinsic groups (especially f90 and vxt):
- * target.h (FFETARGET_defaultSTATE_DCP, FFETARGET_defaultSTATE_F2C,
- FFETARGET_defaultSTATE_F90, FFETARGET_defaultSTATE_MIL,
- FFETARGET_defaultSTATE_UNIX, FFETARGET_defaultSTATE_VXT):
- Delete these macros, let top.c set them directly.
- * top.c (ffeintrinsic_state_dcp_, ffe_intrinsic_state_f2c_,
- ffe_intrinsic_state_f90_, ffe_intrinsic_state_mil_,
- ffe_intrinsic_state_unix_, ffe_intrinsic_state_vxt_):
- Enable all these directly.
-
-Sat Feb 8 03:21:50 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * g77.c: Incorporate recent changes to ../gcc.c.
- For version magic (e.g. `g77 -v'), instead of compiling
- /dev/null, write, compile, run, and then delete a small
- program that prints the version numbers of the three
- components of libf2c (libF77, libI77, and libU77),
- so we get this info with bug reports.
- Also, this change reduces the chances of accidentally
- linking to an old (complex-alias-problem) libf2c.
- Fix `-L' so the argument is expected in `-Larg'.
-
- * com.h (FFECOM_f2cLONGINT): For INTEGER*8 support in f2c.h,
- dynamically determine proper type here, instead of
- assuming `long long int' is correct.
-
-Tue Feb 4 23:12:04 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- Add libU77 library from Dave Love <d.love@dl.ac.uk>:
- * Make-lang.in (f77-runtime): Depend on new Makefile.
- (f/runtime/libU77/Makefile): New rule.
- Also configure libU77.
- ($(srcdir)/f/runtime/configure: Use Makefile.in,
- so configuration doesn't have to have happened.
- (f77.mostlyclean, f77.clean, f77.distclean,
- f77.maintainer-clean): Some fixups here, but more work
- needed.
- (RUNTIMESTAGESTUFF): Add libU77's config.status.
- (LIBU77STAGESTUFF, f77.stage1, f77.stage2, f77.stage3,
- f77.stage4): New macro, appropriate uses added.
- * com-rt.def: Add libU77 procedures.
- * com.c (ffecom_f2c_ptr_to_integer_type_node,
- ffecom_f2c_ptr_to_real_type_node): New type nodes.
- (FFECOM_rttypeCHARACTER_): New type of run-time function.
- (ffecom_char_args_): Handle CHARACTER*n intrinsics
- where n != 1 here, instead of in ffecom_expr_intrinsic_.
- (ffecom_expr_intrinsic_): New code to handle new
- intrinsics.
- In particular, change how FFEINTRIN_impFLUSH is handled.
- (ffecom_make_gfrt_): Handle new type of run-time function.
- (ffecom_init_0): Initialize new type nodes.
- * config-lang.in: New libU77 directory.
- * intrin.h, intrin.c (ffeintrin_is_intrinsic): Handle
- potential generic for subroutine _and_ function
- specifics via two new arguments. All callers changed.
- Properly ignore deleted/disabled intrinsics in resolving
- generics.
- (ffeintrin_check_, ffeintrin_init_0): Handle CHARACTER intrinsics of (*)
- length.
- * intrin.def: Permission granted by FSF to place this in
- public domain, which will allow it to serve as source
- for both g77 program and its documentation.
- Add libU77 intrinsics.
- (FLUSH): Now a generic, not specific, intrinsic.
- (DEFIMP): Now support return modifier for CHARACTER intrinsics.
-
- * com-rt.def (FFECOM_gfrtDIM, FFECOM_gfrtERF,
- FFECOM_gfrtERFC, FFECOM_gfrtEXP, FFECOM_gfrtSIGN,
- FFECOM_gfrtSIN, FFECOM_gfrtSINH, FFECOM_gfrtTAN,
- FFECOM_gfrtTANH, FFECOM_gfrtPOW_RI): Change "&r" to "&f".
-
-Sat Feb 1 12:15:09 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * Version 0.5.19.1 released.
-
- * com.c (ffecom_expr_, ffecom_expr_intrinsic_,
- ffecom_tree_divide_): FFECOM_gfrtPOW_ZI,
- FFECOM_gfrtCONJG, FFECOM_gfrtDCONJG,
- FFECOM_gfrtCCOS, FFECOM_gfrtCDCOS,
- FFECOM_gfrtCLOG, FFECOM_gfrtCDLOG,
- FFECOM_gfrtCSIN, FFECOM_gfrtCDSIN,
- FFECOM_gfrtCSQRT, FFECOM_gfrtCDSQRT,
- FFECOM_gfrtDIV_CC, FFECOM_gfrtDIV_ZZ: These all require
- result to _not_ overlap one or more inputs.
-
-Sat Feb 1 00:25:55 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_init_0): Do internal checks only if
- -fset-g77-defaults not specified.
-
- Fix %LOC(), LOC() to return sufficiently wide type:
- * com.h, com.c (ffecom_pointer_kind_, ffecom_label_kind_,
- ffecom_pointer_kind(), ffecom_label_kind()): New globals
- and accessor macros hold kind for integer pointers on target
- machine.
- (ffecom_init_0): Determine narrowest INTEGER type that
- can hold a pointer (usually INTEGER*4 or INTEGER*8),
- store it in ffecom_pointer_kind_, etc.
- * expr.c (ffeexpr_cb_end_loc_): Use right type for %LOC().
- * intrin.c (ffeintrin_check_, ffeintrin_init_0): Support
- new 'p' kind for type of intrinsic.
- * intrin.def (FFEINTRIN_impLOC): Returns "Ip" instead of "I1",
- so LOC() type is correct for target machine.
-
- Support -fugly-assign:
- * lang-options.h, top.h, top.c (ffe_decode_option):
- Accept -fugly-assign and -fno-ugly-assign.
- * com.c (ffecom_expr_): Handle -fugly-assign.
- * expr.c (ffeexpr_finished_): Check right type for ASSIGN
- contexts.
-
-Fri Jan 31 14:30:00 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- Remove last vestiges of -fvxt-not-f90:
- * stb.c (ffestb_R10012_, ffestb_R10014_, ffestb_V0201_):
- top.c, top.h:
-
-Fri Jan 31 02:13:54 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * top.c (ffe_decode_option): Warn if -fugly is specified,
- it'll go away soon.
-
- * symbol.h: No need to #include "bad.h".
-
- Reorganize features from -fvxt-not-f90 to -fvxt:
- * lang-options.h, top.h, top.c:
- Accept -fvxt and -fno-vxt, but not -fvxt-not-f90 or -ff90-not-vxt.
- Warn if the latter two are used.
- * expr.c (ffeexpr_nil_rhs_): Double-quote means octal constant.
- (ffeexpr_token_rhs_): Double-quote means octal constant.
- * target.h (FFETARGET_defaultIS_VXT_NOT_90): Delete macro
- definition, no longer needed.
-
- Make some -ff90 features the default:
- * data.c (ffedata_value): DATA implies SAVE.
- * src.h (ffesrc_is_name_noninit): Underscores always okay.
-
- Fix up some more #error directives by quoting their text:
- * bld.c (ffebld_constant_is_zero):
- * target.h:
-
-Sat Jan 18 18:22:09 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * g77.c (lookup_option, main): Recognize `-Xlinker',
- `-Wl,', `-l', `-L', `--library-directory', `-o',
- `--output'.
- (lookup_option): Don't depend on SWITCH_TAKES_ARG
- being correct, it might or might not have `-x' in
- it depending on host.
- Return NULL argument if it would be an empty string.
- (main): If no input files (by gcc.c's definition)
- but `-o' or `--output' specified, produce diagnostic
- to avoid overwriting output via gcc.
- Recognize C++ `+e' options.
- Treat -L as another non-magical option (like -B).
- Don't append_arg `-x' twice.
-
-Fri Jan 10 23:36:00 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * top.c [BUILT_FOR_270] (ffe_decode_option): Make
- -fargument-noalias-global the default.
-
-Fri Jan 10 07:42:27 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- Enable inlining of previously-compiled program units:
- * com.c (ffecom_do_entry_, ffecom_start_progunit_):
- Register new public function in ffeglobal database.
- (ffecom_sym_transform_): Any GLOBAL or potentially GLOBAL
- symbol should be looked up in ffeglobal database and
- that tree node used, if found. That way, gcc knows
- the references are to those earlier definitions, so it
- can emit shorter branches/calls, inline, etc.
- (ffecom_transform_common_): Minor change for clarity.
- * expr.c (ffeexpr_sym-lhs_call_, ffeexpr_sym_lhs_extfunc_,
- ffeexpr_sym_rhs_actualarg_, ffeexpr_paren_rhs_let_,
- ffeexpr_token_funsubstr_): Globalize symbol as needed.
- * global.c (ffeglobal_promoted): New function to look up
- existing local symbol in ffeglobal database.
- * global.h: Declare new function.
- * name.h (ffename_token): New macro, plus alphabetize.
- * stc.c (ffestc_R1207_item): Globalize EXTERNAL symbol.
- * stu.c (ffestu_sym_end_transition, ffestu_sym_exec_transition):
- Globalize symbol as needed.
- * symbol.h, symbol.c (ffesymbol_globalize): New function.
-
-Thu Jan 9 14:20:00 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * ste.c (ffeste_R809): Produce a diagnostic for SELECT CASE
- on CHARACTER type, instead of crashing.
-
-Thu Jan 9 00:52:45 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * stc.c (ffestc_order_entry_, ffestc_order_format_,
- ffestc_R1226): Allow ENTRY and FORMAT before IMPLICIT
- NONE, by having them transition only to state 1 instead
- of state 2 (which is disallowed by IMPLICIT NONE).
-
-Mon Jan 6 22:44:53 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- Fix AXP bug found by Rick Niles (961201-1.f):
- * com.c (ffecom_init_0): Undo my 1996-05-14 change, as
- it is incorrect and prevented easily finding this bug.
- * target.h [__alpha__] (ffetargetReal1, ffetargetReal2):
- Use int instead of long.
- (ffetarget_cvt_r1_to_rv_, ffetarget_cvt_rv_to_r1_,
- ffetarget_cvt_r2_to_rv_, ffetarget_cvt_rv_to_r2_):
- New functions that intercede for callers of
- REAL_VALUE_(TO|UNTO)_TARGET_(SINGLE|DOUBLE).
- All callers changed, and damaging casts to (long *) removed.
-
-Sun Jan 5 03:26:11 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * Make-lang.in (g77, g77-cross): Depend on both g77.c and
- zzz.c, in $(srcdir)/f/.
-
- Better design for -fugly-assumed:
- * stc.c (ffestc_R501_item, ffestc_R524_item,
- ffestc_R547_item_object): Pass new is_ugly_assumed flag.
- * stt.c, stt.h (ffestt_dimlist_as_expr,
- ffestt_dimlist_type): New is_ugly_assumed flag now
- controls whether "1" is treated as "*".
- Don't treat "2-1" or other collapsed constants as "*".
-
-Sat Jan 4 15:26:22 1997 Craig Burley <burley@gnu.ai.mit.edu>
-
- * stb.c (ffestb_R10012_): Don't confirm on FORMAT(A,)
- or even FORMAT(A,,B), as R1229 only warns about the
- former currently, and this seems reasonable.
-
- Improvements to diagnostics:
- * sta.c (ffesta_second_): Don't add any ffestb parsers
- unless they're specifically called for.
- Set up ffesta_tokens[0] before calling ffestc_exec_transition,
- else stale info might get used.
- (ffesta_save_): Do a better job picking which parser to run
- after running all parsers with no confirmed possibles.
- (FFESTA_maxPOSSIBLES_): Decrease from 100 now that so few
- possibles are ever on the list at a given time.
- (struct _ffesta_possible): Add named attribute.
- (ffesta_add_possible_exec_, ffesta_add_possible_nonexec_):
- Make these into macros that call a single function that now
- sets the named attribute.
- (ffesta_add_possible_unnamed_exec_,
- ffeseta_add_possible_unnamed_nonexec_): New macros.
- (ffesta_second_): Designate unnamed possibles as
- appropriate.
- * stb.c (ffestb_R1229, ffestb_R12291_): Use more general
- diagnostic, so things like "POINTER (FOO, BAR)" are
- diagnosed as unrecognized statements, not invalid statement
- functions.
- * stb.h, stb.c (ffestb_unimplemented): Remove function.
-
-1996-12-30 Dave Love <d.love@dl.ac.uk>
-
- * com.c: #include libU77/config.h
- (ffecom_f2c_ptr_to_integer_type_node,
- ffecom_f2c_ptr_to_integer_type_node): New variables.
- (ffecom_init_0): Use them.
- (ffecom_expr_intrinsic_): Many news cases for libU77 intrinsics.
-
- * com-rt.def: New definitions for libU77.
- * intrin.def: Likewise. Also correct ftell arg spec.
-
- * Makefile.in (f/runtime/libU77/config.h): New target for com.c
- dependency.
- * Make-lang.in (f771): Depend on f/runtime/Makefile for the above.
-
-Sat Dec 28 12:28:29 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * stt.c (ffestt_dimlist_type): Treat ([...,]1) in dimlist
- as ([...,]*) if -fugly-assumed, so assumed-size array
- detected early enough.
-
-Thu Dec 19 14:01:57 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * target.h (FFETARGET_REAL_VALUE_FROM_INT_): Conditionalize
- definition on BUILT_FOR_280, not BUILT_WITH_280, since
- the name of the macro was (properly) changed since 0.5.19.
-
- Fix warnings/errors resulting from ffetargetOffset becoming
- `long long int' instead of `unsigned long' as of 0.5.19,
- while ffebitCount remains `unsigned long':
- * bld.c (ffebld_constantarray_dump): Avoid warnings by
- using loop var of appropriate type, and using casts.
- * com.c (ffecom_expr_): Use right type for loop var.
- (ffecom_sym_transform_, ffecom_transform_equiv_):
- Cast to right type in assertions.
- * data.c (ffedata_gather_, ffedata_value_): Cast to right
- type in assertions and comparisons.
-
-Wed Dec 18 12:07:11 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- Patch from Alexandre Oliva <oliva@dcc.unicamp.br>:
- * Makefile.in (all.indirect): Don't pass -bbigtoc option
- to GNU ld.
-
- Cope with new versions of gcc:
- * com.h (BUILT_FOR_280): New macro.
- * com.c (ffecom_ptr_to_expr): Conditionalize test of
- OFFSET_REF.
- (ffecom_build_complex_constant_): Conditionalize calling
- sequence for build_complex.
-
-Sat Dec 7 07:15:17 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * Version 0.5.19 released.
-
-Fri Dec 6 12:23:55 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * g77.c: Default to assuming "f77" is in $LANGUAGES, since
- the LANGUAGE_F77 macro isn't defined by anyone anymore (but
- might as well leave the no-f77 code in just in case).
- * Make-lang.in (g77, g77-cross): Don't define LANGUAGE_F77
- anymore.
-
-1996-12-06 Dave Love <d.love@dl.ac.uk>
-
- * Make-lang.in (g77, g77-cross): Revert to building `g77' or not
- conditional on `f77' in LANGUAGES.
-
-Wed Dec 4 13:08:44 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * Make-lang.in (g77, g77-cross): No libs or lib dependencies
- in case where "f77" is not in $LANGUAGES.
-
- * lex.c (ffelex_image_char_, ffelex_file_fixed,
- ffelex_file_free): Fixes to properly handle lines with
- null character, and too-long lines as well.
-
- * lex.c: Call ffebad_start_msg_lex instead of
- ffebad_start_msg throughout.
-
-Sun Dec 1 21:19:55 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- Fix-up for 1996-11-25 changes:
- * com.c (ffecom_member_phase2_): Subtract out 0 offset for
- elegance and consistency with EQUIVALENCE aggregates.
- (ffecom_sym_transform_): Ditto for LOCAL/COMMON, and
- ensure we get the same parent storage area.
- * data.c (ffedata_gather_, ffedata_value_): Subtract out
- aggregate offset.
+ * news.texi (News): Mention GCC 2.95 in favor of EGCS 1.2.
+ Mention that libg2c is multilibbed.
-Wed Nov 27 13:55:57 1996 Craig Burley <burley@gnu.ai.mit.edu>
+Fri Jun 4 10:09:50 1999 Craig Burley <craig@jcb-sc.com>
- * proj.h: Quote the text of the #error message, to avoid
- strange-looking diagnostics from non-gcc ANSI compilers.
+ * g77.texi (Missing Features): Add `Better Warnings'
+ item.
- * top.c: Make -fno-debug-kludge the default.
+Fri May 28 16:51:41 1999 Craig Burley <craig@jcb-sc.com>
-Mon Nov 25 20:13:45 1996 Craig Burley <burley@gnu.ai.mit.edu>
+ * g77.texi: Fix thinko.
- Provide more info on EQUIVALENCE mismatches:
- * bad.def (FFEBAD_EQUIV_MISMATCH): More detailed message.
- * equiv.c (ffeequiv_layout_local_, ffeequiv_layout_cblock):
- More details for FFEBAD_EQUIV_MISMATCH.
+Wed May 26 14:43:27 1999 Craig Burley <craig@jcb-sc.com>
- Fix problem with EQUIVALENCE handling:
- * equiv.c (ffeequiv_layout_local_): Redesign algorithm --
- old one was broken, resulting in rejection of good code.
- (ffeequiv_offset_): Add argument, change callers.
- Clean up the code, fix up the (probably unused) negative-value
- case for SYMTER.
- * com.c (ffecom_sym_transform_): For local EQUIVALENCE
- member, subtract out aggregate offset (which is <= 0).
+ * news.texi: Document Tue May 18 03:52:04 1999 patch.
+ Fix a grammo.
-Thu Nov 21 12:44:56 1996 Craig Burley <burley@gnu.ai.mit.edu>
+Wed May 26 14:25:07 1999 Craig Burley <craig@jcb-sc.com>
- Change type of ffetargetOffset from `unsigned long' to `long long':
- * bld.c (ffebld_constantarray_dump): Change printf formats.
- * storag.c (ffestorag_dump): Ditto.
- * symbol.c (ffesymbol_report): Ditto.
- * target.h (ffetargetOffset_f): Ditto and change type itself.
+ * 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.
- Handle situation where list of languages does not include f77:
- * Make-lang.in: Define LANGUAGE_F77 to 1 only if `f77' is in
- the $LANGUAGES macro for the build.
- * g77.c: Compile to a (nearly) no-op program if LANGUAGE_F77
- is not defined to 1.
-
- Fixes to delay confirmation of READ, WRITE, and GOTO statements
- so the corresponding assignments to same-named CHAR*(*) arrays
- work:
- * stb.c (ffestb_R90915_, ffestb_91014_): New functions.
- (ffestb_goto3_, ffestb_goto5_): Move confirmation from 3 to 5
- for the OPEN_PAREN case.
- (ffestb_R9091_, ffestb_R9094_, ffestb_R90913_, ffestb_R90914_,
- ffestb_R91012_, ffestb_R91013_): Use new functions, and confirm
- except for the OPEN_PAREN case.
+Wed May 26 11:45:21 1999 Craig Burley <craig@jcb-sc.com>
- Fixes to not confirm declarations with an open paren where
- an equal sign or other assignment-like token might be, so the
- corresponding assignments to same-named CHAR*(*) arrays work:
- (ffestb_decl_entsp_5_): Move assertion so we crash on that first,
- if it turns out to be wrong, before the less-debuggable crash
- on mistaken confirmation.
- (ffestb_decl_entsp_6_, ffestb_decl_entsp_7_, ffestb_decl_entsp_8_):
- Include OPEN_PAREN in list of assignment-only tokens.
+ 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.
- Fix more diagnosed-crash bugs:
- * stu.c (ffestu_sym_end_transition): ANY-ize an adjustable array
- with bad dimension expressions even if still stateUNCERTAIN.
- (ffestu_symter_end_transition_, ffestu_symter_exec_transition_):
- Return TRUE for opANY as well.
- For code elegance, move opSYMTER case into first switch.
+Tue May 25 18:21:09 1999 Craig Burley <craig@jcb-sc.com>
-1996-11-17 Dave Love <d.love@dl.ac.uk>
+ * com.c (FFECOM_FASTER_ARRAY_REFS): Delete this vestige,
+ now that -fflatten-arrays exists.
- * lex.c: Fix last change.
+Tue May 25 17:48:34 1999 Craig Burley <craig@jcb-sc.com>
-1996-11-14 Dave Love <d.love@dl.ac.uk>
+ Fix 19990525-0.f:
+ * com.c (ffecom_arg_ptr_to_expr): Strip off parens around
+ CHARACTER expression.
+ (ffecom_prepare_expr_): Ditto.
- * Make-lang.in, config-lang.in: Remove the (broken) libU77 stuff,
- pending 0.5.20.
+Tue May 18 03:52:04 1999 Craig Burley <craig@jcb-sc.com>
-Thu Nov 14 15:40:59 1996 Craig Burley <burley@gnu.ai.mit.edu>
+ Support use of back end's improved open-coding of complex divide:
+ * com.c (ffecom_tree_divide_): Use RDIV_EXPR for complex divide,
+ instead of run-time call to [cz]_div, if `-Os' option specified.
+ (lang_init_options): Tell back end we want support for wide range
+ of inputs to complex divide.
- * bad.def (FFEBAD_UNIMPL_STMT): Explain that invalid
- intrinsic references can trigger this message, too.
+ * Bump version.
-1996-11-12 Dave Love <d.love@dl.ac.uk>
+Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
- * lex.c: Declare dwarfout routines.
+ * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
+ was not given.
- * config-lang.in: Sink grep o/p.
+Thu May 13 12:23:20 1999 Craig Burley <craig@jcb-sc.com>
-Mon Nov 11 14:21:13 1996 Craig Burley <burley@gnu.ai.mit.edu>
+ Fix INTEGER*8 subscripts in array references:
+ * com.c (ffecom_subscript_check_): Convert low, high, and
+ element as necessary to make comparison work.
+ (ffecom_arrayref_): Do more of the work.
+ Properly handle subscript expr that's wider than int,
+ if pointers are wider than int.
+ (ffecom_expr_): Leave more work to ffecom_arrayref_.
+ (ffecom_init_0): Record sizes of pointers and ints for
+ convenience.
+ Use set_sizetype etc. as done by gcc front end.
+ (ffecom_ptr_to_expr): Leave more work to ffecom_arrayref_.
+ * expr.c (ffeexpr_finished_): Don't convert INTEGER subscript
+ expressions in run-time contexts.
+ (ffeexpr_token_elements_, ffeexpr_token_substring_1_): Cope with
+ non-default INTEGER subscript expressions.
+ * news.texi: Announce.
- * g77.c (main): Might as well print version number
- for --verbose as well.
+ Finish accepting -fflatten-arrays option:
+ * com.c (ffecom_arrayref_): Flatten references if requested.
+ * g77.texi: Describe.
+ * lang-options.h: Allow.
+ * news.texi: Announce.
+ * top.c, top.h: Recognize.
-Thu Nov 7 18:41:41 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * expr.c, lang-options.h, target.h, top.c, top.h: Split out
- remaining -fugly stuff into -fugly-logint and -fugly-comma,
- leaving -fugly as simply a `macro' that expands into other
- options, and eliminate defaults for some of the ugly stuff
- in target.h.
-
- * Make-lang.in (gcc-cross): Compile zzz.c, not version.o (!),
- in to get version info for this target.
-
- * config-lang.in: Test for GBE patch application based
- on whether 2.6.x or 2.7.x GBE is detected.
-
-Wed Nov 6 14:19:45 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * Make-lang.in (g77): Compile zzz.c in to get version info.
- * g77.c: Add support for --help and --version.
-
- * g77.c (lookup_option): Short-circuit long-winded tests
- when second char is not hyphen, just to save a spot of time.
-
-Sat Nov 2 13:50:31 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * intrin.def: Add FTELL and FSEEK intrinsics, plus new
- `g' codes for alternate-return (GOTO) arguments.
- * intrin.c (ffeintrin_check_): Support `g' codes.
- * com-rt.def: Add ftell_() and fseek_() to database.
- * com.c (ffecom_expr_intrinsic_): Ditto. Also, let each
- subroutine intrinsic decide for itself what to do with
- tree_type, the default being NULL_TREE once again (so
- ffecom_call_ doesn't think it's supposed to cast the
- function call to the type in the fall-through case).
-
- * ste.c (ffeste_R909_finish): Don't special-case list-directed
- I/O, now that libf2c can return non-zero status codes.
- (ffeste_R910_finish): Ditto.
- (ffeste_io_call_): Simplify logic.
- (ffeste_io_impdo_):
- (ffeste_subr_beru_):
- (ffeste_R904):
- (ffeste_R907):
- (ffeste_R909_start):
- (ffeste_R909_item):
- (ffeste_R909_finish):
- (ffeste_R910_start):
- (ffeste_R910_item):
- (ffeste_R910_finish):
- (ffeste_R911_start):
- (ffeste_R923A): Ditto all the above.
-
-Thu Oct 31 20:56:28 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * config-lang.in, Make-lang.in: Rename flag file
- build-u77 to build-libu77, for consistency with
- install-libf2c and such.
-
- * config-lang.in: Don't complain about failure to patch
- if pre-2.7.0 gcc is involved (since our patch for that
- doesn't add support for tooning).
-
-Sat Oct 26 05:56:51 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * bad.def (FFEBAD_TYPELESS_TOO_LARGE): Remove this
- unused and redundant diagnostic.
-
-Sat Oct 26 00:45:42 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * target.c (ffetarget_integerhex): Fix dumb bug.
-
-1996-10-20 Dave Love <d.love@dl.ac.uk>
-
- * gbe/2.7.2.1.diff: New file.
-
- * Makefile.in (F771_LDFLAGS): Add -bbigtoc for AIX4.1 up, suggested by
- endo@material.tohoku.ac.jp [among others!].
-
-Sat Oct 19 03:11:14 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * bad.def, bld.c, bld.h, expr.c, lang-options.h, target.c,
- target.h, top.c, top.h (ffebld_constant_new_integerbinary,
- ffebld_constant_new_integerhex, ffebld_constant_new_integeroctal,
- ffeexpr_token_name_apos_name_, ffetarget_integerbinary,
- ffetarget_integerhex, ffetarget_integeroctal): Support
- new -fno-typeless-boz option with new functions, mods to
- existing octal-handling functions, new macros, new error
- messages, and so on.
-
- * com.c, lang-options.h, top.c, top.h (ffecom_notify_primary_entry):
- Print program unit name on stderr if -fno-silent (new option).
-
- * lang-options.h, top.c, top.h, stt.c (ffestt_dimlist_as_expr):
- Treat ([...,]1) in dimlist as ([...,]*) if -fugly-assumed
- (new option).
-
- * lang-options.h: Comment out options duplicated in gcc/toplev.c,
- because, somehow, having them commented in and building on my
- DEC Alpha results in a cc1 that always segfaults, and gdb that
- also segfaults whenever it debugs it up to init_lex() calling
- xmalloc() or so.
-
-Thu Oct 17 00:39:27 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * stb.c (ffestb_R10013_): Don't change meaning of .sign until
- after previous meaning/value used to set sign of value
- (960507-1.f).
-
-Sun Oct 13 22:15:23 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * top.c (ffe_decode_option): Don't set back-end flags
- that are nonexistent prior to gcc 2.7.0.
-
-Sun Oct 13 12:48:45 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (convert): Don't convert emulated complex expr to
- real (via REALPART_EXPR) if the target type is (emulated)
- complex.
-
-Wed Oct 2 21:57:12 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_debug_kludge_): Set DECL_IN_SYSTEM_HEADER so
- -Wunused doesn't complain about these manufactured decls.
- (ffecom_expr_): Ditto, for original (non-ASSIGN'ed) variable.
- (ffecom_transform_equiv_): Clear DECL_IGNORED_P for aggregate
- area so it shows up as a debug-accessible symbol.
- (pushdecl): Default for "invented" identifiers (a g77-specific
- concept for now) is that they are artificial, in system header,
- ignored for debugging purposes, used, and (for types) suppressed.
- This ought to be overkill.
-
-Fri Sep 27 23:13:07 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * ste.c (ffeste_begin_iterdo_, ffeste_end_iterdo_): Support
- one-trip DO loops (F66-style).
- * lang-options.h, top.c, top.h (-fonetrip): New option.
-
-Thu Sep 26 00:18:40 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_debug_kludge_): New function.
- (ffecom_sym_transform_): Use new function for COMMON and EQUIVALENCE
- members.
-
- * lang-options.h, top.c, top.h (-fno-debug-kludge):
- New option.
-
-1996-09-24 Dave Love <d.love@dl.ac.uk>
-
- * Make-lang.in (include/f2c.h):
- Remove dependencies on xmake_file and tmake_file.
- They expand inconsistently in 2.8 c.f. 2.7; $(GCC_PARTS) depends on
- them anyhow.
-
-1996-09-22 Dave Love <d.love@dl.ac.uk>
-
- * config-lang.in: Add --enable-libu77 option handling.
-
- * Make-lang.in:
- Conditionally add --enable-libu77 when running runtime configure.
- Define LIBU77STAGESTUFF and use it in relevant rules.
-
-1996-08-21 Dave Love <d.love@dl.ac.uk>
-
- * Make-lang.in (f77-runtime):
- `stmp-hdrs' should have been `stmp-headers'.
-
-1996-08-20 Dave Love <d.love@dl.ac.uk>
-
- * Make-lang.in (f77-runtime):
- Depend on stmp-hdrs, not stmp-int-hdrs, since libF77
- needs float.h.
-
-Sat Jun 22 18:17:11 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_tree_divide_): Fix RECORD_TYPE case to
- look at type of first field, properly, to determine
- whether to call c_div or z_div.
-
-Tue Jun 4 04:27:18 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_build_complex_constant_): Explicitly specify
- TREE_PURPOSE.
- (ffecom_expr_): Fix thinko.
- (ffecom_2): For COMPLEX_EXPR, explicitly specify TREE_PURPOSE.
-
-Mon May 27 16:23:43 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- Changes to optionally avoid gcc's back-end complex support:
- * com.c (ffecom_stabilize_aggregate_): New function.
- (ffecom_convert_to_complex_): New function.
- (ffecom_make_complex_type_): New function.
- (ffecom_build_complex_constant_): New function.
- (ffecom_expr_): For opCONVERT of non-COMPLEX to COMPLEX,
- don't bother explicitly converting to the subtype first,
- because gcc does that anyway, and more code would have
- to be added to find the subtype for the emulated-complex
- case.
- (ffecom_f2c_make_type_): Use ffecom_make_complex_type_
- instead of make_node etc. to make a complex type.
- (ffecom_1, ffecom_2): Translate operations on COMPLEX operands
- to appropriate operations when emulating complex.
- (ffecom_constantunion): Use ffecom_build_complex_constant_
- instead of build_complex to build a complex constant.
- (ffecom_init_0): Change point at which types are laid out
- for improved consistency.
- Use ffecom_make_complex_type_ instead of make_node etc.
- to make a complex type.
- Always calculate storage sizes from TYPE_SIZE, never TYPE_PRECISION.
- (convert): Use e, not expr, since we've copied into that anyway.
- For RECORD_TYPE cases, do emulated-complex conversions.
- (ffecom_f2c_set_lio_code_): Always calculate storage sizes
- from TYPE_SIZE, never TYPE_PRECISION.
- (ffecom_tree_divide_): Allow RECORD_TYPE to also be handled
- by run-time library.
- (ffecom_expr_intrinsic_): Handle possible RECORD_TYPE as argument
- to AIMAG intrinsic.
-
- * top.h, top.c, lang-options.h: Support new -f(no-)emulate-complex option.
-
- * com.c (ffecom_sym_transform_): Clarify and fix typos in comments.
-
-Mon May 20 02:06:27 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * target.h: Use new REAL_VALUE_UNTO_TARGET_* macros instead
- of REAL_VALUE_FROM_TARGET_DOUBLE and _SINGLE.
- Explicitly use long instead of HOST_WIDE_INT for emulation
- of ffetargetReal1 and ffetargetReal2.
-
-1996-05-20 Dave Love <d.love@dl.ac.uk>
-
- * config-lang.in:
- Test for patch being applied with flag_move_all_movables in toplev.c.
-
- * install.texi (Patching GNU Fortran):
- Mention overriding X_CFLAGS rather than
- editing proj.h on SunOS4.
-
- * Make-lang.in (F77_FLAGS_TO_PASS):
- Add X_CFLAGS (convenient for SunOS4 kluge, in
- particular).
- (f77.{,mostly,dist}clean): Reorder things, in particular not to delete
- Makefiles too early.
-
- * g77.c (DEFAULT_SWITCH_TAKES_ARG): Define a la gcc.c in the
- current GCC snapshot.
-
-Tue May 14 00:24:07 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- Changes for DEC Alpha AXP support:
- * com.c (ffecom_init_0): REAL_ARITHMETIC means internal
- REAL/DOUBLE PRECISION might well have a different size
- than the compiled type, so don't crash if this is the
- case.
- * target.h: Use `int' for ffetargetInteger1,
- ffetargetLogical1, and magical tests. Set _f format
- strings accordingly.
-
-Tue Apr 16 14:08:28 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * top.c (ffe_decode_option): -Wall no longer implies
- -Wsurprising.
-
-Sat Apr 13 14:50:06 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_char_args_): If item is error_mark_node,
- set *length that way, too.
-
- * com.c (ffecom_expr_power_integer_): If either operand
- is error_mark_node, return that.
-
- * com.c (ffecom_intrinsic_len_): If item is error_mark_node,
- return that for length.
-
- * expr.c (ffeexpr_declare_unadorned_,
- ffeexpr_declare_parenthesized_): Instead of crashing
- on unexpected contexts, produce a diagnostic.
-
- * intrin.c (ffeintrin_check_), intrin.def (impSIGNAL):
- Allow procedure as second arg to SIGNAL intrinsic.
-
- * stu.c (ffestu_symter_end_transition_): New function.
- (ffestu_symter_exec_transition_): Return bool arg.
- Always transition symbol (don't inhibit when !whereNONE).
- (ffestu_sym_end_transition): If DUMMY/LOCAL arg has any
- opANY exprs in its dimlist, diagnose it so it doesn't
- make it through to later stages that try to deal with
- dimlist stuff.
- (ffestu_sym_exec_transition): If sym has any opANY exprs
- in its dimlist, diagnose it so it becomes opANY itself.
-
- * symbol.c (ffesymbol_error): If token arg is NULL,
- just ANY-ize the symbol -- don't produce diagnostic.
-
-Mon Apr 1 10:14:02 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * Version 0.5.18 released.
-
-Mon Mar 25 20:52:24 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_expr_power_integer_): Don't generate code
- that compares COMPLEX (or, as it happens, REAL) via "LT_EXPR",
- since the back end crashes on that. (This code would never
- be executed anyway, but the test that avoids it has now been
- translated to control whether the code gets generated at all.)
- Fixes 960323-3.f.
-
- * com.c (ffecom_type_localvar_): Handle variable-sized
- dimension bounds expressions here, so they get calculated
- and saved on procedure entry. Fixes 960323-4.f.
-
- * com.c (ffecom_notify_init_symbol): Symbol has no init
- info at all if only zeros have been used to initialize it.
- Fixes 960324-0.f.
-
- * expr.c, expr.h (ffeexpr_type_combine): Renamed from
- ffeexpr_type_combine_ and now a public procedure; last arg now
- a token, instead of an internal structure used to extract a token.
- Now allows the outputs to be aliased with the inputs.
- Now allows a NULL token to mean "don't report error".
- (ffeexpr_reduced_bool2_, ffeexpr_reduced_eqop2_,
- ffeexpr_reduced_math2_, ffeexpr_reduced_power_,
- ffeexpr_reduced_relop2_): Handle new calling sequence for
- ffeexpr_type_combine.
- * (ffeexpr_convert): Don't put an opCONVERT node
- in just because the size is unknown; all downstream code
- should be able to deal without it being there anyway, and
- getting rid of it allows new intrinsic code to more easily
- combine types and such without generating bad code.
- * info.c, info.h (ffeinfo_kindtype_max): Rewrite to do
- proper comparison of size of types, not just comparison
- of their internal kind numbers (so I2.eq.I1 doesn't promote
- I1 to I2, rather the other way around).
- * intrin.c (ffeintrin_check_): Combine types of arguments
- in COL a la expression handling, for greater flexibility
- and permissiveness (though, someday, -fpedantic should
- report use of this kind of thing).
- Make sure Hollerith/typeless where CHARACTER expected is
- rejected. This all fixes 960323-2.f.
-
- * ste.c (ffeste_begin_iterdo_): Fix some more type conversions
- so INTEGER*2-laden DO loops don't crash at compile time on
- certain machines. Believed to fix 960323-1.f.
-
- * stu.c (ffestu_sym_end_transition): Certainly reject
- whereDUMMY not in any dummy list, whether stateUNCERTAIN
- or stateUNDERSTOOD. Fixes 960323-0.f.
-
-Tue Mar 19 13:12:40 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * data.c (ffedata_value): Fix crash on opANY, and simplify
- the code at the same time.
-
- * Make-lang.in (f77-runtime): Also depends on lib[FI]77/Makefile...
- (include/f2c.h...): ...which in turn depend on */Makefile.in.
- (f77.rebuilt): Rebuild runtime stuff too.
-
- * intrin.c (ffeintrin_check_): Accommodate TYPELESS/HOLLERITH
- types, convert args as necessary, etc.
-
- * expr.c (ffeexpr_convert): Fix test for TYPELESS/HOLLERITH
- to obey the docs; crash if no source token when error.
- (ffeexpr_collapse_convert): Crash if no token when error.
-
-Mon Mar 18 15:51:30 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_init_zero_): Renamed from
- ffecom_init_local_zero_; now handles top-level
- (COMMON) initializations too.
-
- * bld.c (ffebld_constant_is_zero):
- * com.c (ffecom_symbol_transform_, ffecom_sym_transform_assign_,
- ffecom_transform_common_, ffecom_transform_equiv_):
- * data.c:
- * equiv.c:
- * equiv.h:
- * lang-options.h:
- * stc.c:
- * storag.c:
- * storag.h:
- * symbol.c:
- * symbol.h:
- * target.c:
- * target.h:
- * top.c:
- * top.h: All of this is mostly housekeeping-type changes
- to support -f(no-)zeros, i.e. not always stuff zero
- values into the initializer fields of symbol/storage objects,
- but still track that they have been given initial values.
-
- * bad.def: Fix wording for DATA-related diagnostics.
-
- * com.c (ffecom_sym_transform_assign_): Don't check
- any EQUIVALENCE stuff for local ASSIGN, the check was
- bad (crashing), and it's not necessary, anyway.
-
- * com.c (ffecom_expr_intrinsic_): For MAX and MIN,
- ignore null arguments as far arg[123], and fix handling
- of ANY arguments. (New intrinsic support now allows
- spurious trailing null arguments.)
-
- * com.c (ffecom_init_0): Add HOLLERITH (unsigned)
- equivalents for INTEGER*2, *4, and *8, so shift intrinsics
- and other things that need unsigned versions of signed
- types work.
-
-Sat Mar 16 12:11:40 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * storag.c (ffestorag_exec_layout): Treat adjustable
- local array like dummy -- don't create storage object.
- * com.c (ffecom_sym_transform_): Allow for NULL storage
- object in LOCAL case (adjustable array).
-
-Fri Mar 15 13:09:41 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_sym_transform_): Allow local symbols
- with nonconstant sizes (adjustable local arrays).
- (ffecom_type_localvar_): Allow dimensions with nonconstant
- component (adjustable local arrays).
- * expr.c: Various minor changes to handle adjustable
- local arrays (a new case of stateUNCERTAIN).
- * stu.c (ffestu_sym_end_transition,
- ffestu_sym_exec_transition): Ditto.
- * symbol.def: Update docs to reflect these changes.
-
- * com.c (ffecom_expr_): Reduce space/time needed for
- opACCTER case by handling it here instead of converting
- it to opARRTER earlier on.
- (ffecom_notify_init_storage): Don't convert ACCTER to ARRTER.
- (ffecom_notify_init_symbol): Ditto.
-
- * com.c (ffecom_init_0): Crash and burn if any of the types'
- sizes, according to the GBE, disagrees with the sizes of
- the FFE's internal implementation. This might catch
- Alpha/SGI bugs earlier.
-
-Fri Mar 15 01:09:41 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com-rt.def, com.c, com.h: Changes for rewrite of intrinsic
- handling.
- * com.c (ffecom_arglist_expr_): New function.
- (ffecom_widest_expr_type_): New function.
- (ffecom_expr_intrinsic_): Reorganize, some rewriting.
- (ffecom_f2c_make_type_): Layout complex types.
- (ffecom_gfrt_args_): New function.
- (ffecom_list_expr): Trivial change for consistency.
-
- * expr.c (ffeexpr_token_name_rhs_): Go back to getting
- type from specific, not implementation, info.
- (ffeexpr_token_funsubstr_): Set intrinsic implementation too!
- * intrin.c: Major rewrite of most portions.
- * intrin.def: Major rearchitecting of tables.
- * intrin.h (ffeintrin_basictype, ffeintrin_kindtype):
- Now (once again) take ffeintrinSpec as arg, not ffeintrinImp;
- for now, these return NONE, since they're not really needed
- and adding the necessary info to the tables is not trivial.
- (ffeintrin_codegen_imp): New function.
- * stc.c (ffestc_R1208_item): Change way ffeintrin funcs called,
- back to original per above; but comment out the code anyway.
-
- * intrin.c (ffe_init_0): Do internal checks only if
- -fset-g77-defaults not specified.
-
- * lang-options.h: Add -fset-g77-defaults option.
- * lang-specs.h: Always pass -fset-g77-defaults.
- * top.c, top.h: New option.
-
-Sat Mar 9 17:49:50 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * Make-lang.in (stmp-int-hdrs): Use --no-validate when
- generating the f77.rebuilt files (BUGS, INSTALL, NEWS)
- so cross-references can work properly in g77.info
- without a lot of hassle. Users can probably deal with
- the way they end up looking in the f77.rebuilt files.
-
- * bld.c (ffebld_constant_new_integer4_val): INTEGER*8
- support -- new function.
- (ffebld_constant_new_logical4_val): New function.
- * com.c (ffecom_f2c_longint_type_node): New type.
- (FFECOM_rttypeLONGINT_): New return type code.
- (ffecom_expr_): Add code to invoke pow_qq instead
- of pow_ii for INTEGER4 (INTEGER*8) case.
- If ffecom_expr_power_integer_ returns NULL_TREE, just do
- the usual work.
- (ffecom_make_gfrt_): Handle new type.
- (ffecom_expr_power_integer_): Let caller do the work if in
- dummy-transforming case, since
- caller now knows about INTEGER*8 and such, by returning
- NULL_TREE.
- * expr.c (ffeexpr_reduced_power_): Complain about non-INTEGER
- raised to INTEGER4 (INTEGER*8) power.
-
- * target.c (ffetarget_power_integerdefault_integerdefault):
- Fix any**negative.
- * com.c (ffecom_expr_power_integer_): Fix (-1)**(-8) and similar
- to ABS() the integral result if the exponent is negative
- and even.
-
- * ste.c (ffeste_begin_iterdo_): Clean up a type ref.
- Always convert iteration count to _default_ INTEGER.
-
- * sta.c (ffesta_second_): Add BYTE and WORD type/stmts;
- changes by Scott Snyder <snyder@d0sgif.fnal.gov>.
- * stb.c (ffestb_decl_recursive): Ditto.
- (ffestb_decl_recursive): Ditto.
- (ffestb_decl_entsp_2_): Ditto.
- (ffestb_decl_entsp_3_): Ditto.
- (ffestb_decl_funcname_2_): Ditto.
- (ffestb_decl_R539): Ditto.
- (ffestb_decl_R5395_): Ditto.
- * stc.c (ffestc_establish_declstmt_): Ditto.
- * std.c (ffestd_R539item): Ditto.
- (ffestd_R1219): Ditto.
- * stp.h: Ditto.
- * str-1t.fin: Ditto.
- * str-2t.fin: Ditto.
-
- * expr.c (ffeexpr_finished_): For DO loops, allow
- any INTEGER type; convert LOGICAL (assuming -fugly)
- to corresponding INTEGER type instead of always default
- INTEGER; let later phases do conversion of DO start,
- end, incr vars for implied-DO; change checks for non-integral
- DO vars to be -Wsurprising warnings.
- * ste.c (ffeste_io_impdo_): Convert start, end, and incr
- to type of DO variable.
-
- * com.c (ffecom_init_0): Add new types for [IL][234],
- much of which was done by Scott Snyder <snyder@d0sgif.fnal.gov>.
- * target.c: Ditto.
- * target.h: Ditto.
-
-Wed Mar 6 14:08:45 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * top.c (ffe_init_gbe_): Make -frerun-loop-opt the default.
-
-Mon Mar 4 12:27:00 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * expr.c (ffeexpr_exprstack_push_unary_): Really warn only
- about two successive _arithmetic_ operators.
-
- * stc.c (ffestc_R522item_object): Allow SAVE of (understood)
- local entity.
-
- * top.c (ffe_decode_option): New -f(no-)second-underscore options.
- * top.h: New options.
- * com.c (ffecom_get_external_identifier_, ffecom_get_identifier_):
- New options.
-
- * Make-lang.in (f77.maintainer-clean): Clean f/BUGS, f/INSTALL,
- f/NEWS.
- ($(srcdir)/f/BUGS, $(srcdir)/f/INSTALL, $(srcdir)/f/NEWS):
- New rules.
- ($(srcdir)/f/g77.info, $(srcdir)/f/g77.dvi): Depend on
- f/bugs.texi and f/news.texi.
- (f77.install-man): Install f77 man pages (if enabled).
- (f77.uninstall): Uninstall info docs, f77 man pages (if enabled).
-
- * top.c (ffe_init_gbe_): New function.
- (ffe_decode_option, ffe_file): Call ffe_init_gbe_ to
- set defaults for gcc options.
-
-Sat Jan 20 13:57:19 1996 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_get_identifier_): Eliminate needless
- comparison of results of strchr.
-
-Tue Dec 26 11:41:56 1995 Craig Burley <burley@gnu.ai.mit.edu>
-
- * Make-lang.in: Add rules for new files g77.texi, g77.info,
- and g77.dvi.
- Reorganize the *clean rules to more closely parallel gcc's.
-
- * config-lang.in: Exclude g77.info from diffs.
-
-Sun Dec 10 02:29:13 1995 Craig Burley <burley@gnu.ai.mit.edu>
-
- * expr.c (ffeexpr_declare_unadorned_,
- ffeexpr_declare_parenthesized_): Break out handling of
- contextDATAIMPDO[INDEX,CTRL] so it's independent of symbol state.
- Don't exec-transition these here (let ffeexpr_sym_impdoitem_
- handle that when appropriate). Don't "declare" them twice.
-
-Tue Dec 5 06:48:26 1995 Craig Burley <burley@gnu.ai.mit.edu>
-
- * stc.c (ffestc_promote_sfdummy_): Allow whereNONE parent
- symbol, since it is not necessarily known whether it will
- become LOCAL or DUMMY.
-
-Mon Dec 4 03:46:55 1995 Craig Burley <burley@gnu.ai.mit.edu>
-
- * lex.c (ffelex_display_token, ffelex_type_string_): Resurrect
- these from their old versions and update them for possible invocation
- from debugger.
- * lex.h (ffelex_display_token): Declare this in case anyone
- else wants to call it.
-
- * lex.c (ffelex_total_tokens_): Have this reflect actual allocated
- tokens, no longer include outstanding "uses" of tokens.
-
- * malloc.c, malloc.h (MALLOC_DEBUG): New macro to control
- checking of whether callers follow rules, now defaults to 0
- for "no checking" to improve compile times.
-
- * malloc.c (malloc_pool_kill): Fix bug that could prevent
- subpool from actually being killed (wasn't setting its use
- count to 1).
-
- * proj.h, *.c (dmpout): Replace all occurrences of `stdout'
- and some of `stderr' with `dmpout', so where to dump debugging
- output can be easily controlled during build; add default
- for `dmpout' of `stderr' to proj.h.
-
-Sun Dec 3 00:56:29 1995 Craig Burley <burley@gnu.ai.mit.edu>
-
- * com.c (ffecom_return_expr): Eliminate attempt at warning
- about unset return values, since the back end does this better,
- with better wording, and is not triggered by clearly working
- (but spaghetti) code as easily as this test.
-
-Sat Dec 2 08:28:56 1995 Craig Burley <burley@gnu.ai.mit.edu>
-
- * target.c (ffetarget_power_*_integerdefault): Raising 0 to
- integer constant power should not be an error condition;
- if so, other code should catch 0 to any power, etc.
-
- * bad.def (FFEBAD_BAD_POWER): 0**integer now a warning instead
- of an error.
-
-Fri Dec 1 00:12:03 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * bad.def: Clarify diagnostic regarding complex constant elements.
- * expr.c (ffeexpr_cb_comma_c_): Capitalize real/imaginary
- for clarified diagnostic.
-
- * com.c (ffecom_close_include_): Close the file!
-
- * lex.c (ffelex_file_fixed): Update line info if the line
- has any content, not just if it finishes a previous line
- or has a label.
- (ffelex_file_free): Clarify switch statement code.
-
-Sat Nov 18 19:37:22 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * Version 0.5.17 released.
-
-Fri Nov 17 14:27:24 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * Make-lang.in: Fix typo in comment.
-
- * Makefile.in (f/fini.o, f/proj-h.o): Don't use `$<' since
- not all makes support it (e.g. NeXT make), use explicit
- source name instead (with $(srcdir) and munging).
- (ASSERT_H): assert.h lives in source dir, not build dir.
-
-Thu Nov 16 12:47:50 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * com.c (ffecom_init_0): Fix dumb bug in code to produce
- warning message about non-32-bit-systems.
-
- * stc.c (ffestc_R501_item): Parenthesize test to make
- warning go away (and perhaps fix bug).
-
-Thu Nov 16 03:43:33 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * g77.c: Upgrade to 2.7.0's gcc.c.
- Fix -v to pass a temp name instead of "/dev/null" for "-o".
-
-Fri Nov 10 19:16:05 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * ste.c (ffeste_begin_iterdo_): Add Toon's change to
- make loops faster on some machines (implement termination
- condition as "--i >= 0" instead of "i-- > 0").
-
-Thu Nov 2 03:58:17 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * Make-lang.in: Remove unnecessary $(exeext) a la cp/Make-lang.in.
-
- * com.c (ffecom_expr_): Restore old strategy for assignp variant
- of opSYMTER case...always return the ASSIGN version of var.
- That way, `-O -Wuninitialized' will catch "I=3;GOTO I;END"
- (though the diagnostic will refer to `__g77_ASSIGN_i').
-
- * com.c (ffecom_expr_power_integer_): For constant rhs case,
- wrap every new eval of lhs in save_expr() so it is clear to
- back end that MULT_EXPR(lhs,lhs) has identical operands,
- otherwise for an rhs like 32767 it generates around 65K pseudo
- registers, with which stupid_life_analysis cannot cope
- (due to reg_renumber in regs.h being `short *' instead of
- `int *').
-
- * com.c (ffecom_expr_): Speed up implementation of LOGICAL
- versions of opNOT, opAND, opOR, opXOR/opNEQV, and opEQV by
- assuming the values actually are kosher LOGICAL bit patterns.
- Also simplify code that implements some of the INTEGER versions
- of these.
-
- * com.c (skip_redundant_dir_prefix, read_name_map,
- ffecom_open_include_, signed_type, unsigned_type): Fold in
- changes to cccp.c made from 2.7.0 through ss-950826.
-
- * equiv.c (ffeequiv_layout_local_): Kill the equiv list
- if no syms in list.
-
- * expr.c (ffeexpr_reduced_eqop2_): Issue specific diagnostic
- regarding usage of .EQV./.NEQV. in preference to .EQ./.NE..
-
- * intrin.c: Add ERF and ERFC as generic intrinsics.
- intrin.def: Same.
-
- * sta.c (ffesta_save_, ffesta_second_): Whoever calls
- ffestd_exec_begin must also set ffesta_seen_first_exec = TRUE,
- and anytime stc sees an exec transition, it must do both.
- stc.c (ffestc_eof): Same.
-
- * stc.c (ffestc_promote_sfdummy_): If failed implicit typing
- or CHARACTER*(*) arg, after calling ffesymbol_error, don't
- reset info to ENTITY/DUMMY, because ffecom_sym_transform_
- doesn't expect such a thing with ANY/ANY type.
-
- * target.h (*logical*): Change some of these so they parallel
- changes in com.c, e.g. for _eqv_, use (l)==(r) instead of
- !!(l)==!!(r), to get a more faithful result.
-
-Fri Oct 27 07:06:59 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * com.c (ffecom_sym_transform_): Simplify code for local
- EQUIVALENCE case.
-
- * expr.c (ffeexpr_exprstack_push_unary_): Warn about two
- successive operators.
- (ffeexpr_exprstack_push_binary_): Warn about "surprising"
- operator precedence, as in "-2**2".
-
- * lang-options.h: Add -W(no-)surprising options.
-
- * parse.c (yyparse): Don't reset -fpedantic if not -pedantic.
-
- * top.c (ffe_decode_option): Support new -Wsurprising option.
- * top.h: Ditto.
-
-Mon Oct 23 09:14:15 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * com.c (ffecom_finish_symbol_transform_): Don't transform
- NONE/NONE (CHARACTER*(*)) vars, as these don't mean anything
- in debugging terms, and can't be turned into anything
- in the back end (so ffecom_sym_transform_ crashes on them).
-
- * com.c (ffecom_expr_): Change strategy for assignp variant
- of opSYMTER case...always return the original var unless
- it is not wide enough.
-
- * ste.c (ffeste_io_cilist_): Clarify diagnostic for ASSIGN
- involving too-narrow variable. This shouldn't happen, though.
- (ffeste_io_icilist_): Ditto.
- (ffeste_R838): Ditto.
- (ffeste_R839): Ditto.
-
-Thu Oct 19 03:21:20 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * com.c (ffecom_sym_transform_assign_): Set TREE_STATIC
- using the same decision-making process as used for their twin
- variables, so ASSIGN can last across RETURN/CALL as appropriate.
-
-Fri Sep 22 20:21:18 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * Makefile.in: fini is a host program, so it needs a host-compiled
- version of proj.o, named proj-h.o. f/fini, f/fini.o, and
- f/proj-h.o targets updated accordingly.
-
- * com.c (__eprintf): New function.
-
-Wed Sep 20 02:26:36 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * lang-options.h: Add omitted -funix-intrinsics-* options.
-
- * malloc.c (malloc_find_inpool_): Check for infinite
- loop, crash if detected (user reports encountering
- them in some large programs, this might help track
- down the bugs).
-
-Thu Sep 7 13:00:32 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * com.c (lang_print_error_function): Don't dereference null
- pointer when outside any program unit.
- (ffecom_let_char_, ffecom_arg_ptr_to_expr): If catlist
- item or length ever error_mark_node, don't continue processing,
- since back-end functions like build_pointer_type crash on
- error_mark_node's (due to pushing bad obstacks, etc.).
-
-Wed Aug 30 15:58:35 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * Version 0.5.16 released.
-
-Mon Aug 28 12:24:20 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * bad.c (ffebad_finish): Fix botched message when no places
- are printed (due to unknown line info, etc.).
-
- * std.c (ffestd_subr_labels_): Do a better job finding
- line info in the case of typeANY and diagnostics.
-
-Fri Aug 25 15:19:29 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * com.c (DECL_ARTIFICIAL): Surround all references to this
- macro with #if !BUILT_FOR_270 and #endif.
- (init_lex): Surround print_error_function decl with
- #if !BUILT_FOR_270 and #endif.
- (lang_init): Call new ffelex_hash_kludge function to solve
- problem with preprocessed files that have INCLUDE statements.
-
- * lex.c (ffelex_getc_): New function.
- (ffelex_cfelex_): Use ffelex_getc_ instead of getc in any
- paths of code that can be affected by ffelex_hash_kludge.
- Don't make an EOF token for unrecognized token; set token
- to NULL instead, to avoid problems when not initialized.
- (ffelex_hash_): Use ffelex_getc_ instead of getc in any
- paths of code that can be affected by ffelex_hash_kludge.
- Test token returned by ffelex_cfelex_ for NULL, meaning
- unrecognized token.
- Get rid of useless used_up variable.
- Don't do ffewhere stuff or kill any tokens if in
- ffelex_hash_kludge.
- (ffelex_file_fixed, ffelex_file_free): Use ffelex_getc_
- instead of getc in any paths of code that can be affected
- by ffelex_hash_kludge.
- (ffelex_hash_kludge): New function.
-
- * lex.h (ffelex_hash_kludge): New function.
-
-Wed Aug 23 15:17:40 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * com.c: Implement -f(no-)underscoring options by always
- compiling in code to do it, and having that code inhibit
- itself when -fno-underscoring is in effect. This option
- overrides -f(no-)f2c for this purpose; -f(no-)f2c returns
- to it's <=0.5.15 behavior of affecting only how code
- is generated, not how/whether names are mangled.
-
- * target.h: Redo specification of appending underscores so
- the macros are named "_default" instead of "_is" and the
- two-underscore macro defaults to 1.
-
- * top.c, top.h (underscoring): Add appropriate stuff
- for the -f(no-)underscoring options.
-
-Tue Aug 22 10:25:01 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * bad.c (ffebad_finish): Call report_error_function (in toplev.c)
- to better identify location of problem.
- Say "(continued):" instead of "(continued:)" for consistency.
-
- * com.c (ffecom_gen_sfuncdef_): Set and reset new
- ffecom_nested_entry_ variable to hold ffesymbol being compiled.
- (lang_print_error_function): New function from toplev.c.
- Use ffecom_nested_entry_ to help determine which name
- and kind-string to print.
- (ffecom_expr_intrinsic_): Handle EXIT and FLUSH invocations
- with different calling sequences than library functions.
- Have SIGNAL and SYSTEM push and pop calltemps, and convert
- their return values to the destination type (just in case).
- (FFECOM_rttypeINT_): New return type for `int', in case
- gcc/f/runtime/libF77/system_.c(system_) is really supposed
- to return `int' instead of `ftnint'.
-
- * com.h (report_error_function): Declare this.
-
- * equiv.c (ffeequiv_layout_local_): Don't forget to consider
- root variable itself as possible "first rooted variable",
- else might never set symbol and then crash later.
-
- * intrin.c (ffeintrin_check_exit_): Change to allow no args
- and rename to ffeintrin_check_int_1_o_ for `optional'.
- #define ffeintrin_check_exit_ and _flush_ to this new
- function, so intrin.def can refer to the appropriate names.
-
- * intrin.def (FFEINTRIN_impFLUSH): Validate using
- ffeintrin_check_flush_ so passing an INTEGER arg is allowed.
-
- * lex.c (ffelex_file_push_, ffelex_file_pop_): New functions
- to manage input_file_stack in gbe.
- (ffelex_hash_): Call new functions (instead of doing code).
- (ffelex_include_): Call new functions to update stack for
- INCLUDE (_hash_ handles cpp output of #include).
-
-Mon Aug 21 08:09:04 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * Makefile.in: Put `-W' in front of every `-Wall', since
- 2.7.0 requires that to engage `-Wunused' for parameters.
-
- * com.c: Mark all parameters as artificial, so
- `-W -Wunused' doesn't complain about unused ones (since
- there's no way right not to individually specify attributes
- like `unused').
-
- * proj.h: Don't #define UNUSED if already defined, regardless
- of host compiler.
-
-Sun Aug 20 16:03:56 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * gbe/2.7.0.diff: Regenerate.
-
- * lang-options.h, lang-specs.h: If not __STDC__ (ANSI C),
- avoid doing anything, especially the stringizing in -specs.h.
-
-Thu Aug 17 03:36:12 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * lang-specs.h: Remove useless optional settings of -traditional,
- since -traditional is always set anyway.
-
-Wed Aug 16 16:56:46 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * Make-lang.in (F2C_INSTALL_FLAG, F2CLIBOK): More
- control over whether to install f2c-related stuff.
- (install-f2c-*): New targets to install f2c-related
- stuff in system, not just gcc, directories.
-
- * com.c: Change calls to ffecom_get_invented_identifier
- to use generally more predictable names.
- Change calls to build_range_type to ensure consistency
- of types of operands.
- (ffecom_get_external_identifier_): Change to accept
- symbol info, not just text, so it can use f2c flag for
- symbol to decide whether to append underscore(s).
- (ffecom_get_identifier_): Don't change names if f2c flag
- off for compilation.
- (ffecom_type_permanent_copy_): Use same type for new max as
- used for min.
- (ffecom_notify_init_storage): Offline fixups for stand-alone.
-
- * data.c (ffedata_gather): Explicitly test for common block,
- since it's no longer always the case that a local EQUIVALENCE
- group has no symbol ptr (it now can, if a user-predictable
- "rooted" symbol has been identified).
-
- * equiv.c: Add some debugging stuff.
- (ffeequiv_layout_local_): Set symbol ptr with user-predictable
- "rooted" symbol, for giving the invented aggregate a
- predictable name.
-
- * g77.c (append_arg): Allow for 20 extra args instead of 10.
- (main): For version-only case, add `-fnull-version' and, unless
- explicitly omitted, `-lf2c -lm'.
-
- * lang-options.h: New "-fnull-version" option.
-
- * lang-specs.h: Support ".fpp" suffix for preprocessed source
- (useful for OS/2, MS-DOS, other case-insensitive systems).
-
- * stc.c (ffestc_R544_equiv_): Swap way lists are merged so this
- is consistent with the order in which lists are built, making
- user predictability of invented aggregate name much higher.
-
- * storag.c, storag.h (FFESTORAG_typeDUMMY): Delete this enum.
-
- * top.c: Accept, but otherwise ignore, `-fnull-version'.
-
-Tue Aug 15 07:01:07 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * DOC, INSTALL, PROJECTS: Extensive improvements to documentation.
-
-Sun Aug 13 01:55:18 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * INSTALL (f77-install-ok): Document the use of this file.
-
- * Make-lang.in (F77_INSTALL_FLAG): New flag to control
- whether to install an `f77' command (based on whether
- a file named `f77-install-ok' exists in the source or
- build directory) to replace the broken attempt to use
- comment lines to avoid installing `f77' (broken in the
- sense that it prevented installation of `g77').
-
-Mon Aug 7 06:14:26 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * DOC: Add new sections for g77 & gcc compiler options,
- source code form, and types, sizes and precisions.
- Remove lots of old "delta-version" info, or at least
- summarize it.
-
- * INSTALL: Add info here that used to be in DOC.
- Other changes.
-
- * g77.c (lookup_option, main): Check for --print-* options,
- so we avoid adding version-determining stuff.
-
-Wed Jul 26 15:51:03 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * Make-lang.in, Makefile.in (input.j, INPUT_H): New file.
- Update dependencies accordingly.
-
- * bad.c (ffebad_here): Okay to use unknown line/col.
-
- * compilers.h (@f77-cpp-input): Remove -P option now that
- # directives are handled by f771. Update other options
- to be more consistent with @c in gcc/gcc.c. Don't run f771
- if -E specified, etc., a la @c.
- (@f77): Don't run f771 if -E specified, etc., a la @c.
-
- * config-lang.in: Avoid use of word "guaranteed".
-
- * input.j: New file to wrap around gcc/input.h.
-
- * lex.j: Add support for parsing # directives output by cpp.
- (ffelex_cfebackslash_): New function.
- (ffelex_cfelex_): New function.
- (ffelex_get_directive_line_): New function.
- (ffelex_hash_): New function.
- (ffelex_include_): Change to not use ffewhere_file_(begin|end).
- Also fix bug in pointing to next line (for diagnostics, &c)
- following successful INCLUDE.
- (ffelex_next_line_): New function that does chunk of code
- seen in several places elsewhere in the lexers.
- (ffelex_file_fixed): Delay finishing statement until source
- line is registered with ffewhere, so INCLUDE processing
- picks up the info correctly.
- Okay to kill or use unknown line/col objects now.
- Handle HASH (#) lines.
- Reorder tests for insubstantial lines to put most frequent
- occurrences at top, for possible minor speedup.
- Some general consolidation of code.
- (ffelex_file_free): Handle HASH (#) lines.
- Okay to kill or use unknown line/col objects now.
- Some general consolidation of code.
- (ffelex_init_1): Detect HASH (#) lines.
- (ffelex_set_expecting_hollerith): Okay to kill or use unknown
- line/col objects now.
-
- * lex.h (FFELEX_typeHASH): New enum.
-
- * options-lang.h (-fident, -fno-ident): New options.
-
- * stw.c (ffestw_update): Okay to kill unknown line/col objects
- now.
-
- * target.h (FFETARGET_okREALQUAD, FFETARGET_okCOMPLEXDOUBLE,
- FFETARGET_okCOMPLEXQUAD): #define these appropriately.
-
- * top.c: Include flag.j wrapper, not flags.h directly.
- (ffe_is_ident_): New flag.
- (ffe_decode_option): Handle -fident and -fno-ident.
- (ffe_file): Replace obsolete ffewhere_file_(begin|end) with
- ffewhere_file_set.
-
- * top.h (ffe_is_ident_, ffe_is_ident, ffe_set_is_ident):
- New flag and access functions.
-
- * where.c, where.h: Remove all tracking of parent file.
- (ffewhere_file_begin, ffewhere_file_end): Delete these.
- (ffewhere_line_use): Make it work with unknown line object.
-
-Mon Jul 17 03:04:09 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * com.c (ffecom_sym_transform_): Set DECL_IN_SYSTEM_HEADER
- flag for any local vars used as stmtfunc dummies or DATA
- implied-DO iter vars, so no -Wunused warnings are produced
- for them (a la f2c).
- (ffecom_init_0): Do "extern int xargc;" for IARGC() intrinsic.
- Warn if target machine not 32 bits, since g77 isn't yet
- working on them at all well.
-
- * expr.c (ffeexpr_sym_lhs_call_, ffeexpr_sym_lhs_data_,
- ffeexpr_sym_lhs_extfunc_, ffeexpr_sym_rhs_actualarg_,
- ffeexpr_sym_rhs_let_, ffeexpr_paren_rhs_let_): Don't
- gratuitously set attr bits that don't apply just
- to avoid null set meaning error; instead, use explicit
- error flag, and allow null attr set, to
- fix certain bugs discovered by looking at this code.
-
- * g77.c: Major changes to improve support for gcc long options,
- to make `g77 -v' report more useful info, and so on.
-
-Mon Jul 3 14:49:16 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * DOC, com.c, intrin.h, intrin.c, intrin.def, target.h, top.c,
- top.h: Add new `unix' group of intrinsics, which includes the
- newly added ERF, ERFC, EXIT, plus even newer ABORT, DERF, DERFC,
- FLUSH, GETARG, GETENV, SIGNAL, and SYSTEM.
-
-Tue Jun 27 23:01:05 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * bld.c, bld.h (ffebld_constant_pool,
- ffebld_constant_character_pool): Use a single macro (the
- former) to access the pool for allocating constants, instead
- of latter in public and FFEBLD_CONSTANT_POOL_ internally
- in bld.c (which was the only one that was correct before
- these changes). Add verification of integrity of certain
- heap-allocated areas.
-
- * com.c (ffecom_overlap_, ffecom_args_overlap_,
- ffecom_tree_canonize_ptr_, ffecom_tree_canonize_ref_): New
- functions to optimize calling COMPLEX and, someday, CHARACTER
- functions requiring additional argument to be passed.
- (ffecom_call_, ffecom_call_binop_, ffecom_expr_,
- ffecom_expr_intrinsic_): Change calling
- sequences to include more info on possible destination.
- (ffecom_expr_intrinsic_): Add ERF(), ERFC(), and EXIT()
- intrinsic code.
- (ffecom_sym_transform_): For assumed-size arrays, set high
- bound to highest possible value instead of low bound, to
- improve validity of overlap checking.
- (duplicate_decls): If olddecl and newdecl are the same,
- don't do any munging, just return affirmative.
-
- * expr.c: Change ffecom_constant_character_pool() to
- ffecom_constant_pool().
-
- * info.c (ffeinfo_new): Compile this version if not being
- compiled by GNU C.
-
- * info.h (ffeinfo_new): Don't define macro if not being
- compiled by GNU C.
-
- * intrin.c, intrin.def: Add ERF(), ERFC(), and EXIT() intrinsics.
- (ffeintrin_check_exit_): New for EXIT() subroutine intrinsic.
-
- * malloc.c, malloc.h (malloc_verify_*): New functions to verify
- integrity of heap-storage areas.
-
- * stc.c (ffestc_R834, ffestc_R835): Handle possibility that
- an enclosing DO won't have a construct name even when the
- CYCLE/EXIT does (i.e. without dereferencing NULL).
-
- * target.c, target.h (ffetarget_verify_character1): New function
- to verify integrity of heap storage used to hold character constant.
-
-Thu Jun 22 15:36:39 1995 Howard Gordon (flash@super.org)
-
- * stp.h (ffestpVxtcodeIx): Fix typo in typedef for this.
-
-Mon May 29 15:22:31 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * *: Make all sorts of changes to accommodate upcoming gcc-2.7.0.
- I didn't keep track of them, nor just when I made them, nor
- when I (much later, probably in early August 1995) modified
- them so they could properly handle both 2.7.0 and 2.6.x.
-
- * com.c (ffecom_expr_power_integer_): Don't expand_start_stmt_expr
- if transforming dummy args, because the back end cannot handle
- that (it's rejected by the gcc front end), just generate
- call to run-time library.
- Back out changes in 0.5.15 because more temporaries might be
- needed anyway (for COMPLEX**INTEGER).
- (ffecom_push_tempvar): Remove inhibitor.
- Around start_decl and finish_decl (in particular, arround
- expand_decl, which is called by them), push NULL_TREE into
- sequence_rtl_expr, an external published by gcc/function.c.
- This makes sure the temporary is truly in the function's
- context, not the inner context of a statement-valued expression.
- (I think the back end is inconsistent here, but am not
- interested in convincing the gbe maintainers about this now.)
- (pushdecl): Make sure that when pushing PARM_DECLs, nothing
- other than them are pushed, as happened for 0.5.15 and which,
- if done for other reasons not fixed here, might well indicate
- some other problem -- so crash if it happens.
-
- * equiv.c (ffeequiv_layout_local_): If the local equiv group
- has a non-nil COMMON field, it should mean that an error has
- occurred and been reported, so just trash the local equiv
- group and do nothing.
-
- * stc.c (ffestc_promote_sfdummy_): Set sfdummy arg state to
- UNDERSTOOD so above checking for duplicate args actually
- works, and so we don't crash later in pushdecl.
-
- * ste.c (ffeste_R1001): Set initial value only for VAR_DECLs,
- not for, e.g., LABEL_DECLs, which the FORMAT label can be
- if it was previously treated as an executable label.
-
-Sat May 20 01:53:53 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * com.c (ffecom_sym_transform_): For adjustable arrays,
- pass high bound through variable_size in case its primaries
- are changed (dumb0.f, and this might also improve
- performance so it approaches f2c|gcc).
-
-Fri May 19 11:00:36 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * Version 0.5.15 released.
-
- * com.c (ffecom_expr_power_integer_): Push temp vars
- before expanding a statement expression, since that seems
- to cause temp vars to be "forgotten" after the end of the
- expansion in the back end. Disallow more temp-var
- pushing during such an expansion, just in case.
- (ffecom_push_tempvar): Crash if a new variable needs to be
- pushed but cannot be at this point (should never happen).
-
-Wed May 17 12:26:16 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * expr.c (ffeexpr_collapse_convert): Add code to convert
- LOGICAL to CHARACTER. Reject conversion of REAL or COMPLEX
- to CHARACTER entirely, as it cannot be supported with all
- configurations.
-
- * target.h, target.c (ffetarget_convert_character1_logical1):
- New function.
-
-Sun May 14 00:00:09 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * com.c (ffecom_do_entry_, ffecom_gen_sfuncdef_,
- ffecom_start_progunit_, ffecom_sym_transform_,
- ffecom_init_0, start_function): Changes to have REAL
- external functions return same type as DOUBLE PRECISION
- external functions when -ff2c is in force; while at it,
- some code cleanups done.
-
- * stc.c (ffestc_R547_item_object): Disallow array declarator
- if one already exists for symbol.
-
- * ste.c (ffeste_R1227): Convert result variable to type
- of function result as seen by back end (e.g. for when REAL
- external function actually returns result as double).
-
- * target.h (FFETARGET_defaultFIXED_LINE_LENGTH): New
- macro for default for -ffixed-line-length-N option.
-
- * top.c (ffe_fixed_line_length_): Initialize this to new
- target.h macro instead of constant 72.
-
-Tue May 9 01:20:03 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * lex.c (ffelex_send_token_): If sending CHARACTER token with
- null text field, put a single '\0' in it and set length/size
- fields to 0 (to fix 950508-0.f).
- (ffelex_image_char_): When setting ffelex_bad_line_ to TRUE,
- always "close" card image by appending a null char and setting
- ffelex_card_length_. As part of this, append useful text
- to identify the two kinds of problems that involve this.
- (ffelex_file_fixed): Reset ffelex_bad_line_ to FALSE after
- seeing a line with invalid first character (fixes 950508-1.f).
- If final nontab column is zero, assume tab seen in line.
- (ffelex_card_image_): Always make this array 8 characters
- longer than reflected by ffelex_card_size_.
- (ffelex_init_1): Get final nontab column info from top instead
- of assuming 72.
-
- * options-lang.h: Add -ffixed-line-length- prefix.
-
- * top.h: Add ffe_fixed_line_length() and _set_ version, plus
- corresponding extern.
-
- * top.c: Handle -ffixed-line-length- option prefix.
-
-Fri Apr 28 05:40:25 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * Version 0.5.14 released.
-
- * Make-lang.in: Add assert.j.
-
- * Makefile.in: Add assert.j.
-
- * assert.j: New file.
-
-Thu Apr 27 16:24:22 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * bad.h (ffebad_severity): New function.
-
- * bad.c (ffebad_severity): New function.
-
- * bad.def (FFEBAD_OPEN_INCLUDE): Change severity from SEVERE
- to FATAL, since processing continues, and that seems fine.
+ * version.c: Bump version.
- * com.c: Add facility to handle -I.
- (ffecom_file, ffecom_close_include, ffecom_open_include,
- ffecom_decode_include_option): New global functions for -I.
- (ffecom_file_, ffecom_initialize_char_syntax_,
- ffecom_close_include_, ffecom_decode_include_option_,
- ffecom_open_include_, append_include_chain, open_include_file,
- print_containing_files, read_filename_string, file_name_map,
- savestring): New internal functions for -I.
+Wed May 12 07:30:05 1999 Craig Burley <craig@jcb-sc.com>
- * compilers.h: Pass -I flag(s) to f771 (via "%{I*}").
+ * com.c (lang_init_options): Disable back end's maintenance
+ of errno.
+ * news.texi: Document dropping of errno.
- * lex.c (ffelex_include_): Call ffecom_close_include
- to close include file, for its tracking needs for -I,
- instead of using fclose.
+1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
- * options-lang.h: Add -I prefix.
+ * lang-specs.h: Pass -$ to the preprocessor.
- * parse.c (yyparse): Call ffecom_file for main input file,
- so -I handling works (diagnostics).
+Mon May 10 18:14:28 1999 Craig Burley <craig@jcb-sc.com>
- * std.c (ffestd_S3P4): Have ffecom_open_include handle
- opening and diagnosing errors with INCLUDE files.
+ * g77.texi: Fix various @xref's per proper style.
+ Go ahead and use nested braces in @xref's, with care.
+ * g77install.texi: Fix @xref per proper style.
- * ste.c (ffeste_begin_iterdo_): Use correct algorithm for
- calculating # of iterations -- mathematically similar but
- computationally different algorithm was not handling cases
- like "DO I=6,5,2" correctly, because (5-6)/2+1 => 1, not 0.
+Mon May 10 17:38:39 1999 Craig Burley <craig@jcb-sc.com>
- * top.c (ffe_decode_option): Allow -I, restructure a bit
- for clarity and, maybe, speed.
+ * news.texi: Doc upgrade to netlib libf2c as of today.
-Mon Apr 17 13:31:11 1995 Craig Burley (burley@gnu.ai.mit.edu)
+Sun May 9 18:52:13 1999 Hans-Peter Nilsson <hp@bitrange.com>
- * g77.c: Remove -lc, turns out not all systems has it, but
- leave other changes in for clarity of code.
+ * f/g77spec.c (lang_specific_driver): Correct bug-report address
+ and point to the FAQ.
-Sun Apr 16 21:50:33 1995 Craig Burley (burley@gnu.ai.mit.edu)
+Thu May 6 12:40:21 1999 Craig Burley <craig@jcb-sc.com>
- * com.c (ffecom_expr_): Implement ARRAY_EXPR as INDIRECT_REF
- of appropriate PLUS_EXPRs of ptr_to_expr of array, to see
- if this generates better code. (Conditional on
- FFECOM_FASTER_ARRAY_REFS.)
+ * g77.texi (Arbitrary Concatenation): Put this under
+ "Missing Features" instead of "Projects".
+ (Internals Documentation): Point to new "Front End" chapter.
-Sun Apr 16 00:22:48 1995 Craig Burley (burley@gnu.ai.mit.edu)
+Thu May 6 08:23:52 1999 Craig Burley <craig@jcb-sc.com>
- * Make-lang.in (F77_SRCS): Remove g77.c, since it doesn't
- contribute to building f771.
+ * bugs.texi, news.texi: Automatic arrays reportedly working
+ on HP-UX systems.
- * Makefile.in (dircheck): Remove/replace with f/Makefile, because
- phony targets that are referenced in other real targets get run
- when those targets are specified, which is a waste of time (e.g.
- when rebuilding and only g77.c has changed, f771 was being linked
- anyway).
+Thu May 6 08:19:31 1999 Craig Burley <craig@jcb-sc.com>
- * g77.c: Include -lc between -lf2c and -lm throughout.
+ * g77.texi (Advantages Over f2c): Expand on this topic.
- * implic.c (ffeimplic_establish_symbol): If -Wimplicit, warn if
- implicit type given to symbol.
+Mon May 3 19:41:48 1999 Craig Burley <craig@jcb-sc.com>
- * lex.c (ffelex_include_): Don't gratuitously increment line
- number here.
+ * com.c (ffecom_expr_intrinsic_): Fix test of CTIME_subr.
- * top.h, top.c (ffe_is_warn_implicit_): New global variable and
- related access macros.
- (ffe_decode_option): Handle -W options, including -Wall and
- -Wimplicit.
+Mon May 3 18:11:48 1999 Craig Burley <craig@jcb-sc.com>
- * where.c (ffewhere_line_new): Don't muck with root line (was
- crashing on null input since lexer changes over the past week
- or so).
+ Reverse order of two arguments to CTIME_subr, DTIME_subr,
+ ETIME_subr, and TTYNAM_subr:
+ * com.c (ffecom_expr_intrinsic_): Reverse the arguments.
+ While at it, set TREE_SIDE_EFFECTS for CTIME_subr and
+ TTYNAM_subr.
+ * intdoc.in: Document the new calling sequences.
+ * intrin.def: Reverse the arguments.
+ * news.texi: Document the fact that they changed.
+ * version.c: Bump version.
-Thu Apr 13 16:48:30 1995 Craig Burley (burley@gnu.ai.mit.edu)
+Mon May 3 11:28:14 1999 Craig Burley <craig@jcb-sc.com>
- * com.c (ffecom_init_0): Register built-in functions for cos,
- sin, and sqrt.
- (ffecom_tree_fun_type_double): New variable.
- (ffecom_expr_intrinsic_): Update f2c input and output files
- to latest version of f2c (no important g77-related changes
- noted, just bug fixes to f2c and such).
- (builtin_function): New function from c-decl.c.
+ * news.texi: Doc upgrade to netlib libf2c as of today.
- * com-rt.def: Refer to built-in functions for cos, sin, and sqrt.
+Sun May 2 17:04:28 1999 Craig Burley <craig@jcb-sc.com>
-Thu Apr 13 10:25:09 1995 Craig Burley (burley@gnu.ai.mit.edu)
+ * version.c: Bump version.
- * com.c (ffecom_expr_intrinsic_): Convert 0. to appropriate
- type to keep DCMPLX(I) from crashing the compiler.
- (ffecom_expr_): Don't convert result from ffecom_tree_divide_.
- (ffecom_tree_divide_): Add tree_type argument, have all callers
- pass one, and don't convert right-hand operand to it (this is
- to make this new function work as much like the old in-line
- code used in ffecom_expr_ as possible).
+Sun May 2 16:53:01 1999 Craig Burley <craig@jcb-sc.com>
- * lex.c: Maintain lineno and input_filename the way the gcc
- lexer does.
+ Fix compile/19990502-1.f:
+ * ste.c (ffeste_R819B): Don't overwrite tree for temp
+ variable when expanding the assignment into it.
- * std.c (ffestd_exec_end): Save and restore lineno and
- input_filename around the second pass, which sets them
- appropriately for each saved statement.
+Sun Apr 25 20:55:10 1999 Craig Burley <craig@jcb-sc.com>
-Wed Apr 12 09:44:45 1995 Craig Burley (burley@gnu.ai.mit.edu)
+ Fix 19990325-0.f and 19990325-1.f:
+ * com.c (ffecom_possible_partial_overlap_): New function.
+ (ffecom_expand_let_stmt): Use it to determine whether to assign
+ to a COMPLEX operand through a temp.
+ * news.texi: Document fix.
- * com.c (ffecom_expr_power_integer_): New function.
- (ffecom_expr_): Call new function for power op with integer second
- argument, for generating better code. Also replace divide
- code with call to new ffecom_tree_divide_ function.
- Canonicalize calls to ffecom_truth_value(_invert).
- (ffecom_tree_divide_): New function.
+ * version.c: Bump version.
-Wed Apr 5 14:15:44 1995 Craig Burley (burley@gnu.ai.mit.edu)
+Sat Apr 24 12:19:53 1999 Craig Burley <craig@jcb-sc.com>
- * lex.c: Change to allocate text for tokens only when actually
- needed, which should speed compilation up somewhat.
- Change to allow INCLUDE at any point where a statement
- can end, i.e. in ffelex_finish_statement_ or when a SEMICOLON
- token is sent.
- Remove some old, obsolete code.
- Clean up layout of entire file to improve formatting,
- readability, etc.
- (ffelex_set_expecting_hollerith): Remove include argument.
+ * expr.c (ffeexpr_finished_): Convert DATA implied-do
+ start/end/incr expressions to default INTEGER.
+ Fix some broken conditionals.
+ Clean up some code in the region.
+ * news.c: Document the fix.
-Fri Mar 31 23:19:08 1995 Craig Burley (burley@gnu.ai.mit.edu)
+ * version.c: Bump version.
- * bad.h, bad.c (ffebad_start_msg, ffebad_start_msg_lex):
- New functions to generate arbitrary messages.
- (FFEBAD_severityPEDANTIC): New severity, to correspond
- to toplev's pedwarn() function.
+Fri Apr 23 02:08:32 1999 Craig Burley <craig@jcb-sc.com>
- * lex.c (ffelex_backslash_): New function to implement
- backslash processing.
- (ffelex_file_fixed, ffelex_file_free): Implement new
- backslash processing.
+ * g77.texi (Compiler Prototypes): Replace "missing" subscript-
+ checking option with something else.
- * std.c (ffestd_R1001dump_): Don't assume CHARACTER and
- HOLLERITH tokens stop at '\0' characters, now that backslash
- processing is supported -- use their advertised lengths instead,
- and double up the '\002' character for libf2c.
+Fri Apr 23 01:48:28 1999 Craig Burley <craig@jcb-sc.com>
-Mon Mar 27 17:10:33 1995 Craig Burley (burley@gnu.ai.mit.edu)
+ Support new -fsubscript-check and -ff2c-subscript-check options:
+ * com-rt.def (FFECOM_gfrtRANGE): Describe s_rnge, in libf2c/libF77.
+ * com.c (ffecom_subscript_check_, ffecom_arrayref_): New functions.
+ (ffecom_char_args_x_): Use new ffecom_arrayref_ function for
+ FFEBLD_opARRAYREF case.
+ Compute character name, array type, and use new
+ ffecom_subscript_check_ function for FFEBLD_opSUBSTRING case.
+ (ffecom_expr_): Use new ffecom_arrayref_ function.
+ (ffecom_ptr_to_expr): Use new ffecom_arrayref_ function.
+ * g77.texi, news.texi: Document new options.
+ * top.c, top.h: Support new options.
- * com.c (ffecom_init_local_zero_): Implement -finit-local-zero.
- (ffecom_sym_transform_): Same.
- (ffecom_transform_equiv_): Same.
+ * news.texi: Fix up some items to not be in "User-Visible Changes".
- * options-lang.h: Add -f(no-)(init-local-zero,backslash,ugly-init).
+ * ste.c (ffeste_R819B): Fix type for loop variable, to avoid
+ warnings.
- * stb.c (ffestb_V020): Reject "TYPEblah(...", which might be
- an array assignment.
+ * version.c: Bump version.
- * target.h, top.h, top.c: Implement -finit-local-zero.
+Tue Apr 20 01:38:57 1999 Craig Burley <craig@jcb-sc.com>
-Fri Mar 24 19:56:22 1995 Craig Burley (burley@gnu.ai.mit.edu)
+ * bugs.texi, news.texi: Clarify -malign-double situation.
- * Make-lang.in, Makefile.in: Remove conf-proj(.in) and
- proj.h(.in) rules, plus related config.log, config.cache,
- and config.status stuff.
+Tue Apr 20 01:15:25 1999 Craig Burley <craig@jcb-sc.com>
- * com.c (ffecom_init_0): Change messages when atof(), bsearch(),
- or strtoul() do not work as expected in the start-up test.
-
- * conf-proj, conf-proj.in: Delete.
-
- * lex.c (ffelex_file_fixed): Allow f2c's '&' in column 1
- to mean continuation line.
-
- * options-lang.h: New file, #include'd by ../toplev.c.
-
- * proj.h.in: Rename back to proj.h.
-
- * proj.h (LAME_ASSERT): Remove.
- (LAME_STDIO): Remove.
- (NO_STDDEF): Remove.
- (NO_STDLIB): Remove.
- (NO_BSEARCH): Remove auto detection, rename to !FFEPROJ_BSEARCH.
- (NO_STRTOUL): Remove auto detection, rename to !FFEPROJ_STRTOUL.
- (USE_HOST_LIMITS): Remove (maybe still needed by stand-alone?).
- (STR, STRX): Do only ANSI C definitions.
-
-Mon Mar 13 10:46:13 1995 Craig Burley (burley@gnu.ai.mit.edu)
+ * stb.c (ffestb_R5282_): Convert DATA repeat count
+ to default INTEGER, to avoid problems downstream.
- * BUGS: Add item about g77 requiring gcc to compile it.
-
- * NEWS: New file listing user-visible changes in the release.
-
- * PROJECTS: Update to include a new item or two, and modify
- or delete items that are addressed in this or previous releases.
-
- * bad.c (ffebad_finish): Don't crash if missing string &c,
- just substitute obviously distressed string "[REPORT BUG!!]"
- for cases where the message/caller are fudgy.
+ * version.c: Bump version.
- * bad.def: Clean up error messages in a major way, add new ones
- for use by changes in target.c.
-
- * com.c (ffecom_expr_): Handle opANY in opCONVERT.
- (ffecom_let_char_): Disregard destinations with ERROR_MARK.
- (ffecom_1, ffecom_1_fn, ffecom_2, ffecom_2s, ffecom_3,
- ffecom_3s, &c): Check all inputs for error_mark_node.
- (ffecom_start_progunit_): Don't transform all symbols
- in BLOCK DATA, since it never executes, and it is silly
- to, e.g., generate all the structures for NAMELIST.
- (ffecom_char_length_expr_): Rename to ffecom_intrinsic_len_.
- (ffecom_intrinsic_ichar_): New function to handle ICHAR of
- arbitrary expression with possible 0-length operands.
- (ffecom_expr_intrinsic_): Use ffecom_intrinsic_char_.
- For MVBITS, set tree_type to void_type_node.
- (ffecom_start_progunit_): Name master function for entry points
- after primary entry point so users can easily guess it while
- debugging.
- (ffecom_arg_ptr_to_expr): Change treatment of Hollerith,
- Typeless, and %DESCR.
- (ffecom_expr_): Change treatment of Hollerith.
-
- * data.c (ffedata_gather_): Handle opANY in opCONVERT.
+Mon Apr 19 21:36:48 1999 Craig Burley <craig@jcb-sc.com>
- * expr.c (ffeexpr_token_apostrophe_): Issue FFEBAD_NULL_CHAR_CONST
- warning as necessary.
- (ffeexpr_token_name_rhs_): Set context for args to intrinsic
- so that assignment-like concatenation is allowed for ICHAR(),
- IACHAR(), and LEN() intrinsics.
- (ffeexpr_reduced_*_): Say "an array" instead of "an entity" in
- diagnostics, since it's more informative.
- (ffeexpr_finished_): For many contexts, check for null expression
- and array before trying to do a conversion, to avoid redundant
- diagnostics.
+ * ste.c (ffeste_R819B): Start the loop before expanding
+ the termination expression.
- * g77.1: Fix typo for preprocessed suffix (.F, not .f).
+ * version.c: Bump version.
- * global.c (ffeglobal_init_common): Warn if initializing
- blank common.
- (ffeglobal_pad_common): Enable code to warn if initial
- padding needed.
- (ffeglobal_size_common): Complain if enlarging already-
- initialized common, since it won't work right anyway.
+Sun Apr 18 21:53:58 1999 Craig Burley <craig@jcb-sc.com>
+
+ * com.c (ffecom_sym_transform_): COMMON and EQUIVALENCE
+ variables have constant addresses (EQUIVALENCE only if
+ containing aggregate is static).
+
+Sat Apr 17 16:55:59 1999 Craig Burley <craig@jcb-sc.com>
+
+ * bugs.texi, ffe.texi, g77.texi, g77install.texi, news.texi:
+ Clean up @code{} vs. @samp{}.
+ Clean up dashes (`--') vs. @minus{} vs. `---'.
+
+ * ffe.texi: Add copyright header.
+
+ * g77.texi, lang-options.h, news.texi, top.c (ffe_decode_option):
+ Remove support for -fugly option.
+ Clarify that -fugly-logint is needed instead of -fugly
+ to work around using .EQ./.NE. on LOGICAL operands.
+ Explain more about why -fugly-logint is bad juju.
+
+ * g77.texi (Missing Features): Describe READONLY as a missing
+ feature. Describe AUTOMATIC better.
+
+ * news.texi: Mention libf2c upgrade.
+
+Sat Apr 17 14:05:53 1999 Craig Burley <craig@jcb-sc.com>
+
+ Make a place for front-end internals documentation:
+ * Make-lang.in (f/g77.info, f/g77.dvi): Depend on f/ffe.texi.
+ * ffe.texi: New file, containing docs on front-end internals.
+ * g77.texi: New chapter for, and inclusion of, ffe.texi.
+
+ * g77.texi: Fix an index entry.
+
+Sat Apr 17 13:53:43 1999 Craig Burley <craig@jcb-sc.com>
+
+ Rewrite to use block/scope structure of GBE and to ensure
+ variables (especially those going on stack/reg) are declared
+ before executable code generated:
+ * bld.c (ffebld_new_item, ffebld_new_one, ffebld_new_two):
+ Support new hooks.
+ * bld.h (ffebld_item_hook, ffebld_item_set_hook,
+ ffebld_nonter_hook, ffebld_nonter_set_hook): Ditto.
+ * bld.h (ffebld_basictype, ffebld_kind, ffebld_kindtype,
+ ffebld_rank, ffebld_where): New convenience macros (used
+ by rest of this patch).
+ * com.c, com.h (ffecom_push_calltemps, ffecom_pop_calltemps,
+ ffecom_push_tempvar, ffecom_pop_tempvar): Remove temp-var-
+ handling mechanism.
+ * com.c (ffecom_call_, ffecom_call_binop_, ffecom_tree_divide_,
+ ffecom_call_gfrt): Support passing hooks for temp-var info.
+ (ffecom_expr_power_integer_): Takes opPOWER expression, instead
+ of its left and right operands, so it can get at the hook.
+ (ffecom_prepare_let_char_, ffecom_prepare_arg_ptr_to_expr,
+ ffecom_prepare_end, ffecom_prepare_expr_, ffecom_prepare_expr_rw,
+ ffecom_prepare_expr_w, ffecom_prepare_return_expr,
+ ffecom_prepare_ptr_to_expr): New functions supporting expression
+ pre-scanning.
+ (bison_rule_compstmt_): Return the tree, as in the CFE.
+ (delete_block): New function, from CFE.
+ (kept_level_p): New function, from CFE, modified.
+ (ffecom_start_compstmt, ffecom_end_compstmt): New functions,
+ replacing ffecom_start_compstmt_ and ffecom_end_compstmt_ macros,
+ and they do real work.
+ (struct binding_level): Add prep_state member. Initialize to 0.
+ (ffecom_get_invented_identifier): Now takes either or both a
+ string and an integer, using -1 to denote no integer.
+ (ffecom_do_entry_): Disallow temp-var generation via expressions
+ in body of function, since the exprs aren't prescanned.
+ (ffecom_expr_rw): Now takes destination tree.
+ (ffecom_expr_w): New function, now used in some places
+ ffecom_expr_rw had been used.
+ (ffecom_expr_intrinsic_): Move huge f2c-related comment to bottom
+ of source file, to avoid annoying problems editing com.c using
+ Emacs C-mode.
+ (ffecom_expr_power_integer_): Make a temp var for division, if
+ necessary.
+ Handle expanded statement expression as does CFE.
+ (ffecom_start_progunit_): Disallow temp-var generation in body
+ of function, since expressions are not prescanned at this level.
+ (ffecom_sym_transform_): Transform ASSIGN variables as well,
+ so these are all transformed up front, before code-generation
+ begins.
+ (ffecom_arg_ptr_to_const_expr, ffecom_const_expr,
+ ffecom_ptr_to_const_expr): New functions to transform expressions
+ only if the results will surely be constants.
+ (ffecom_arg_ptr_to_expr): Precompute size, for convenience
+ obtaining temp vars.
+ (ffecom_expand_let_stmt): Guess at usability of destination
+ pre-expansion, to provide better prescan preparation (fewer
+ spurious temp vars).
+ (ffecom_init_0): Disallow temp-var generation in global scope.
+ (ffecom_type_expr): New function, returns just the type tree
+ for the expression.
+ (start_function): Disallow temp-var generation in parm scope.
+ (incomplete_type_error): Fix introductory comment.
+ (poplevel): Update (somewhat) from CFE.
+ (pushlevel): Update (somewhat) from CFE.
+ * stc.c (ffestc_R838): Mark ASSIGNed variable as so.
+ * std.c (ffestd_stmt_pass_, ffestd_R803, ffestd_R804, ffestd_R805,
+ ffestd_R806): Remember and pass through the ffestw block info
+ for these (IFTHEN, ELSEIF, ELSE, and ENDIF) statements.
+ * ste.c (ffeste_end_iterdo_): Now takes ffestw block argument.
+ (ffeste_io_inlist_): Add prototype.
+ (ffeste_f2c_*): Macros rewritten, new ones added.
+ (ffeste_start_block_, ffeste_end_block_, ffeste_start_stmt_,
+ ffeste_end_stmt_): New macros/functions, depending on whether
+ checking is enabled, to keep track of symmetry of other ste.c code.
+ (ffeste_begin_iterdo_, ffeste_end_iterdo_, ffeste_io_impdo_,
+ ffeste_io_dofio_, ffeste_io_dolio_, ffeste_io_douio_,
+ ffeste_io_ialist_, ffeste_io_cilist_, ffeste_io_cllist_,
+ ffeste_icilist_, ffeste_io_inlist_, ffeste_io_olist_,
+ ffeste_subr_beru_, ffeste_do, ffeste_end_R807, ffeste_R737A,
+ ffeste_R803, ffeste_R804, ffeste_R805, ffeste_R806, ffeste_R807,
+ ffeste_R809, ffeste_R810, ffeste_R811, ffeste_R819A, ffeste_R819B,
+ ffeste_R837, ffeste_R838, ffeste_R839, ffeste_R840, ffeste_R904,
+ ffeste_R907, ffeste_R909_start, ffeste_R909_item, ffeste_R909_finish,
+ ffeste_R910_start, ffeste_R910_item, ffeste_R910_finish,
+ ffeste_R911_start, ffeste_R911_item, ffeste_R911_finish,
+ ffeste_R923A, ffeste_R1212, ffeste_R1227): Prescan/prepare
+ all pertinent expressions, update to new com.c interface, etc.
+ (ffeste_io_impdo_): Relocate.
+ (ffeste_R834, ffeste_R835, ffeste_R836, ffeste_R1226): Don't
+ bother calling clear_momentary, nothing was generated.
+ (ffeste_R842, ffeste_R843): Update to new com.c interface.
+ (ffeste_R1226): Don't try to stuff error_mark_node's DECL_INITIAL.
+ (ffeste_terminate_2): When checking enabled, make sure all blocks
+ and statements have been ended.
+ * ste.h (ffeste_R803, ffeste_R804, ffeste_R805, ffeste_R806):
+ These now take ffestw block argument.
+ (ffeste_terminate_2): When checking enabled, it's a function, not
+ a macro.
+ * stw.h (struct _ffestw_): New variable for IFTHEN.
+ (ffestw_ifthen_fake_else, ffestw_set_ifthen_fake_else): New
+ accessor macros.
+ * symbol.c, symbol.h: Support new ASSIGN'ed-to info.
+
+ * com.c: Clean up commentary per GNU coding standards.
+
+ * bld.h (ffebld_size, ffebld_size_known): Canonize.
- * intrin.c: Add IMAG() intrinsic.
- (ffeintrin_check_loc_): Allow opSUBSTR in LOC().
+ * version.c: Bump version.
- * intrin.def: Add IMAG() intrinsic.
+Sun Apr 11 21:33:33 1999 Mumit Khan <khan@xraylith.wisc.edu>
- * lex.c: Don't report FFEBAD_NULL_CHAR_CONST errors.
+ * g77spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
+ null to decide whether to use it.
- * sta.c, sta.h, stb.c: Changes to clean up error messages (see
- bad.def).
+Wed Apr 7 09:47:09 1999 Kaveh R. Ghazi <ghazi@snafu.rutgers.edu>
- * stb.c (ffestb_R100113_): Issue FFEBAD_NULL_CHAR_CONST
- warning as necessary.
+ * ansify.c (die): Specify void argument.
- * stc.c (ffestc_shriek_do_): Don't try to reference doref_line
- stuff in ANY case, since it won't be valid.
- (ffestc_R1227): Allow RETURN in main program unit, with
- appropriate warnings/errors.
- (ffestc_subr_format_): Array of any type is a CHAREXPR (F77 C5).
-
- * ste.c (ffeste_begin_doiter_): Couple of fixes to accurately
- determine if loop never executes.
-
- * target.c (ffetarget_convert_*_hollerith_): Append spaces,
- not zeros, to follow F77 Appendix C, and to warn when
- truncation of non-blanks done.
- (ffetarget_convert_*_typeless): Rewrite to do typeless
- conversions properly, and warn when truncation done.
- (ffetarget_print_binary, ffetarget_print_octal,
- ffetarget_print_hex): Rewrite to use new implementation of
- typeless.
- (ffetarget_typeless_*): Rewrite to use new implementation
- of typeless, and to warn about overflow.
-
- * target.h (ffetargetTypeless): New implementation of
- this type.
-
- * type.h, type.c (ffetype_size_typeless): Remove (incorrect)
- implementation of this function and its extern.
-
-Sun Mar 5 18:46:42 1995 Craig Burley (burley@gnu.ai.mit.edu)
-
- * BUGS: Clarify that constant handling would also fix lack of
- adequate IEEE-754/854 support to some degree, and typeless
- and non-decimal constants.
-
- * com.c (ffecom_type_permanent_copy_): Comment out to avoid
- warnings.
- (duplicate_decls): New function a la gcc/c-decl.c.
- (pushdecl): Use duplicate_decls to decide whether to return
- existing decl or new one, instead of always returning existing
- decl.
- (ffecom_expr_): opPERCENT_LOC now supports CHARACTER arguments.
- (ffecom_init_0): Give f2c I/O code 0 for basictypeANY/kindtypeANY.
- (ffecom_sym_transform_): For adjustable arrays, pass low bound
- through variable_size in case its primaries are changed (950302-1.f).
+ * intdoc.c (family_name, dumpgen, dumpspec, dumpimp,
+ argument_info_ptr, argument_info_string, argument_name_ptr,
+ argument_name_string, elaborate_if_complex,
+ elaborate_if_maybe_complex, elaborate_if_real, print_type_string):
+ Const-ify a char*.
+ (main): Mark parameter `argv' with ATTRIBUTE_UNUSED.
+ (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_,
+ _ffeintrin_imp_, cc_pair, descriptions, summaries): Const-ify a char*.
- * com.h: More decls that belong in tree.h &c.
+Mon Apr 5 11:57:54 1999 Donn Terry (donn@interix.com)
- * data.c (ffedata_eval_integer1_): Fix opPAREN case to not
- treat value of expression as an error code.
+ * Make-lang.in (HOST_CFLAGS): compute dynamically.
- * expr.c (ffeexpr_finished_): Allow opSUBSTR in contextLOC case.
+Mon Apr 5 02:11:23 1999 Craig Burley <craig@jcb-sc.com>
- * proj.c: Add "const" as appropriate.
+ Fix bugs exposed by configuring with --enable-checking:
+ * com.c (ffecom_do_entry_, ffecom_expr_, ffecom_arg_ptr_to_expr,
+ ffecom_list_expr, ffecom_list_ptr_to_expr, finish_function,
+ pop_f_function_context, store_parm_decls, poplevel): Handle
+ error_mark_node properly.
+ * ste.c (ffeste_begin_iterdo_, ffeste_end_iterdo_): Ditto.
+ * version.c: Bump version.
-Mon Feb 27 10:04:03 1995 Craig Burley (burley@gnu.ai.mit.edu)
+Sat Apr 3 23:57:56 1999 Craig Burley <craig@jcb-sc.com>
- * bad.def (FFEBAD_BAD_SUBSTR): Fix bad grammar in message.
+ * g77.texi: Fix up docs for -fset-g77-defaults, and
+ describe how internal consistency checking now happens.
+ (Should have been done for EGCS version 1.1.)
-Fri Feb 24 16:21:31 1995 Craig Burley (burley@gnu.ai.mit.edu)
+Sat Apr 3 23:29:33 1999 Craig Burley <craig@jcb-sc.com>
- * Version 0.5.13 released.
+ * bugs.texi, g77.texi, lang-options.h, news.texi, top.c:
+ Make -fno-emulate-complex the default, as COMPLEX support
+ in the back end is now believed to be working.
- * INSTALL: Warn that f/zzz.o will compare differently between
- stages, since it puts the __TIME__ macro into a string.
+ * version.c: Bump version.
- * com.c (ffecom_sym_transform_): Transform kindFUNCTION/whereDUMMY
- to pointer-to-function, not function.
- (ffecom_expr_): Use ffecom_arg_ptr_to_expr instead of
- ffecom_char_args_ to handle comparison between CHARACTER
- types, so either operand can be a CONCATENATE.
- (ffecom_transform_common_): Set size of initialized common area
- to global (largest-known) size, even though size of init might
- be smaller.
+Fri Apr 2 13:33:16 1999 Craig Burley <craig@jcb-sc.com>
- * equiv.c (ffeequiv_offset_): Check symbol info for ANY.
+ * g77.texi: -malign-double now works.
+ Give URL for alignment-testing package.
+ * news.texi: -malign-double now works.
- * expr.c (ffeexpr_find_close_paren_, ffeexpr_nil_*): New functions
- to handle following the contour of a rejected expression, so
- statements like "PRINT(I,I,I)=0" don't cause the PRINT statement
- code to get the second passed back to it as if there was a
- missing close-paren before it, the comma causing the PRINT code
- to confirm the statement, resulting in an ambiguity vis-a-vis
- the let statement code.
- Use the new ffecom_find_close_paren_ handler when an expected
- close-paren is missing.
- (ffeexpr_isdigits_): New function, use in all places that
- currently use isdigit in repetitive code.
- (ffeexpr_collapse_symter): Collapse to ANY if init-expr is ANY,
- so as to avoid having symbol get "transformed" if used to
- dimension an array.
- (ffeexpr_token_real_, ffeexpr_token_number_real_): Don't issue
- diagnostic about exponent, since it'll be passed along the
- handler path, resulting in a diagnostic anyway.
- (ffeexpr_token_apos_char_): Use consistent handler path
- regardless of whether diagnostics inhibited.
- (ffeexpr_token_name_apos_name_): Skip past closing quote/apos
- even if not a match or other diagnostic issued.
- (ffeexpr_sym_impdoitem_): Exec-transition local SEEN symbol.
+Fri Apr 2 12:49:12 1999 Craig Burley <craig@jcb-sc.com>
- * lex.c (ffelex_image_char_): Set ffelex_saw_tab_ if TAB
- seen, not if anything other than TAB seen!
+ * g77.texi (Funding GNU Fortran): Dude's got a web page.
+ * root.texi: Ditto.
- * stc.c (ffestc_R537_item): If source is ANY but dest isn't,
- set dest symbol's init expr to ANY.
- (ffestc_R501_attrib, ffestc_R522, ffestc_R522start): Complain
- about conflict between "SAVE" by itself and other uses of
- SAVE only in pedantic mode.
+Tue Mar 30 12:04:11 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
- * ste.c (ffeste_R1212): Fix loop over labels to always
- increment caseno, to avoid pushcase returning 2 for duplicate
- values when one of the labels is invalid.
+ * sta.c (ffesta_ffebad_1sp, ffesta_ffebad_1st, ffesta_ffebad_2st):
+ Const-ify a char*.
-Thu Feb 23 12:42:04 1995 Craig Burley (burley@gnu.ai.mit.edu)
+ * sta.h (ffesta_ffebad_1sp, ffesta_ffebad_1st, ffesta_ffebad_2st):
+ Likewise.
- * Version 0.5.12 released.
+ * stb.c (ffestb_local_u_): Likewise.
+ (ffestb_do, ffestb_dowhile, ffestb_else, ffestb_elsexyz,
+ ffestb_else3_, ffestb_endxyz, ffestb_goto, ffestb_let,
+ ffestb_type, ffestb_type1_, ffestb_varlist, ffestb_R423B,
+ ffestb_R522, ffestb_R528, ffestb_R542, ffestb_R834, ffestb_R835,
+ ffestb_R838, ffestb_R841, ffestb_R1102, ffestb_blockdata,
+ ffestb_R1212, ffestb_R1228, ffestb_V009, ffestb_module,
+ ffestb_R809, ffestb_R810, ffestb_R10014_, ffestb_R10015_,
+ ffestb_R10018_, ffestb_R1107, ffestb_R1202, ffestb_R12026_,
+ ffestb_S3P4, ffestb_V012, ffestb_V014, ffestb_V025, ffestb_V0255_,
+ ffestb_V020, ffestb_dimlist, ffestb_dummy, ffestb_R524,
+ ffestb_R547, ffestb_decl_chartype, ffestb_decl_dbltype,
+ ffestb_decl_gentype, ffestb_decl_recursive, ffestb_decl_entsp_2_,
+ ffestb_decl_func_, ffestb_V003, ffestb_V016, ffestb_V027,
+ ffestb_decl_R539): Likewise.
- * Make-lang.in (f77.install-common): Add "else true;" before outer
- "fi" per Makefile.in patch.
+ * stb.h (_ffestb_args_): Likewise.
- * Makefile.in (dircheck): Add "else true;" before "fi" per
- patch from chs1pm@surrey.ac.uk.
+ * stc.c (ffestc_subr_binsrch_, ffestc_subr_is_present_,
+ ffestc_subr_speccmp_, ffestc_R904, ffestc_R907): Likewise.
- * com.c (ffecom_push_tempvar): If type desired is ERROR_MARK,
- return error_mark_node, to avoid crash that results from
- making a VAR_DECL with error_mark_node as its type.
+ * std.c (ffestd_R1001dump_1005_1_, ffestd_R1001dump_1005_2_,
+ ffestd_R1001dump_1005_3_, ffestd_R1001dump_1005_4_,
+ ffestd_R1001dump_1005_5_, ffestd_R1001dump_1010_1_,
+ ffestd_R1001dump_1010_2_, ffestd_R1001dump_1010_3_,
+ ffestd_R1001dump_1010_4_, ffestd_R1001dump_1010_5_): Likewise.
- * ste.c (ffeste_begin_iterdo_): Convert itercount to INTEGER
- anytime calculation of number of iterations ends up with type
- other than INTEGER (e.g. DOUBLE PRECISION, REAL).
+ * ste.c (ffeste_begin_iterdo_, ffeste_subr_file_): Likewise.
-Thu Feb 23 02:48:38 1995 Craig Burley (burley@gnu.ai.mit.edu)
+ * sts.c (ffests_printf_1D, ffests_printf_1U, ffests_printf_1s,
+ ffests_printf_2Us, ffests_puts, ffests_puttext): Likewise.
- * Version 0.5.11 released.
+ * sts.h (ffests_printf_1D, ffests_printf_1U, ffests_printf_1s,
+ ffests_printf_2Us, ffests_puts, ffests_puttext): Likewise.
- * DOC: Explain -fugly-args.
+ * stt.c (ffestt_exprlist_drive, ffestt_implist_drive,
+ ffestt_tokenlist_drive): Add prototype arguments.
- * bad.def (FFEBAD_ACTUALARG): Explain -fugly-args and how to
- rewrite code to not require it.
+ * stt.h (ffestt_exprlist_drive, ffestt_implist_drive,
+ ffestt_tokenlist_drive): Likewise.
- * com.c (ffecom_vardesc_): Handle negative type code, just in
- case.
- (ffecom_arg_ptr_to_expr): Let ffecom_expr handle hollerith
- and typeless constants (move code to ffecom_constantunion).
- (ffecom_constantunion): Handle hollerith and typeless constants.
+ * stu.c (ffestu_dummies_transition_): Likewise.
+ (ffestu_sym_end_transition): Const-ify a char*.
- * expr.c (ffecom_finished_): Check -fugly-args in actual-arg
- context where hollerith/typeless provided.
+ * stw.c (ffestw_display_state, ffestw_new, ffestw_pop): Add
+ prototype arguments.
- * intrin.def (FFEINTRIN_genDFLOAT): Add FFEINTRIN_specDFLOAT.
- (FFEINTRIN_specDFLOAT): Add as f2c intrinsic.
+ * stw.h (ffestw_display_state, ffestw_new, ffestw_pop): Likewise.
- * target.h (ffetarget_convert_real[12]_integer,
- ffetarget_convert_complex[12]_integer): Pass -1 for high integer
- value if low part is negative.
- (FFETARGET_defaultIS_UGLY_ARGS): New macro.
+ * version.c (ffe_version_string): Const-ify a char*.
- * top.c (ffe_is_ugly_args_): New variable.
- (ffe_decode_option): Handle -fugly-args and -fno-ugly-args.
+ * version.h (ffe_version_string): Likewise.
- * top.h (ffe_is_ugly_args_, ffe_is_ugly_args(),
- ffe_set_is_ugly_args()): New variable and macros.
+Sat Mar 27 13:00:43 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-Thu Feb 23 02:48:38 1995 Pedro A M Vazquez (vazquez@iqm.unicamp.br)
+ * bad.c (_ffebad_message_, ffebad_string_, ffebad_message_,
+ ffebad_bufputs_, ffebad_bufputs_, ffebad_start_, ffebad_string,
+ ffebad_finish): Const-ify a char*.
- * g77.c (sys_errlist): Use const for __FreeBSD__ systems
- as well.
+ * bld.c (ffebld_op_string_, ffebld_op_string): Likewise.
-Wed Feb 22 13:33:43 1995 Craig Burley (burley@gnu.ai.mit.edu)
+ * bld.h (ffebld_op_string): Likewise.
- * Version 0.5.10 released.
+ * com.c (ffecom_arglist_expr_, ffecom_build_f2c_string_,
+ ffecom_debug_kludge_, ffecom_f2c_make_type_,
+ ffecom_get_appended_identifier_, ffecom_get_identifier_,
+ ffecom_gfrt_args_): Likewise.
+ (ffecom_convert_narrow_, ffecom_convert_widen_): Add prototype.
+ (builtin_function, ffecom_gfrt_name_, ffecom_gfrt_argstring_,
+ ffecom_arglist_expr_, ffecom_build_f2c_string_,
+ ffecom_debug_kludge_, ffecom_f2c_make_type_,
+ ffecom_get_appended_identifier_, ffecom_get_external_identifier_,
+ ffecom_get_identifier_, ffecom_decl_field,
+ ffecom_get_invented_identifier, lang_print_error_function,
+ skip_redundant_dir_prefix, read_name_map, print_containing_files):
+ Const-ify a char*.
+ (savestring): Remove, use `xstrdup' instead.
- * CREDITS: Add Rick Niles.
+ * com.h (ffecom_decl_field, ffecom_get_invented_identifier):
+ Const-ify a char*.
- * INSTALL: Note how to get around lack of makeinfo.
+ * data.c (ffebld, ffedata_gather_): Make explicitly static.
- * Make-lang.in (f/proj.h): Remove # comment.
+ * expr.c (ffeexpr_isdigits_, ffeexpr_percent_,
+ ffeexpr_reduced_concatenate_, ffeexpr_nil_real_,
+ ffeexpr_nil_number_, ffeexpr_nil_number_period_,
+ ffeexpr_nil_number_real_, ffeexpr_token_real_,
+ ffeexpr_token_number_, ffeexpr_token_number_period_,
+ ffeexpr_token_number_real_): Const-ify a char*.
- * Makefile.in (f/proj.h): Remove # comment.
+ * fini.c (xspaces): Likewise.
- * com.c (ffecom_expr_): Simplify opFUNCREF/opSUBRREF conversion.
- (ffecom_sym_transform_): For whereGLOBAL and whereDUMMY
- kindFUNCTION, use ffecom_tree_fun_type[][] only for non-constant
- (non-statement-function) f2c functions.
- (ffecom_init_0): ffecom_tree_fun_type[][] and _ptr_to_*_* are
- really f2c-interface arrays, so use base type void for COMPLEX
- (like CHARACTER).
+ * global.c (ffeglobal_type_string_): Likewise.
+ (ffeglobal_drive): Protoize.
+ (ffeglobal_proc_def_arg): Const-ify a char*.
-Tue Feb 21 19:01:18 1995 Dave Love <d.love@dl.ac.uk>
+ * global.h (ffeglobal_drive): Protoize.
+ (ffeglobal_proc_def_arg): Const-ify a char*.
- * Make-lang.in (f77.install-common): Expurgate the test for and
- possible installation of f2c in line with elsewhere. Seems to have
- been missing a semicolon anyhow!
+ * implic.c (ffeimplic_none, ffeimplic_peek_symbol_type):
+ Likewise.
-Tue Feb 21 11:45:25 1995 Craig Burley (burley@gnu.ai.mit.edu)
+ * implic.h (ffeimplic_peek_symbol_type): Likewise.
- * Version 0.5.9 released.
+ * info.c (ffeinfo_basictype_string_, ffeinfo_kind_message_,
+ ffeinfo_kind_string_, ffeinfo_kindtype_string_,
+ ffeinfo_where_string_, ffeinfo_basictype_string,
+ ffeinfo_kind_message, ffeinfo_kind_string,
+ ffeinfo_kindtype_string, ffeinfo_where_string): Likewise.
- * Make-lang.in (f/proj.h): touch file to register update,
- because the previous commands won't necessarily modify it.
+ * info.h (ffeinfo_basictype_string, ffeinfo_kind_message,
+ ffeinfo_kind_string, ffeinfo_kindtype_string,
+ ffeinfo_where_string): Likewise.
- * Makefile.in (f/proj.h): touch file to register update,
- because the previous commands won't necessarily modify it.
+ * intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_,
+ _ffeintrin_imp_, ffeintrin_check_, ffeintrin_cmp_name_,
+ ffeintrin_fulfill_specific, ffeintrin_init_0,
+ ffeintrin_is_actualarg, ffeintrin_is_intrinsic,
+ ffeintrin_name_generic, ffeintrin_name_implementation,
+ ffeintrin_name_specific): Likewise.
- * Makefile.in (f/str-*.h, f/str-*.j): Explicitly specify
- output file names, so these targets go in build, not source,
- directory.
+ * intrin.h (ffeintrin_is_intrinsic, ffeintrin_name_generic,
+ ffeintrin_name_implementation, ffeintrin_name_specific): Likewise.
- * bits.c, bits.h: Switch to valid ANSI C replacement for
- ARRAY_ZERO.
+ * lex.c (ffelex_type_string_, ffelex_token_new_character,
+ ffelex_token_new_name, ffelex_token_new_names,
+ ffelex_token_new_number): Likewise.
- * com.c (ffecom_expr_): Add assignp arg to support ASSIGN better.
- If assignp is TRUE, use different tree for FFEBLD_opSYMTER case.
- (ffecom_sym_transform_assign_): New function.
- (ffecom_expr_assign): New function.
- (ffecom_expr_assign_w): New function.
+ * lex.h (ffelex_token_new_character, ffelex_token_new_name,
+ ffelex_token_new_names, ffelex_token_new_number): Likewise.
- * com.c (ffecom_f2c_make_type_): Do make_signed_type instead
- of make_unsigned_type throughout.
+ * malloc.c (malloc_types_, malloc_pool_new, malloc_new_inpool_,
+ malloc_new_zinpool_): Likewise.
- * com.c (ffecom_finish_symbol_transform_): Expand scope of
- commented-out code to probably produce faster compiler code.
+ * malloc.h (malloc_new_inpool_, malloc_new_zinpool_,
+ malloc_pool_new): Likewise.
- * com.c (ffecom_gen_sfuncdef_): Push/pop calltemps so
- COMPLEX works right.
- Remove obsolete comment.
+ * name.c (ffename_space_drive_global, ffename_space_drive_symbol):
+ Protoize.
- * com.c (ffecom_start_progunit_): If non-multi alt-entry
- COMPLEX function, primary (static) entry point returns result
- directory, not via extra arg -- to agree with ffecom_return_expr
- and others.
- Pretransform all symbols so statement functions are defined
- before any code emitted.
+ * name.h (ffename_space_drive_global, ffename_space_drive_symbol):
+ Likewise.
- * com.c (ffecom_finish_progunit): Don't posttransform all
- symbols here -- pretransform them instead.
+ * symbol.c (ffesymbol_state_name_, ffesymbol_attr_name_,
+ ffesymbol_attrs_string): Const-ify a char*.
+ (ffesymbol_drive, ffesymbol_drive_sfnames): Protoize.
+ (ffesymbol_state_string): Const-ify a char*.
- * com.c (ffecom_init_0): Don't warn about possible ASSIGN
- crash, as this shouldn't happen now.
+ * symbol.h (ffesymbol_attrs_string): Likewise.
+ (ffesymbol_drive, ffesymbol_drive_sfnames): Protoize.
+ (ffesymbol_state_string): Const-ify a char*.
- * com.c (ffecom_push_tempvar): Fix to handle temp vars
- pushed while context is a statement (nested) function, and
- add appropriate commentary.
+ * target.c (ffetarget_layout): Likewise.
- * com.c (ffecom_return_expr): Check TREE_USED to determine
- where return value is unset.
+ * target.h (ffetarget_layout): Likewise.
- * com.h (struct _ffecom_symbol_): Add note about length_tree
- now being used to keep tree for ASSIGN version of symbol.
+1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
- * com.h (ffecom_expr_assign, ffecom_expr_assign_rw): New decls.
- (error): Add this prototype for back-end function.
+ * Make-lang.in: Remove all references to g77.o/g77.c.
+ Link g77 from gcc.o.
- * fini.c (main): Grab input, output, and include names
- directly off the command line instead of making the latter
- two out of the first.
+1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
- * lex.c: Improve tab handling for both fixed and free source
- forms, and ignore carriage-returns on input, while generally
- improving the code. ffelex_handle_tab_ has been renamed and
- reinvented as ffelex_image_char_, among other things.
+ * Makefile.in (g77$(exeext)): Depend on intl.o. Link in intl.o.
- * malloc.c, malloc.h: Switch to valid ANSI C replacement for
- ARRAY_ZERO, and kill the full number of bytes in pools and
- areas.
+Wed Mar 17 11:39:44 1999 Craig Burley <craig@jcb-sc.com>
- * proj.h.in (ARRAY_ZERO, ARRAY_ZERO_SIZE): Remove.
+ * news.texi: Editorial fix.
- * ste.c (ffeste_io_cilist_, ffeste_io_icilist_, ffeste_R838,
- ffeste_R839): Issue diagnostic if a too-narrow variable used in an
- ASSIGN context despite changes to this code and code in com.c.
+Mon Mar 15 17:12:07 1999 Craig Burley <craig@jcb-sc.com>
- * where.c, where.h: Switch to valid ANSI C replacement for
- ARRAY_ZERO.
+ * bugs.texi, g77.texi, news.texi: Editorial fixes.
-Fri Feb 17 03:35:19 1995 Craig Burley (burley@gnu.ai.mit.edu)
+Sat Mar 13 17:51:55 1999 Craig Burley <craig@jcb-sc.com>
- * Version 0.5.8 released.
+ Fix 19990313-0.f, 19990313-1.f, 19990313-2.f, 19990313-3.f:
+ * bad.def (FFEBAD_NOCANDO): New error code for internal use only.
+ * expr.c (ffeexpr_collapse_convert): If FFEBAD_NOCANDO returned
+ by convertor, just return original expr.
+ * target.h: Return FFEBAD_NOCANDO for (usually) 64-bit
+ conversions that aren't yet working properly.
+ * news.texi: Explain.
- * INSTALL: In quick-build case, list g77 target first so g77
- gets installed. Also, explain that gcc gets built and installed
- as well, even though this isn't really what we want (and maybe
- we'll find a way around this someday).
+ * version.c: Bump version.
-Fri Feb 17 02:35:41 1995 Craig Burley (burley@gnu.ai.mit.edu)
+Sat Mar 13 14:26:55 1999 Craig Burley <craig@jcb-sc.com>
+
+ * RELEASE-PREP: New file, lists things to do for a release.
+
+ * Make-lang.in, bugs.texi, bugs0.texi, g77.texi, g77install.texi,
+ install0.texi, news.texi, news0.texi: Accommodate new doc
+ architecture.
+ Consolidate news items. Don't describe old news items in
+ various generated docs.
+ Don't describe FSF-g77 installation stuff in various EGCS-g77
+ generated docs.
+ Move description of AUTOMATIC to more suitable location.
+ * root.texi: New file for new doc architecture.
+
+Thu Mar 11 17:32:55 1999 Craig Burley <craig@jcb-sc.com>
+
+ * g77.texi: Add AUTOMATIC to list of unsupported extensions.
+
+Sat Mar 6 02:28:35 1999 Craig Burley <craig@jcb-sc.com>
+
+ Warn about non-Y2K-compliant intrinsics:
+ * bad.def (FFEBAD_INTRINSIC_Y2KBAD): New diagnostic.
+ * intrin.def (FFEINTRIN_impDATE, FFEINTRIN_impIDATE_vxt):
+ Use new DEFIMPY macro to flag these as non-Y2K-compliant.
+ * intdoc.c (DEFIMPY): Support new Y2K macro.
+ * intrin.h (DEFIMPY): Ditto.
+ * intrin.c (DEFIMPY): Ditto.
+ (ffeintrin_fulfill_generic, ffeintrin_fulfill_specific):
+ Warn about invocation of non-Y2K-compliant intrinsic.
+ * com-rt.def (FFECOM_gfrtDATE, FFECOM_gfrtVXTIDATE):
+ Rename external procedure names, to keep previously-
+ compiled (sans-new-warnings) code from linking to
+ new library.
+ * g77.texi: Document all this stuff.
+ * news.texi: Spread the joy.
+ * version.c: Bump version.
- * Version 0.5.7 released.
+Fri Mar 5 13:22:44 1999 Craig Burley <craig@jcb-sc.com>
- * Makefile.in (CONFIG_H, HCONFIG_H, TCONFIG_H, TM_H): Remove
- ../ prefix in front of .h files, since they're in the cd.
+ * news.texi: Relocate IDATE (VXT) fix: we put it in 1.1.2
+ so describe it there, instead of under 1.2.
-Fri Feb 17 01:50:48 1995 Craig Burley (burley@gnu.ai.mit.edu)
+Wed Mar 3 00:57:56 1999 Craig Burley <craig@jcb-sc.com>
- * Version 0.5.6 released.
+ * news.texi: IDATE (VXT) fixed to return year as 0..99.
-Thu Feb 16 20:26:54 1995 Craig Burley (burley@gnu.ai.mit.edu)
+Wed Mar 3 00:43:49 1999 Craig Burley <craig@jcb-sc.com>
- * ../README.g77: Remove description of g77 as "not-yet-published".
+ * g77.texi: Add remaining changes pending from Dave Love.
- * CREDITS: More changes.
+Wed Mar 3 00:38:42 1999 Craig Burley <craig@jcb-sc.com>
- * Make-lang.in (G77STAGESTUFF): Remove cktyps stuff.
+ * bugs.texi, news.texi: Conditionalize cross-references
+ on non-html processing, providing temporary HTML "links".
- * Makefile.in (CONFIG_H, HCONFIG_H, TCONFIG_H, TM_H): Don't
- prefix gcc dir with $(srcdir) since these don't live there,
- they are created in the build dir by gcc's configure. Add
- a note explaining what these macros are about.
- Update dependencies via deps-kinda.
+ * g77.texi: Fix up a reference.
- * README.NEXTSTEP: Credit Toon, and per his request, add his
- email address.
+Wed Mar 3 00:12:31 1999 Craig Burley <craig@jcb-sc.com>
- * com.h (FFECOM_DETERMINE_TYPES): #include "config.j".
+ * news.texi, bugs.texi: Delete fixed bugs, make one
+ of them into the appropriate news item.
- * config.j, convert.j, flags.j, hconfig.j, rtl.j, tconfig.j,
- tm.j, tree.j: Don't #include if already done.
+Wed Mar 3 00:05:52 1999 Craig Burley <craig@jcb-sc.com>
- * convert.j: #include "tree.j" first, as convert.h clearly depends
- on trees being defined.
+ * news.texi: Copy over 1.1.2 news.
- * rtl.j: #include "config.j" first, since there's some stuff
- in rtl.h that assumes it has been #included.
+1999-03-02 Craig Burley <craig@jcb-sc.com>
- * tree.j: #include "config.j" first, or real.h makes inconsistent
- decision about return type of ereal_atof, leading to bugs, and
- because tree.h/real.h assume config.h already included.
+ * g77.texi (Bug Reporting): Clarify whether to use -E.
+ Clarify other instructions.
-Wed Feb 15 14:40:20 1995 Craig Burley (burley@gnu.ai.mit.edu)
+1999-02-27 Craig Burley <craig@jcb-sc.com>
- * Version 0.5.5 released.
+ * lang-specs.h: Fix specs to pass `-ax' as well as `-a' option.
- * Copyright notices updated to be FSF-style.
+1999-02-26 Craig Burley <craig@jcb-sc.com>
- * INSTALL: Some more clarification regarding building just f77.
+ * intdoc.in (STAT_func, STAT_subr,
+ FSTAT_func, FSTAT_subr, LSTAT_func, LSTAT_subr):
+ Properly order array elements. Specify N/A return values.
- * Make-lang.in (F77_SRCS): Update wrt changing some .h to .j.
- (install-libf77): Fix typo in new parenthetical note.
+1999-02-26 Craig Burley <craig@jcb-sc.com>
- * Makefile.in (f/*.o): Update.
- (CONFIG_H, CONVERT_H, FLAGS_H, GLIMITS_H, HCONFIG_H, RTL_H,
- TCONFIG_H, TM_H, TREE_H): Update/new symbols.
- (deps-kinda): More fixes wrt changing some .h to .j.
- Document and explain this rule a bit better.
- Accommodate changes in output of gcc -MM.
+ * intdoc.in (DATE_AND_TIME): Explain that VALUES(7) holds
+ seconds, and VALUES(8), therefore, milliseconds.
- * *.h, *.c: Change #include's so proj.h not assumed to #include
- malloc.h or config.h (now config.j), and so new .j files are
- used instead of old .h ones.
+1999-02-26 Craig Burley <craig@jcb-sc.com>
- * com.c (ffecom_init_0): Use FLOAT_TYPE_SIZE for f2c's
- TYLONG/TYLOGICAL type codes, to get g77 working on Alpha.
+ * news.texi: Clarify IOSTAT= fix.
- * com.h: Make all f2c-related integral types "int", not "long
- int".
+1999-02-25 Richard Henderson <rth@cygnus.com>
- * config.j, convert.j, flags.j, glimits.j, hconfig.j, rtl.j,
- tconfig.j, tm.j, tree.j: New files wrapping around gbe
- .h files.
+ * lang-specs.h: Define __FAST_MATH__ when appropriate.
- * config.h, convert.h, flags.h, glimits.h, hconfig.h, rtl.h,
- tconfig.h, tm.h, tree.h: Deleted so new .j files
- can #include the gbe files directly, instead of using "../",
- and thus do better with various kinds of builds.
+1999-02-25 Craig Burley <craig@jcb-sc.com>
- * proj.h: Delete unused NO_STDDEF and related stuff.
+ * g77.texi: Clarify/index lack of run-time allocation for
+ concatenation.
+
+1999-02-25 Andreas Jaeger <aj@arthur.rhein-neckar.de>
-Tue Feb 14 08:28:08 1995 Craig Burley (burley@gnu.ai.mit.edu)
+ * f/intdoc.in: Add missing `,' after cross references.
- * BUGS: Remove item #12, cross-compiling & autoconf scripts
- reportedly expected to work properly (according to d.love).
+1999-02-20 Craig Burley <craig@jcb-sc.com>
- * INSTALL: Add explanation of d.love's patch to config-lang.in.
- Add explanation of how to install just g77 when gcc already installed.
- Add note about usability of "-Wall". Add note about bug-
- reporting.
+ * Make-lang.in (f77.install-common, f77.install-info,
+ f77.install-man, f77.uninstall): Use `$(prefix)/lang-f77'
+ instead of `lang-f77' for flag file, to be sure of a
+ writable directory, and remove the flag file after each
+ operation to keep things clean.
- * Make-lang.in ($(srcdir)/f/conf-proj): Add comment about why
- conf-proj.out.
- (install-libf77): Echo parenthetical note to user about how to do
- just the (aborted) libf2c installation.
- (deps-kinda): Update to work with new configuration/build stuff.
+1999-02-20 Craig Burley <craig@jcb-sc.com>
- * bad.c (ffebad_finish): Put capitalized "warning:" &c message
- as prefix on any diagnostic without pointers into source.
+ * g77.texi: Properly attribute Priest document; clarify
+ that it is in the .ps version of the Goldberg document.
- * bad.def (FFEBAD_TOO_BIG_INIT): Add this warning message.
+1999-02-19 Craig Burley <craig@jcb-sc.com>
- * config-lang.in: Add Dave Love's patch to catch case where
- back-end patches not applied and abort configuration.
+ * bugs0.texi, bugs.texi, install0.texi, g77install.texi,
+ news0.texi, news.texi: Update copyright dates.
+ Clarify which files are source, which are derived,
+ and remind maintainers where copyright dates are sourced.
+ * BUGS, INSTALL, NEWS: Regenerated.
- * data.c (ffedata_gather_, ffedata_value_): Warn when about
- to initialize a large aggregate area, due to design flaw resulting
- in too much time/space used to handle such cases.
- Use COMMON area name, and first notice of symbol, for multiple-
- initialization diagnostic, instead of member symbol and unknown
- location.
- (FFEDATA_sizeTOO_BIG_INIT_): New macro per above.
+1999-02-19 Craig Burley <craig@jcb-sc.com>
-Mon Feb 13 13:54:26 1995 Dave Love <d.love@dl.ac.uk>
+ * global.c (ffeglobal_ref_progunit_): Warn about a function
+ definition that disagrees with the type of a previous reference.
+ Improve commentary. Fix a couple of minor bugs. Clean up
+ some code.
+ * news.texi: Spread the joy.
- * Make-lang.in (F77_SRCS): Use $(srcdir)/f/proj.h.in, not
- $(srcdir)/f/proj.h for build outside srcdir.
+1999-02-18 Craig Burley <craig@jcb-sc.com>
-Sun Feb 12 13:37:11 1995 Craig Burley (burley@gnu.ai.mit.edu)
+ * expr.c (ffeexpr_finished_): Disallow non-default INTEGER
+ as argument for FILEINT and FILEASSOC as lhs.
+ * news.texi: Document fix.
+ * version.c: Bump.
- * ../README.g77: Clarify procedures for unpacking, add asterisks
- to mark important things the user must do.
+1999-02-18 Craig Burley <craig@jcb-sc.com>
- * Fix dates in/add dates to ../README.g77, BUGS, CREDITS, DOC,
- INSTALL, PROJECTS, README.
+ * g77.texi: Clarify -fno-globals vs. -Wno-globals.
-Sun Feb 12 00:26:10 1995 Craig Burley (burley@gnu.ai.mit.edu)
+1999-02-18 Craig Burley <craig@jcb-sc.com>
- * Version 0.5.4 released.
+ * intdoc.in (LOG10): Fix typo.
- * Make-lang.in (f/proj.h): Reproduce this rule here from
- Makefile.in.
- ($(srcdir)/f/conf-proj): Put autoconf's stdout in temp file
- conf-proj.out, then mv to conf-proj only if successful, so
- conf-proj not touched if autoconf not installed.
+1999-02-17 Ulrich Drepper <drepper@cygnus.com>
- * Makefile.in ($(srcdir)/conf-proj): See Make-lang.in's similar
- rule.
+ * intdoc.in: Fix typo.
-Sat Feb 11 20:56:02 1995 Craig Burley (burley@gnu.ai.mit.edu)
+1999-02-17 Craig Burley <craig@jcb-sc.com>
- * BUGS: Clarify some bugs.
+ * g77.texi, intdoc.in: Document Y2K and some other known
+ limitations.
+ * intrin.def (DTIME, FDATE): Fix capitalization of
+ case-sensitive forms of these intrinsics' names.
- * DOC: Many improvements and fixes.
+1999-02-17 Dave Love <fx@gnu.org>
- * README: Move bulk of text, edited, to ../README.g77, and
- replace with pointer to that file.
+ * intdoc.in: Say `common' logarithm for log10.
- * com.c (ffecom_init_0): Comment out warning about sizeof(ftnlen)
- as per ste.c change. Add text about ASSIGN to help user understand
- what is being warned about.
+1999-02-16 Ulrich Drepper <drepper@cygnus.com>
- * conf-proj.in: Fix typos in comments.
+ * g77.texi: Add missing @ in email addresses.
- * proj.h.in: Add ARRAY_ZERO_SIZE to parallel malloc.h's version,
- in case it proves to be needed.
+1999-02-15 Craig Burley <craig@jcb-sc.com>
- * ste.c: Comment out assertions requiring sizeof(ftnlen) >=
- sizeof(char *), in the hopes that overflow will never happen.
- (ffeste_R838): Change assertion to fatal() with at least
- partially helpful message.
+ * *.*: Delete my (old) email address in most places, change it
+ in a few.
-Sat Feb 11 12:38:00 1995 Craig Burley (burley@gnu.ai.mit.edu)
+1999-02-14 Craig Burley <craig@jcb-sc.com>
- * com.c (ffecom_vardesc_): Crash if typecode is -1.
+ * version.c: Bump.
- * ste.c (ffeste_io_dolio_): Crash if typecode is -1.
+1999-02-14 Craig Burley <craig@jcb-sc.com>
-Sat Feb 11 09:51:57 1995 Craig Burley (burley@gnu.ai.mit.edu)
+ * version.c: Bump for 1998-10-02 change (forgot to do this
+ before).
- * ste.c: In I/O code tests for item arrayness, sort of revert
- to much earlier code that tests original exp, but also check
- in newer way just in case. Newer way alone treated FOO(1:40)
- as an array, not sure why older way alone didn't work, but I
- think maybe it was when diagnosed code was involved, and
- since there are now checks for error_mark_node, maybe the old
- way alone would work. But better to be safe; both original
- ffebld exp _and_ the transformed tree must indicate an array
- for the size-determination code to be used, else just 1/2 elements
- assumed. And this text is for EMACS: (foo at bar).
+1999-02-14 Craig Burley <craig@jcb-sc.com>
-Fri Feb 10 11:05:50 1995 Craig Burley (burley@gnu.ai.mit.edu)
+ * lang-specs.h, g77.1, g77.texi, news.texi: Recognize `.FOR'
+ and `.FPP' as well as `.for' and `.fpp'.
- * ste.c: In many cases, surround statement-expansion code
- with ffecom_push_calltemps () and ffecom_pop_calltemps ()
- so COMPLEX-returning functions can have temporaries pushed
- in "auto-pop" mode and have them auto-popped at the end of
- the statement.
+1999-02-14 Craig Burley <craig@jcb-sc.com>
-Wed Feb 8 14:35:10 1995 Dave Love <d.love@dl.ac.uk>
+ * intdoc.in (LOG10): Fix description.
- * runtime/f2c.h.in (ftnlen, ftnint): Make same size as integer.
+1999-02-14 Craig Burley <craig@jcb-sc.com>
- * runtime/libI77/err.c (f_init): Thinko in MISSING_FILE_ELEMS
- conditional.
- * runtime/libI77/wrtfmt.c (mv_cur): Likewise.
- * runtime/libI77/wsfe.c (x_putc): Likewise.
+ * news.texi: Mention fix for SIGNAL invocation circa egcs-1.1.
- * runtime/libF77/signal_.c (signal_): Return 0 (this is a
- subroutine).
+1999-02-14 Craig Burley <craig@jcb-sc.com>
- * Makefile.in (f/proj.h): Depend on com.h.
- * Make-lang.in (include/f2c.h): Likewise (and proj.h).
- (install-libf77): Also install f2c.h.
+ * g77.texi, g77install.texi, bugs.texi, g77install.texi: Clean
+ up and improve indexing, and some other areas of docs.
- * runtime/libI77/Makefile.in (*.o): Add f2c.h dependency.
- * runtime/libF77/Makefile.in: Likewise.
+1999-02-14 Craig Burley <craig@jcb-sc.com>
-Wed Feb 8 13:56:47 1995 Craig Burley (burley@gnu.ai.mit.edu)
+ * intdoc.in (MCLOCK8, TIME8): Warn about lower range on
+ 32-bit systems.
- * stc.c (ffestc_R501_item): Don't reset kind/where to NONE when
- setting basictype/kindtype info for symbol, or especially
- its function/result twin, because kind/where might not be NONE.
+Sat Feb 6 18:02:17 1999 Jeffrey A Law (law@cygnus.com)
-Tue Feb 7 14:47:26 1995 Dave Love <d.love@dl.ac.uk>
+ * g77.texi: Update email addresses.
- * Make-lang.in (include/f2c.h:): Set shell variable src more
- robustly (independent of whether srcdir is relative or absolute).
- * Makefile.in (f/proj.h:): Likewise.
+Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
- * conf-proj.in: Check need for LAME_ASSERT. Fix indentation in
- check for LAME_STDIO (cosmetic only with ANSI C).
+ * Make-lang.in (g77$(exeext)): Get choose-temp.o, pexecute.o and
+ mkstemp.o from libiberty.
- * com.h: Extra ...SIZE stuff taken from com.c.
+1999-02-01 Zack Weinberg <zack@rabi.columbia.edu>
- * com.c (FFECOM_DETERMINE_TYPES): Define before including com.h.
- (BITS_PER_WORD etc.) Remove and use conditional definitions to com.h.
+ * top.c: Don't define ffe_is_ident_. Don't process
+ -f(no-)ident here.
+ * top.h: Remove declaration of ffe_is_ident_ and macros
+ ffe_is_ident() and ffe_set_is_ident().
+ * lex.c: Use flag_no_ident instead of ffe_is_ident().
- * runtime/configure.in: #define FFECOM_DETERMINE_TYPES for com.h in
- f2c type determination.
+Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
- * tm.h: Remove (at least pro tem) because of relative path and use
- top-level one.
+ * lang-specs.h: Map -Qn to -fno-ident.
- * Make-lang.in (include/f2c.h:): Set shell variable src more
- robustly (independent of whether srcdir is relative or absolute).
- * Makefile.in (f/proj.h:): Likewise.
+Tue Jan 5 22:12:41 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-Mon Feb 6 19:58:32 1995 Dave Love <d.love@dl.ac.uk>
+ * Make-lang.in (g77.o): Depend on prefix.h.
- * g77.c (append_arg): Use K&R declaration for, e.g. SunOS4 build.
+Fri Nov 27 13:10:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-Fri Feb 3 20:33:14 1995 Craig Burley (burley@gnu.ai.mit.edu)
+ * fini.c: Rename variable `spaces' to `xspaces' to avoid
+ conflicting with function `spaces' from libiberty.
- * g77.c (main): Treat -l like filename in terms of -x handling.
- Rewrite arglist mechanism for ease of maintenance.
- Make sure every -lf2c is followed by -lm and vice versa.
+ * g77spec.c: Don't prototype libiberty functions.
+ * malloc.c: Likewise.
- * Make-lang.in: Put complete list of sources in F77_SRCS def
- so changing a .h file, for example, causes rebuild.
+1998-11-20 Dave Love <d.love@dl.ac.uk>
- * Makefile.in: Change test for nextstep to m68k-next-nextstep* so
- all versions of nextstep on m68k get the necessary flag.
+ * g77.texi: Assorted minor changes.
-Fri Feb 3 19:10:32 1995 Dave Love <d.love@dl.ac.uk>
+1998-11-19 Dave Love <d.love@dl.ac.uk>
- * INSTALL: Note about possible conflict with existing libf2c.a and
- f2c.h.
+ * bugs.texi: Formatting changes from Craig.
- * Make-lang.in (f77.distclean): Tidy and move deletion of
- f/config.cache to mostlyclean.
- (install-libf77): Test for $(libdir)/libf2c.* and barf if found
- unless F2CLIBOK defined.
+ * intdoc.in: Terminate some @xrefs with `,'.
- * runtime/Makefile.in (all): Change path to include directory (and
- elsewhere).
- (INCLUDES): Remove (unused/misleading).
- (distclean): Include f2c.h.
- (clean): Include config.cache.
+1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
- * runtime/libF77/Makefile.in (.SUFFIXES): Correct typo.
- (ALL_CFLAGS) Fix up include search path to find f2c.h in top level
- includes always.
- (all): Depend on f2c.h.
- * runtime/libI77/Makefile.in (.SUFFIXES): Likewise.
+ * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
-Thu Feb 2 17:17:06 1995 Dave Love <d.love@dl.ac.uk>
+Mon Nov 9 23:15:39 1998 Jeffrey A Law (law@cygnus.com)
- * INSTALL: Note about --srcdir and GNU make.
+ * g77.texi, news.texi: Updates from Craig.
- * runtime/f2c.h.in (Pad_UDread, ALWAYS_FLUSH): Reomve the #defines
- per below.
+Sun Nov 8 17:47:56 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
- * runtime/configure.in (Pad_UDread, ALWAYS_FLUSH): Define these
- here, not in f2c.h as they'r eonly relevant for building.
- * runtime/configure: Regenerated.
+ * Makefile.in (INCLUDES): Add "-I$(srcdir)/../../include".
- * config-lang.in: Warn about using GNU make outside source tree
- since I can't get Irix5 or SunOS4 makes to work in this case.
+Sat Nov 7 15:58:54 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
- * Makefile.in (VPATH): Don't set it here.
- (srcdir): Make it the normal `.' (overridden) at top level.
- (all.indirect): New dependency `dircheck'.
- (f771): Likewise
- (dircheck): New target for foolproofing.
- (f/proj.h:): Change finding source.
- (CONFIG_H): Don't use this as the relative path in the include loses
- f builddir != srcdir.
+ * g77spec.c: Don't include gansidecl.h.
+ * output.j: Likewise.
- * config.h: Remove per CONFIG_H change above.
+1998-11-04 Dave Love <d.love@dl.ac.uk>
- * Make-lang.in (F77_FLAGS_TO_PASS): Remove GCC_FOR_TARGET.
- (f771:): Pass VPATH, srcdir to sub-make.
- (f/Makefile:): New target.
- (stmp-int-hdrs): new variable for cheating build.
- (f77-runtime:): Alter GCC_FOR_TARGET treatment.
- (include/f2c.h f/runtime/Makefile:) Likewise.
- (f77-runtime-unsafe:): New (cheating) target.
+ * g77.texi: Small formatting/indexing fixes.
-Thu Feb 2 12:09:51 1995 Craig Burley (burley@gnu.ai.mit.edu)
+Mon Oct 12 20:41:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
- * BUGS: Update regarding losing EQUIVALENCE members in -g, and
- regarding RS/6000 problems in the back end.
+ * bad.c (ffebad_finish): Change type of variable `c' to unsigned
+ char, change type of variable `s' to unsigned char *.
- * CREDITS: Make some changes as requested.
+ * com.c (ffecom_symbol_null_): Add missing initializers.
- * com.c (ffecom_member_trunk_): Remove unused static variable.
- (ffecom_finish_symbol_transform_): Improve comments.
- (ffecom_let_char_): Fix size of temp address-type var.
- (ffecom_member_phase2_): Try fixing problem fixed by change
- to ffecom_transform_equiv_ (f_m_p2_ function currently not used).
- (ffecom_transform_equiv_): Remove def of unused static variable.
- Comment-out use of ffecom_member_phase2_, until problems with
- back end fixed.
- (ffecom_push_tempvar): Fix assertion to not crash okay code.
+ * fini.c (MAXNAMELEN): Undef it before defining.
- * com.h: Remove old, commented-out code.
- Add prototype for warning() in back end.
+ * implic.c (ffeimplic_lookup_): Change type of parameter `c' to
+ unsigned char.
- * ste.c (ffeste_io_dofio_, ffeste_io_dolio_, ffeste_io_douio_,
- ffeste_io_icilist_): Check correct type of variable for arrayness.
+ * intrin.c (ffeintrin_init_0): Cast the argument of ctype macros
+ to (unsigned char).
-Sun Jan 29 14:41:42 1995 Dave Love <d.love@dl.ac.uk>
+ * lex.c (ffelex_splice_tokens): Change type of variable `p' to
+ unsigned char *.
+ (ffelex_token_name_from_names): Cast the argument of
+ `ffelex_is_firstnamechar' to (unsigned char).
+ (ffelex_token_names_from_names): Likewise.
+ (ffelex_token_new_name): Likewise.
+ (ffelex_token_new_names): Likewise.
- * BUGS: Remove references to my configure bugs; add another.
+ * malloc.c (malloc_root_): Add missing initializer.
- * runtime/Makefile.in (AR_FLAGS): Provide default value.
+ * stb.c (ffestb_do): Change type of variable `p' to unsigned char *.
+ (ffestb_else) Likewise.
+ (ffestb_else3_) Likewise.
+ (ffestb_endxyz) Likewise.
+ (ffestb_goto) Likewise.
+ (ffestb_let) Likewise.
+ (ffestb_varlist) Likewise.
+ (ffestb_R522) Likewise.
+ (ffestb_R528) Likewise.
+ (ffestb_R834) Likewise.
+ (ffestb_R835) Likewise.
+ (ffestb_R838) Likewise.
+ (ffestb_R1102) Likewise.
+ (ffestb_blockdata) Likewise.
+ (ffestb_R1212) Likewise.
+ (ffestb_R810) Likewise.
+ (ffestb_R10014_): Cast the argument of `ffelex_is_firstnamechar'
+ to (unsigned char).
+ (ffestb_V014): Change type of variable `p' to unsigned char *.
+ (ffestb_dummy) Likewise.
+ (ffestb_R524) Likewise.
+ (ffestb_R547) Likewise.
+ (ffestb_decl_chartype) Likewise.
+ (ffestb_decl_dbltype) Likewise.
+ (ffestb_decl_gentype) Likewise.
+ (ffestb_decl_entsp_2_) Likewise.
+ (ffestb_V027) Likewise.
+ (ffestb_decl_R539) Likewise.
- * runtime/f2c.h.in (integer, logical): Take typedefs from
- F2C_INTEGER configuration parameter again.
- (NON_UNIX_STDIO): don't define it.
+ * top.c (ffe_decode_option): Mark parameter `argc' with
+ ATTRIBUTE_UNUSED.
- * runtime/configure.in: Bring type checks for f2c.h in line with
- com.h.
- (MISSING_FILE_ELEMS): New variable to determine whether the relevant
- elements of the FILE struct exist, independent of NON_UNIX_STDIO.
- * runtime/libI77/{err,wrtfmt,wsfe}.c (MISSING_FILE_ELEMS): Use new
- parameter.
+ * where.c (ffewhere_unknown_line_): Add missing initializers.
- * config-lang.in: Comment out more of f2c rules (c.f. Make-lang.in).
- (This stuff is relevant iff you gave configure --enable-f2c.)
- Create f/runtime directory tree iff not building in source
- directory.
+1998-10-02 Dave Love <d.love@dl.ac.uk>
- * Makefile.in (srcdir): Append slash so we get the right value when
- not building in the source directory. This is a consequence of not
- building the `f' sources in `f'.
- (VPATH): Override configure's value for reasons above.
- (f/proj.h f/conf-proj): New rules to build proj.h by
- autoconfiguration.
+ * com.c (ffecom_expr_intrinsic_): Fix return type for RAND.
- * proj.h: Rename to proj.h.in for autoconfiguration.
- * proj.h.in: New as above.
- * conf-proj conf-proj.in: New files for autoconfiguration.
+Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
- * Make-lang.in (include/f2c.h f/runtime/Makefile:): Change the order
- of setting the sh variables so that the right GCC_FOR_TARGET is
- used.
- (f77.*clean:) Add products of new configuration files and make sure
- all the *clean targets do something (unlike the ones in
- cp/Make-lange.in).
+ * lex.c: Replace occurances of HANDLE_SYSV_PRAGMA with
+ HANDLE_GENERIC_PRAGMAS.
- * com.h (FFECOM_f2cINTEGER, FFECOM_f2cLOGICAL): Define as long or
- int appropriately to ensure sizeof(real) == sizeof(integer).
+Mon Sep 28 04:22:00 1998 Jeffrey A Law (law@cygnus.com)
- * PROJECTS: Library section.
+ * news.texi: Update from Craig.
- * runtime/libI77/endfile.c: Don't #include sys/types.h conditional
- on NON_UNIX_STDIO since rawio.h needs size_t.
- * runtime/libI77/uio.c: #include <sys/types.h> for size_t if not
- KR_headers.
+1998-09-23 Dave Love <d.love@dl.ac.uk>
-Wed Jan 25 03:31:51 1995 Craig Burley (burley@gnu.ai.mit.edu)
+ * g77.texi: Additions about `/*', trailing comments and cpp.
- * Version 0.5.3 released.
+1998-09-18 Dave Love <d.love@dl.ac.uk>
- * INSTALL: Revise.
+ * g77.texi: Various additions and some small fixes.
- * Make-lang.in: Comment out rules for building f2c itself (f/f2c/).
+Thu Sep 10 14:55:44 1998 Kamil Iskra <iskra@student.uci.agh.edu.pl>
- * README: Revise.
+ * Make-lang.in (f77.install-common): Add missing "else true;".
- * com.c (ffecom_init_0): Warn if ftnlen or INTEGER not big enough
- to hold a char *.
+1998-09-07 Dave Love <d.love@dl.ac.uk>
- * gbe/2.6.2.diff: Update.
+ * ChangeLog.egcs: Deleted. Entries merged here.
-Mon Jan 23 17:10:49 1995 Craig Burley (burley@gnu.ai.mit.edu)
+1998-09-05 Dave Love <d.love@dl.ac.uk>
- * TODO: Remove.
- BUGS: New file.
- PROJECTS: New file.
- CREDITS: New file.
+ * Makefile.in (LDFLAGS): Set from BOOT_LDFLAGS.
+ (F771_LDFLAGS): Variable dispensed with.
- * cktyps*: Remove.
- Make-lang.in: Remove cktyps stuff.
- Makefile.in: Remove cktyps stuff.
+Fri Sep 4 19:53:34 1998 Craig Burley <burley@gnu.org>
- * DOC: Add info on changes for 0.5.3.
+ * intdoc.in: Minor editorial tweaks.
- * bad.c: Put "warning:" &c on diagnostic messages.
- Don't output informational messages if warnings disabled.
+Fri Sep 4 18:35:52 1998 Craig Burley <burley@gnu.org>
-Thu Jan 19 12:38:13 1995 Craig Burley (burley@gnu.ai.mit.edu)
+ * lang-options.h: Convert to wrap option and doc string
+ in a new macro invocation, FTNOPT, so the nearly identical
+ list can be used in FSF-g77.
- * g77.c: Avoid putting out useless "-xnone -xf77" pairs so
- larger command lines can be accommodated.
- Recognize both `-xlang' and `-x lang'.
- Recognize `-xnone' and `-x none' to mean what it does, instead
- of treating "none" as any other language.
- Some minor, slight improvements in the way args are handled
- (hopefully for clearer, more maintainable code), including
- consistency checks on arg count just in case.
+Fri Sep 4 18:35:52 1998 Craig Burley <burley@gnu.org>
-Wed Jan 18 16:41:57 1995 Craig Burley (burley@gnu.ai.mit.edu)
+ * Makefile.in (fini.o): Don't define USE_HCONFIG here.
+ * fini.c: Define USE_HCONFIG here instead, so deps-kinda
+ picks up correct dependency.
- * DOC: Explain -fautomatic better.
+ * Makefile.in (proj-h.o): Fix dependencies list.
- * INSTALL: Describe libf2c.a better.
+Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
- * Make-lang.in, Makefile.in: Build f771 &c with gcc/ as cd instead
- of gcc/f/ so debugging info is better (source file tracking).
- Add new source file type.c.
+ * lex.c (ffe_lex_hash): Change how HANDLE_PRAGMA and
+ HANDLE_SYSV_PRAGMA would be called if they pragma parsing was
+ enabled in this code.
+ Generate warning messages if unknown pragmas are encountered.
+ (pragma_getc): New function: retrieves characters from the
+ input stream. Defined when HANDLE_PRAGMA is defined.
+ (pragma_ungetc): New function: replaces characters back into the
+ input stream. Defined when HANDLE_PRAGMA is defined.
- * Makefile.in: For nextstep3, link f771 with -segaddr __DATA
- 6000000. Fix typo. Change deps-kinda target to handle building
- from gcc/. Update dependencies.
+Tue Sep 1 10:00:21 1998 Craig Burley <burley@gnu.org>
- * bld-op.def, bld.h, bld.c: Remove opBACKEND and all related
- stuff.
- Remove consistency tests that cause compiler warnings.
+ * bugs.texi, g77.1, g77.texi, intdoc.in, news.texi: Doc updates
+ from Craig.
- * cktyps.c: Remove all typing checking.
+1998-08-23 Dave Love <d.love@dl.ac.uk>
- * com-rt.def: Change all rttypeFLOAT_ intrinsics to rttypeDOUBLE_,
- to precisely match how they're declared in libf2c.
+ * g77.texi: Increment `version-g77' and fix a few typos.
- * com.h, com.c: Revise to more elegantly track related stuff
- in the version of f2c.h used to build libf2c.
+Tue Aug 18 21:41:31 1998 Jeffrey A Law (law@cygnus.com)
- * com.c: Increase FFECOM_sizeMAXSTACKITEM, and if 0 or undefined
- when checked to determine where to put entity, treat as infinite.
- Rewrite temporary mechanism to be based on trees instead of
- ffeinfo stuff, and make it much simpler. Change interface
- accordingly.
- Fixes to better track types of things, make appropriate
- conversions, etc. E.g. when making an arg for a libf2c
- function, make sure it's of the right type (such as ftnlen).
- Delete opBACKEND transformation code.
- (ffecom_init_0): Smoother initialization of types, especially
- paying attention to using consistent rules for making INTEGER,
- REAL, DOUBLE PRECISION, etc., and for deciding their "*N"
- and kind values that will work across all g77 platforms.
- No longer require per-target configuration info in target.h
- or config/*/*; use new type module to store size, alignment.
- (ffecom_member_phase2): Declare COMMON/EQUIVALENCE group members
- so debugger sees them.
- (ffecom_finish_progunit): Transform all symbols in program unit,
- so -g will show they all exist.
+ * Make-lang.in: Add several "else true" clauses to deal with lame
+ systems.
- * expr.c (ffeexpr_collapse_substr): Handle strange substring
- range values.
+Tue Aug 11 08:12:14 1998 H.J. Lu (hjl@gnu.org)
- * info.h, info.c: Provide connection to new type module.
- Remove tests that yield compiler warnings.
+ * Make-lang.in (g77.o): Touch lang-f77 before checking it.
- * intrin.c (ffeintrin_is_intrinsic): Properly handle deleted
- intrinsic.
+1998-08-09 Dave Love <d.love@dl.ac.uk>
- * lex.c (ffelex_file_fixed): Remove redundant/buggy code.
+ * Make-lang.in (f/g77.dvi): Replace non-working use of texi2dvi
+ with explicit use of tex.
+ (f77.mostlyclean): Remove TeX index files.
- * stc.c (ffestc_kindtype_kind_, ffestc_kindtype_star_): Replace
- boring switch stmt with simple call to new type module. This
- sort of thing is a reason to get up in the morning.
+ * g77install.texi (Prerequisites): Kluge round TeX lossage with
+ hyphen in @value in @code.
- * ste.c: Update to handle new interface for
- ffecom_push/pop_tempvar.
- Fixes to better track types of things.
- Fixes to not crash for certain diagnosed constructs.
- (ffeste_begin_iterdo_): Check only constants for overflow to avoid
- spurious diagnostics.
- Don't convert larger integer (say, INTEGER*8) to canonical integer
- for iteration count.
+Tue Aug 4 16:59:39 1998 Craig Burley <burley@gnu.org>
- * stw.h: Track DO iteration count temporary variable.
+ * com.c (ffecom_convert_narrow_, ffecom_convert_widen_):
+ Allow conversion from pointer to same-sized integer,
+ to fix invoking SIGNAL as a function.
- * symbol.c: Remove consistency tests that cause compiler warnings.
+1998-07-26 Dave Love <d.love@dl.ac.uk>
- * target.c (ffetarget_aggregate_info): Replace big switch with
- little call to new type module.
- (ffetarget_layout): Remove consistency tests that cause
- compiler warnings.
- (ffetarget_convert_character1_typeless): Pick up length of
- typeless type from new type module.
+ * BUGS, INSTALL, NEWS: Rebuilt.
- * target.h: Crash build if target float bit pattern cannot be
- precisely determined.
- Remove all the type cruft now determined by ffecom_init_0
- at invocation time and maintained in new type module.
- Put casts on second arg of all REAL_VALUE_TO_TARGET_DOUBLE
- uses so compiler warnings avoided (requires target float bit
- pattern to be precisely determined, hence code to crash build).
+Sat Jul 25 17:23:55 1998 Craig Burley <burley@gnu.org>
- * top.c: Add inits/terminates for new type module.
+ Fix 980615-0.f:
+ * stc.c (ffestc_R1229_start): Set info to ANY as well.
- * type.h, type.c: New module.
+Tue Jul 21 04:33:37 1998 Craig Burley <burley@gnu.org>
- * gbe/2.6.2.diff: Remove all patches to files in gcc/config/
- directory and its subdirectories.
+ * g77spec.c (lang_specific_driver): Return unmolested
+ command line when --help seen.
+ Comment out code that printed g77-specific --help info.
-Mon Jan 9 19:23:25 1995 Dave Love <d.love@dl.ac.uk>
+Sat Jul 18 19:16:48 1998 Craig Burley <burley@gnu.org>
- * com.h (FFECOM_F2C_INTEGER_TYPE_NODE): Define and use instead of
- long_integer_type_node where appropriate.
+ * lang-options.h: Fix up doc strings.
+ Remove the unimplemented -fdcp-intrinsics-* options.
-Tue Jan 3 14:56:18 1995 Dave Love <d.love@dl.ac.uk>
+ * str-1t.fin: Change mixed-case spelling of `GoTo' from
+ `Goto'.
- * com.h: Make ffecom_f2c_logical_type_node long, consistent with
- integer.
+Thu Jul 16 13:26:36 1998 Craig Burley <burley@gnu.org>
-Fri Dec 2 20:07:37 1994 Dave Love <d.love@dl.ac.uk>
+ * com.c (ffecom_finish_symbol_transform_): Revert change
+ of 1998-05-23, as it was too aggressive, in that it
+ prevented transformation of (used) functions before
+ primary code generation.
- * config-lang.in (stagestuff): Add f2c conditionally.
- * Make-lang.in: Add f2c and related targets.
- * f2c: Add the directory.
+1998-07-15 Dave Love <d.love@dl.ac.uk>
-Fri Nov 25 22:17:26 1994 Dave Love <d.love@dl.ac.uk>
+ * intdoc.texi: Regenerated.
- * Makefile.in (FLAGS_TO_PASS): pass $(CROSS)
- * Make-lang.in: more changes to runtime targets
+Mon Jul 13 18:45:06 1998 Craig Burley <burley@gnu.org>
-Thu Nov 24 18:03:21 1994 Dave Love <d.love@dl.ac.uk>
+ * Make-lang.in (f77.rebuilt): Fix to depend on
+ build-dir-based, not source-based, g77.info.
- * Makefile.in (FLAGS_TO_PASS): define for sub-makes
+ * g77.texi: Merge docs with 0.5.24.
+ * g77install.texi: Ditto.
- * g77.c (main): change f77-cpp-output to f77-cpp-input (.F files)
+Mon Jul 13 18:02:29 1998 Craig Burley <burley@gnu.org>
-Wed Nov 23 15:22:53 1994 Dave Love <d.love@dl.ac.uk>
+ Cleanups vis-a-vis g77-0.5.24:
+ * g77spec.c (lang_specific_driver): Tabify source.
+ * top.c (ffe_decode_option): Use fixed macro to set
+ internal-checking flag.
+ * top.h (ffe_set_is_do_internal_checks): Fix macro.
- * bad.c (ffebad_finish): kluge to fool emacs19 into finding errors:
- add trailing space to <file>:<line>:
+Mon Jul 13 17:33:44 1998 Craig Burley <burley@gnu.org>
-Tue Nov 22 11:30:50 1994 Dave Love <d.love@dl.ac.uk>
+ Cleanups vis-a-vis system.h cutover and g77-0.5.24:
+ * Makefile.in (fini.o): Define USE_HCONFIG macro
+ so source code doesn't have to.
+ * fini.c: Don't define USE_HCONFIG here, since
+ source code usually shouldn't care about this.
+ * ansify.c: Include stddef.h only if we have it.
+ * intdoc.c: Ditto.
+ * proj.h: Ditto.
- * runtime/libF77/signal_.c (RETSIGTYPE): added
+Mon Jul 13 17:30:29 1998 Nick Clifton <nickc@cygnus.com>
-Mon Nov 21 13:04:13 1994 Dave Love <d.love@dl.ac.uk>
+ * lang-options.h: Format changed to work with --help support added
+ to gcc/toplev.c
- * Makefile.in (compiler): add runtime
+Mon Jul 13 11:54:03 1998 Craig Burley <burley@gnu.org>
- * config-lang.in (stagestuff): add libf2c.a to stagestuff
+ * com.c (ffecom_push_tempvar): Replace kludge that
+ munged back-end globals directly with proper calls
+ to push_topmost_sequence and pop_topmost_sequence.
- * Make-lang.in:
- G77STAGESTUFF <- MORESTAGESTUFF
- f77-runtime: new target, plus supporting ones
+1998-07-12 Dave Love <d.love@dl.ac.uk>
- * runtime: add the directory, containing libI77, libF77 and autoconf
- stuff
+ * version.c: Bump version.
- * g++.1: remove
+Sat Jul 11 19:24:32 1998 Craig Burley <burley@gnu.org>
- * g77.1: minor fixes
+ Fix 980616-0.f:
+ * equiv.c (ffeequiv_offset_): Don't crash on various
+ possible ANY operands.
-Thu Nov 17 15:18:05 1994 Craig Burley (burley@gnu.ai.mit.edu)
+Sat Jul 11 18:24:37 1998 Craig Burley <burley@gnu.org>
- * Version 0.5.2 released.
+ * com.c (ffecom_expr_) [FFEBLD_opCONTER]: Die if padding
+ for constant is non-zero.
- * bad.def: Modify wording of FFEBAD_UNIMPL_STMT to indicate
- that it covers a wide array of possible problems (that, someday,
- should be handled via separate diagnostics).
+ * com.c (__eprintf): Delete this function, it is obsolete.
- * lex.c: Allow $ in identifiers if -fdollar-ok.
- * top.c: Support -fdollar-ok.
- * top.h: Support -fdollar-ok.
- * target.h: Support -fdollar-ok.
- * DOC: Describe -fdollar-ok.
+1998-07-09 Dave Love <d.love@dl.ac.uk>
- * std.c (ffestd_R1229_finish): Fix bug so stand-alone build works.
- * ste.c (ffeste_R819A): Fix bug so stand-alone build works.
+ * intdoc.in (HOSTNM_func, HOSTNM_subr): Update last change.
- * Make: Improvements for stand-alone build.
+Thu Jul 9 00:45:59 1998 Craig Burley <burley@gnu.org>
- * Makefile.in: Fix copyright text at top of file.
+ Fix debugging of CHARACTER*(*), etc., which requires
+ emitting debug info on types like `ftnlen':
+ * com.c (ffecom_start_progunit_): Don't bother
+ resetting "invented" flag for identifier.
+ (ffecom_transform_equiv_): Don't bother zeroing
+ "ignored" flag for decl.
+ (pushdecl): No longer set "ignored", "used", or
+ "suppressed debug" flags for decls having "invented"
+ identifiers.
- * LINK, SRCS, UNLINK: Removed. Not particularly useful now that
- g77 sources live in their own subdirectory.
+1998-07-06 Mike Stump <mrs@wrs.com>
- * g77.c (main): Cast arg to bzero to avoid warning. (This is
- identical to Kenner's fix to cp/g++.c.)
+ * Make-lang.in (f77.stage?): Use mv -f instead of just mv so that
+ we can move g77.c.
- * gbe/: New subdirectory, to contain .diff files for various
- versions of the GNU CC back end.
+1998-07-06 Dave Love <d.love@dl.ac.uk>
- * gbe/README: New file.
- * gbe/2.6.2.diff: New file.
+ * intdoc.in (HOSTNM_func, HOSTNM_subr): Note possible need for
+ -lsocket.
-Tue Nov 8 10:23:10 1994 Dave Love <d.love@dl.ac.uk>
+1998-07-05 Dave Love <d.love@dl.ac.uk>
- * Make-lang.in: don't install as f77 as well as g77 to avoid
- confusion with system's compiler (especially while testing)
+ * intdoc.in: Add entry for DATE_AND_TIME.
- * g77.c (main): use -lf2c and -lm; fix sense of test for .f/.F files
+ * intrin.def: Add implementation for DATE_AND_TIME. Make second
+ and third args of SYSTEM_CLOCK optional.
-Fri Oct 28 09:45:00 1994 Craig Burley (burley@gnu.ai.mit.edu)
+ * com.c (ffecom_expr_intrinsic_): New case for DATE_AND_TIME.
- * Version 0.5.1 released.
+ * com-rt.def (FFECOM_gfrtSYSTEM_CLOCK): Call G77_system_clock_0,
+ not system_clock_.
+ (FFECOM_gfrtDATE_AND_TIME): New DEFGFRT.
- * gcc.c: Invoke f771 instead of f-771.
+Wed Jul 1 11:19:13 1998 Craig Burley <burley@gnu.org>
-Fri Oct 28 02:00:44 1994 Craig Burley (burley@gnu.ai.mit.edu)
+ Fix 980701-1.f (which was producing "unaligned trap"
+ on an Alpha running GNU/Linux, as predicted):
+ * equiv.c (ffeequiv_layout_local_): Don't bother
+ coping with pre-padding of entire area while building
+ it; do that instead after the building is done, and
+ do it by modifying only the modulo field. This covers
+ the case of alignment stringency being increased without
+ lowering the starting offset, unlike the previous changes,
+ and even more elegantly than those.
- * Version 0.5.0 released.
+ * target.c (ffetarget_align): Make sure alignments
+ are non-zero, just in case.
-Fri Oct 14 15:03:35 1994 Craig Burley (burley@gnu.ai.mit.edu)
+See ChangeLog.0 for earlier changes.
- * Makefile.in: Handle the Fortran-77 front-end in a subdirectory.
- * f-*: Move Fortran-77 front-end to f/*.
+Local Variables:
+add-log-time-format: current-time-string
+End:
diff --git a/contrib/gcc/f/INSTALL b/contrib/gcc/f/INSTALL
new file mode 100644
index 0000000..9185880
--- /dev/null
+++ b/contrib/gcc/f/INSTALL
@@ -0,0 +1,352 @@
+*Note:* This file is automatically generated from the files
+`install0.texi' and `g77install.texi'. `INSTALL' is *not* a source
+file, although it is normally included within source distributions.
+
+ This file contains installation information for the GNU Fortran
+compiler. Copyright (C) {No Value For "copyrights-install"} Free
+Software Foundation, Inc. You may copy, distribute, and modify it
+freely as long as you preserve this copyright notice and permission
+notice.
+
+Installing GNU Fortran
+**********************
+
+ The following information describes how to install `g77'.
+
+ 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.
+Efforts are made to keep it somewhat up-to-date, but they are
+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
+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-07-17:
+
+Prerequisites
+=============
+
+ For users of the GCC-2.95 version of `g77', this information is
+superceded by the GCC installation instructions.
+
+Problems Installing
+===================
+
+ This is a list of problems (and some apparent problems which don't
+really mean anything is wrong) that show up when configuring, building,
+installing, or porting GNU Fortran.
+
+ *Note Installation Problems: (gcc)Installation Problems, for more
+information on installation problems that can afflict either `gcc' or
+`g77'.
+
+General Problems
+----------------
+
+ These problems can occur on most or all systems.
+
+GNU C Required
+..............
+
+ Compiling `g77' requires GNU C, not just ANSI C. Fixing this
+wouldn't be very hard (just tedious), but the code using GNU extensions
+to the C language is expected to be rewritten for 0.6 anyway, so there
+are no plans for an interim fix.
+
+ This requirement does not mean you must already have `gcc' installed
+to build `g77'. As long as you have a working C compiler, you can use a
+"bootstrap" build to automate the process of first building `gcc' using
+the working C compiler you have, then building `g77' and rebuilding
+`gcc' using that just-built `gcc', and so on.
+
+Patching GNU CC
+...............
+
+ `g77' no longer requires application of a patch file to the `gcc'
+compiler tree. In fact, no such patch file is distributed with `g77'.
+This is as of version 0.5.23 and `egcs' version 1.0.
+
+Building GNU CC Necessary
+.........................
+
+ It should be possible to build the runtime without building `cc1'
+and other non-Fortran items, but, for now, an easy way to do that is
+not yet established.
+
+Missing strtoul or bsearch
+..........................
+
+ This information does not apply to the GCC-2.95 version of `g77',
+
+Cleanup Kills Stage Directories
+...............................
+
+ It'd be helpful if `g77''s `Makefile.in' or `Make-lang.in' would
+create the various `stageN' directories and their subdirectories, so
+developers and expert installers wouldn't have to reconfigure after
+cleaning up.
+
+ That help has arrived as of version 0.5.23 of `g77' and version 1.1
+of `egcs'. Configuration itself no longer creates any particular
+directories that are unique to `g77'. The build procedures in
+`Make-lang.in' take care of that, on demand.
+
+LANGUAGES Macro Ignored
+.......................
+
+ Prior to version 0.5.23 of `g77' and version 1.1 of `egcs', `g77'
+would sometimes ignore the absence of `f77' and `F77' in the
+`LANGUAGES' macro definition used for the `make' command being
+processed.
+
+ As of `g77' version 0.5.23 and `egcs' version 1.1, `g77' now obeys
+this macro in all relevant situations.
+
+ However, in versions of `gcc' through 2.8.1, non-`g77' portions of
+`gcc', such as `g++', are known to go ahead and perform various
+language-specific activities when their respective language strings do
+not appear in the `LANGUAGES' macro in effect during that invocation of
+`make'.
+
+ It is expected that these remaining problems will be fixed in a
+future version of `gcc'.
+
+System-specific Problems
+------------------------
+
+ A linker bug on some versions of AIX 4.1 might prevent building when
+`g77' is built within `gcc'. It might also occur when building within
+`egcs'.
+
+Cross-compiler Problems
+-----------------------
+
+ `g77' has been in alpha testing since September of 1992, and in
+public beta testing since February of 1995. Alpha testing was done by
+a small number of people worldwide on a fairly wide variety of
+machines, involving self-compilation in most or all cases. Beta
+testing has been done primarily via self-compilation, but in more and
+more cases, cross-compilation (and "criss-cross compilation", where a
+version of a compiler is built on one machine to run on a second and
+generate code that runs on a third) has been tried and has succeeded,
+to varying extents.
+
+ Generally, `g77' can be ported to any configuration to which `gcc',
+`f2c', and `libf2c' can be ported and made to work together, aside from
+the known problems described in this manual. If you want to port `g77'
+to a particular configuration, you should first make sure `gcc' and
+`libf2c' can be ported to that configuration before focusing on `g77',
+because `g77' is so dependent on them.
+
+ Even for cases where `gcc' and `libf2c' work, you might run into
+problems with cross-compilation on certain machines, for several
+reasons.
+
+ * There is one known bug (a design bug to be fixed in 0.6) that
+ prevents configuration of `g77' as a cross-compiler in some cases,
+ though there are assumptions made during configuration that
+ probably make doing non-self-hosting builds a hassle, requiring
+ manual intervention.
+
+ * `gcc' might still have some trouble being configured for certain
+ combinations of machines. For example, it might not know how to
+ handle floating-point constants.
+
+ * Improvements to the way `libg2c' is built could make building
+ `g77' as a cross-compiler easier--for example, passing and using
+ `$(LD)' and `$(AR)' in the appropriate ways. (This is improved in
+ the `egcs' version of `g77', especially as of version 1.1.)
+
+ * There are still some challenges putting together the right
+ run-time libraries (needed by `libg2c') for a target system,
+ depending on the systems involved in the configuration. (This is
+ a general problem with cross-compilation, and with `gcc' in
+ particular.)
+
+Changing Settings Before Building
+=================================
+
+ Here are some internal `g77' settings that can be changed by editing
+source files in `egcs/gcc/f/' before building.
+
+ This information, and perhaps even these settings, represent
+stop-gap solutions to problems people doing various ports of `g77' have
+encountered. As such, none of the following information is expected to
+be pertinent in future versions of `g77'.
+
+Larger File Unit Numbers
+------------------------
+
+ As distributed, whether as part of `f2c' or `g77', `libf2c' accepts
+file unit numbers only in the range 0 through 99. For example, a
+statement such as `WRITE (UNIT=100)' causes a run-time crash in
+`libf2c', because the unit number, 100, is out of range.
+
+ If you know that Fortran programs at your installation require the
+use of unit numbers higher than 99, you can change the value of the
+`MXUNIT' macro, which represents the maximum unit number, to an
+appropriately higher value.
+
+ To do this, edit the file `egcs/libf2c/libI77/fio.h' in your `g77'
+source tree, changing the following line:
+
+ #define MXUNIT 100
+
+ Change the line so that the value of `MXUNIT' is defined to be at
+least one *greater* than the maximum unit number used by the Fortran
+programs on your system.
+
+ (For example, a program that does `WRITE (UNIT=255)' would require
+`MXUNIT' set to at least 256 to avoid crashing.)
+
+ Then build or rebuild `g77' as appropriate.
+
+ *Note:* Changing this macro has *no* effect on other limits your
+system might place on the number of files open at the same time. That
+is, the macro might allow a program to do `WRITE (UNIT=100)', but the
+library and operating system underlying `libf2c' might disallow it if
+many other files have already been opened (via `OPEN' or implicitly via
+`READ', `WRITE', and so on). Information on how to increase these
+other limits should be found in your system's documentation.
+
+Always Flush Output
+-------------------
+
+ Some Fortran programs require output (writes) to be flushed to the
+operating system (under UNIX, via the `fflush()' library call) so that
+errors, such as disk full, are immediately flagged via the relevant
+`ERR=' and `IOSTAT=' mechanism, instead of such errors being flagged
+later as subsequent writes occur, forcing the previously written data
+to disk, or when the file is closed.
+
+ Essentially, the difference can be viewed as synchronous error
+reporting (immediate flagging of errors during writes) versus
+asynchronous, or, more precisely, buffered error reporting (detection
+of errors might be delayed).
+
+ `libg2c' supports flagging write errors immediately when it is built
+with the `ALWAYS_FLUSH' macro defined. This results in a `libg2c' that
+runs slower, sometimes quite a bit slower, under certain
+circumstances--for example, accessing files via the networked file
+system NFS--but the effect can be more reliable, robust file I/O.
+
+ If you know that Fortran programs requiring this level of precision
+of error reporting are to be compiled using the version of `g77' you
+are building, you might wish to modify the `g77' source tree so that
+the version of `libg2c' is built with the `ALWAYS_FLUSH' macro defined,
+enabling this behavior.
+
+ To do this, find this line in `egcs/libf2c/f2c.h' in your `g77'
+source tree:
+
+ /* #define ALWAYS_FLUSH */
+
+ Remove the leading `/* ', so the line begins with `#define', and the
+trailing ` */'.
+
+ Then build or rebuild `g77' as appropriate.
+
+Maximum Stackable Size
+----------------------
+
+ `g77', on most machines, puts many variables and arrays on the stack
+where possible, and can be configured (by changing
+`FFECOM_sizeMAXSTACKITEM' in `egcs/gcc/f/com.c') to force smaller-sized
+entities into static storage (saving on stack space) or permit
+larger-sized entities to be put on the stack (which can improve
+run-time performance, as it presents more opportunities for the GBE to
+optimize the generated code).
+
+ *Note:* Putting more variables and arrays on the stack might cause
+problems due to system-dependent limits on stack size. Also, the value
+of `FFECOM_sizeMAXSTACKITEM' has no effect on automatic variables and
+arrays. *Note But-bugs::, for more information.
+
+Floating-point Bit Patterns
+---------------------------
+
+ The `g77' build will crash if an attempt is made to build it as a
+cross-compiler for a target when `g77' cannot reliably determine the
+bit pattern of floating-point constants for the target. Planned
+improvements for version 0.6 of `g77' will give it the capabilities it
+needs to not have to crash the build but rather generate correct code
+for the target. (Currently, `g77' would generate bad code under such
+circumstances if it didn't crash during the build, e.g. when compiling
+a source file that does something like `EQUIVALENCE (I,R)' and `DATA
+R/9.43578/'.)
+
+Initialization of Large Aggregate Areas
+---------------------------------------
+
+ A warning message is issued when `g77' sees code that provides
+initial values (e.g. via `DATA') to an aggregate area (`COMMON' or
+`EQUIVALENCE', or even a large enough array or `CHARACTER' variable)
+that is large enough to increase `g77''s compile time by roughly a
+factor of 10.
+
+ This size currently is quite small, since `g77' currently has a
+known bug requiring too much memory and time to handle such cases. In
+`egcs/gcc/f/data.c', the macro `FFEDATA_sizeTOO_BIG_INIT_' is defined
+to the minimum size for the warning to appear. The size is specified
+in storage units, which can be bytes, words, or whatever, on a
+case-by-case basis.
+
+ After changing this macro definition, you must (of course) rebuild
+and reinstall `g77' for the change to take effect.
+
+ Note that, as of version 0.5.18, improvements have reduced the scope
+of the problem for *sparse* initialization of large arrays, especially
+those with large, contiguous uninitialized areas. However, the warning
+is issued at a point prior to when `g77' knows whether the
+initialization is sparse, and delaying the warning could mean it is
+produced too late to be helpful.
+
+ Therefore, the macro definition should not be adjusted to reflect
+sparse cases. Instead, adjust it to generate the warning when densely
+initialized arrays begin to cause responses noticeably slower than
+linear performance would suggest.
+
+Alpha Problems Fixed
+--------------------
+
+ `g77' used to warn when it was used to compile Fortran code for a
+target configuration that is not basically a 32-bit machine (such as an
+Alpha, which is a 64-bit machine, especially if it has a 64-bit
+operating system running on it). That was because `g77' was known to
+not work properly on such configurations.
+
+ As of version 0.5.20, `g77' is believed to work well enough on such
+systems. So, the warning is no longer needed or provided.
+
+ However, support for 64-bit systems, especially in areas such as
+cross-compilation and handling of intrinsics, is still incomplete. The
+symptoms are believed to be compile-time diagnostics rather than the
+generation of bad code. It is hoped that version 0.6 will completely
+support 64-bit systems.
+
+Quick Start
+===========
+
+ For users of the GCC-2.95 version of `g77', this information is
+superceded by the GCC installation instructions.
+
+Complete Installation
+=====================
+
+ For users of the GCC-2.95 version of `g77', this information is
+superceded by the GCC installation instructions.
+
+Distributing Binaries
+=====================
+
+ For users of the GCC-2.95 version of `g77', this information is
+superceded by the GCC installation instructions.
+
diff --git a/contrib/gcc/f/Make-lang.in b/contrib/gcc/f/Make-lang.in
index 38712fd..a531abb 100644
--- a/contrib/gcc/f/Make-lang.in
+++ b/contrib/gcc/f/Make-lang.in
@@ -59,16 +59,6 @@ F77 f77: f771$(exeext)
f77.extraclean f77.maintainer-clean f77.distdir f77.rebuilt \
f77.stage1 f77.stage2 f77.stage3 f77.stage4
-g77.c: $(srcdir)/gcc.c
- case "$(LANGUAGES)" in \
- *[fF]77*) touch lang-f77;; \
- *) rm -f lang-f77;; \
- esac
- if [ -f lang-f77 ]; then \
- rm -f g77.c; \
- $(LN_S) $(srcdir)/gcc.c g77.c; \
- else true; fi
-
g77spec.o: $(srcdir)/f/g77spec.c $(srcdir)/f/version.h
case "$(LANGUAGES)" in \
*[fF]77*) touch lang-f77;; \
@@ -88,26 +78,12 @@ g77version.o: $(srcdir)/f/version.c
$(srcdir)/f/version.c; \
else true; fi
-# N.B.: This is a copy of the gcc.o rule, with -DLANG_SPECIFIC_DRIVER added.
-# It'd be nice if we could find an easier way to do this---rather than have
-# to track changes to the toplevel gcc Makefile as well.
-# We depend on g77.c last, to make it obvious where it came from.
-g77.o: $(CONFIG_H) multilib.h config.status $(lang_specs_files) g77.c
- case "$(LANGUAGES)" in \
- *[fF]77*) touch lang-f77;; \
- *) rm -f lang-f77;; \
- esac
- if [ -f lang-f77 ]; then \
- $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(DRIVER_DEFINES) \
- -DLANG_SPECIFIC_DRIVER -c g77.c; \
- else true; fi
-
# Create the compiler driver for g77.
-g77$(exeext): g77.o g77spec.o g77version.o version.o choose-temp.o pexecute.o prefix.o mkstemp.o \
+g77$(exeext): gcc.o g77spec.o g77version.o version.o prefix.o intl.o \
$(LIBDEPS) $(EXTRA_GCC_OBJS)
if [ -f lang-f77 ]; then \
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ g77.o g77spec.o g77version.o \
- version.o choose-temp.o pexecute.o prefix.o mkstemp.o $(EXTRA_GCC_OBJS) $(LIBS); \
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o g77spec.o g77version.o \
+ version.o prefix.o intl.o $(EXTRA_GCC_OBJS) $(LIBS); \
else true; fi
# Create a version of the g77 driver which calls the cross-compiler.
@@ -227,7 +203,8 @@ F77_SRCS = \
f771$(exeext): $(P) $(F77_SRCS) $(LIBDEPS) stamp-objlist
touch lang-f77
cd f; $(MAKE) $(FLAGS_TO_PASS) \
- HOST_CC="$(HOST_CC)" HOST_CFLAGS="$(HOST_CFLAGS)" HOST_CPPFLAGS="$(HOST_CPPFLAGS)" \
+ HOST_CC="`case '$(HOST_CC)' in stage*) echo '$(HOST_CC)' | sed -e 's|stage|../stage|g';; *) echo '$(HOST_CC)';; esac`" \
+ HOST_CFLAGS="$(HOST_CFLAGS)" HOST_CPPFLAGS="$(HOST_CPPFLAGS)" \
../f771$(exeext)
#
@@ -243,8 +220,9 @@ f77.dvi: f/g77.dvi
# g77 documentation.
f/g77.info: $(srcdir)/f/g77.texi $(srcdir)/f/bugs.texi \
+ $(srcdir)/f/ffe.texi \
$(srcdir)/f/g77install.texi $(srcdir)/f/news.texi \
- $(srcdir)/f/intdoc.texi
+ $(srcdir)/f/intdoc.texi $(srcdir)/f/root.texi
case "$(LANGUAGES)" in \
*[fF]77*) touch lang-f77;; \
*) rm -f lang-f77;; \
@@ -255,8 +233,9 @@ f/g77.info: $(srcdir)/f/g77.texi $(srcdir)/f/bugs.texi \
else true; fi
f/g77.dvi: $(srcdir)/f/g77.texi $(srcdir)/f/bugs.texi \
+ $(srcdir)/f/ffe.texi \
$(srcdir)/f/g77install.texi $(srcdir)/f/news.texi \
- $(srcdir)/f/intdoc.texi
+ $(srcdir)/f/intdoc.texi $(srcdir)/f/root.texi
case "$(LANGUAGES)" in \
*[fF]77*) touch lang-f77;; \
*) rm -f lang-f77;; \
@@ -306,15 +285,15 @@ $(srcdir)/f/intdoc.texi: f/intdoc.c f/intdoc.in f/ansify.c f/intrin.def f/intrin
rm f/intdoc f/ansify f/intdoc.h0; \
else true; fi
-$(srcdir)/f/BUGS: f/bugs0.texi f/bugs.texi
+$(srcdir)/f/BUGS: f/bugs0.texi f/bugs.texi f/root.texi
cd $(srcdir)/f; $(MAKEINFO) -D BUGSONLY --no-header --no-split \
--no-validate -o BUGS bugs0.texi
-$(srcdir)/f/INSTALL: f/install0.texi f/g77install.texi
+$(srcdir)/f/INSTALL: f/install0.texi f/g77install.texi f/root.texi
cd $(srcdir)/f; $(MAKEINFO) -D INSTALLONLY --no-header --no-split \
--no-validate -o INSTALL install0.texi
-$(srcdir)/f/NEWS: f/news0.texi f/news.texi
+$(srcdir)/f/NEWS: f/news0.texi f/news.texi f/root.texi
cd $(srcdir)/f; $(MAKEINFO) -D NEWSONLY --no-header --no-split \
--no-validate -o NEWS news0.texi
@@ -329,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 lang-f77;; \
- *) rm -f lang-f77;; \
+ *[fF]77*) touch $(libsubdir)/lang-f77;; \
+ *) rm -f $(libsubdir)/lang-f77;; \
esac
- -if [ -f 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); \
@@ -354,64 +335,74 @@ f77.install-common:
echo ' f77-install-ok in the source or build directory.)'; \
echo ''; \
else true; fi
+ 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 lang-f77;; \
- *) rm -f lang-f77;; \
+ *[fF]77*) touch $(libsubdir)/lang-f77;; \
+ *) rm -f $(libsubdir)/lang-f77;; \
esac
- if [ -f 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|'`; \
$(INSTALL_DATA) $$f $(infodir)/$$realfile; \
done; \
chmod a-x $(infodir)/g77.info*; \
- fi
- @if [ -f lang-f77 -a -f $(srcdir)/f/g77.info ] ; then \
+ else true; fi
+ @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 $(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 lang-f77;; \
- *) rm -f lang-f77;; \
+ *[fF]77*) touch $(libsubdir)/lang-f77;; \
+ *) rm -f $(libsubdir)/lang-f77;; \
esac
- -if [ -f 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 $(mandir)/$(G77_CROSS_NAME)$(manext); \
- $(INSTALL_DATA) $(srcdir)/f/g77.1 $(mandir)/$(G77_CROSS_NAME)$(manext); \
- chmod a-x $(mandir)/$(G77_CROSS_NAME)$(manext); \
+ rm -f $(man1dir)/$(G77_CROSS_NAME)$(manext); \
+ $(INSTALL_DATA) $(srcdir)/f/g77.1 $(man1dir)/$(G77_CROSS_NAME)$(manext); \
+ chmod a-x $(man1dir)/$(G77_CROSS_NAME)$(manext); \
else \
- rm -f $(mandir)/$(G77_INSTALL_NAME)$(manext); \
- $(INSTALL_DATA) $(srcdir)/f/g77.1 $(mandir)/$(G77_INSTALL_NAME)$(manext); \
- chmod a-x $(mandir)/$(G77_INSTALL_NAME)$(manext); \
+ rm -f $(man1dir)/$(G77_INSTALL_NAME)$(manext); \
+ $(INSTALL_DATA) $(srcdir)/f/g77.1 $(man1dir)/$(G77_INSTALL_NAME)$(manext); \
+ chmod a-x $(man1dir)/$(G77_INSTALL_NAME)$(manext); \
fi; \
else true; fi
+ 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 lang-f77;; \
- *) rm -f lang-f77;; \
+ *[fF]77*) touch $(libsubdir)/lang-f77;; \
+ *) rm -f $(libsubdir)/lang-f77;; \
esac
- @if [ -f 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 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 $(mandir)/$(G77_INSTALL_NAME)$(manext); \
- rm -rf $(mandir)/$(G77_CROSS_NAME)$(manext); \
+ rm -rf $(man1dir)/$(G77_INSTALL_NAME)$(manext); \
+ rm -rf $(man1dir)/$(G77_CROSS_NAME)$(manext); \
rm -rf $(infodir)/g77.info*; \
fi
+ rm -f $(libsubdir)/lang-f77
#
# Clean hooks:
# A lot of the ancillary files are deleted by the main makefile.
@@ -424,7 +415,7 @@ f77.mostlyclean:
-rm -f g77.aux g77.cps g77.ky g77.toc g77.vr g77.fn g77.kys \
g77.pg g77.tp g77.vrs g77.cp g77.fns g77.log g77.pgs g77.tps
f77.clean:
- -rm -f g77.c g77.o g77spec.o g77version.o
+ -rm -f g77spec.o g77version.o
f77.distclean:
-rm -f lang-f77 f/Makefile
f77.extraclean:
@@ -435,7 +426,7 @@ f77.maintainer-clean:
# The main makefile has already created stage?/f.
G77STAGESTUFF = f/*$(objext) f/fini f/stamp-str f/str-*.h f/str-*.j \
- lang-f77 g77.c g77.o g77spec.o g77version.o
+ lang-f77 g77spec.o g77version.o
f77.stage1: stage1-start
-if [ -f lang-f77 ]; then \
diff --git a/contrib/gcc/f/Makefile.in b/contrib/gcc/f/Makefile.in
index 4f9733b..96975a5 100644
--- a/contrib/gcc/f/Makefile.in
+++ b/contrib/gcc/f/Makefile.in
@@ -134,12 +134,11 @@ ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) -W
# Likewise.
ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
-# f771 is so big, need to tell linker on m68k-next-nextstep* to make enough
-# room for it. On AIX, linking f771 overflows the linker TOC;
-# `-bbigtoc' is appropriate for the linker on AIX 4.1 and above.
-F771_LDFLAGS = `case "${target}" in\
- m68k-next-nextstep*) echo -segaddr __DATA 6000000;;\
- *-*-aix[4-9]*) \`$(CC) --print-prog-name=ld\` -v 2>&1 | grep BFD >/dev/null || echo -Wl,-bbigtoc;; esac`
+# We should be compiling with the built compiler, for which
+# BOOT_LDFLAGS is appropriate. (Formerly we had a separate
+# F771_LDFLAGS, but the ld flags can be taken care of by the target
+# configuration files in egcs.)
+LDFLAGS=$(BOOT_LDFLAGS)
# Even if ALLOCA is set, don't use it if compiling with GCC.
@@ -155,7 +154,7 @@ LIBS = $(SUBDIR_OBSTACK) $(SUBDIR_USE_ALLOCA) $(SUBDIR_MALLOC) $(CLIB)
# Both . and srcdir are used, in that order,
# so that tm.h and config.h will be found in the compilation
# subdirectory rather than in the source directory.
-INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config
+INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config -I$(srcdir)/../../include
# Always use -I$(srcdir)/config when compiling.
.c.o:
@@ -213,8 +212,7 @@ OBJDEPS = ../stamp-objlist
compiler: ../f771$(exeext)
../f771$(exeext): $(P) $(F77_OBJS) $(OBJDEPS) $(LIBDEPS)
rm -f f771$(exeext)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) $(F771_LDFLAGS) -o $@ \
- $(F77_OBJS) $(OBJS) $(LIBS)
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(F77_OBJS) $(OBJS) $(LIBS)
Makefile: $(srcdir)/Makefile.in $(srcdir)/../configure
cd ..; $(SHELL) config.status
@@ -461,10 +459,11 @@ fini: fini.o proj-h.o
$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o fini fini.o proj-h.o
fini.o:
- $(HOST_CC) -c -DUSE_HCONFIG $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
+ $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
`echo $(srcdir)/fini.c | sed 's,^\./,,'` -o $@
-proj-h.o: proj.o
+# Like proj.o, but depends on hconfig.h instead of config.h.
+proj-h.o: proj.c proj.h $(HCONFIG_H) $(SYSTEM_H) $(ASSERT_H) $(GLIMITS_H)
$(HOST_CC) -c -DUSE_HCONFIG $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
`echo $(srcdir)/proj.c | sed 's,^\./,,'` -o $@
diff --git a/contrib/gcc/f/NEWS b/contrib/gcc/f/NEWS
index ff1bb45..b8b5243 100644
--- a/contrib/gcc/f/NEWS
+++ b/contrib/gcc/f/NEWS
@@ -1,7 +1,12 @@
-This file lists recent changes to the GNU Fortran compiler. Copyright
-(C) 1995, 1996 Free Software Foundation, Inc. You may copy,
-distribute, and modify it freely as long as you preserve this copyright
-notice and permission notice.
+*Note:* This file is automatically generated from the files
+`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 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
+notice.
News About GNU Fortran
**********************
@@ -38,16 +43,169 @@ clarify how they differ from other versions, though this can make
getting a complete picture of what a particular `egcs' version contains
somewhat more difficult.
+ *Warning:* The information below is still under development, and
+might not accurately reflect the `g77' code base of which it is a part.
+Efforts are made to keep it somewhat up-to-date, but they are
+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
+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.
+
+ Nevertheless, information on *previous* releases of `g77', below, is
+likely to be more up-to-date and accurate than the equivalent
+information that accompanied those releases, assuming the last-updated
+date of the information below is later than the dates of those releases.
+
+ That's due to attempts to keep this development version of news
+about previous `g77' versions up-to-date.
+
An online, "live" version of this document (derived directly from
-the up-to-date mainline version of `g77' within `egcs') is available at
-`http://egcs.cygnus.com/onlinedocs/g77_news.html'.
+the mainline, development version of `g77' within `egcs') is available
+at `http://www.gnu.org/software/gcc/onlinedocs/g77_news.html'.
+
+ The following information was last updated on 1999-07-08:
+
+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
+ `INTEGER(KIND=2)' (often referred to as `INTEGER*8').
+
+ For example, `INTEGER*8 J; J = 4E10' now works as documented.
+
+ 2. `g77' no longer truncates `INTEGER(KIND=2)' (usually `INTEGER*8')
+ subscript expressions when evaluating array references on systems
+ with pointers widers than `INTEGER(KIND=1)' (such as Alphas).
+
+ 3. `g77' no longer generates bad code for an assignment to a
+ `COMPLEX' variable or array that partially overlaps one or more of
+ the sources of the same assignment (a very rare construction). It
+ now assigns through a temporary, in cases where such partial
+ overlap is deemed possible.
+
+ 4. `libg2c' (`libf2c') no longer loses track of the file being worked
+ on during a `BACKSPACE' operation.
+
+ 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.
+
+ 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'.
+
+ 10. The `-ax' option is now obeyed when compiling Fortran programs.
+ (It is passed to the `f771' driver.)
+
+ * 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.
+
+ * `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',
+ respectively.
+
+ * The order of arguments to the *subroutine* forms of the `CTime',
+ `DTime', `ETime', and `TtyNam' intrinsics has been swapped. The
+ argument serving as the returned value for the corresponding
+ function forms now is the *second* argument, making these
+ 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, `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).
+
+ 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.
+
+ * `-fno-emulate-complex' is now the default option. This should
+ result in improved performance of code that uses the `COMPLEX'
+ data type.
+
+ * The `-malign-double' option now reliably aligns *all*
+ double-precision variables and arrays on Intel x86 targets.
+
+ 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.
+
+ 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.
+
+ 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
+ used before containing binding contour" message.
+
+ * Support for the `-fugly' option has been removed.
-In 0.5.24 and `egcs' 1.1.2 (versus 0.5.23 and 1.1.1):
-=====================================================
+ 16. Improve documentation and indexing, including information on Year
+ 2000 (Y2K) compliance, and providing more information on internals
+ of the front end.
- * Fix the `IDate' Intrinsic (VXT) so the returned year is in the
- documented, non-Y2K-compliant range of 0-99, instead of being
- returned as 100 in the year 2000.
+ 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.
+
+ 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
+ being returned as 100 in the year 2000.
* Fix the `Date_and_Time' intrinsic (in `libg2c') to return the
milliseconds value properly in VALUES(8).
@@ -57,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.
@@ -79,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):
-==============================
-
- * Fix `g77' crash compiling code containing the construct
- `CMPLX(0.)' or similar.
-
- * Fix `g77' crash (or apparently infinite run-time) when compiling
- certain complicated expressions involving `COMPLEX' arithmetic
- (especially multiplication).
+In `EGCS' 1.1 versus `EGCS' 1.0.3:
+==================================
- * 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):
-====================================
-
- * 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.
- * 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'.
- * 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'.
- * `CASE DEFAULT' no longer crashes `g77'.
+ 21. `CASE DEFAULT' no longer crashes `g77'.
- * 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.
@@ -148,25 +283,25 @@ In `egcs' 1.1 (versus `egcs' 1.0.3):
`libf2c' environment, even when `libf2c' (now `libg2c') is a
shared library.
- * `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.
- * `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.
- * 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.
- * 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
@@ -178,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.
- * 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.
- * `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
@@ -191,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.
- * 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'.
- * Improve documentation and indexing.
+ 30. Improve documentation and indexing.
- * 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'.
- * `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.
- * `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'.
- * `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"
@@ -223,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
@@ -243,1381 +398,15 @@ 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.
- * Upgrade to `libf2c' as of 1998-06-18.
-
- * Improve documentation and indexing.
-
-In 0.5.23 (versus 0.5.22):
-==========================
-
- * This release contains several regressions against version 0.5.22
- of `g77', due to using the "vanilla" `gcc' back end instead of
- patching it to fix a few bugs and improve performance in a few
- cases.
-
- See `egcs/gcc/f/BUGS', for information on the known bugs in this
- version, including the regressions.
-
- Features that have been dropped from this version of `g77' due to
- their being implemented via `g77'-specific patches to the `gcc'
- back end in previous releases include:
-
- - Support for `__restrict__' keyword, the options
- `-fargument-alias', `-fargument-noalias', and
- `-fargument-noalias-global', and the corresponding
- alias-analysis code.
-
- (`egcs' has the alias-analysis code, but not the
- `__restrict__' keyword. `egcs' `g77' users benefit from the
- alias-analysis code despite the lack of the `__restrict__'
- keyword, which is a C-language construct.)
-
- - Support for the GNU compiler options `-fmove-all-movables',
- `-freduce-all-givs', and `-frerun-loop-opt'.
-
- (`egcs' supports these options. `g77' users of `egcs'
- benefit from them even if they are not explicitly specified,
- because the defaults are optimized for `g77' users.)
-
- - Support for the `-W' option warning about integer division by
- zero.
-
- - The Intel x86-specific option `-malign-double' applying to
- stack-allocated data as well as statically-allocate data.
-
- Note that the `gcc/f/gbe/' subdirectory has been removed from this
- distribution as a result of `g77' no longer including patches for
- the `gcc' back end.
-
- * 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.
-
- * Support `gcc' version 2.8, and remove support for prior versions
- of `gcc'.
-
- * Remove support for the `--driver' option, as `g77' now does all
- the driving, just like `gcc'.
-
- * `CASE DEFAULT' no longer crashes `g77'.
-
- * 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'.
-
- * `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.
-
- * `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.
-
- * 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.
-
- * 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
- `netlib' they wish to use on a case-by-case basis. See the
- installation documentation for more information.
-
- * The `g77' command now expects the run-time library to be named
- `libg2c.a' instead of `libf2c.a', to ensure that a version other
- than the one built and installed as part of the same `g77' version
- is picked up.
-
- * The `-Wunused' option no longer issues a spurious warning about
- the "master" procedure generated by `g77' for procedures
- containing `ENTRY' statements.
-
- * `g77''s version of `libf2c' separates out the setting of global
- state (such as command-line arguments and signal handling) from
- `main.o' into distinct, new library archive members.
-
- This should make it easier to write portable applications that
- have their own (non-Fortran) `main()' routine properly set up the
- `libf2c' environment, even when `libf2c' (now `libg2c') is a
- shared library.
-
- * During the configuration and build process, `g77' creates
- subdirectories it needs only as it needs them, thus avoiding
- unnecessary creation of, for example, `stage1/f/runtime' when
- doing a non-bootstrap build. Other cleaning up of the
- configuration and build process has been performed as well.
-
- * `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
- prevent inadvertent use of the resulting, probably buggy, programs.
- These mostly include diagnostics about use of unsupported features
- in the `OPEN', `INQUIRE', `READ', and `WRITE' statements, and
- about truncations of various sorts of constants.
-
- * Improve documentation and indexing.
-
- * Upgrade to `libf2c' as of 1998-04-20.
-
- This 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.22 (versus 0.5.21):
-==========================
-
- * Fix code generation for iterative `DO' loops that have one or more
- references to the iteration variable, or to aliases of it, in
- their control expressions. For example, `DO 10 J=2,J' now is
- compiled correctly.
-
- * 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'.
-
- * Fix `DTime' intrinsic so as not to truncate results to integer
- values (on some systems).
-
- * Fix `Signal' intrinsic so it offers portable support for 64-bit
- systems (such as Digital Alphas running GNU/Linux).
-
- * Fix run-time crash involving `NAMELIST' on 64-bit machines such as
- Alphas.
-
- * Fix `g77' version of `libf2c' so it no longer produces a spurious
- `I/O recursion' diagnostic at run time when an I/O operation (such
- as `READ *,I') is interrupted in a manner that causes the program
- to be terminated via the `f_exit' routine (such as via `C-c').
-
- * Fix `g77' crash triggered by `CASE' statement with an omitted
- lower or upper bound.
-
- * Fix `g77' crash compiling references to `CPU_Time' intrinsic.
-
- * Fix `g77' crash (or apparently infinite run-time) when compiling
- certain complicated expressions involving `COMPLEX' arithmetic
- (especially multiplication).
-
- * Fix `g77' crash on statements such as `PRINT *,
- (REAL(Z(I)),I=1,2)', where `Z' is `DOUBLE COMPLEX'.
-
- * Fix a `g++' crash.
-
- * Support `FORMAT(I<EXPR>)' when EXPR is a compile-time constant
- `INTEGER' expression.
-
- * Fix `g77' `-g' option so procedures that use `ENTRY' can be
- stepped through, line by line, in `gdb'.
-
- * Fix a profiling-related bug in `gcc' back end for Intel x86
- architecture.
-
- * Allow any `REAL' argument to intrinsics `Second' and `CPU_Time'.
-
- * Allow any numeric argument to intrinsics `Int2' and `Int8'.
-
- * Use `tempnam', if available, to open scratch files (as in
- `OPEN(STATUS='SCRATCH')') so that the `TMPDIR' environment
- variable, if present, is used.
-
- * Rename the `gcc' keyword `restrict' to `__restrict__', to avoid
- rejecting valid, existing, C programs. Support for `restrict' is
- now more like support for `complex'.
-
- * Fix `-fpedantic' to not reject procedure invocations such as
- `I=J()' and `CALL FOO()'.
-
- * Fix `-fugly-comma' to affect invocations of only external
- procedures. Restore rejection of gratuitous trailing omitted
- arguments to intrinsics, as in `I=MAX(3,4,,)'.
-
- * Fix compiler so it accepts `-fgnu-intrinsics-*' and
- `-fbadu77-intrinsics-*' options.
-
- * Improve diagnostic messages from `libf2c' so it is more likely
- that the printing of the active format string is limited to the
- string, with no trailing garbage being printed.
-
- (Unlike `f2c', `g77' did not append a null byte to its compiled
- form of every format string specified via a `FORMAT' statement.
- However, `f2c' would exhibit the problem anyway for a statement
- like `PRINT '(I)garbage', 1' by printing `(I)garbage' as the
- format string.)
-
- * 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'.
-
- * Fix various crashes involving code with diagnosed errors.
-
- * Fix cross-compilation bug when configuring `libf2c'.
-
- * Improve diagnostics.
-
- * Improve documentation and indexing.
-
- * Upgrade to `libf2c' as of 1997-09-23. This fixes a formatted-I/O
- bug that afflicted 64-bit systems with 32-bit integers (such as
- Digital Alpha running GNU/Linux).
-
-In `egcs' 1.0.2 (versus `egcs' 1.0.1):
-======================================
-
- * Fix `g77' crash triggered by `CASE' statement with an omitted
- lower or upper bound.
-
- * Fix `g77' crash on statements such as `PRINT *,
- (REAL(Z(I)),I=1,2)', where `Z' is `DOUBLE COMPLEX'.
-
- * Fix `-fPIC' (such as compiling for ELF targets) on the Intel x86
- architecture target so invalid assembler code is no longer
- produced.
-
- * Fix `-fpedantic' to not reject procedure invocations such as
- `I=J()' and `CALL FOO()'.
-
- * Fix `-fugly-comma' to affect invocations of only external
- procedures. Restore rejection of gratuitous trailing omitted
- arguments to intrinsics, as in `I=MAX(3,4,,)'.
-
- * Fix compiler so it accepts `-fgnu-intrinsics-*' and
- `-fbadu77-intrinsics-*' options.
-
-In `egcs' 1.0.1 (versus `egcs' 1.0):
-====================================
-
- * Fix run-time crash involving `NAMELIST' on 64-bit machines such as
- Alphas.
-
-In `egcs' 1.0 (versus 0.5.21):
-==============================
-
- * Version 1.0 of `egcs' contains several regressions against version
- 0.5.21 of `g77', due to using the "vanilla" `gcc' back end instead
- of patching it to fix a few bugs and improve performance in a few
- cases.
-
- See `egcs/gcc/f/BUGS', for information on the known bugs in this
- version, including the regressions.
-
- Features that have been dropped from this version of `g77' due to
- their being implemented via `g77'-specific patches to the `gcc'
- back end in previous releases include:
-
- - Support for the C-language `restrict' keyword.
-
- - Support for the `-W' option warning about integer division by
- zero.
-
- - The Intel x86-specific option `-malign-double' applying to
- stack-allocated data as well as statically-allocate data.
-
- Note that the `gcc/f/gbe/' subdirectory has been removed from this
- distribution as a result of `g77' being fully integrated with the
- `egcs' variant of the `gcc' back end.
-
- * Fix code generation for iterative `DO' loops that have one or more
- references to the iteration variable, or to aliases of it, in
- their control expressions. For example, `DO 10 J=2,J' now is
- compiled correctly.
-
- * Fix `DTime' intrinsic so as not to truncate results to integer
- values (on some systems).
-
- * Remove support for non-`egcs' versions of `gcc'.
-
- * Remove support for the `--driver' option, as `g77' now does all
- the driving, just like `gcc'.
-
- * Allow any numeric argument to intrinsics `Int2' and `Int8'.
-
- * Improve diagnostic messages from `libf2c' so it is more likely
- that the printing of the active format string is limited to the
- string, with no trailing garbage being printed.
-
- (Unlike `f2c', `g77' did not append a null byte to its compiled
- form of every format string specified via a `FORMAT' statement.
- However, `f2c' would exhibit the problem anyway for a statement
- like `PRINT '(I)garbage', 1' by printing `(I)garbage' as the
- format string.)
-
- * Upgrade to `libf2c' as of 1997-09-23. This fixes a formatted-I/O
- bug that afflicted 64-bit systems with 32-bit integers (such as
- Digital Alpha running GNU/Linux).
-
-In 0.5.21:
-==========
-
- * Fix a code-generation bug introduced by 0.5.20 caused by loop
- unrolling (by specifying `-funroll-loops' or similar). This bug
- afflicted all code compiled by version 2.7.2.2.f.2 of `gcc' (C,
- C++, Fortran, and so on).
-
- * Fix a code-generation bug manifested when combining local
- `EQUIVALENCE' with a `DATA' statement that follows the first
- executable statement (or is treated as an executable-context
- statement as a result of using the `-fpedantic' option).
-
- * Fix a compiler crash that occured when an integer division by a
- constant zero is detected. Instead, when the `-W' option is
- specified, the `gcc' back end issues a warning about such a case.
- This bug afflicted all code compiled by version 2.7.2.2.f.2 of
- `gcc' (C, C++, Fortran, and so on).
-
- * Fix a compiler crash that occurred in some cases of procedure
- inlining. (Such cases became more frequent in 0.5.20.)
-
- * Fix a compiler crash resulting from using `DATA' or similar to
- initialize a `COMPLEX' variable or array to zero.
-
- * Fix compiler crashes involving use of `AND', `OR', or `XOR'
- intrinsics.
-
- * Fix compiler bug triggered when using a `COMMON' or `EQUIVALENCE'
- variable as the target of an `ASSIGN' or assigned-`GOTO' statement.
-
- * Fix compiler crashes due to using the name of a some non-standard
- intrinsics (such as `FTELL' or `FPUTC') as such and as the name of
- a procedure or common block. Such dual use of a name in a program
- is allowed by the standard.
-
- * Place automatic arrays on the stack, even if `SAVE' or the
- `-fno-automatic' option is in effect. This avoids a compiler
- crash in some cases.
-
- * The `-malign-double' option now reliably aligns `DOUBLE PRECISION'
- optimally on Pentium and Pentium Pro architectures (586 and 686 in
- `gcc').
-
- * New option `-Wno-globals' disables warnings about "suspicious" use
- of a name both as a global name and as the implicit name of an
- intrinsic, and warnings about disagreements over the number or
- natures of arguments passed to global procedures, or the natures
- of the procedures themselves.
-
- The default is to issue such warnings, which are new as of this
- version of `g77'.
-
- * New option `-fno-globals' disables diagnostics about potentially
- fatal disagreements analysis problems, such as disagreements over
- the number or natures of arguments passed to global procedures, or
- the natures of those procedures themselves.
-
- The default is to issue such diagnostics and flag the compilation
- as unsuccessful. With this option, the diagnostics are issued as
- warnings, or, if `-Wno-globals' is specified, are not issued at
- all.
-
- This option also disables inlining of global procedures, to avoid
- compiler crashes resulting from coding errors that these
- diagnostics normally would identify.
-
- * Diagnose cases where a reference to a procedure disagrees with the
- type of that procedure, or where disagreements about the number or
- nature of arguments exist. This avoids a compiler crash.
-
- * Fix parsing bug whereby `g77' rejected a second initialization
- specification immediately following the first's closing `/' without
- an intervening comma in a `DATA' statement, and the second
- specification was an implied-DO list.
-
- * Improve performance of the `gcc' back end so certain complicated
- expressions involving `COMPLEX' arithmetic (especially
- multiplication) don't appear to take forever to compile.
-
- * Fix a couple of profiling-related bugs in `gcc' back end.
-
- * Integrate GNU Ada's (GNAT's) changes to the back end, which
- consist almost entirely of bug fixes. These fixes are circa
- version 3.10p of GNAT.
-
- * Include some other `gcc' fixes that seem useful in `g77''s version
- of `gcc'. (See `gcc/ChangeLog' for details--compare it to that
- file in the vanilla `gcc-2.7.2.3.tar.gz' distribution.)
-
- * Fix `libU77' routines that accept file and other names to strip
- trailing blanks from them, for consistency with other
- implementations. Blanks may be forcibly appended to such names by
- appending a single null character (`CHAR(0)') to the significant
- trailing blanks.
-
- * Fix `CHMOD' intrinsic to work with file names that have embedded
- blanks, commas, and so on.
-
- * Fix `SIGNAL' intrinsic so it accepts an optional third `Status'
- argument.
-
- * Fix `IDATE()' intrinsic subroutine (VXT form) so it accepts
- arguments in the correct order. Documentation fixed accordingly,
- and for `GMTIME()' and `LTIME()' as well.
-
- * Make many changes to `libU77' intrinsics to support existing code
- more directly.
-
- Such changes include allowing both subroutine and function forms
- of many routines, changing `MCLOCK()' and `TIME()' to return
- `INTEGER(KIND=1)' values, introducing `MCLOCK8()' and `TIME8()' to
- return `INTEGER(KIND=2)' values, and placing functions that are
- intended to perform side effects in a new intrinsic group,
- `badu77'.
-
- * Improve `libU77' so it is more portable.
-
- * Add options `-fbadu77-intrinsics-delete',
- `-fbadu77-intrinsics-hide', and so on.
-
- * Fix crashes involving diagnosed or invalid code.
-
- * `g77' and `gcc' now do a somewhat better job detecting and
- diagnosing arrays that are too large to handle before these cause
- diagnostics during the assembler or linker phase, a compiler
- crash, or generation of incorrect code.
-
- * Make some fixes to alias analysis code.
-
- * Add support for `restrict' keyword in `gcc' front end.
-
- * Support `gcc' version 2.7.2.3 (modified by `g77' into version
- 2.7.2.3.f.1), and remove support for prior versions of `gcc'.
-
- * Incorporate GNAT's patches to the `gcc' back end into `g77''s, so
- GNAT users do not need to apply GNAT's patches to build both GNAT
- and `g77' from the same source tree.
-
- * Modify `make' rules and related code so that generation of Info
- documentation doesn't require compilation using `gcc'. Now, any
- ANSI C compiler should be adequate to produce the `g77'
- documentation (in particular, the tables of intrinsics) from
- scratch.
-
- * Add `INT2' and `INT8' intrinsics.
-
- * Add `CPU_TIME' intrinsic.
-
- * Add `ALARM' intrinsic.
-
- * `CTIME' intrinsic now accepts any `INTEGER' argument, not just
- `INTEGER(KIND=2)'.
-
- * Warn when explicit type declaration disagrees with the type of an
- intrinsic invocation.
-
- * Support `*f771' entry in `gcc' `specs' file.
-
- * Fix typo in `make' rule `g77-cross', used only for cross-compiling.
-
- * Fix `libf2c' build procedure to re-archive library if previous
- attempt to archive was interrupted.
-
- * Change `gcc' to unroll loops only during the last invocation (of
- as many as two invocations) of loop optimization.
-
- * Improve handling of `-fno-f2c' so that code that attempts to pass
- an intrinsic as an actual argument, such as `CALL FOO(ABS)', is
- rejected due to the fact that the run-time-library routine is,
- effectively, compiled with `-ff2c' in effect.
-
- * Fix `g77' driver to recognize `-fsyntax-only' as an option that
- inhibits linking, just like `-c' or `-S', and to recognize and
- properly handle the `-nostdlib', `-M', `-MM', `-nodefaultlibs',
- and `-Xlinker' options.
-
- * Upgrade to `libf2c' as of 1997-08-16.
-
- * Modify `libf2c' to consistently and clearly diagnose recursive I/O
- (at run time).
-
- * `g77' driver now prints version information (such as produced by
- `g77 -v') to `stderr' instead of `stdout'.
-
- * The `.r' suffix now designates a Ratfor source file, to be
- preprocessed via the `ratfor' command, available separately.
-
- * Fix some aspects of how `gcc' determines what kind of system is
- being configured and what kinds are supported. For example, GNU
- Linux/Alpha ELF systems now are directly supported.
-
- * Improve diagnostics.
-
- * Improve documentation and indexing.
-
- * Include all pertinent files for `libf2c' that come from
- `netlib.bell-labs.com'; give any such files that aren't quite
- accurate in `g77''s version of `libf2c' the suffix `.netlib'.
-
- * Reserve `INTEGER(KIND=0)' for future use.
-
-In 0.5.20:
-==========
-
- * The `-fno-typeless-boz' option is now the default.
-
- This option specifies that non-decimal-radix constants using the
- prefixed-radix form (such as `Z'1234'') are to be interpreted as
- `INTEGER' constants. Specify `-ftypeless-boz' to cause such
- constants to be interpreted as typeless.
-
- (Version 0.5.19 introduced `-fno-typeless-boz' and its inverse.)
-
- * Options `-ff90-intrinsics-enable' and `-fvxt-intrinsics-enable'
- now are the defaults.
-
- Some programs might use names that clash with intrinsic names
- defined (and now enabled) by these options or by the new `libU77'
- intrinsics. Users of such programs might need to compile them
- differently (using, for example, `-ff90-intrinsics-disable') or,
- better yet, insert appropriate `EXTERNAL' statements specifying
- that these names are not intended to be names of intrinsics.
-
- * The `ALWAYS_FLUSH' macro is no longer defined when building
- `libf2c', which should result in improved I/O performance,
- especially over NFS.
-
- *Note:* If you have code that depends on the behavior of `libf2c'
- when built with `ALWAYS_FLUSH' defined, you will have to modify
- `libf2c' accordingly before building it from this and future
- versions of `g77'.
-
- * Dave Love's implementation of `libU77' has been added to the
- version of `libf2c' distributed with and built as part of `g77'.
- `g77' now knows about the routines in this library as intrinsics.
-
- * New option `-fvxt' specifies that the source file is written in
- VXT Fortran, instead of GNU Fortran.
-
- * The `-fvxt-not-f90' option has been deleted, along with its
- inverse, `-ff90-not-vxt'.
-
- If you used one of these deleted options, you should re-read the
- pertinent documentation to determine which options, if any, are
- appropriate for compiling your code with this version of `g77'.
-
- * The `-fugly' option now issues a warning, as it likely will be
- removed in a future version.
-
- (Enabling all the `-fugly-*' options is unlikely to be feasible,
- or sensible, in the future, so users should learn to specify only
- those `-fugly-*' options they really need for a particular source
- file.)
-
- * The `-fugly-assumed' option, introduced in version 0.5.19, has
- been changed to better accommodate old and new code.
-
- * Make a number of fixes to the `g77' front end and the `gcc' back
- end to better support Alpha (AXP) machines. This includes
- providing at least one bug-fix to the `gcc' back end for Alphas.
-
- * Related to supporting Alpha (AXP) machines, the `LOC()' intrinsic
- and `%LOC()' construct now return values of integer type that is
- the same width (holds the same number of bits) as the pointer type
- on the machine.
-
- On most machines, this won't make a difference, whereas on Alphas,
- the type these constructs return is `INTEGER*8' instead of the
- more common `INTEGER*4'.
-
- * Emulate `COMPLEX' arithmetic in the `g77' front end, to avoid bugs
- in `complex' support in the `gcc' back end. New option
- `-fno-emulate-complex' causes `g77' to revert the 0.5.19 behavior.
-
- * Fix bug whereby `REAL A(1)', for example, caused a compiler crash
- if `-fugly-assumed' was in effect and A was a local (automatic)
- array. That case is no longer affected by the new handling of
- `-fugly-assumed'.
-
- * Fix `g77' command driver so that `g77 -o foo.f' no longer deletes
- `foo.f' before issuing other diagnostics, and so the `-x' option
- is properly handled.
-
- * Enable inlining of subroutines and functions by the `gcc' back end.
- This works as it does for `gcc' itself--program units may be
- inlined for invocations that follow them in the same program unit,
- as long as the appropriate compile-time options are specified.
-
- * Dummy arguments are no longer assumed to potentially alias
- (overlap) other dummy arguments or `COMMON' areas when any of
- these are defined (assigned to) by Fortran code.
-
- This can result in faster and/or smaller programs when compiling
- with optimization enabled, though on some systems this effect is
- observed only when `-fforce-addr' also is specified.
-
- New options `-falias-check', `-fargument-alias',
- `-fargument-noalias', and `-fno-argument-noalias-global' control
- the way `g77' handles potential aliasing.
-
- * The `CONJG()' and `DCONJG()' intrinsics now are compiled in-line.
-
- * The bug-fix for 0.5.19.1 has been re-done. The `g77' compiler has
- been changed back to assume `libf2c' has no aliasing problems in
- its implementations of the `COMPLEX' (and `DOUBLE COMPLEX')
- intrinsics. The `libf2c' has been changed to have no such
- problems.
-
- As a result, 0.5.20 is expected to offer improved performance over
- 0.5.19.1, perhaps as good as 0.5.19 in most or all cases, due to
- this change alone.
-
- *Note:* This change requires version 0.5.20 of `libf2c', at least,
- when linking code produced by any versions of `g77' other than
- 0.5.19.1. Use `g77 -v' to determine the version numbers of the
- `libF77', `libI77', and `libU77' components of the `libf2c'
- library. (If these version numbers are not printed--in
- particular, if the linker complains about unresolved references to
- names like `g77__fvers__'--that strongly suggests your
- installation has an obsolete version of `libf2c'.)
-
- * New option `-fugly-assign' specifies that the same memory
- locations are to be used to hold the values assigned by both
- statements `I = 3' and `ASSIGN 10 TO I', for example. (Normally,
- `g77' uses a separate memory location to hold assigned statement
- labels.)
-
- * `FORMAT' and `ENTRY' statements now are allowed to precede
- `IMPLICIT NONE' statements.
-
- * Produce diagnostic for unsupported `SELECT CASE' on `CHARACTER'
- type, instead of crashing, at compile time.
-
- * Fix crashes involving diagnosed or invalid code.
-
- * Change approach to building `libf2c' archive (`libf2c.a') so that
- members are added to it only when truly necessary, so the user
- that installs an already-built `g77' doesn't need to have write
- access to the build tree (whereas the user doing the build might
- not have access to install new software on the system).
-
- * Support `gcc' version 2.7.2.2 (modified by `g77' into version
- 2.7.2.2.f.2), and remove support for prior versions of `gcc'.
-
- * Upgrade to `libf2c' as of 1997-02-08, and fix up some of the build
- procedures.
-
- * Improve general build procedures for `g77', fixing minor bugs
- (such as deletion of any file named `f771' in the parent directory
- of `gcc/').
-
- * Enable full support of `INTEGER*8' available in `libf2c' and
- `f2c.h' so that `f2c' users may make full use of its features via
- the `g77' version of `f2c.h' and the `INTEGER*8' support routines
- in the `g77' version of `libf2c'.
-
- * Improve `g77' driver and `libf2c' so that `g77 -v' yields version
- information on the library.
-
- * The `SNGL' and `FLOAT' intrinsics now are specific intrinsics,
- instead of synonyms for the generic intrinsic `REAL'.
-
- * New intrinsics have been added. These are `REALPART', `IMAGPART',
- `COMPLEX', `LONG', and `SHORT'.
-
- * A new group of intrinsics, `gnu', has been added to contain the
- new `REALPART', `IMAGPART', and `COMPLEX' intrinsics. An old
- group, `dcp', has been removed.
-
- * Complain about industry-wide ambiguous references `REAL(EXPR)' and
- `AIMAG(EXPR)', where EXPR is `DOUBLE COMPLEX' (or any complex type
- other than `COMPLEX'), unless `-ff90' option specifies Fortran 90
- interpretation or new `-fugly-complex' option, in conjunction with
- `-fnot-f90', specifies `f2c' interpretation.
-
- * Make improvements to diagnostics.
-
- * Speed up compiler a bit.
-
- * Improvements to documentation and indexing, including a new
- chapter containing information on one, later more, diagnostics
- that users are directed to pull up automatically via a message in
- the diagnostic itself.
-
- (Hence the menu item `M' for the node `Diagnostics' in the
- top-level menu of the Info documentation.)
-
-In 0.5.19.1:
-============
-
- * Code-generation bugs afflicting operations on complex data have
- been fixed.
-
- These bugs occurred when assigning the result of an operation to a
- complex variable (or array element) that also served as an input
- to that operation.
-
- The operations affected by this bug were: `CONJG()', `DCONJG()',
- `CCOS()', `CDCOS()', `CLOG()', `CDLOG()', `CSIN()', `CDSIN()',
- `CSQRT()', `CDSQRT()', complex division, and raising a `DOUBLE
- COMPLEX' operand to an `INTEGER' power. (The related generic and
- `Z'-prefixed intrinsics, such as `ZSIN()', also were affected.)
-
- For example, `C = CSQRT(C)', `Z = Z/C', and `Z = Z**I' (where `C'
- is `COMPLEX' and `Z' is `DOUBLE COMPLEX') have been fixed.
-
-In 0.5.19:
-==========
-
- * Fix `FORMAT' statement parsing so negative values for specifiers
- such as `P' (e.g. `FORMAT(-1PF8.1)') are correctly processed as
- negative.
-
- * Fix `SIGNAL' intrinsic so it once again accepts a procedure as its
- second argument.
-
- * A temporary kludge option provides bare-bones information on
- `COMMON' and `EQUIVALENCE' members at debug time.
-
- * New `-fonetrip' option specifies FORTRAN-66-style one-trip `DO'
- loops.
-
- * New `-fno-silent' option causes names of program units to be
- printed as they are compiled, in a fashion similar to UNIX `f77'
- and `f2c'.
-
- * New `-fugly-assumed' option specifies that arrays dimensioned via
- `DIMENSION X(1)', for example, are to be treated as assumed-size.
-
- * New `-fno-typeless-boz' option specifies that non-decimal-radix
- constants using the prefixed-radix form (such as `Z'1234'') are to
- be interpreted as `INTEGER' constants.
-
- * New `-ff66' option is a "shorthand" option that specifies
- behaviors considered appropriate for FORTRAN 66 programs.
-
- * New `-ff77' option is a "shorthand" option that specifies
- behaviors considered appropriate for UNIX `f77' programs.
-
- * New `-fugly-comma' and `-fugly-logint' options provided to perform
- some of what `-fugly' used to do. `-fugly' and `-fno-ugly' are
- now "shorthand" options, in that they do nothing more than enable
- (or disable) other `-fugly-*' options.
-
- * Fix parsing of assignment statements involving targets that are
- substrings of elements of `CHARACTER' arrays having names such as
- `READ', `WRITE', `GOTO', and `REALFUNCTIONFOO'.
-
- * Fix crashes involving diagnosed code.
-
- * Fix handling of local `EQUIVALENCE' areas so certain cases of
- valid Fortran programs are not misdiagnosed as improperly
- extending the area backwards.
-
- * Support `gcc' version 2.7.2.1.
-
- * Upgrade to `libf2c' as of 1996-09-26, and fix up some of the build
- procedures.
-
- * Change code generation for list-directed I/O so it allows for new
- versions of `libf2c' that might return non-zero status codes for
- some operations previously assumed to always return zero.
-
- This change not only affects how `IOSTAT=' variables are set by
- list-directed I/O, it also affects whether `END=' and `ERR='
- labels are reached by these operations.
-
- * Add intrinsic support for new `FTELL' and `FSEEK' procedures in
- `libf2c'.
-
- * Modify `fseek_()' in `libf2c' to be more portable (though, in
- practice, there might be no systems where this matters) and to
- catch invalid `whence' arguments.
-
- * Some useless warnings from the `-Wunused' option have been
- eliminated.
-
- * Fix a problem building the `f771' executable on AIX systems by
- linking with the `-bbigtoc' option.
-
- * Abort configuration if `gcc' has not been patched using the patch
- file provided in the `gcc/f/gbe/' subdirectory.
-
- * Add options `--help' and `--version' to the `g77' command, to
- conform to GNU coding guidelines. Also add printing of `g77'
- version number when the `--verbose' (`-v') option is used.
-
- * Change internally generated name for local `EQUIVALENCE' areas to
- one based on the alphabetically sorted first name in the list of
- names for entities placed at the beginning of the areas.
-
- * Improvements to documentation and indexing.
-
-In 0.5.18:
-==========
-
- * Add some rudimentary support for `INTEGER*1', `INTEGER*2',
- `INTEGER*8', and their `LOGICAL' equivalents. (This support works
- on most, maybe all, `gcc' targets.)
-
- Thanks to Scott Snyder (<snyder@d0sgif.fnal.gov>) for providing
- the patch for this!
-
- Among the missing elements from the support for these features are
- full intrinsic support and constants.
-
- * Add some rudimentary support for the `BYTE' and `WORD'
- type-declaration statements. `BYTE' corresponds to `INTEGER*1',
- while `WORD' corresponds to `INTEGER*2'.
-
- Thanks to Scott Snyder (<snyder@d0sgif.fnal.gov>) for providing
- the patch for this!
-
- * The compiler code handling intrinsics has been largely rewritten
- to accommodate the new types. No new intrinsics or arguments for
- existing intrinsics have been added, so there is, at this point,
- no intrinsic to convert to `INTEGER*8', for example.
-
- * Support automatic arrays in procedures.
-
- * Reduce space/time requirements for handling large *sparsely*
- initialized aggregate arrays. This improvement applies to only a
- subset of the general problem to be addressed in 0.6.
-
- * Treat initial values of zero as if they weren't specified (in DATA
- and type-declaration statements). The initial values will be set
- to zero anyway, but the amount of compile time processing them
- will be reduced, in some cases significantly (though, again, this
- is only a subset of the general problem to be addressed in 0.6).
-
- A new option, `-fzeros', is introduced to enable the traditional
- treatment of zeros as any other value.
-
- * With `-ff90' in force, `g77' incorrectly interpreted `REAL(Z)' as
- returning a `REAL' result, instead of as a `DOUBLE PRECISION'
- result. (Here, `Z' is `DOUBLE COMPLEX'.)
-
- With `-fno-f90' in force, the interpretation remains unchanged,
- since this appears to be how at least some F77 code using the
- `DOUBLE COMPLEX' extension expected it to work.
-
- Essentially, `REAL(Z)' in F90 is the same as `DBLE(Z)', while in
- extended F77, it appears to be the same as `REAL(REAL(Z))'.
-
- * An expression involving exponentiation, where both operands were
- type `INTEGER' and the right-hand operand was negative, was
- erroneously evaluated.
-
- * Fix bugs involving `DATA' implied-`DO' constructs (these involved
- an errant diagnostic and a crash, both on good code, one involving
- subsequent statement-function definition).
-
- * Close `INCLUDE' files after processing them, so compiling source
- files with lots of `INCLUDE' statements does not result in being
- unable to open `INCLUDE' files after all the available file
- descriptors are used up.
-
- * Speed up compiling, especially of larger programs, and perhaps
- slightly reduce memory utilization while compiling (this is *not*
- the improvement planned for 0.6 involving large aggregate
- areas)--these improvements result from simply turning off some
- low-level code to do self-checking that hasn't been triggered in a
- long time.
-
- * Introduce three new options that implement optimizations in the
- `gcc' back end (GBE). These options are `-fmove-all-movables',
- `-freduce-all-givs', and `-frerun-loop-opt', which are enabled, by
- default, for Fortran compilations. These optimizations are
- intended to help toon Fortran programs.
-
- * Patch the GBE to do a better job optimizing certain kinds of
- references to array elements.
-
- * Due to patches to the GBE, the version number of `gcc' also is
- patched to make it easier to manage installations, especially
- useful if it turns out a `g77' change to the GBE has a bug.
-
- The `g77'-modified version number is the `gcc' version number with
- the string `.f.N' appended, where `f' identifies the version as
- enhanced for Fortran, and N is `1' for the first Fortran patch for
- that version of `gcc', `2' for the second, and so on.
-
- So, this introduces version 2.7.2.f.1 of `gcc'.
-
- * Make several improvements and fixes to diagnostics, including the
- removal of two that were inappropriate or inadequate.
-
- * Warning about two successive arithmetic operators, produced by
- `-Wsurprising', now produced *only* when both operators are,
- indeed, arithmetic (not relational/boolean).
-
- * `-Wsurprising' now warns about the remaining cases of using
- non-integral variables for implied-`DO' loops, instead of these
- being rejected unless `-fpedantic' or `-fugly' specified.
-
- * Allow `SAVE' of a local variable or array, even after it has been
- given an initial value via `DATA', for example.
-
- * Introduce an Info version of `g77' documentation, which supercedes
- `gcc/f/CREDITS', `gcc/f/DOC', and `gcc/f/PROJECTS'. These files
- will be removed in a future release. The files `gcc/f/BUGS',
- `gcc/f/INSTALL', and `gcc/f/NEWS' now are automatically built from
- the texinfo source when distributions are made.
-
- This effort was inspired by a first pass at translating
- `g77-0.5.16/f/DOC' that was contributed to Craig by David Ronis
- (<ronis@onsager.chem.mcgill.ca>).
-
- * New `-fno-second-underscore' option to specify that, when
- `-funderscoring' is in effect, a second underscore is not to be
- appended to Fortran names already containing an underscore.
-
- * Change the way iterative `DO' loops work to follow the F90
- standard. In particular, calculation of the iteration count is
- still done by converting the start, end, and increment parameters
- to the type of the `DO' variable, but the result of the
- calculation is always converted to the default `INTEGER' type.
-
- (This should have no effect on existing code compiled by `g77',
- but code written to assume that use of a *wider* type for the `DO'
- variable will result in an iteration count being fully calculated
- using that wider type (wider than default `INTEGER') must be
- rewritten.)
-
- * Support `gcc' version 2.7.2.
-
- * Upgrade to `libf2c' as of 1996-03-23, and fix up some of the build
- procedures.
-
- Note that the email addresses related to `f2c' have changed--the
- distribution site now is named `netlib.bell-labs.com', and the
- maintainer's new address is <dmg@bell-labs.com>.
-
-In 0.5.17:
-==========
-
- * *Fix serious bug* in `g77 -v' command that can cause removal of a
- system's `/dev/null' special file if run by user `root'.
-
- *All users* of version 0.5.16 should ensure that they have not
- removed `/dev/null' or replaced it with an ordinary file (e.g. by
- comparing the output of `ls -l /dev/null' with `ls -l /dev/zero'.
- If the output isn't basically the same, contact your system
- administrator about restoring `/dev/null' to its proper status).
-
- This bug is particularly insidious because removing `/dev/null' as
- a special file can go undetected for quite a while, aside from
- various applications and programs exhibiting sudden, strange
- behaviors.
-
- I sincerely apologize for not realizing the implications of the
- fact that when `g77 -v' runs the `ld' command with `-o /dev/null'
- that `ld' tries to *remove* the executable it is supposed to build
- (especially if it reports unresolved references, which it should
- in this case)!
-
- * Fix crash on `CHARACTER*(*) FOO' in a main or block data program
- unit.
-
- * Fix crash that can occur when diagnostics given outside of any
- program unit (such as when input file contains `@foo').
-
- * Fix crashes, infinite loops (hangs), and such involving diagnosed
- code.
-
- * Fix `ASSIGN''ed variables so they can be `SAVE''d or dummy
- arguments, and issue clearer error message in cases where target
- of `ASSIGN' or `ASSIGN'ed `GOTO'/`FORMAT' is too small (which
- should never happen).
-
- * Make `libf2c' build procedures work on more systems again by
- eliminating unnecessary invocations of `ld -r -x' and `mv'.
-
- * Fix omission of `-funix-intrinsics-...' options in list of
- permitted options to compiler.
-
- * Fix failure to always diagnose missing type declaration for
- `IMPLICIT NONE'.
-
- * Fix compile-time performance problem (which could sometimes crash
- the compiler, cause a hang, or whatever, due to a bug in the back
- end) involving exponentiation with a large `INTEGER' constant for
- the right-hand operator (e.g. `I**32767').
-
- * Fix build procedures so cross-compiling `g77' (the `fini' utility
- in particular) is properly built using the host compiler.
-
- * Add new `-Wsurprising' option to warn about constructs that are
- interpreted by the Fortran standard (and `g77') in ways that are
- surprising to many programmers.
-
- * Add `ERF()' and `ERFC()' as generic intrinsics mapping to existing
- `ERF'/`DERF' and `ERFC'/`DERFC' specific intrinsics.
-
- *Note:* You should specify `INTRINSIC ERF,ERFC' in any code where
- you might use these as generic intrinsics, to improve likelihood
- of diagnostics (instead of subtle run-time bugs) when using a
- compiler that doesn't support these as intrinsics (e.g. `f2c').
-
- * Remove from `-fno-pedantic' the diagnostic about `DO' with
- non-`INTEGER' index variable; issue that under `-Wsurprising'
- instead.
-
- * Clarify some diagnostics that say things like "ignored" when that's
- misleading.
-
- * Clarify diagnostic on use of `.EQ.'/`.NE.' on `LOGICAL' operands.
-
- * Minor improvements to code generation for various operations on
- `LOGICAL' operands.
-
- * Minor improvement to code generation for some `DO' loops on some
- machines.
-
- * Support `gcc' version 2.7.1.
-
- * Upgrade to `libf2c' as of 1995-11-15.
-
-In 0.5.16:
-==========
-
- * Fix a code-generation bug involving complicated `EQUIVALENCE'
- statements not involving `COMMON'.
-
- * Fix code-generation bugs involving invoking "gratis" library
- procedures in `libf2c' from code compiled with `-fno-f2c' by
- making these procedures known to `g77' as intrinsics (not affected
- by -fno-f2c). This is known to fix code invoking `ERF()',
- `ERFC()', `DERF()', and `DERFC()'.
-
- * Update `libf2c' to include netlib patches through 1995-08-16, and
- `#define' `WANT_LEAD_0' to 1 to make `g77'-compiled code more
- consistent with other Fortran implementations by outputting
- leading zeros in formatted and list-directed output.
-
- * Fix a code-generation bug involving adjustable dummy arrays with
- high bounds whose primaries are changed during procedure
- execution, and which might well improve code-generation
- performance for such arrays compared to `f2c' plus `gcc' (but
- apparently only when using `gcc-2.7.0' or later).
-
- * Fix a code-generation bug involving invocation of `COMPLEX' and
- `DOUBLE COMPLEX' `FUNCTION's and doing `COMPLEX' and `DOUBLE
- COMPLEX' divides, when the result of the invocation or divide is
- assigned directly to a variable that overlaps one or more of the
- arguments to the invocation or divide.
-
- * Fix crash by not generating new optimal code for `X**I' if `I' is
- nonconstant and the expression is used to dimension a dummy array,
- since the `gcc' back end does not support the necessary mechanics
- (and the `gcc' front end rejects the equivalent construct, as it
- turns out).
-
- * Fix crash on expressions like `COMPLEX**INTEGER'.
-
- * Fix crash on expressions like `(1D0,2D0)**2', i.e. raising a
- `DOUBLE COMPLEX' constant to an `INTEGER' constant power.
-
- * Fix crashes and such involving diagnosed code.
-
- * Diagnose, instead of crashing on, statement function definitions
- having duplicate dummy argument names.
-
- * Fix bug causing rejection of good code involving statement function
- definitions.
-
- * Fix bug resulting in debugger not knowing size of local equivalence
- area when any member of area has initial value (via `DATA', for
- example).
-
- * Fix installation bug that prevented installation of `g77' driver.
- Provide for easy selection of whether to install copy of `g77' as
- `f77' to replace the broken code.
-
- * Fix `gcc' driver (affects `g77' thereby) to not gratuitously
- invoke the `f771' program (e.g. when `-E' is specified).
-
- * Fix diagnostic to point to correct source line when it immediately
- follows an `INCLUDE' statement.
-
- * Support more compiler options in `gcc'/`g77' when compiling
- Fortran files. These options include `-p', `-pg', `-aux-info',
- `-P', correct setting of version-number macros for preprocessing,
- full recognition of `-O0', and automatic insertion of
- configuration-specific linker specs.
-
- * Add new intrinsics that interface to existing routines in `libf2c':
- `ABORT', `DERF', `DERFC', `ERF', `ERFC', `EXIT', `FLUSH',
- `GETARG', `GETENV', `IARGC', `SIGNAL', and `SYSTEM'. Note that
- `ABORT', `EXIT', `FLUSH', `SIGNAL', and `SYSTEM' are intrinsic
- subroutines, not functions (since they have side effects), so to
- get the return values from `SIGNAL' and `SYSTEM', append a final
- argument specifying an `INTEGER' variable or array element (e.g.
- `CALL SYSTEM('rm foo',ISTAT)').
-
- * Add new intrinsic group named `unix' to contain the new intrinsics,
- and by default enable this new group.
-
- * Move `LOC()' intrinsic out of the `vxt' group to the new `unix'
- group.
-
- * Improve `g77' so that `g77 -v' by itself (or with certain other
- options, including `-B', `-b', `-i', `-nostdlib', and `-V')
- reports lots more useful version info, and so that long-form
- options `gcc' accepts are understood by `g77' as well (even in
- truncated, unambiguous forms).
-
- * Add new `g77' option `--driver=name' to specify driver when
- default, `gcc', isn't appropriate.
-
- * Add support for `#' directives (as output by the preprocessor) in
- the compiler, and enable generation of those directives by the
- preprocessor (when compiling `.F' files) so diagnostics and
- debugging info are more useful to users of the preprocessor.
-
- * Produce better diagnostics, more like `gcc', with info such as `In
- function `foo':' and `In file included from...:'.
-
- * Support `gcc''s `-fident' and `-fno-ident' options.
-
- * When `-Wunused' in effect, don't warn about local variables used as
- statement-function dummy arguments or `DATA' implied-`DO' iteration
- variables, even though, strictly speaking, these are not uses of
- the variables themselves.
-
- * When `-W -Wunused' in effect, don't warn about unused dummy
- arguments at all, since there's no way to turn this off for
- individual cases (`g77' might someday start warning about
- these)--applies to `gcc' versions 2.7.0 and later, since earlier
- versions didn't warn about unused dummy arguments.
-
- * New option `-fno-underscoring' that inhibits transformation of
- names (by appending one or two underscores) so users may experiment
- with implications of such an environment.
-
- * Minor improvement to `gcc/f/info' module to make it easier to build
- `g77' using the native (non-`gcc') compiler on certain machines
- (but definitely not all machines nor all non-`gcc' compilers).
- Please do not report bugs showing problems compilers have with
- macros defined in `gcc/f/target.h' and used in places like
- `gcc/f/expr.c'.
-
- * Add warning to be printed for each invocation of the compiler if
- the target machine `INTEGER', `REAL', or `LOGICAL' size is not 32
- bits, since `g77' is known to not work well for such cases (to be
- fixed in Version 0.6--*note Actual Bugs We Haven't Fixed Yet:
- Actual Bugs.).
-
- * Lots of new documentation (though work is still needed to put it
- into canonical GNU format).
-
- * Build `libf2c' with `-g0', not `-g2', in effect (by default), to
- produce smaller library without lots of debugging clutter.
-
-In 0.5.15:
-==========
-
- * Fix bad code generation involving `X**I' and temporary, internal
- variables generated by `g77' and the back end (such as for `DO'
- loops).
-
- * Fix crash given `CHARACTER A;DATA A/.TRUE./'.
-
- * Replace crash with diagnostic given `CHARACTER A;DATA A/1.0/'.
-
- * Fix crash or other erratic behavior when null character constant
- (`''') is encountered.
-
- * Fix crash or other erratic behavior involving diagnosed code.
-
- * Fix code generation for external functions returning type `REAL'
- when the `-ff2c' option is in force (which it is by default) so
- that `f2c' compatibility is indeed provided.
-
- * Disallow `COMMON I(10)' if `I' has previously been specified with
- an array declarator.
-
- * New `-ffixed-line-length-N' option, where N is the maximum length
- of a typical fixed-form line, defaulting to 72 columns, such that
- characters beyond column N are ignored, or N is `none', meaning no
- characters are ignored. does not affect lines with `&' in column
- 1, which are always processed as if `-ffixed-line-length-none' was
- in effect.
-
- * No longer generate better code for some kinds of array references,
- as `gcc' back end is to be fixed to do this even better, and it
- turned out to slow down some code in some cases after all.
-
- * In `COMMON' and `EQUIVALENCE' areas with any members given initial
- values (e.g. via `DATA'), uninitialized members now always
- initialized to binary zeros (though this is not required by the
- standard, and might not be done in future versions of `g77').
- Previously, in some `COMMON'/`EQUIVALENCE' areas (essentially
- those with members of more than one type), the uninitialized
- members were initialized to spaces, to cater to `CHARACTER' types,
- but it seems no existing code expects that, while much existing
- code expects binary zeros.
-
-In 0.5.14:
-==========
-
- * Don't emit bad code when low bound of adjustable array is
- nonconstant and thus might vary as an expression at run time.
-
- * Emit correct code for calculation of number of trips in `DO' loops
- for cases where the loop should not execute at all. (This bug
- affected cases where the difference between the begin and end
- values was less than the step count, though probably not for
- floating-point cases.)
-
- * Fix crash when extra parentheses surround item in `DATA'
- implied-`DO' list.
-
- * Fix crash over minor internal inconsistencies in handling
- diagnostics, just substitute dummy strings where necessary.
-
- * Fix crash on some systems when compiling call to `MVBITS()'
- intrinsic.
-
- * Fix crash on array assignment `TYPEDDD(...)=...', where DDD is a
- string of one or more digits.
-
- * Fix crash on `DCMPLX()' with a single `INTEGER' argument.
-
- * Fix various crashes involving code with diagnosed errors.
-
- * Support `-I' option for `INCLUDE' statement, plus `gcc''s
- `header.gcc' facility for handling systems like MS-DOS.
-
- * Allow `INCLUDE' statement to be continued across multiple lines,
- even allow it to coexist with other statements on the same line.
-
- * Incorporate Bellcore fixes to `libf2c' through 1995-03-15--this
- fixes a bug involving infinite loops reading EOF with empty
- list-directed I/O list.
-
- * Remove all the `g77'-specific auto-configuration scripts, code,
- and so on, except for temporary substitutes for bsearch() and
- strtoul(), as too many configure/build problems were reported in
- these areas. People will have to fix their systems' problems
- themselves, or at least somewhere other than `g77', which expects
- a working ANSI C environment (and, for now, a GNU C compiler to
- compile `g77' itself).
-
- * Complain if initialized common redeclared as larger in subsequent
- program unit.
-
- * Warn if blank common initialized, since its size can vary and hence
- related warnings that might be helpful won't be seen.
-
- * New `-fbackslash' option, on by default, that causes `\' within
- `CHARACTER' and Hollerith constants to be interpreted a la GNU C.
- Note that this behavior is somewhat different from `f2c''s, which
- supports only a limited subset of backslash (escape) sequences.
-
- * Make `-fugly-args' the default.
-
- * New `-fugly-init' option, on by default, that allows
- typeless/Hollerith to be specified as initial values for variables
- or named constants (`PARAMETER'), and also allows
- character<->numeric conversion in those contexts--turn off via
- `-fno-ugly-init'.
-
- * New `-finit-local-zero' option to initialize local variables to
- binary zeros. This does not affect whether they are `SAVE'd, i.e.
- made automatic or static.
-
- * New `-Wimplicit' option to warn about implicitly typed variables,
- arrays, and functions. (Basically causes all program units to
- default to `IMPLICIT NONE'.)
-
- * `-Wall' now implies `-Wuninitialized' as with `gcc' (i.e. unless
- `-O' not specified, since `-Wuninitialized' requires `-O'), and
- implies `-Wunused' as well.
-
- * `-Wunused' no longer gives spurious messages for unused `EXTERNAL'
- names (since they are assumed to refer to block data program
- units, to make use of libraries more reliable).
-
- * Support `%LOC()' and `LOC()' of character arguments.
-
- * Support null (zero-length) character constants and expressions.
-
- * Support `f2c''s `IMAG()' generic intrinsic.
-
- * Support `ICHAR()', `IACHAR()', and `LEN()' of character
- expressions that are valid in assignments but not normally as
- actual arguments.
-
- * Support `f2c'-style `&' in column 1 to mean continuation line.
-
- * Allow `NAMELIST', `EXTERNAL', `INTRINSIC', and `VOLATILE' in
- `BLOCK DATA', even though these are not allowed by the standard.
-
- * Allow `RETURN' in main program unit.
-
- * Changes to Hollerith-constant support to obey Appendix C of the
- standard:
-
- - Now padded on the right with zeros, not spaces.
-
- - Hollerith "format specifications" in the form of arrays of
- non-character allowed.
-
- - Warnings issued when non-space truncation occurs when
- converting to another type.
-
- - When specified as actual argument, now passed by reference to
- `INTEGER' (padded on right with spaces if constant too small,
- otherwise fully intact if constant wider the `INTEGER' type)
- instead of by value.
-
- *Warning:* `f2c' differs on the interpretation of `CALL FOO(1HX)',
- which it treats exactly the same as `CALL FOO('X')', but which the
- standard and `g77' treat as `CALL FOO(%REF('X '))' (padded with
- as many spaces as necessary to widen to `INTEGER'), essentially.
-
- * Changes and fixes to typeless-constant support:
-
- - Now treated as a typeless double-length `INTEGER' value.
-
- - Warnings issued when overflow occurs.
-
- - Padded on the left with zeros when converting to a larger
- type.
-
- - Should be properly aligned and ordered on the target machine
- for whatever type it is turned into.
-
- - When specified as actual argument, now passed as reference to
- a default `INTEGER' constant.
-
- * `%DESCR()' of a non-`CHARACTER' expression now passes a pointer to
- the expression plus a length for the expression just as if it were
- a `CHARACTER' expression. For example, `CALL FOO(%DESCR(D))',
- where `D' is `REAL*8', is the same as `CALL FOO(D,%VAL(8)))'.
-
- * Name of multi-entrypoint master function changed to incorporate
- the name of the primary entry point instead of a decimal value, so
- the name of the master function for `SUBROUTINE X' with alternate
- entry points is now `__g77_masterfun_x'.
-
- * Remove redundant message about zero-step-count `DO' loops.
-
- * Clean up diagnostic messages, shortening many of them.
-
- * Fix typo in `g77' man page.
-
- * Clarify implications of constant-handling bugs in `f/BUGS'.
-
- * Generate better code for `**' operator with a right-hand operand of
- type `INTEGER'.
+ 38. Upgrade to `libf2c' as of 1998-06-18.
- * Generate better code for `SQRT()' and `DSQRT()', also when
- `-ffast-math' specified, enable better code generation for `SIN()'
- and `COS()'.
+ 39. Improve documentation and indexing.
- * Generate better code for some kinds of array references.
+In previous versions:
+=====================
- * Speed up lexing somewhat (this makes the compilation phase
- noticeably faster).
+ Information on previous versions is not provided in this
+`egcs/gcc/f/NEWS' file, to keep it short. See `egcs/gcc/f/news.texi',
+or any of its other derivations (Info, HTML, dvi forms) for such
+information.
diff --git a/contrib/gcc/f/RELEASE-PREP b/contrib/gcc/f/RELEASE-PREP
new file mode 100644
index 0000000..7069ea5
--- /dev/null
+++ b/contrib/gcc/f/RELEASE-PREP
@@ -0,0 +1,5 @@
+1999-03-13 RELEASE-PREP
+
+Things to do to prepare a g77 release (FSF, egcs, whatever).
+
+- Update root.texi: clear DEVELOPMENT flag, set version info.
diff --git a/contrib/gcc/f/ansify.c b/contrib/gcc/f/ansify.c
index 3af68e5..6c6d01f 100644
--- a/contrib/gcc/f/ansify.c
+++ b/contrib/gcc/f/ansify.c
@@ -1,6 +1,6 @@
/* ansify.c
Copyright (C) 1997 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -51,7 +51,7 @@ typedef enum
while(0)
static void
-die ()
+die (void)
{
exit (1);
}
diff --git a/contrib/gcc/f/assert.j b/contrib/gcc/f/assert.j
index a24b66f..d9b9daa 100644
--- a/contrib/gcc/f/assert.j
+++ b/contrib/gcc/f/assert.j
@@ -1,6 +1,6 @@
/* assert.j -- Wrapper for GCC's assert.h
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/bad.c b/contrib/gcc/f/bad.c
index a2a4832..704fa12 100644
--- a/contrib/gcc/f/bad.c
+++ b/contrib/gcc/f/bad.c
@@ -1,6 +1,6 @@
/* bad.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -62,7 +62,7 @@ bool ffebad_is_inhibited_ = FALSE;
struct _ffebad_message_
{
ffebadSeverity severity;
- char *message;
+ const char *message;
};
/* Static objects accessed by functions in this module. */
@@ -89,11 +89,11 @@ static struct
}
ffebad_here_[FFEBAD_MAX_];
-static char *ffebad_string_[FFEBAD_MAX_];
+static const char *ffebad_string_[FFEBAD_MAX_];
static ffebadIndex ffebad_order_[FFEBAD_MAX_];
static ffebad ffebad_errnum_;
static ffebadSeverity ffebad_severity_;
-static char *ffebad_message_;
+static const char *ffebad_message_;
static unsigned char ffebad_index_;
static ffebadIndex ffebad_places_;
static bool ffebad_is_temp_inhibited_; /* Effective setting of
@@ -102,7 +102,7 @@ static bool ffebad_is_temp_inhibited_; /* Effective setting of
/* Static functions (internal). */
-static int ffebad_bufputs_ (char buf[], int bufi, char *s);
+static int ffebad_bufputs_ (char buf[], int bufi, const char *s);
/* Internal macros. */
@@ -115,7 +115,7 @@ static int ffebad_bufputs_ (char buf[], int bufi, char *s);
static int
-ffebad_bufputs_ (char buf[], int bufi, char *s)
+ffebad_bufputs_ (char buf[], int bufi, const char *s)
{
for (; *s != '\0'; ++s)
bufi = ffebad_bufputc_ (buf, bufi, *s);
@@ -161,7 +161,7 @@ ffebad_severity (ffebad errnum)
bool
ffebad_start_ (bool lex_override, ffebad errnum, ffebadSeverity sev,
- char *message)
+ const char *message)
{
unsigned char i;
@@ -321,7 +321,7 @@ ffebad_here (ffebadIndex index, ffewhereLine line, ffewhereColumn col)
/* Establish string for next index (always in order) of message
- ffebad_string(char *string);
+ ffebad_string(const char *string);
Call ffebad_start to establish the message, ffebad_here and ffebad_string
to send run-time data to it as necessary, then ffebad_finish when through
@@ -330,7 +330,7 @@ ffebad_here (ffebadIndex index, ffewhereLine line, ffewhereColumn col)
the argument passed in until then. */
void
-ffebad_string (char *string)
+ffebad_string (const char *string)
{
if (ffebad_is_temp_inhibited_)
return;
@@ -351,7 +351,7 @@ void
ffebad_finish ()
{
#define MAX_SPACES 132
- static char *spaces
+ static const char *spaces
= "...>\
\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\
\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\
@@ -372,9 +372,9 @@ ffebad_finish ()
ffebadIndex bi;
unsigned short i;
char pointer;
- char c;
- char *s;
- char *fn;
+ unsigned char c;
+ unsigned const char *s;
+ const char *fn;
static char buf[1024];
int bufi;
int index;
diff --git a/contrib/gcc/f/bad.def b/contrib/gcc/f/bad.def
index 3a86a1f..4c7bfe4 100644
--- a/contrib/gcc/f/bad.def
+++ b/contrib/gcc/f/bad.def
@@ -1,6 +1,6 @@
/* bad.def -- Public #include File (module.h template V1.0)
Copyright (C) 1995-1997 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -700,6 +700,10 @@ FFEBAD_MSGS1 (FFEBAD_ARRAY_LARGE, FATAL,
"Array `%A' at %0 is too large to handle")
FFEBAD_MSGS1 (FFEBAD_SFUNC_UNUSED, WARN,
"Statement function `%A' defined at %0 is not used")
+FFEBAD_MSGS1 (FFEBAD_INTRINSIC_Y2KBAD, WARN,
+"Intrinsic `%A', invoked at %0, known to be non-Y2K-compliant [info -f g77 M Y2KBAD]")
+FFEBAD_MSGS1 (FFEBAD_NOCANDO, DISASTER,
+"Internal compiler error -- cannot perform operation")
#undef INFORM
#undef TRIVIAL
diff --git a/contrib/gcc/f/bad.h b/contrib/gcc/f/bad.h
index a52ff1f..7340223 100644
--- a/contrib/gcc/f/bad.h
+++ b/contrib/gcc/f/bad.h
@@ -1,6 +1,6 @@
/* bad.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -82,8 +82,8 @@ void ffebad_init_0 (void);
bool ffebad_is_fatal (ffebad errnum);
ffebadSeverity ffebad_severity (ffebad errnum);
bool ffebad_start_ (bool lex_override, ffebad errnum, ffebadSeverity sev,
- char *message);
-void ffebad_string (char *string);
+ const char *message);
+void ffebad_string (const char *string);
/* Define macros. */
diff --git a/contrib/gcc/f/bit.c b/contrib/gcc/f/bit.c
index 71e74d7..5f581a0 100644
--- a/contrib/gcc/f/bit.c
+++ b/contrib/gcc/f/bit.c
@@ -1,6 +1,6 @@
/* bit.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/bit.h b/contrib/gcc/f/bit.h
index 0e84499..a2acc25 100644
--- a/contrib/gcc/f/bit.h
+++ b/contrib/gcc/f/bit.h
@@ -1,6 +1,6 @@
/* bit.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/bld-op.def b/contrib/gcc/f/bld-op.def
index 44cde44..737dcc7 100644
--- a/contrib/gcc/f/bld-op.def
+++ b/contrib/gcc/f/bld-op.def
@@ -1,6 +1,6 @@
/* bld-op.def -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/bld.c b/contrib/gcc/f/bld.c
index 6e75692..15cadf1 100644
--- a/contrib/gcc/f/bld.c
+++ b/contrib/gcc/f/bld.c
@@ -1,6 +1,6 @@
/* bld.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -203,7 +203,7 @@ static ffebldConstant ffebld_constant_hollerith_;
static ffebldConstant ffebld_constant_typeless_[FFEBLD_constTYPELESS_LAST
- FFEBLD_constTYPELESS_FIRST + 1];
-static char *ffebld_op_string_[]
+static const char *ffebld_op_string_[]
=
{
#define FFEBLD_OP(KWD,NAME,ARITY) NAME,
@@ -5573,6 +5573,9 @@ ffebld_new_item (ffebld head, ffebld trail)
x->op = FFEBLD_opITEM;
x->u.item.head = head;
x->u.item.trail = trail;
+#ifdef FFECOM_itemHOOK
+ x->u.item.hook = FFECOM_itemNULL;
+#endif
return x;
}
@@ -5655,6 +5658,9 @@ ffebld_new_one (ffebldOp o, ffebld left)
#endif
x->op = o;
x->u.nonter.left = left;
+#ifdef FFECOM_nonterHOOK
+ x->u.nonter.hook = FFECOM_nonterNULL;
+#endif
return x;
}
@@ -5703,6 +5709,9 @@ ffebld_new_two (ffebldOp o, ffebld left, ffebld right)
x->op = o;
x->u.nonter.left = left;
x->u.nonter.right = right;
+#ifdef FFECOM_nonterHOOK
+ x->u.nonter.hook = FFECOM_nonterNULL;
+#endif
return x;
}
@@ -5745,7 +5754,7 @@ ffebld_pool_push (mallocPool pool)
Returns a short string (uppercase) containing the name of the op. */
-char *
+const char *
ffebld_op_string (ffebldOp o)
{
if (o >= ARRAY_SIZE (ffebld_op_string_))
diff --git a/contrib/gcc/f/bld.h b/contrib/gcc/f/bld.h
index d3b613ef..ddbd448 100644
--- a/contrib/gcc/f/bld.h
+++ b/contrib/gcc/f/bld.h
@@ -1,6 +1,6 @@
/* bld.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -406,12 +406,18 @@ struct _ffebld_
{
ffebld left;
ffebld right;
+#ifdef FFECOM_nonterHOOK
+ ffecomNonter hook; /* Whatever the compiler/backend wants! */
+#endif
}
nonter;
struct
{
ffebld head;
ffebld trail;
+#ifdef FFECOM_itemHOOK
+ ffecomItem hook; /* Whatever the compiler/backend wants! */
+#endif
}
item;
struct
@@ -726,7 +732,7 @@ ffebld ffebld_new_symter (ffesymbol s, ffeintrinGen gen, ffeintrinSpec spec,
ffeintrinImp imp);
ffebld ffebld_new_one (ffebldOp o, ffebld left);
ffebld ffebld_new_two (ffebldOp o, ffebld left, ffebld right);
-char *ffebld_op_string (ffebldOp o);
+const char *ffebld_op_string (ffebldOp o);
void ffebld_pool_pop (void);
void ffebld_pool_push (mallocPool pool);
ffetargetCharacterSize ffebld_size_max (ffebld b);
@@ -748,6 +754,7 @@ ffetargetCharacterSize ffebld_size_max (ffebld b);
#define ffebld_arrter_set_pad(b,p) ((b)->u.arrter.pad = (p))
#define ffebld_arrter_set_size(b,s) ((b)->u.arrter.size = (s))
#define ffebld_arrter_size(b) ((b)->u.arrter.size)
+#define ffebld_basictype(b) (ffeinfo_basictype (ffebld_info ((b))))
#if FFEBLD_whereconstCURRENT_ == FFEBLD_whereconstPROGUNIT_
#define ffebld_constant_pool() ffe_pool_program_unit()
#elif FFEBLD_whereconstCURRENT_ == FFEBLD_whereconstFILE_
@@ -944,6 +951,10 @@ ffetargetCharacterSize ffebld_size_max (ffebld b);
#define ffebld_init_3()
#define ffebld_init_4()
#define ffebld_init_list(l,b) (*(l) = NULL, *(b) = (l))
+#define ffebld_item_hook(b) ((b)->u.item.hook)
+#define ffebld_item_set_hook(b,h) ((b)->u.item.hook = (h))
+#define ffebld_kind(b) (ffeinfo_kind (ffebld_info ((b))))
+#define ffebld_kindtype(b) (ffeinfo_kindtype (ffebld_info ((b))))
#define ffebld_labter(b) ((b)->u.labter)
#define ffebld_labtok(b) ((b)->u.labtok)
#define ffebld_left(b) ((b)->u.nonter.left)
@@ -987,8 +998,11 @@ ffetargetCharacterSize ffebld_size_max (ffebld b);
#define ffebld_new_arrayref(l,r) ffebld_new_two(FFEBLD_opARRAYREF,(l),(r))
#define ffebld_new_substr(l,r) ffebld_new_two(FFEBLD_opSUBSTR,(l),(r))
#define ffebld_new_impdo(l,r) ffebld_new_two(FFEBLD_opIMPDO,(l),(r))
+#define ffebld_nonter_hook(b) ((b)->u.nonter.hook)
+#define ffebld_nonter_set_hook(b,h) ((b)->u.nonter.hook = (h))
#define ffebld_op(b) ((b)->op)
#define ffebld_pool() (ffebld_pool_stack_.pool)
+#define ffebld_rank(b) (ffeinfo_rank (ffebld_info ((b))))
#define ffebld_right(b) ((b)->u.nonter.right)
#define ffebld_set_accter(b,a) ((b)->u.accter.array = (a))
#define ffebld_set_arrter(b,a) ((b)->u.arrter.array = (a))
@@ -1000,8 +1014,8 @@ ffetargetCharacterSize ffebld_size_max (ffebld b);
#define ffebld_set_left(b,l) ((b)->u.nonter.left = (l))
#define ffebld_set_right(b,r) ((b)->u.nonter.right = (r))
#define ffebld_set_trail(b,t) ((b)->u.item.trail = (t))
-#define ffebld_size(b) (ffeinfo_size((b)->info))
-#define ffebld_size_known(b) ffebld_size(b)
+#define ffebld_size(b) (ffeinfo_size (ffebld_info ((b))))
+#define ffebld_size_known(b) ffebld_size((b))
#define ffebld_symter(b) ((b)->u.symter.symbol)
#define ffebld_symter_generic(b) ((b)->u.symter.generic)
#define ffebld_symter_doiter(b) ((b)->u.symter.do_iter)
@@ -1018,6 +1032,7 @@ ffetargetCharacterSize ffebld_size_max (ffebld b);
#define ffebld_terminate_3()
#define ffebld_terminate_4()
#define ffebld_trail(b) ((b)->u.item.trail)
+#define ffebld_where(b) (ffeinfo_where (ffebld_info ((b))))
/* End of #include file. */
diff --git a/contrib/gcc/f/bugs.texi b/contrib/gcc/f/bugs.texi
index 52c9287..3f4cd90 100644
--- a/contrib/gcc/f/bugs.texi
+++ b/contrib/gcc/f/bugs.texi
@@ -1,20 +1,40 @@
-@c Copyright (C) 1995-1998 Free Software Foundation, Inc.
+@c Copyright (C) 1995-1999 Free Software Foundation, Inc.
@c This is part of the G77 manual.
@c For copying conditions, see the file g77.texi.
@c The text of this file appears in the file BUGS
@c in the G77 distribution, as well as in the G77 manual.
-@c 1999-03-13
+@c Keep this the same as the dates above, since it's used
+@c in the standalone derivations of this file (e.g. BUGS).
+@set copyrights-bugs 1995-1999
-@ifset BUGSONLY
-@set which-g77 @code{egcs}-1.1.2
+@set last-update-bugs 1999-06-29
+
+@include root.texi
+
+@ifset DOC-BUGS
+@c The immediately following lines apply to the BUGS file
+@c which is derived from this file.
+@emph{Note:} This file is automatically generated from the files
+@file{bugs0.texi} and @file{bugs.texi}.
+@file{BUGS} is @emph{not} a source file,
+although it is normally included within source distributions.
+
+This file lists known bugs in the @value{which-g77} version
+of the GNU Fortran compiler.
+Copyright (C) @value{copyrights-bugs} Free Software Foundation, Inc.
+You may copy, distribute, and modify it freely as long as you preserve
+this copyright notice and permission notice.
+
+@node Top,,, (dir)
+@chapter Known Bugs In GNU Fortran
@end ifset
-@ifclear BUGSONLY
-@node Actual Bugs
-@section Actual Bugs We Haven't Fixed Yet
-@end ifclear
+@ifset DOC-G77
+@node Known Bugs
+@section Known Bugs In GNU Fortran
+@end ifset
This section identifies bugs that @code{g77} @emph{users}
might run into in the @value{which-g77} version
@@ -25,97 +45,64 @@ sets of code are at least somewhat under the control
of (and necessarily intertwined with) @code{g77},
so it isn't worth separating them out.
-@ifset last-up-date
+@ifset DOC-G77
For information on bugs in @emph{other} versions of @code{g77},
-@ref{News,,News About GNU Fortran}.
+see @ref{News,,News About GNU Fortran}.
+There, lists of bugs fixed in various versions of @code{g77}
+can help determine what bugs existed in prior versions.
@end ifset
-@ifset BUGSONLY
+@ifset DOC-BUGS
For information on bugs in @emph{other} versions of @code{g77},
-see @file{egcs/gcc/f/NEWS}.
+see @file{@value{path-g77}/NEWS}.
+There, lists of bugs fixed in various versions of @code{g77}
+can help determine what bugs existed in prior versions.
+@end ifset
+
+@ifset DEVELOPMENT
+@emph{Warning:} The information below is still under development,
+and might not accurately reflect the @code{g77} code base
+of which it is a part.
+Efforts are made to keep it somewhat up-to-date,
+but they are particularly concentrated
+on any version of this information
+that is distributed as part of a @emph{released} @code{g77}.
+
+In particular, while this information is intended to apply to
+the @value{which-g77} version of @code{g77},
+only an official @emph{release} of that version
+is expected to contain documentation that is
+most consistent with the @code{g77} product in that version.
@end ifset
An online, ``live'' version of this document
-(derived directly from the up-to-date mainline version
+(derived directly from the mainline, development version
of @code{g77} within @code{egcs})
-is available at
-@uref{http://egcs.cygnus.com/onlinedocs/g77_bugs.html}.
+is available via
+@uref{http://www.gnu.org/software/gcc/onlinedocs/g77_bugs.html}.
+Follow the ``Known Bugs'' link.
-@ifset last-up-date
+@ifset DOC-G77
For information on bugs that might afflict people who
configure, port, build, and install @code{g77},
-@ref{Problems Installing}.
+see @ref{Problems Installing}.
@end ifset
-@ifset BUGSONLY
+@ifset DOC-BUGS
For information on bugs that might afflict people who
configure, port, build, and install @code{g77},
-see ``Problems Installing'' in @file{egcs/gcc/f/INSTALL}.
+see "Problems Installing" in @file{@value{path-g77}/INSTALL}.
@end ifset
-@itemize @bullet
-@item
-@code{g77} generates bad code for assignments,
-or other conversions,
-of @code{REAL} or @code{COMPLEX} constant expressions
-to type @code{INTEGER(KIND=2)}
-(often referred to as @code{INTEGER*8}).
-
-For example, @samp{INTEGER*8 J; J = 4E10} is miscompiled
-on some systems---the wrong value is stored in @var{J}.
-
-@item
-The @code{IDate} Intrinsic (VXT)
-fails to return the year in the documented, non-Y2K-compliant range
-of 0--99,
-instead returning 100 for the year 2000.
-
-@c Fixed in @code{egcs} 1.2.
-
-@item
-Year 2000 (Y2K) compliance information
-is missing from the documentation.
-
-@c Fixed in @code{egcs} 1.2.
-
-@item
-@code{g77} crashes when compiling
-I/O statements using keywords that define @code{INTEGER} values,
-such as @samp{IOSTAT=@var{j}},
-where @var{j} is other than default @code{INTEGER}
-(such as @code{INTEGER*2}).
-
-@c Fixed in @code{egcs} 1.2.
-
-@item
-The @samp{-ax} option is not obeyed when compiling Fortran programs.
-(It is not passed to the @file{f771} driver.)
-
-@c Fixed in @code{egcs} 1.2.
-
-@item
-@code{g77} fails to warn about a reference to a function
-when the corresponding @emph{subsequent} function program unit
-disagrees with the reference concerning the type of the function.
-
-@c Fixed in @code{egcs} 1.2.
-
-@item
-@c Tim Prince discovered this.
-Automatic arrays possibly aren't working on HP-UX systems,
-at least in HP-UX version 10.20.
-Writing into them apparently causes over-writing
-of statically declared data in the main program.
-This probably means the arrays themselves are being under-allocated,
-or pointers to them being improperly handled,
-e.g. not passed to other procedures as they should be.
+The following information was last updated on @value{last-update-bugs}:
+@itemize @bullet
@item
@code{g77} fails to warn about
use of a ``live'' iterative-DO variable
as an implied-DO variable
-in a @samp{WRITE} or @samp{PRINT} statement
-(although it does warn about this in a @samp{READ} statement).
+in a @code{WRITE} or @code{PRINT} statement
+(although it does warn about this in a @code{READ} statement).
@item
Something about @code{g77}'s straightforward handling of
@@ -153,7 +140,7 @@ This is to be fixed in version 0.6, when @code{g77} will use the
@cindex compiler memory usage
@cindex memory usage, of compiler
@cindex large aggregate areas
-@cindex initialization
+@cindex initialization, bug
@cindex DATA statement
@cindex statements, DATA
@item
@@ -179,7 +166,7 @@ improvements to the compiler.)
Note that @code{g77} does display a warning message to
notify the user before the compiler appears to hang.
-@ifset last-up-date
+@ifset DOC-G77
@xref{Large Initialization,,Initialization of Large Aggregate Areas},
for information on how to change the point at which
@code{g77} decides to issue this warning.
@@ -201,7 +188,7 @@ As of Version 0.5.19, a temporary kludge solution is provided whereby
some rudimentary information on a member is written as a string that
is the member's value as a character string.
-@ifset last-up-date
+@ifset DOC-G77
@xref{Code Gen Options,,Options for Code Generation Conventions},
for information on the @samp{-fdebug-kludge} option.
@end ifset
@@ -213,8 +200,8 @@ for information on the @samp{-fdebug-kludge} option.
@item
When debugging, after starting up the debugger but before being able
to see the source code for the main program unit, the user must currently
-set a breakpoint at @samp{MAIN__} (or @samp{MAIN___} or @samp{MAIN_} if
-@samp{MAIN__} doesn't exist)
+set a breakpoint at @code{MAIN__} (or @code{MAIN___} or @code{MAIN_} if
+@code{MAIN__} doesn't exist)
and run the program until it hits the breakpoint.
At that point, the
main program unit is activated and about to execute its first
@@ -250,23 +237,6 @@ This problem is largely resolved as of version 0.5.23.
Version 0.6 should solve most or all remaining problems
(such as cross-compiling involving 64-bit machines).
-@cindex COMPLEX support
-@cindex support, COMPLEX
-@item
-Maintainers of gcc report that the back end definitely has ``broken''
-support for @code{COMPLEX} types.
-Based on their input, it seems many of
-the problems affect only the more-general facilities for gcc's
-@code{__complex__} type, such as @code{__complex__ int}
-(where the real and imaginary parts are integers) that GNU
-Fortran does not use.
-
-Version 0.5.20 of @code{g77} works around this
-problem by not using the back end's support for @code{COMPLEX}.
-The new option @samp{-fno-emulate-complex} avoids the work-around,
-reverting to using the same ``broken'' mechanism as that used
-by versions of @code{g77} prior to 0.5.20.
-
@cindex padding
@cindex structures
@cindex common blocks
@@ -285,42 +255,6 @@ of specifications of alignment requirements and preferences for targets,
and front ends like @code{g77} should take advantage of this
when it becomes available.
-@cindex alignment
-@cindex double-precision performance
-@cindex -malign-double
-@item
-The x86 target's @samp{-malign-double} option
-no longer reliably aligns double-precision variables and arrays
-when they are placed in the stack frame.
-
-This can significantly reduce the performance of some applications,
-even on a run-to-run basis
-(that is, performance measurements can vary fairly widely
-depending on whether frequently used variables are properly aligned,
-and that can change from one program run to the next,
-even from one procedure call to the next).
-
-Versions 0.5.22 and earlier of @code{g77}
-included a patch to @code{gcc} that enabled this,
-but that patch has been deemed an improper (probably buggy) one
-for version 2.8 of @code{gcc} and for @code{egcs}.
-
-Note that version 1.1 of @code{egcs}
-aligns double-precision variables and arrays
-when they are in static storage
-even if @samp{-malign-double} is not specified.
-
-There is ongoing investigation into
-how to make @samp{-malign-double} work properly,
-also into how to make it unnecessary to get
-all double-precision variables and arrays aligned
-when such alignment would not violate
-the relevant specifications for processor
-and inter-procedural interfaces.
-
-For a suite of programs to test double-precision alignment,
-see @uref{ftp://alpha.gnu.org/gnu/g77/align/}.
-
@cindex complex performance
@cindex aliasing
@item
diff --git a/contrib/gcc/f/bugs0.texi b/contrib/gcc/f/bugs0.texi
index e8f6d22..9636f4d 100644
--- a/contrib/gcc/f/bugs0.texi
+++ b/contrib/gcc/f/bugs0.texi
@@ -1,17 +1,9 @@
\input texinfo @c -*-texinfo-*-
-@c %**start of header
+@c %**start of header
@setfilename BUGS
-@set BUGSONLY
@c %**end of header
-@c The immediately following lines apply to the BUGS file
-@c which is generated using this file.
-This file lists known bugs in the GNU Fortran compiler.
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-You may copy, distribute, and modify it freely as long as you preserve
-this copyright notice and permission notice.
-
-@node Top,,, (dir)
-@chapter Bugs in GNU Fortran
+@c This tells bugs.texi that it's generating just the BUGS file.
+@set DOC-BUGS
@include bugs.texi
@bye
diff --git a/contrib/gcc/f/com-rt.def b/contrib/gcc/f/com-rt.def
index 6ceaf17..cb3a5f1 100644
--- a/contrib/gcc/f/com-rt.def
+++ b/contrib/gcc/f/com-rt.def
@@ -1,6 +1,6 @@
/* com-rt.def -- Public #include File (module.h template V1.0)
Copyright (C) 1995-1997 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -66,6 +66,7 @@ DEFGFRT (FFECOM_gfrtCMP, "s_cmp", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE)
DEFGFRT (FFECOM_gfrtCOPY, "s_copy", FFECOM_rttypeVOID_, 0, FALSE, FALSE)
DEFGFRT (FFECOM_gfrtPAUSE, "s_paus", FFECOM_rttypeVOID_, 0, FALSE, FALSE)
DEFGFRT (FFECOM_gfrtSTOP, "s_stop", FFECOM_rttypeVOID_, 0, TRUE, FALSE)
+DEFGFRT (FFECOM_gfrtRANGE, "s_rnge", FFECOM_rttypeINTEGER_, 0, TRUE, FALSE)
DEFGFRT (FFECOM_gfrtSRDUE, "s_rdue", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE)
DEFGFRT (FFECOM_gfrtERDUE, "e_rdue", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE)
@@ -142,7 +143,7 @@ DEFGFRT (FFECOM_gfrtDACOS, "d_acos", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtDASIN, "d_asin", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtDATAN, "d_atan", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtDATAN2, "d_atn2", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE)
-DEFGFRT (FFECOM_gfrtDATE, "G77_date_0", FFECOM_rttypeVOID_, "&a", FALSE, FALSE)
+DEFGFRT (FFECOM_gfrtDATE, "G77_date_y2kbug_0", FFECOM_rttypeVOID_, "&a", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtDATE_AND_TIME, "G77_date_and_time_0", FFECOM_rttypeVOID_, "&a&a&a&i", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtL_BESJ0, "j0", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtL_BESJ1, "j1", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE)
@@ -242,7 +243,7 @@ DEFGFRT (FFECOM_gfrtTIME, "G77_time_0", FFECOM_rttypeLONGINT_, 0, FALSE, FALSE)
DEFGFRT (FFECOM_gfrtTTYNAM, "G77_ttynam_0", FFECOM_rttypeCHARACTER_, "&i", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtUNLINK, "G77_unlink_0", FFECOM_rttypeINTEGER_, "&a", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtUMASK, "G77_umask_0", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE)
-DEFGFRT (FFECOM_gfrtVXTIDATE, "G77_vxtidate_0", FFECOM_rttypeVOID_, "&i&i&i", FALSE, FALSE)
+DEFGFRT (FFECOM_gfrtVXTIDATE, "G77_vxtidate_y2kbug_0", FFECOM_rttypeVOID_, "&i&i&i", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtVXTTIME, "G77_vxttime_0", FFECOM_rttypeVOID_, "&a", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtCDABS, "z_abs", FFECOM_rttypeDOUBLE_, "&e", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtCDCOS, "z_cos", FFECOM_rttypeDBLCMPLX_F2C_, "&e", FALSE, TRUE)
diff --git a/contrib/gcc/f/com.c b/contrib/gcc/f/com.c
index 9db1f84..c326fed 100644
--- a/contrib/gcc/f/com.c
+++ b/contrib/gcc/f/com.c
@@ -1,6 +1,6 @@
/* com.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995-1998 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -60,9 +60,9 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
is_nested, is_public);
// for each arg, build PARM_DECL and call push_parm_decl (decl) with it;
store_parm_decls (is_main_program);
- ffecom_start_compstmt_ ();
+ ffecom_start_compstmt ();
// for stmts and decls inside function, do appropriate things;
- ffecom_end_compstmt_ ();
+ ffecom_end_compstmt ();
finish_function (is_nested);
if (is_nested) pop_f_function_context ();
if (is_nested) resume_momentary (yes);
@@ -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
@@ -231,8 +229,8 @@ tree unsigned_type_node;
tree char_type_node;
tree current_function_decl;
-/* ~~tree.h SHOULD declare this, because toplev.c and dwarfout.c reference
- it. */
+/* ~~gcc/tree.h *should* declare this, because toplev.c and dwarfout.c
+ reference it. */
char *language_string = "GNU F77";
@@ -302,6 +300,8 @@ ffecomSymbol ffecom_symbol_null_
NULL_TREE,
NULL_TREE,
NULL_TREE,
+ NULL_TREE,
+ false
};
ffeinfoKindtype ffecom_pointer_kind_ = FFEINFO_basictypeNONE;
ffeinfoKindtype ffecom_label_kind_ = FFEINFO_basictypeNONE;
@@ -367,7 +367,6 @@ typedef enum
#if FFECOM_targetCURRENT == FFECOM_targetGCC
typedef struct _ffecom_concat_list_ ffecomConcatList_;
-typedef struct _ffecom_temp_ *ffecomTemp_;
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
/* Private include files. */
@@ -384,24 +383,12 @@ struct _ffecom_concat_list_
ffetargetCharacterSize minlen;
ffetargetCharacterSize maxlen;
};
-
-struct _ffecom_temp_
- {
- ffecomTemp_ next;
- tree type; /* Base type (w/o size/array applied). */
- tree t;
- ffetargetCharacterSize size;
- int elements;
- bool in_use;
- bool auto_pop;
- };
-
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
/* Static functions (internal). */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
-static tree ffecom_arglist_expr_ (char *argstring, ffebld args);
+static tree ffecom_arglist_expr_ (const char *argstring, ffebld args);
static tree ffecom_widest_expr_type_ (ffebld list);
static bool ffecom_overlap_ (tree dest_decl, tree dest_offset,
tree dest_size, tree source_tree,
@@ -409,18 +396,18 @@ static bool ffecom_overlap_ (tree dest_decl, tree dest_offset,
static bool ffecom_args_overlapping_ (tree dest_tree, ffebld dest,
tree args, tree callee_commons,
bool scalar_args);
-static tree ffecom_build_f2c_string_ (int i, char *s);
+static tree ffecom_build_f2c_string_ (int i, const char *s);
static tree ffecom_call_ (tree fn, ffeinfoKindtype kt,
bool is_f2c_complex, tree type,
tree args, tree dest_tree,
ffebld dest, bool *dest_used,
- tree callee_commons, bool scalar_args);
+ tree callee_commons, bool scalar_args, tree hook);
static tree ffecom_call_binop_ (tree fn, ffeinfoKindtype kt,
bool is_f2c_complex, tree type,
ffebld left, ffebld right,
tree dest_tree, ffebld dest,
bool *dest_used, tree callee_commons,
- bool scalar_args);
+ bool scalar_args, tree hook);
static void ffecom_char_args_x_ (tree *xitem, tree *length,
ffebld expr, bool with_null);
static tree ffecom_check_size_overflow_ (ffesymbol s, tree type, bool dummy);
@@ -432,27 +419,28 @@ static ffecomConcatList_
static void ffecom_concat_list_kill_ (ffecomConcatList_ catlist);
static ffecomConcatList_ ffecom_concat_list_new_ (ffebld expr,
ffetargetCharacterSize max);
-static void ffecom_debug_kludge_ (tree aggr, char *aggr_type, ffesymbol member,
- tree member_type, ffetargetOffset offset);
+static void ffecom_debug_kludge_ (tree aggr, const char *aggr_type,
+ ffesymbol member, tree member_type,
+ ffetargetOffset offset);
static void ffecom_do_entry_ (ffesymbol fn, int entrynum);
static tree ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest,
bool *dest_used, bool assignp, bool widenp);
static tree ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
ffebld dest, bool *dest_used);
-static tree ffecom_expr_power_integer_ (ffebld left, ffebld right);
+static tree ffecom_expr_power_integer_ (ffebld expr);
static void ffecom_expr_transform_ (ffebld expr);
-static void ffecom_f2c_make_type_ (tree *type, int tcode, char *name);
+static void ffecom_f2c_make_type_ (tree *type, int tcode, const char *name);
static void ffecom_f2c_set_lio_code_ (ffeinfoBasictype bt, int size,
int code);
static ffeglobal ffecom_finish_global_ (ffeglobal global);
static ffesymbol ffecom_finish_symbol_transform_ (ffesymbol s);
-static tree ffecom_get_appended_identifier_ (char us, char *text);
+static tree ffecom_get_appended_identifier_ (char us, const char *text);
static tree ffecom_get_external_identifier_ (ffesymbol s);
-static tree ffecom_get_identifier_ (char *text);
+static tree ffecom_get_identifier_ (const char *text);
static tree ffecom_gen_sfuncdef_ (ffesymbol s,
ffeinfoBasictype bt,
ffeinfoKindtype kt);
-static char *ffecom_gfrt_args_ (ffecomGfrt ix);
+static const char *ffecom_gfrt_args_ (ffecomGfrt ix);
static tree ffecom_gfrt_tree_ (ffecomGfrt ix);
static tree ffecom_init_zero_ (tree decl);
static tree ffecom_intrinsic_ichar_ (tree tree_type, ffebld arg,
@@ -467,6 +455,8 @@ static void ffecom_member_phase1_ (ffestorag mst, ffestorag st);
#ifdef SOMEONE_GETS_DEBUG_SUPPORT_WORKING
static void ffecom_member_phase2_ (ffestorag mst, ffestorag st);
#endif
+static void ffecom_prepare_let_char_ (ffetargetCharacterSize dest_size,
+ ffebld source);
static void ffecom_push_dummy_decls_ (ffebld dumlist,
bool stmtfunc);
static void ffecom_start_progunit_ (void);
@@ -481,7 +471,7 @@ static void ffecom_tree_canonize_ref_ (tree *decl, tree *offset,
tree *size, tree tree);
static tree ffecom_tree_divide_ (tree tree_type, tree left, tree right,
tree dest_tree, ffebld dest,
- bool *dest_used);
+ bool *dest_used, tree hook);
static tree ffecom_type_localvar_ (ffesymbol s,
ffeinfoBasictype bt,
ffeinfoKindtype kt);
@@ -493,17 +483,20 @@ static tree ffecom_type_vardesc_ (void);
static tree ffecom_vardesc_ (ffebld expr);
static tree ffecom_vardesc_array_ (ffesymbol s);
static tree ffecom_vardesc_dims_ (ffesymbol s);
+static tree ffecom_convert_narrow_ (tree type, tree expr);
+static tree ffecom_convert_widen_ (tree type, tree expr);
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
/* These are static functions that parallel those found in the C front
end and thus have the same names. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
-static void bison_rule_compstmt_ (void);
+static tree bison_rule_compstmt_ (void);
static void bison_rule_pushlevel_ (void);
-static tree builtin_function (char *name, tree type,
+static tree builtin_function (const char *name, tree type,
enum built_in_function function_code,
- char *library_name);
+ const char *library_name);
+static void delete_block (tree block);
static int duplicate_decls (tree newdecl, tree olddecl);
static void finish_decl (tree decl, tree init, bool is_top_level);
static void finish_function (int nested);
@@ -514,6 +507,7 @@ static void pop_f_function_context (void);
static void push_f_function_context (void);
static void push_parm_decl (tree parm);
static tree pushdecl_top_level (tree decl);
+static int kept_level_p (void);
static tree storedecls (tree decls);
static void store_parm_decls (int is_main_program);
static tree start_decl (tree decl, bool is_top_level);
@@ -538,8 +532,6 @@ static bool ffecom_primary_entry_is_proc_;
static tree ffecom_outer_function_decl_;
static tree ffecom_previous_function_decl_;
static tree ffecom_which_entrypoint_decl_;
-static ffecomTemp_ ffecom_latest_temp_;
-static int ffecom_pending_calls_ = 0;
static tree ffecom_float_zero_ = NULL_TREE;
static tree ffecom_float_half_ = NULL_TREE;
static tree ffecom_double_zero_ = NULL_TREE;
@@ -562,6 +554,8 @@ static tree
static bool ffecom_member_namelisted_; /* _member_phase1_ namelisted? */
static bool ffecom_doing_entry_ = FALSE;
static bool ffecom_transform_only_dummies_ = FALSE;
+static int ffecom_typesize_pointer_;
+static int ffecom_typesize_integer1_;
/* Holds pointer-to-function expressions. */
@@ -575,7 +569,7 @@ static tree ffecom_gfrt_[FFECOM_gfrt]
/* Holds the external names of the functions. */
-static char *ffecom_gfrt_name_[FFECOM_gfrt]
+static const char *ffecom_gfrt_name_[FFECOM_gfrt]
=
{
#define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX) NAME,
@@ -615,7 +609,7 @@ static ffecomRttype_ ffecom_gfrt_type_[FFECOM_gfrt]
/* String of codes for the function's arguments. */
-static char *ffecom_gfrt_argstring_[FFECOM_gfrt]
+static const char *ffecom_gfrt_argstring_[FFECOM_gfrt]
=
{
#define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX) ARGS,
@@ -634,17 +628,15 @@ static char *ffecom_gfrt_argstring_[FFECOM_gfrt]
it would be best to do something here to figure out automatically
from other information what type to use. */
-/* NOTE: g77 currently doesn't use these; see setting of sizetype and
- change that if you need to. -- jcb 09/01/91. */
+#ifndef SIZE_TYPE
+#define SIZE_TYPE "long unsigned int"
+#endif
#define ffecom_concat_list_count_(catlist) ((catlist).count)
#define ffecom_concat_list_expr_(catlist,i) ((catlist).exprs[(i)])
#define ffecom_concat_list_maxlen_(catlist) ((catlist).maxlen)
#define ffecom_concat_list_minlen_(catlist) ((catlist).minlen)
-#define ffecom_start_compstmt_ bison_rule_pushlevel_
-#define ffecom_end_compstmt_ bison_rule_compstmt_
-
#define ffecom_char_args_(i,l,e) ffecom_char_args_x_((i),(l),(e),FALSE)
#define ffecom_char_args_with_null_(i,l,e) ffecom_char_args_x_((i),(l),(e),TRUE)
@@ -664,20 +656,27 @@ static char *ffecom_gfrt_argstring_[FFECOM_gfrt]
struct binding_level
{
- /* A chain of _DECL nodes for all variables, constants, functions, and
- typedef types. These are in the reverse of the order supplied. */
+ /* A chain of _DECL nodes for all variables, constants, functions,
+ and typedef types. These are in the reverse of the order supplied.
+ */
tree names;
- /* For each level (except not the global one), a chain of BLOCK nodes for
- all the levels that were entered and exited one level down. */
+ /* For each level (except not the global one),
+ a chain of BLOCK nodes for all the levels
+ that were entered and exited one level down. */
tree blocks;
- /* The BLOCK node for this level, if one has been preallocated. If 0, the
- BLOCK is allocated (if needed) when the level is popped. */
+ /* The BLOCK node for this level, if one has been preallocated.
+ If 0, the BLOCK is allocated (if needed) when the level is popped. */
tree this_block;
/* The binding level which this one is contained in (inherits from). */
struct binding_level *level_chain;
+
+ /* 0: no ffecom_prepare_* functions called at this level yet;
+ 1: ffecom_prepare* functions called, except not ffecom_prepare_end;
+ 2: ffecom_prepare_end called. */
+ int prep_state;
};
#define NULL_BINDING_LEVEL (struct binding_level *) NULL
@@ -700,7 +699,7 @@ static struct binding_level *global_binding_level;
static struct binding_level clear_binding_level
=
-{NULL, NULL, NULL, NULL_BINDING_LEVEL};
+{NULL, NULL, NULL, NULL_BINDING_LEVEL, 0};
/* Language-dependent contents of an identifier. */
@@ -747,6 +746,314 @@ static tree shadowed_labels;
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
+/* Return the subscript expression, modified to do range-checking.
+
+ `array' is the array to be checked against.
+ `element' is the subscript expression to check.
+ `dim' is the dimension number (starting at 0).
+ `total_dims' is the total number of dimensions (0 for CHARACTER substring).
+*/
+
+static tree
+ffecom_subscript_check_ (tree array, tree element, int dim, int total_dims,
+ char *array_name)
+{
+ tree low = TYPE_MIN_VALUE (TYPE_DOMAIN (array));
+ tree high = TYPE_MAX_VALUE (TYPE_DOMAIN (array));
+ tree cond;
+ tree die;
+ tree args;
+
+ if (element == error_mark_node)
+ return element;
+
+ if (TREE_TYPE (low) != TREE_TYPE (element))
+ {
+ if (TYPE_PRECISION (TREE_TYPE (low))
+ > TYPE_PRECISION (TREE_TYPE (element)))
+ element = convert (TREE_TYPE (low), element);
+ else
+ {
+ low = convert (TREE_TYPE (element), low);
+ if (high)
+ high = convert (TREE_TYPE (element), high);
+ }
+ }
+
+ element = ffecom_save_tree (element);
+ cond = ffecom_2 (LE_EXPR, integer_type_node,
+ low,
+ element);
+ if (high)
+ {
+ cond = ffecom_2 (TRUTH_ANDIF_EXPR, integer_type_node,
+ cond,
+ ffecom_2 (LE_EXPR, integer_type_node,
+ element,
+ high));
+ }
+
+ {
+ int len;
+ char *proc;
+ char *var;
+ tree arg3;
+ tree arg2;
+ tree arg1;
+ tree arg4;
+
+ switch (total_dims)
+ {
+ case 0:
+ var = xmalloc (strlen (array_name) + 20);
+ sprintf (&var[0], "%s[%s-substring]",
+ array_name,
+ dim ? "end" : "start");
+ len = strlen (var) + 1;
+ break;
+
+ case 1:
+ len = strlen (array_name) + 1;
+ var = array_name;
+ break;
+
+ default:
+ var = xmalloc (strlen (array_name) + 40);
+ sprintf (&var[0], "%s[subscript-%d-of-%d]",
+ array_name,
+ dim + 1, total_dims);
+ len = strlen (var) + 1;
+ break;
+ }
+
+ arg1 = build_string (len, var);
+
+ if (total_dims != 1)
+ free (var);
+
+ TREE_TYPE (arg1)
+ = build_type_variant (build_array_type (char_type_node,
+ build_range_type
+ (integer_type_node,
+ integer_one_node,
+ build_int_2 (len, 0))),
+ 1, 0);
+ TREE_CONSTANT (arg1) = 1;
+ TREE_STATIC (arg1) = 1;
+ arg1 = ffecom_1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (arg1)),
+ arg1);
+
+ /* s_rnge adds one to the element to print it, so bias against
+ that -- want to print a faithful *subscript* value. */
+ arg2 = convert (ffecom_f2c_ftnint_type_node,
+ ffecom_2 (MINUS_EXPR,
+ TREE_TYPE (element),
+ element,
+ convert (TREE_TYPE (element),
+ integer_one_node)));
+
+ proc = xmalloc ((len = strlen (input_filename)
+ + IDENTIFIER_LENGTH (DECL_NAME (current_function_decl))
+ + 2));
+
+ sprintf (&proc[0], "%s/%s",
+ input_filename,
+ IDENTIFIER_POINTER (DECL_NAME (current_function_decl)));
+ arg3 = build_string (len, proc);
+
+ free (proc);
+
+ TREE_TYPE (arg3)
+ = build_type_variant (build_array_type (char_type_node,
+ build_range_type
+ (integer_type_node,
+ integer_one_node,
+ build_int_2 (len, 0))),
+ 1, 0);
+ TREE_CONSTANT (arg3) = 1;
+ TREE_STATIC (arg3) = 1;
+ arg3 = ffecom_1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (arg3)),
+ arg3);
+
+ arg4 = convert (ffecom_f2c_ftnint_type_node,
+ build_int_2 (lineno, 0));
+
+ arg1 = build_tree_list (NULL_TREE, arg1);
+ arg2 = build_tree_list (NULL_TREE, arg2);
+ arg3 = build_tree_list (NULL_TREE, arg3);
+ arg4 = build_tree_list (NULL_TREE, arg4);
+ TREE_CHAIN (arg3) = arg4;
+ TREE_CHAIN (arg2) = arg3;
+ TREE_CHAIN (arg1) = arg2;
+
+ args = arg1;
+ }
+ die = ffecom_call_gfrt (FFECOM_gfrtRANGE,
+ args, NULL_TREE);
+ TREE_SIDE_EFFECTS (die) = 1;
+
+ element = ffecom_3 (COND_EXPR,
+ TREE_TYPE (element),
+ cond,
+ element,
+ die);
+
+ return element;
+}
+
+/* Return the computed element of an array reference.
+
+ `item' is NULL_TREE, or the transformed pointer to the array.
+ `expr' is the original opARRAYREF expression, which is transformed
+ if `item' is NULL_TREE.
+ `want_ptr' is non-zero if a pointer to the element, instead of
+ the element itself, is to be returned. */
+
+static tree
+ffecom_arrayref_ (tree item, ffebld expr, int want_ptr)
+{
+ ffebld dims[FFECOM_dimensionsMAX];
+ int i;
+ int total_dims;
+ int flatten = ffe_is_flatten_arrays ();
+ int need_ptr;
+ tree array;
+ tree element;
+ tree tree_type;
+ tree tree_type_x;
+ char *array_name;
+ ffetype type;
+ ffebld list;
+
+ if (ffebld_op (ffebld_left (expr)) == FFEBLD_opSYMTER)
+ array_name = ffesymbol_text (ffebld_symter (ffebld_left (expr)));
+ else
+ array_name = "[expr?]";
+
+ /* Build up ARRAY_REFs in reverse order (since we're column major
+ here in Fortran land). */
+
+ for (i = 0, list = ffebld_right (expr);
+ list != NULL;
+ ++i, list = ffebld_trail (list))
+ {
+ dims[i] = ffebld_head (list);
+ type = ffeinfo_type (ffebld_basictype (dims[i]),
+ ffebld_kindtype (dims[i]));
+ if (! flatten
+ && ffecom_typesize_pointer_ > ffecom_typesize_integer1_
+ && ffetype_size (type) > ffecom_typesize_integer1_)
+ /* E.g. ARRAY(INDEX), given INTEGER*8 INDEX, on a system with 64-bit
+ pointers and 32-bit integers. Do the full 64-bit pointer
+ arithmetic, for codes using arrays for nonstandard heap-like
+ work. */
+ flatten = 1;
+ }
+
+ total_dims = i;
+
+ need_ptr = want_ptr || flatten;
+
+ if (! item)
+ {
+ if (need_ptr)
+ item = ffecom_ptr_to_expr (ffebld_left (expr));
+ else
+ item = ffecom_expr (ffebld_left (expr));
+
+ if (item == error_mark_node)
+ return item;
+
+ if (ffeinfo_where (ffebld_info (expr)) == FFEINFO_whereFLEETING
+ && ! mark_addressable (item))
+ return error_mark_node;
+ }
+
+ if (item == error_mark_node)
+ return item;
+
+ if (need_ptr)
+ {
+ tree min;
+
+ for (--i, array = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (item)));
+ i >= 0;
+ --i, array = TYPE_MAIN_VARIANT (TREE_TYPE (array)))
+ {
+ min = TYPE_MIN_VALUE (TYPE_DOMAIN (array));
+ element = ffecom_expr_ (dims[i], NULL, NULL, NULL, FALSE, TRUE);
+ if (ffe_is_subscript_check ())
+ element = ffecom_subscript_check_ (array, element, i, total_dims,
+ array_name);
+ if (element == error_mark_node)
+ return element;
+
+ /* Widen integral arithmetic as desired while preserving
+ signedness. */
+ tree_type = TREE_TYPE (element);
+ tree_type_x = tree_type;
+ if (tree_type
+ && GET_MODE_CLASS (TYPE_MODE (tree_type)) == MODE_INT
+ && TYPE_PRECISION (tree_type) < TYPE_PRECISION (sizetype))
+ tree_type_x = (TREE_UNSIGNED (tree_type) ? usizetype : ssizetype);
+
+ if (TREE_TYPE (min) != tree_type_x)
+ min = convert (tree_type_x, min);
+ if (TREE_TYPE (element) != tree_type_x)
+ element = convert (tree_type_x, element);
+
+ item = ffecom_2 (PLUS_EXPR,
+ build_pointer_type (TREE_TYPE (array)),
+ item,
+ size_binop (MULT_EXPR,
+ size_in_bytes (TREE_TYPE (array)),
+ fold (build (MINUS_EXPR,
+ tree_type_x,
+ element,
+ min))));
+ }
+ if (! want_ptr)
+ {
+ item = ffecom_1 (INDIRECT_REF,
+ TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (item))),
+ item);
+ }
+ }
+ else
+ {
+ for (--i;
+ i >= 0;
+ --i)
+ {
+ array = TYPE_MAIN_VARIANT (TREE_TYPE (item));
+
+ element = ffecom_expr_ (dims[i], NULL, NULL, NULL, FALSE, TRUE);
+ if (ffe_is_subscript_check ())
+ element = ffecom_subscript_check_ (array, element, i, total_dims,
+ array_name);
+ if (element == error_mark_node)
+ return element;
+
+ /* Widen integral arithmetic as desired while preserving
+ signedness. */
+ tree_type = TREE_TYPE (element);
+ tree_type_x = tree_type;
+ if (tree_type
+ && GET_MODE_CLASS (TYPE_MODE (tree_type)) == MODE_INT
+ && TYPE_PRECISION (tree_type) < TYPE_PRECISION (sizetype))
+ tree_type_x = (TREE_UNSIGNED (tree_type) ? usizetype : ssizetype);
+
+ element = convert (tree_type_x, element);
+
+ item = ffecom_2 (ARRAY_REF,
+ TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (item))),
+ item,
+ element);
+ }
+ }
+
+ return item;
+}
/* This is like gcc's stabilize_reference -- in fact, most of the code
comes from that -- but it handles the situation where the reference
@@ -1095,7 +1402,7 @@ ffecom_build_complex_constant_ (tree type, tree realpart, tree imagpart)
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree
-ffecom_arglist_expr_ (char *c, ffebld expr)
+ffecom_arglist_expr_ (const char *c, ffebld expr)
{
tree list;
tree *plist = &list;
@@ -1279,6 +1586,48 @@ ffecom_widest_expr_type_ (ffebld list)
}
#endif
+/* Check whether a partial overlap between two expressions is possible.
+
+ Can *starting* to write a portion of expr1 change the value
+ computed (perhaps already, *partially*) by expr2?
+
+ Currently, this is a concern only for a COMPLEX expr1. But if it
+ isn't in COMMON or local EQUIVALENCE, since we don't support
+ aliasing of arguments, it isn't a concern. */
+
+static bool
+ffecom_possible_partial_overlap_ (ffebld expr1, ffebld expr2)
+{
+ ffesymbol sym;
+ ffestorag st;
+
+ switch (ffebld_op (expr1))
+ {
+ case FFEBLD_opSYMTER:
+ sym = ffebld_symter (expr1);
+ break;
+
+ case FFEBLD_opARRAYREF:
+ if (ffebld_op (ffebld_left (expr1)) != FFEBLD_opSYMTER)
+ return FALSE;
+ sym = ffebld_symter (ffebld_left (expr1));
+ break;
+
+ default:
+ return FALSE;
+ }
+
+ if (ffesymbol_where (sym) != FFEINFO_whereCOMMON
+ && (ffesymbol_where (sym) != FFEINFO_whereLOCAL
+ || ! (st = ffesymbol_storage (sym))
+ || ! ffestorag_parent (st)))
+ return FALSE;
+
+ /* It's in COMMON or local EQUIVALENCE. */
+
+ return TRUE;
+}
+
/* Check whether dest and source might overlap. ffebld versions of these
might or might not be passed, will be NULL if not.
@@ -1517,14 +1866,14 @@ ffecom_args_overlapping_ (tree dest_tree, ffebld dest UNUSED,
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree
-ffecom_build_f2c_string_ (int i, char *s)
+ffecom_build_f2c_string_ (int i, const char *s)
{
if (!ffe_is_f2c_library ())
return build_string (i, s);
{
char *tmp;
- char *p;
+ const char *p;
char *q;
char space[34];
tree t;
@@ -1558,7 +1907,7 @@ static tree
ffecom_call_ (tree fn, ffeinfoKindtype kt, bool is_f2c_complex,
tree type, tree args, tree dest_tree,
ffebld dest, bool *dest_used, tree callee_commons,
- bool scalar_args)
+ bool scalar_args, tree hook)
{
tree item;
tree tempvar;
@@ -1578,10 +1927,15 @@ ffecom_call_ (tree fn, ffeinfoKindtype kt, bool is_f2c_complex,
callee_commons,
scalar_args))
{
- tempvar = ffecom_push_tempvar (ffecom_tree_type
+#ifdef HOHO
+ tempvar = ffecom_make_tempvar (ffecom_tree_type
[FFEINFO_basictypeCOMPLEX][kt],
FFETARGET_charactersizeNONE,
- -1, TRUE);
+ -1);
+#else
+ tempvar = hook;
+ assert (tempvar);
+#endif
}
else
{
@@ -1593,7 +1947,7 @@ ffecom_call_ (tree fn, ffeinfoKindtype kt, bool is_f2c_complex,
item
= build_tree_list (NULL_TREE,
ffecom_1 (ADDR_EXPR,
- build_pointer_type (TREE_TYPE (tempvar)),
+ build_pointer_type (TREE_TYPE (tempvar)),
tempvar));
TREE_CHAIN (item) = args;
@@ -1622,17 +1976,15 @@ static tree
ffecom_call_binop_ (tree fn, ffeinfoKindtype kt, bool is_f2c_complex,
tree type, ffebld left, ffebld right,
tree dest_tree, ffebld dest, bool *dest_used,
- tree callee_commons, bool scalar_args)
+ tree callee_commons, bool scalar_args, tree hook)
{
tree left_tree;
tree right_tree;
tree left_length;
tree right_length;
- ffecom_push_calltemps ();
left_tree = ffecom_arg_ptr_to_expr (left, &left_length);
right_tree = ffecom_arg_ptr_to_expr (right, &right_length);
- ffecom_pop_calltemps ();
left_tree = build_tree_list (NULL_TREE, left_tree);
right_tree = build_tree_list (NULL_TREE, right_tree);
@@ -1655,17 +2007,11 @@ ffecom_call_binop_ (tree fn, ffeinfoKindtype kt, bool is_f2c_complex,
return ffecom_call_ (fn, kt, is_f2c_complex, type, left_tree,
dest_tree, dest, dest_used, callee_commons,
- scalar_args);
+ scalar_args, hook);
}
#endif
-/* ffecom_char_args_x_ -- Return ptr/length args for char subexpression
-
- tree ptr_arg;
- tree length_arg;
- ffebld expr;
- bool with_null;
- ffecom_char_args_x_(&ptr_arg,&length_arg,expr,with_null);
+/* Return ptr/length args for char subexpression
Handles CHARACTER-type CONTER, SYMTER, SUBSTR, ARRAYREF, and FUNCREF
subexpressions by constructing the appropriate trees for the ptr-to-
@@ -1691,15 +2037,17 @@ ffecom_char_args_x_ (tree *xitem, tree *length, ffebld expr, bool with_null)
newlen = ffetarget_length_character1 (val);
if (with_null)
{
+ /* Begin FFETARGET-NULL-KLUDGE. */
if (newlen != 0)
- ++newlen; /* begin FFETARGET-NULL-KLUDGE. */
+ ++newlen;
}
*length = build_int_2 (newlen, 0);
TREE_TYPE (*length) = ffecom_f2c_ftnlen_type_node;
high = build_int_2 (newlen, 0);
TREE_TYPE (high) = ffecom_f2c_ftnlen_type_node;
- item = build_string (newlen, /* end FFETARGET-NULL-KLUDGE. */
+ item = build_string (newlen,
ffetarget_text_character1 (val));
+ /* End FFETARGET-NULL-KLUDGE. */
TREE_TYPE (item)
= build_type_variant
(build_array_type
@@ -1737,7 +2085,8 @@ ffecom_char_args_x_ (tree *xitem, tree *length, ffebld expr, bool with_null)
}
else if (item == error_mark_node)
*length = error_mark_node;
- else /* FFEINFO_kindFUNCTION: */
+ else
+ /* FFEINFO_kindFUNCTION. */
*length = NULL_TREE;
if (!ffesymbol_hook (s).addr
&& (item != error_mark_node))
@@ -1749,13 +2098,7 @@ ffecom_char_args_x_ (tree *xitem, tree *length, ffebld expr, bool with_null)
case FFEBLD_opARRAYREF:
{
- ffebld dims[FFECOM_dimensionsMAX];
- tree array;
- int i;
-
- ffecom_push_calltemps ();
ffecom_char_args_ (&item, length, ffebld_left (expr));
- ffecom_pop_calltemps ();
if (item == error_mark_node || *length == error_mark_node)
{
@@ -1763,26 +2106,7 @@ ffecom_char_args_x_ (tree *xitem, tree *length, ffebld expr, bool with_null)
break;
}
- /* Build up ARRAY_REFs in reverse order (since we're column major
- here in Fortran land). */
-
- for (i = 0, expr = ffebld_right (expr);
- expr != NULL;
- expr = ffebld_trail (expr))
- dims[i++] = ffebld_head (expr);
-
- for (--i, array = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (item)));
- i >= 0;
- --i, array = TYPE_MAIN_VARIANT (TREE_TYPE (array)))
- {
- item = ffecom_2 (PLUS_EXPR, build_pointer_type (TREE_TYPE (array)),
- item,
- size_binop (MULT_EXPR,
- size_in_bytes (TREE_TYPE (array)),
- size_binop (MINUS_EXPR,
- ffecom_expr (dims[i]),
- TYPE_MIN_VALUE (TYPE_DOMAIN (array)))));
- }
+ item = ffecom_arrayref_ (item, expr, 1);
}
break;
@@ -1793,6 +2117,9 @@ ffecom_char_args_x_ (tree *xitem, tree *length, ffebld expr, bool with_null)
ffebld thing = ffebld_right (expr);
tree start_tree;
tree end_tree;
+ char *char_name;
+ ffebld left_symter;
+ tree array;
assert (ffebld_op (thing) == FFEBLD_opITEM);
start = ffebld_head (thing);
@@ -1800,9 +2127,17 @@ ffecom_char_args_x_ (tree *xitem, tree *length, ffebld expr, bool with_null)
assert (ffebld_trail (thing) == NULL);
end = ffebld_head (thing);
- ffecom_push_calltemps ();
+ /* Determine name for pretty-printing range-check errors. */
+ for (left_symter = ffebld_left (expr);
+ left_symter && ffebld_op (left_symter) == FFEBLD_opARRAYREF;
+ left_symter = ffebld_left (left_symter))
+ ;
+ if (ffebld_op (left_symter) == FFEBLD_opSYMTER)
+ char_name = ffesymbol_text (ffebld_symter (left_symter));
+ else
+ char_name = "[expr?]";
+
ffecom_char_args_ (&item, length, ffebld_left (expr));
- ffecom_pop_calltemps ();
if (item == error_mark_node || *length == error_mark_node)
{
@@ -1810,14 +2145,22 @@ ffecom_char_args_x_ (tree *xitem, tree *length, ffebld expr, bool with_null)
break;
}
+ array = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (item)));
+
+ /* ~~~~Handle INTEGER*8 start/end, a la FFEBLD_opARRAYREF. */
+
if (start == NULL)
{
if (end == NULL)
;
else
{
+ end_tree = ffecom_expr (end);
+ if (ffe_is_subscript_check ())
+ end_tree = ffecom_subscript_check_ (array, end_tree, 1, 0,
+ char_name);
end_tree = convert (ffecom_f2c_ftnlen_type_node,
- ffecom_expr (end));
+ end_tree);
if (end_tree == error_mark_node)
{
@@ -1830,8 +2173,12 @@ ffecom_char_args_x_ (tree *xitem, tree *length, ffebld expr, bool with_null)
}
else
{
+ start_tree = ffecom_expr (start);
+ if (ffe_is_subscript_check ())
+ start_tree = ffecom_subscript_check_ (array, start_tree, 0, 0,
+ char_name);
start_tree = convert (ffecom_f2c_ftnlen_type_node,
- ffecom_expr (start));
+ start_tree);
if (start_tree == error_mark_node)
{
@@ -1859,8 +2206,12 @@ ffecom_char_args_x_ (tree *xitem, tree *length, ffebld expr, bool with_null)
}
else
{
+ end_tree = ffecom_expr (end);
+ if (ffe_is_subscript_check ())
+ end_tree = ffecom_subscript_check_ (array, end_tree, 1, 0,
+ char_name);
end_tree = convert (ffecom_f2c_ftnlen_type_node,
- ffecom_expr (end));
+ end_tree);
if (end_tree == error_mark_node)
{
@@ -1887,7 +2238,8 @@ ffecom_char_args_x_ (tree *xitem, tree *length, ffebld expr, bool with_null)
ffecomGfrt ix;
if (size == FFETARGET_charactersizeNONE)
- size = 24; /* ~~~~ Kludge alert! This should someday be fixed. */
+ /* ~~Kludge alert! This should someday be fixed. */
+ size = 24;
*length = build_int_2 (size, 0);
TREE_TYPE (*length) = ffecom_f2c_ftnlen_type_node;
@@ -1896,7 +2248,8 @@ ffecom_char_args_x_ (tree *xitem, tree *length, ffebld expr, bool with_null)
== FFEINFO_whereINTRINSIC)
{
if (size == 1)
- { /* Invocation of an intrinsic returning CHARACTER*1. */
+ {
+ /* Invocation of an intrinsic returning CHARACTER*1. */
item = ffecom_expr_intrinsic_ (expr, NULL_TREE,
NULL, NULL);
break;
@@ -1924,14 +2277,16 @@ ffecom_char_args_x_ (tree *xitem, tree *length, ffebld expr, bool with_null)
item = ffecom_1_fn (item);
}
- assert (ffecom_pending_calls_ != 0);
+#ifdef HOHO
tempvar = ffecom_push_tempvar (char_type_node, size, -1, TRUE);
+#else
+ tempvar = ffebld_nonter_hook (expr);
+ assert (tempvar);
+#endif
tempvar = ffecom_1 (ADDR_EXPR,
build_pointer_type (TREE_TYPE (tempvar)),
tempvar);
- ffecom_push_calltemps ();
-
args = build_tree_list (NULL_TREE, tempvar);
if (ffesymbol_where (s) == FFEINFO_whereCONSTANT) /* Sfunc args by value. */
@@ -1957,16 +2312,12 @@ ffecom_char_args_x_ (tree *xitem, tree *length, ffebld expr, bool with_null)
item, args, NULL_TREE);
item = ffecom_2 (COMPOUND_EXPR, TREE_TYPE (tempvar), item,
tempvar);
-
- ffecom_pop_calltemps ();
}
break;
case FFEBLD_opCONVERT:
- ffecom_push_calltemps ();
ffecom_char_args_ (&item, length, ffebld_left (expr));
- ffecom_pop_calltemps ();
if (item == error_mark_node || *length == error_mark_node)
{
@@ -1983,9 +2334,13 @@ ffecom_char_args_x_ (tree *xitem, tree *length, ffebld expr, bool with_null)
tree args;
tree newlen;
- assert (ffecom_pending_calls_ != 0);
- tempvar = ffecom_push_tempvar (char_type_node,
- ffebld_size (expr), -1, TRUE);
+#ifdef HOHO
+ tempvar = ffecom_make_tempvar (char_type_node,
+ ffebld_size (expr), -1);
+#else
+ tempvar = ffebld_nonter_hook (expr);
+ assert (tempvar);
+#endif
tempvar = ffecom_1 (ADDR_EXPR,
build_pointer_type (TREE_TYPE (tempvar)),
tempvar);
@@ -1999,7 +2354,7 @@ ffecom_char_args_x_ (tree *xitem, tree *length, ffebld expr, bool with_null)
TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (args)))
= build_tree_list (NULL_TREE, *length);
- item = ffecom_call_gfrt (FFECOM_gfrtCOPY, args);
+ item = ffecom_call_gfrt (FFECOM_gfrtCOPY, args, NULL_TREE);
TREE_SIDE_EFFECTS (item) = 1;
item = ffecom_2 (COMPOUND_EXPR, TREE_TYPE (tempvar), fold (item),
tempvar);
@@ -2077,10 +2432,10 @@ ffecom_char_enhance_arg_ (tree *xtype, ffesymbol s)
{
if (ffesymbol_where (s) == FFEINFO_whereDUMMY)
tlen = ffecom_get_invented_identifier ("__g77_length_%s",
- ffesymbol_text (s), 0);
+ ffesymbol_text (s), -1);
else
tlen = ffecom_get_invented_identifier ("__g77_%s",
- "length", 0);
+ "length", -1);
tlen = build_decl (PARM_DECL, tlen, ffecom_f2c_ftnlen_type_node);
#if BUILT_FOR_270
DECL_ARTIFICIAL (tlen) = 1;
@@ -2177,7 +2532,8 @@ recurse: /* :::::::::::::::::::: */
case FFEBLD_opARRAYREF:
case FFEBLD_opFUNCREF:
case FFEBLD_opSUBSTR:
- break; /* ~~Do useful truncations here. */
+ /* ~~Do useful truncations here. */
+ break;
default:
assert ("op changed or inconsistent switches!" == NULL);
@@ -2238,12 +2594,7 @@ ffecom_concat_list_kill_ (ffecomConcatList_ catlist)
}
#endif
-/* ffecom_concat_list_new_ -- Make list of concatenated string exprs
-
- ffecomConcatList_ catlist;
- ffebld expr; // Root expr of CHARACTER basictype.
- ffetargetCharacterSize max; // max chars to gather or _...NONE if no max
- catlist = ffecom_concat_list_new_(expr,max);
+/* Make list of concatenated string exprs.
Returns a flattened list of concatenated subexpressions given a
tree of such expressions. */
@@ -2266,7 +2617,7 @@ ffecom_concat_list_new_ (ffebld expr, ffetargetCharacterSize max)
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static void
-ffecom_debug_kludge_ (tree aggr, char *aggr_type, ffesymbol member,
+ffecom_debug_kludge_ (tree aggr, const char *aggr_type, ffesymbol member,
tree member_type UNUSED, ffetargetOffset offset)
{
tree value;
@@ -2521,7 +2872,7 @@ ffecom_do_entry_ (ffesymbol fn, int entrynum)
type = ffecom_tree_type[FFEINFO_basictypeCOMPLEX][kt];
result = ffecom_get_invented_identifier ("__g77_%s",
- "result", 0);
+ "result", -1);
/* Make length arg _and_ enhance type info for CHAR arg itself. */
@@ -2551,7 +2902,9 @@ ffecom_do_entry_ (ffesymbol fn, int entrynum)
store_parm_decls (0);
- ffecom_start_compstmt_ ();
+ ffecom_start_compstmt ();
+ /* Disallow temp vars at this level. */
+ current_binding_level->prep_state = 2;
/* Make local var to hold return type for multi-type master fn. */
@@ -2560,7 +2913,7 @@ ffecom_do_entry_ (ffesymbol fn, int entrynum)
yes = suspend_momentary ();
multi_retval = ffecom_get_invented_identifier ("__g77_%s",
- "multi_retval", 0);
+ "multi_retval", -1);
multi_retval = build_decl (VAR_DECL, multi_retval,
ffecom_multi_type_node_);
multi_retval = start_decl (multi_retval, FALSE);
@@ -2594,7 +2947,8 @@ ffecom_do_entry_ (ffesymbol fn, int entrynum)
if (ffebld_op (arg) != FFEBLD_opSYMTER)
continue;
s = ffebld_symter (arg);
- if (ffesymbol_hook (s).decl_tree == NULL_TREE)
+ if (ffesymbol_hook (s).decl_tree == NULL_TREE
+ || ffesymbol_hook (s).decl_tree == error_mark_node)
actarg = null_pointer_node; /* We don't have this arg. */
else
actarg = ffesymbol_hook (s).decl_tree;
@@ -2617,7 +2971,8 @@ ffecom_do_entry_ (ffesymbol fn, int entrynum)
continue; /* Only looking for CHARACTER arguments. */
if (ffesymbol_kind (s) != FFEINFO_kindENTITY)
continue; /* Only looking for variables and arrays. */
- if (ffesymbol_hook (s).length_tree == NULL_TREE)
+ if (ffesymbol_hook (s).length_tree == NULL_TREE
+ || ffesymbol_hook (s).length_tree == error_mark_node)
actarg = ffecom_f2c_ftnlen_zero_node; /* We don't have this arg. */
else
actarg = ffesymbol_hook (s).length_tree;
@@ -2719,7 +3074,7 @@ ffecom_do_entry_ (ffesymbol fn, int entrynum)
clear_momentary ();
}
- ffecom_end_compstmt_ ();
+ ffecom_end_compstmt ();
finish_function (0);
@@ -2975,65 +3330,14 @@ ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest,
return t;
case FFEBLD_opARRAYREF:
- {
- ffebld dims[FFECOM_dimensionsMAX];
-#if FFECOM_FASTER_ARRAY_REFS
- tree array;
-#endif
- int i;
-
-#if FFECOM_FASTER_ARRAY_REFS
- t = ffecom_ptr_to_expr (ffebld_left (expr));
-#else
- t = ffecom_expr (ffebld_left (expr));
-#endif
- if (t == error_mark_node)
- return t;
-
- if ((ffeinfo_where (ffebld_info (expr)) == FFEINFO_whereFLEETING)
- && !mark_addressable (t))
- return error_mark_node; /* Make sure non-const ref is to
- non-reg. */
-
- /* Build up ARRAY_REFs in reverse order (since we're column major
- here in Fortran land). */
-
- for (i = 0, expr = ffebld_right (expr);
- expr != NULL;
- expr = ffebld_trail (expr))
- dims[i++] = ffebld_head (expr);
-
-#if FFECOM_FASTER_ARRAY_REFS
- for (--i, array = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (t)));
- i >= 0;
- --i, array = TYPE_MAIN_VARIANT (TREE_TYPE (array)))
- t = ffecom_2 (PLUS_EXPR,
- build_pointer_type (TREE_TYPE (array)),
- t,
- size_binop (MULT_EXPR,
- size_in_bytes (TREE_TYPE (array)),
- size_binop (MINUS_EXPR,
- ffecom_expr (dims[i]),
- TYPE_MIN_VALUE (TYPE_DOMAIN (array)))));
- t = ffecom_1 (INDIRECT_REF,
- TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (t))),
- t);
-#else
- while (i > 0)
- t = ffecom_2 (ARRAY_REF,
- TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (t))),
- t,
- ffecom_expr_ (dims[--i], NULL, NULL, NULL, FALSE, TRUE));
-#endif
-
- return t;
- }
+ return ffecom_arrayref_ (NULL_TREE, expr, 0);
case FFEBLD_opUPLUS:
left = ffecom_expr_ (ffebld_left (expr), NULL, NULL, NULL, FALSE, widenp);
return ffecom_1 (NOP_EXPR, tree_type, left);
- case FFEBLD_opPAREN: /* ~~~Make sure Fortran rules respected here */
+ case FFEBLD_opPAREN:
+ /* ~~~Make sure Fortran rules respected here */
left = ffecom_expr_ (ffebld_left (expr), NULL, NULL, NULL, FALSE, widenp);
return ffecom_1 (NOP_EXPR, tree_type, left);
@@ -3089,7 +3393,8 @@ ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest,
right = convert (tree_type, right);
}
return ffecom_tree_divide_ (tree_type, left, right,
- dest_tree, dest, dest_used);
+ dest_tree, dest, dest_used,
+ ffebld_nonter_hook (expr));
case FFEBLD_opPOWER:
{
@@ -3104,7 +3409,7 @@ ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest,
case FFEINFO_basictypeINTEGER:
if (1 || optimize)
{
- item = ffecom_expr_power_integer_ (left, right);
+ item = ffecom_expr_power_integer_ (expr);
if (item != NULL_TREE)
return item;
}
@@ -3221,7 +3526,8 @@ ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest,
&& ffecom_gfrt_complex_[code]),
tree_type, left, right,
dest_tree, dest, dest_used,
- NULL_TREE, FALSE);
+ NULL_TREE, FALSE,
+ ffebld_nonter_hook (expr));
}
case FFEBLD_opNOT:
@@ -3270,12 +3576,13 @@ ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest,
else
item = ffecom_1_fn (dt);
- ffecom_push_calltemps ();
if (ffesymbol_where (s) == FFEINFO_whereCONSTANT)
args = ffecom_list_expr (ffebld_right (expr));
else
args = ffecom_list_ptr_to_expr (ffebld_right (expr));
- ffecom_pop_calltemps ();
+
+ if (args == error_mark_node)
+ return error_mark_node;
item = ffecom_call_ (item, kt,
ffesymbol_is_f2c (s)
@@ -3285,7 +3592,8 @@ ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest,
tree_type,
args,
dest_tree, dest, dest_used,
- error_mark_node, FALSE);
+ error_mark_node, FALSE,
+ ffebld_nonter_hook (expr));
TREE_SIDE_EFFECTS (item) = 1;
return item;
@@ -3503,8 +3811,6 @@ ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest,
}
case FFEINFO_basictypeCHARACTER:
- ffecom_push_calltemps (); /* Even though we might not call. */
-
{
ffebld left = ffebld_left (expr);
ffebld right = ffebld_right (expr);
@@ -3536,10 +3842,7 @@ ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest,
if (left_tree == error_mark_node || left_length == error_mark_node
|| right_tree == error_mark_node
|| right_length == error_mark_node)
- {
- ffecom_pop_calltemps ();
- return error_mark_node;
- }
+ return error_mark_node;
if ((ffebld_size_known (left) == 1)
&& (ffebld_size_known (right) == 1))
@@ -3572,7 +3875,7 @@ ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest,
left_length);
TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (item)))
= build_tree_list (NULL_TREE, right_length);
- item = ffecom_call_gfrt (FFECOM_gfrtCMP, item);
+ item = ffecom_call_gfrt (FFECOM_gfrtCMP, item, NULL_TREE);
item = ffecom_2 (code, integer_type_node,
item,
convert (TREE_TYPE (item),
@@ -3581,7 +3884,6 @@ ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest,
item = convert (tree_type, item);
}
- ffecom_pop_calltemps ();
return item;
default:
@@ -3783,8 +4085,8 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
case FFEINTRIN_impAINT:
case FFEINTRIN_impDINT:
-#if 0 /* ~~ someday implement FIX_TRUNC_EXPR
- yielding same type as arg */
+#if 0
+ /* ~~Someday implement FIX_TRUNC_EXPR yielding same type as arg. */
return ffecom_1 (FIX_TRUNC_EXPR, tree_type, ffecom_expr (arg1));
#else /* in the meantime, must use floor to avoid range problems with ints */
/* r__1 = r1 >= 0 ? floor(r1) : -floor(-r1); */
@@ -3800,14 +4102,16 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
ffecom_call_gfrt (FFECOM_gfrtL_FLOOR,
build_tree_list (NULL_TREE,
convert (double_type_node,
- saved_expr1))),
+ saved_expr1)),
+ NULL_TREE),
ffecom_1 (NEGATE_EXPR, double_type_node,
ffecom_call_gfrt (FFECOM_gfrtL_FLOOR,
build_tree_list (NULL_TREE,
convert (double_type_node,
ffecom_1 (NEGATE_EXPR,
arg1_type,
- saved_expr1))))
+ saved_expr1))),
+ NULL_TREE)
))
);
#endif
@@ -3852,7 +4156,8 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
arg1_type,
saved_expr1,
convert (arg1_type,
- ffecom_float_half_))))),
+ ffecom_float_half_)))),
+ NULL_TREE),
ffecom_1 (NEGATE_EXPR, double_type_node,
ffecom_call_gfrt (FFECOM_gfrtL_FLOOR,
build_tree_list (NULL_TREE,
@@ -3861,7 +4166,8 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
arg1_type,
convert (arg1_type,
ffecom_float_half_),
- saved_expr1)))))
+ saved_expr1))),
+ NULL_TREE))
)
);
#endif
@@ -3876,9 +4182,12 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
case FFEINTRIN_impCHAR:
case FFEINTRIN_impACHAR:
- assert (ffecom_pending_calls_ != 0);
- tempvar = ffecom_push_tempvar (char_type_node,
- 1, -1, TRUE);
+#ifdef HOHO
+ tempvar = ffecom_make_tempvar (char_type_node, 1, -1);
+#else
+ tempvar = ffebld_nonter_hook (expr);
+ assert (tempvar);
+#endif
{
tree tmv = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (tempvar)));
@@ -4128,8 +4437,8 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
case FFEINTRIN_impNINT:
case FFEINTRIN_impIDNINT:
-#if 0 /* ~~ ideally FIX_ROUND_EXPR would be
- implemented, but it ain't yet */
+#if 0
+ /* ~~Ideally FIX_ROUND_EXPR would be implemented, but it ain't yet. */
return ffecom_1 (FIX_ROUND_EXPR, tree_type, ffecom_expr (arg1));
#else
/* i__1 = r1 >= 0 ? floor(r1 + .5) : -floor(.5 - r1); */
@@ -4542,13 +4851,11 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
tree prep_arg4;
tree arg5_plus_arg3;
- ffecom_push_calltemps ();
-
arg2_tree = convert (integer_type_node,
ffecom_expr (arg2));
arg3_tree = ffecom_save_tree (convert (integer_type_node,
ffecom_expr (arg3)));
- arg4_tree = ffecom_expr_rw (arg4);
+ arg4_tree = ffecom_expr_rw (NULL_TREE, arg4);
arg4_type = TREE_TYPE (arg4_tree);
arg1_tree = ffecom_save_tree (convert (arg4_type,
@@ -4557,8 +4864,6 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
arg5_tree = ffecom_save_tree (convert (integer_type_node,
ffecom_expr (arg5)));
- ffecom_pop_calltemps ();
-
prep_arg1
= ffecom_2 (LSHIFT_EXPR, arg4_type,
ffecom_2 (BIT_AND_EXPR, arg4_type,
@@ -4676,8 +4981,6 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
tree arg2_tree;
tree arg3_tree;
- ffecom_push_calltemps ();
-
arg1_tree = convert (ffecom_f2c_integer_type_node,
ffecom_expr (arg1));
arg1_tree = ffecom_1 (ADDR_EXPR,
@@ -4693,12 +4996,10 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
arg2_tree);
if (arg3 != NULL)
- arg3_tree = ffecom_expr_rw (arg3);
+ arg3_tree = ffecom_expr_w (NULL_TREE, arg3);
else
arg3_tree = NULL_TREE;
- ffecom_pop_calltemps ();
-
arg1_tree = build_tree_list (NULL_TREE, arg1_tree);
arg2_tree = build_tree_list (NULL_TREE, arg2_tree);
TREE_CHAIN (arg1_tree) = arg2_tree;
@@ -4711,7 +5012,8 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
NULL_TREE :
tree_type),
arg1_tree,
- NULL_TREE, NULL, NULL, NULL_TREE, TRUE);
+ NULL_TREE, NULL, NULL, NULL_TREE, TRUE,
+ ffebld_nonter_hook (expr));
if (arg3_tree != NULL_TREE)
expr_tree
@@ -4727,8 +5029,6 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
tree arg2_tree;
tree arg3_tree;
- ffecom_push_calltemps ();
-
arg1_tree = convert (ffecom_f2c_integer_type_node,
ffecom_expr (arg1));
arg1_tree = ffecom_1 (ADDR_EXPR,
@@ -4744,12 +5044,10 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
arg2_tree);
if (arg3 != NULL)
- arg3_tree = ffecom_expr_rw (arg3);
+ arg3_tree = ffecom_expr_w (NULL_TREE, arg3);
else
arg3_tree = NULL_TREE;
- ffecom_pop_calltemps ();
-
arg1_tree = build_tree_list (NULL_TREE, arg1_tree);
arg2_tree = build_tree_list (NULL_TREE, arg2_tree);
TREE_CHAIN (arg1_tree) = arg2_tree;
@@ -4760,7 +5058,8 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
FALSE,
NULL_TREE,
arg1_tree,
- NULL_TREE, NULL, NULL, NULL_TREE, TRUE);
+ NULL_TREE, NULL, NULL, NULL_TREE, TRUE,
+ ffebld_nonter_hook (expr));
if (arg3_tree != NULL_TREE)
expr_tree
@@ -4783,17 +5082,13 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
tree arg1_tree;
tree arg2_tree;
- ffecom_push_calltemps ();
-
arg1_tree = ffecom_arg_ptr_to_expr (arg1, &arg1_len);
if (arg2 != NULL)
- arg2_tree = ffecom_expr_rw (arg2);
+ arg2_tree = ffecom_expr_w (NULL_TREE, arg2);
else
arg2_tree = NULL_TREE;
- ffecom_pop_calltemps ();
-
arg1_tree = build_tree_list (NULL_TREE, arg1_tree);
arg1_len = build_tree_list (NULL_TREE, arg1_len);
TREE_CHAIN (arg1_tree) = arg1_len;
@@ -4804,7 +5099,8 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
FALSE,
NULL_TREE,
arg1_tree,
- NULL_TREE, NULL, NULL, NULL_TREE, TRUE);
+ NULL_TREE, NULL, NULL, NULL_TREE, TRUE,
+ ffebld_nonter_hook (expr));
if (arg2_tree != NULL_TREE)
expr_tree
@@ -4830,7 +5126,8 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
FALSE,
void_type_node,
expr_tree,
- NULL_TREE, NULL, NULL, NULL_TREE, TRUE);
+ NULL_TREE, NULL, NULL, NULL_TREE, TRUE,
+ ffebld_nonter_hook (expr));
case FFEINTRIN_impFLUSH:
if (arg1 == NULL)
@@ -4850,17 +5147,13 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
tree arg2_tree;
tree arg3_tree;
- ffecom_push_calltemps ();
-
arg1_tree = ffecom_arg_ptr_to_expr (arg1, &arg1_len);
arg2_tree = ffecom_arg_ptr_to_expr (arg2, &arg2_len);
if (arg3 != NULL)
- arg3_tree = ffecom_expr_rw (arg3);
+ arg3_tree = ffecom_expr_w (NULL_TREE, arg3);
else
arg3_tree = NULL_TREE;
- ffecom_pop_calltemps ();
-
arg1_tree = build_tree_list (NULL_TREE, arg1_tree);
arg1_len = build_tree_list (NULL_TREE, arg1_len);
arg2_tree = build_tree_list (NULL_TREE, arg2_tree);
@@ -4873,7 +5166,8 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
FALSE,
NULL_TREE,
arg1_tree,
- NULL_TREE, NULL, NULL, NULL_TREE, TRUE);
+ NULL_TREE, NULL, NULL, NULL_TREE, TRUE,
+ ffebld_nonter_hook (expr));
if (arg3_tree != NULL_TREE)
expr_tree = ffecom_modify (NULL_TREE, arg3_tree,
convert (TREE_TYPE (arg3_tree),
@@ -4889,19 +5183,15 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
tree arg2_tree;
tree arg3_tree;
- ffecom_push_calltemps ();
-
arg1_tree = ffecom_arg_ptr_to_expr (arg1, &arg1_len);
arg2_tree = ffecom_ptr_to_expr (arg2);
if (arg3 != NULL)
- arg3_tree = ffecom_expr_rw (arg3);
+ arg3_tree = ffecom_expr_w (NULL_TREE, arg3);
else
arg3_tree = NULL_TREE;
- ffecom_pop_calltemps ();
-
arg1_tree = build_tree_list (NULL_TREE, arg1_tree);
arg1_len = build_tree_list (NULL_TREE, arg1_len);
arg2_tree = build_tree_list (NULL_TREE, arg2_tree);
@@ -4912,7 +5202,8 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
FALSE,
NULL_TREE,
arg1_tree,
- NULL_TREE, NULL, NULL, NULL_TREE, TRUE);
+ NULL_TREE, NULL, NULL, NULL_TREE, TRUE,
+ ffebld_nonter_hook (expr));
if (arg3_tree != NULL_TREE)
expr_tree = ffecom_modify (NULL_TREE, arg3_tree,
convert (TREE_TYPE (arg3_tree),
@@ -4928,8 +5219,6 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
tree arg2_len = integer_zero_node;
tree arg3_tree;
- ffecom_push_calltemps ();
-
arg1_tree = convert (ffecom_f2c_integer_type_node,
ffecom_expr (arg1));
arg1_tree = ffecom_1 (ADDR_EXPR,
@@ -4937,9 +5226,7 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
arg1_tree);
arg2_tree = ffecom_arg_ptr_to_expr (arg2, &arg2_len);
- arg3_tree = ffecom_expr_rw (arg3);
-
- ffecom_pop_calltemps ();
+ arg3_tree = ffecom_expr_w (NULL_TREE, arg3);
arg1_tree = build_tree_list (NULL_TREE, arg1_tree);
arg2_tree = build_tree_list (NULL_TREE, arg2_tree);
@@ -4952,7 +5239,8 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
FALSE,
NULL_TREE,
arg1_tree,
- NULL_TREE, NULL, NULL, NULL_TREE, TRUE);
+ NULL_TREE, NULL, NULL, NULL_TREE, TRUE,
+ ffebld_nonter_hook (expr));
expr_tree = ffecom_modify (NULL_TREE, arg3_tree,
convert (TREE_TYPE (arg3_tree),
expr_tree));
@@ -4965,8 +5253,6 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
tree arg2_tree;
tree arg3_tree;
- ffecom_push_calltemps ();
-
arg1_tree = convert (ffecom_f2c_integer_type_node,
ffecom_expr (arg1));
arg1_tree = ffecom_1 (ADDR_EXPR,
@@ -4979,9 +5265,7 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
if (arg3 == NULL)
arg3_tree = NULL_TREE;
else
- arg3_tree = ffecom_expr_rw (arg3);
-
- ffecom_pop_calltemps ();
+ arg3_tree = ffecom_expr_w (NULL_TREE, arg3);
arg1_tree = build_tree_list (NULL_TREE, arg1_tree);
arg2_tree = build_tree_list (NULL_TREE, arg2_tree);
@@ -4991,7 +5275,8 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
FALSE,
NULL_TREE,
arg1_tree,
- NULL_TREE, NULL, NULL, NULL_TREE, TRUE);
+ NULL_TREE, NULL, NULL, NULL_TREE, TRUE,
+ ffebld_nonter_hook (expr));
if (arg3_tree != NULL_TREE) {
expr_tree = ffecom_modify (NULL_TREE, arg3_tree,
convert (TREE_TYPE (arg3_tree),
@@ -5006,8 +5291,6 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
tree arg2_tree;
tree arg3_tree;
- ffecom_push_calltemps ();
-
arg1_tree = convert (ffecom_f2c_integer_type_node,
ffecom_expr (arg1));
arg1_tree = ffecom_1 (ADDR_EXPR,
@@ -5023,9 +5306,7 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
if (arg3 == NULL)
arg3_tree = NULL_TREE;
else
- arg3_tree = ffecom_expr_rw (arg3);
-
- ffecom_pop_calltemps ();
+ arg3_tree = ffecom_expr_w (NULL_TREE, arg3);
arg1_tree = build_tree_list (NULL_TREE, arg1_tree);
arg2_tree = build_tree_list (NULL_TREE, arg2_tree);
@@ -5035,7 +5316,8 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
FALSE,
NULL_TREE,
arg1_tree,
- NULL_TREE, NULL, NULL, NULL_TREE, TRUE);
+ NULL_TREE, NULL, NULL, NULL_TREE, TRUE,
+ ffebld_nonter_hook (expr));
if (arg3_tree != NULL_TREE) {
expr_tree = ffecom_modify (NULL_TREE, arg3_tree,
convert (TREE_TYPE (arg3_tree),
@@ -5051,20 +5333,16 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
tree arg1_tree;
tree arg2_tree;
- ffecom_push_calltemps ();
-
- arg1_tree = ffecom_arg_ptr_to_expr (arg1, &arg1_len);
+ arg1_tree = ffecom_arg_ptr_to_expr (arg2, &arg1_len);
- arg2_tree = convert (((gfrt == FFEINTRIN_impCTIME_subr) ?
+ arg2_tree = convert (((codegen_imp == FFEINTRIN_impCTIME_subr) ?
ffecom_f2c_longint_type_node :
ffecom_f2c_integer_type_node),
- ffecom_expr (arg2));
+ ffecom_expr (arg1));
arg2_tree = ffecom_1 (ADDR_EXPR,
build_pointer_type (TREE_TYPE (arg2_tree)),
arg2_tree);
- ffecom_pop_calltemps ();
-
arg1_tree = build_tree_list (NULL_TREE, arg1_tree);
arg1_len = build_tree_list (NULL_TREE, arg1_len);
arg2_tree = build_tree_list (NULL_TREE, arg2_tree);
@@ -5077,7 +5355,9 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
FALSE,
NULL_TREE,
arg1_tree,
- NULL_TREE, NULL, NULL, NULL_TREE, TRUE);
+ NULL_TREE, NULL, NULL, NULL_TREE, TRUE,
+ ffebld_nonter_hook (expr));
+ TREE_SIDE_EFFECTS (expr_tree) = 1;
}
return expr_tree;
@@ -5106,7 +5386,8 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
ffecom_f2c_real_type_node),
arg1_tree,
dest_tree, dest, dest_used,
- NULL_TREE, TRUE);
+ NULL_TREE, TRUE,
+ ffebld_nonter_hook (expr));
}
return expr_tree;
@@ -5116,8 +5397,6 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
tree arg1_tree;
tree arg2_tree;
- ffecom_push_calltemps ();
-
arg1_tree = convert (ffecom_f2c_integer_type_node,
ffecom_expr (arg1));
arg1_tree = ffecom_1 (ADDR_EXPR,
@@ -5127,9 +5406,7 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
if (arg2 == NULL)
arg2_tree = NULL_TREE;
else
- arg2_tree = ffecom_expr_rw (arg2);
-
- ffecom_pop_calltemps ();
+ arg2_tree = ffecom_expr_w (NULL_TREE, arg2);
expr_tree = ffecom_call_ (ffecom_gfrt_tree_ (gfrt),
ffecom_gfrt_kindtype (gfrt),
@@ -5137,7 +5414,8 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
NULL_TREE,
build_tree_list (NULL_TREE, arg1_tree),
NULL_TREE, NULL, NULL, NULL_TREE,
- TRUE);
+ TRUE,
+ ffebld_nonter_hook (expr));
if (arg2_tree != NULL_TREE) {
expr_tree = ffecom_modify (NULL_TREE, arg2_tree,
convert (TREE_TYPE (arg2_tree),
@@ -5151,11 +5429,7 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
{
tree arg1_tree;
- ffecom_push_calltemps ();
-
- arg1_tree = ffecom_expr_rw (arg1);
-
- ffecom_pop_calltemps ();
+ arg1_tree = ffecom_expr_w (NULL_TREE, arg1);
expr_tree
= ffecom_call_ (ffecom_gfrt_tree_ (gfrt),
@@ -5163,7 +5437,8 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
FALSE,
NULL_TREE,
NULL_TREE,
- NULL_TREE, NULL, NULL, NULL_TREE, TRUE);
+ NULL_TREE, NULL, NULL, NULL_TREE, TRUE,
+ ffebld_nonter_hook (expr));
expr_tree
= ffecom_modify (NULL_TREE, arg1_tree,
@@ -5176,30 +5451,27 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
case FFEINTRIN_impETIME_subr:
{
tree arg1_tree;
- tree arg2_tree;
+ tree result_tree;
- ffecom_push_calltemps ();
+ result_tree = ffecom_expr_w (NULL_TREE, arg2);
- arg1_tree = ffecom_expr_rw (arg1);
-
- arg2_tree = ffecom_ptr_to_expr (arg2);
-
- ffecom_pop_calltemps ();
+ arg1_tree = ffecom_ptr_to_expr (arg1);
expr_tree = ffecom_call_ (ffecom_gfrt_tree_ (gfrt),
ffecom_gfrt_kindtype (gfrt),
FALSE,
NULL_TREE,
- build_tree_list (NULL_TREE, arg2_tree),
+ build_tree_list (NULL_TREE, arg1_tree),
NULL_TREE, NULL, NULL, NULL_TREE,
- TRUE);
- expr_tree = ffecom_modify (NULL_TREE, arg1_tree,
- convert (TREE_TYPE (arg1_tree),
+ TRUE,
+ ffebld_nonter_hook (expr));
+ expr_tree = ffecom_modify (NULL_TREE, result_tree,
+ convert (TREE_TYPE (result_tree),
expr_tree));
}
return expr_tree;
- /* Straightforward calls of libf2c routines: */
+ /* Straightforward calls of libf2c routines: */
case FFEINTRIN_impABORT:
case FFEINTRIN_impACCESS:
case FFEINTRIN_impBESJ0:
@@ -5280,890 +5552,20 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
assert (gfrt != FFECOM_gfrt); /* Must have an implementation! */
- ffecom_push_calltemps ();
expr_tree = ffecom_arglist_expr_ (ffecom_gfrt_args_ (gfrt),
ffebld_right (expr));
- ffecom_pop_calltemps ();
return ffecom_call_ (ffecom_gfrt_tree_ (gfrt), ffecom_gfrt_kindtype (gfrt),
(ffe_is_f2c_library () && ffecom_gfrt_complex_[gfrt]),
tree_type,
expr_tree, dest_tree, dest, dest_used,
- NULL_TREE, TRUE);
-
- /**INDENT* (Do not reformat this comment even with -fca option.)
- Data-gathering files: Given the source file listed below, compiled with
- f2c I obtained the output file listed after that, and from the output
- file I derived the above code.
+ NULL_TREE, TRUE,
+ ffebld_nonter_hook (expr));
--------- (begin input file to f2c)
- implicit none
- character*10 A1,A2
- complex C1,C2
- integer I1,I2
- real R1,R2
- double precision D1,D2
-C
- call getem(A1,A2,C1,C2,I1,I2,R1,R2,D1,D2)
-c /
- call fooI(I1/I2)
- call fooR(R1/I1)
- call fooD(D1/I1)
- call fooC(C1/I1)
- call fooR(R1/R2)
- call fooD(R1/D1)
- call fooD(D1/D2)
- call fooD(D1/R1)
- call fooC(C1/C2)
- call fooC(C1/R1)
- call fooZ(C1/D1)
-c **
- call fooI(I1**I2)
- call fooR(R1**I1)
- call fooD(D1**I1)
- call fooC(C1**I1)
- call fooR(R1**R2)
- call fooD(R1**D1)
- call fooD(D1**D2)
- call fooD(D1**R1)
- call fooC(C1**C2)
- call fooC(C1**R1)
- call fooZ(C1**D1)
-c FFEINTRIN_impABS
- call fooR(ABS(R1))
-c FFEINTRIN_impACOS
- call fooR(ACOS(R1))
-c FFEINTRIN_impAIMAG
- call fooR(AIMAG(C1))
-c FFEINTRIN_impAINT
- call fooR(AINT(R1))
-c FFEINTRIN_impALOG
- call fooR(ALOG(R1))
-c FFEINTRIN_impALOG10
- call fooR(ALOG10(R1))
-c FFEINTRIN_impAMAX0
- call fooR(AMAX0(I1,I2))
-c FFEINTRIN_impAMAX1
- call fooR(AMAX1(R1,R2))
-c FFEINTRIN_impAMIN0
- call fooR(AMIN0(I1,I2))
-c FFEINTRIN_impAMIN1
- call fooR(AMIN1(R1,R2))
-c FFEINTRIN_impAMOD
- call fooR(AMOD(R1,R2))
-c FFEINTRIN_impANINT
- call fooR(ANINT(R1))
-c FFEINTRIN_impASIN
- call fooR(ASIN(R1))
-c FFEINTRIN_impATAN
- call fooR(ATAN(R1))
-c FFEINTRIN_impATAN2
- call fooR(ATAN2(R1,R2))
-c FFEINTRIN_impCABS
- call fooR(CABS(C1))
-c FFEINTRIN_impCCOS
- call fooC(CCOS(C1))
-c FFEINTRIN_impCEXP
- call fooC(CEXP(C1))
-c FFEINTRIN_impCHAR
- call fooA(CHAR(I1))
-c FFEINTRIN_impCLOG
- call fooC(CLOG(C1))
-c FFEINTRIN_impCONJG
- call fooC(CONJG(C1))
-c FFEINTRIN_impCOS
- call fooR(COS(R1))
-c FFEINTRIN_impCOSH
- call fooR(COSH(R1))
-c FFEINTRIN_impCSIN
- call fooC(CSIN(C1))
-c FFEINTRIN_impCSQRT
- call fooC(CSQRT(C1))
-c FFEINTRIN_impDABS
- call fooD(DABS(D1))
-c FFEINTRIN_impDACOS
- call fooD(DACOS(D1))
-c FFEINTRIN_impDASIN
- call fooD(DASIN(D1))
-c FFEINTRIN_impDATAN
- call fooD(DATAN(D1))
-c FFEINTRIN_impDATAN2
- call fooD(DATAN2(D1,D2))
-c FFEINTRIN_impDCOS
- call fooD(DCOS(D1))
-c FFEINTRIN_impDCOSH
- call fooD(DCOSH(D1))
-c FFEINTRIN_impDDIM
- call fooD(DDIM(D1,D2))
-c FFEINTRIN_impDEXP
- call fooD(DEXP(D1))
-c FFEINTRIN_impDIM
- call fooR(DIM(R1,R2))
-c FFEINTRIN_impDINT
- call fooD(DINT(D1))
-c FFEINTRIN_impDLOG
- call fooD(DLOG(D1))
-c FFEINTRIN_impDLOG10
- call fooD(DLOG10(D1))
-c FFEINTRIN_impDMAX1
- call fooD(DMAX1(D1,D2))
-c FFEINTRIN_impDMIN1
- call fooD(DMIN1(D1,D2))
-c FFEINTRIN_impDMOD
- call fooD(DMOD(D1,D2))
-c FFEINTRIN_impDNINT
- call fooD(DNINT(D1))
-c FFEINTRIN_impDPROD
- call fooD(DPROD(R1,R2))
-c FFEINTRIN_impDSIGN
- call fooD(DSIGN(D1,D2))
-c FFEINTRIN_impDSIN
- call fooD(DSIN(D1))
-c FFEINTRIN_impDSINH
- call fooD(DSINH(D1))
-c FFEINTRIN_impDSQRT
- call fooD(DSQRT(D1))
-c FFEINTRIN_impDTAN
- call fooD(DTAN(D1))
-c FFEINTRIN_impDTANH
- call fooD(DTANH(D1))
-c FFEINTRIN_impEXP
- call fooR(EXP(R1))
-c FFEINTRIN_impIABS
- call fooI(IABS(I1))
-c FFEINTRIN_impICHAR
- call fooI(ICHAR(A1))
-c FFEINTRIN_impIDIM
- call fooI(IDIM(I1,I2))
-c FFEINTRIN_impIDNINT
- call fooI(IDNINT(D1))
-c FFEINTRIN_impINDEX
- call fooI(INDEX(A1,A2))
-c FFEINTRIN_impISIGN
- call fooI(ISIGN(I1,I2))
-c FFEINTRIN_impLEN
- call fooI(LEN(A1))
-c FFEINTRIN_impLGE
- call fooL(LGE(A1,A2))
-c FFEINTRIN_impLGT
- call fooL(LGT(A1,A2))
-c FFEINTRIN_impLLE
- call fooL(LLE(A1,A2))
-c FFEINTRIN_impLLT
- call fooL(LLT(A1,A2))
-c FFEINTRIN_impMAX0
- call fooI(MAX0(I1,I2))
-c FFEINTRIN_impMAX1
- call fooI(MAX1(R1,R2))
-c FFEINTRIN_impMIN0
- call fooI(MIN0(I1,I2))
-c FFEINTRIN_impMIN1
- call fooI(MIN1(R1,R2))
-c FFEINTRIN_impMOD
- call fooI(MOD(I1,I2))
-c FFEINTRIN_impNINT
- call fooI(NINT(R1))
-c FFEINTRIN_impSIGN
- call fooR(SIGN(R1,R2))
-c FFEINTRIN_impSIN
- call fooR(SIN(R1))
-c FFEINTRIN_impSINH
- call fooR(SINH(R1))
-c FFEINTRIN_impSQRT
- call fooR(SQRT(R1))
-c FFEINTRIN_impTAN
- call fooR(TAN(R1))
-c FFEINTRIN_impTANH
- call fooR(TANH(R1))
-c FFEINTRIN_imp_CMPLX_C
- call fooC(cmplx(C1,C2))
-c FFEINTRIN_imp_CMPLX_D
- call fooZ(cmplx(D1,D2))
-c FFEINTRIN_imp_CMPLX_I
- call fooC(cmplx(I1,I2))
-c FFEINTRIN_imp_CMPLX_R
- call fooC(cmplx(R1,R2))
-c FFEINTRIN_imp_DBLE_C
- call fooD(dble(C1))
-c FFEINTRIN_imp_DBLE_D
- call fooD(dble(D1))
-c FFEINTRIN_imp_DBLE_I
- call fooD(dble(I1))
-c FFEINTRIN_imp_DBLE_R
- call fooD(dble(R1))
-c FFEINTRIN_imp_INT_C
- call fooI(int(C1))
-c FFEINTRIN_imp_INT_D
- call fooI(int(D1))
-c FFEINTRIN_imp_INT_I
- call fooI(int(I1))
-c FFEINTRIN_imp_INT_R
- call fooI(int(R1))
-c FFEINTRIN_imp_REAL_C
- call fooR(real(C1))
-c FFEINTRIN_imp_REAL_D
- call fooR(real(D1))
-c FFEINTRIN_imp_REAL_I
- call fooR(real(I1))
-c FFEINTRIN_imp_REAL_R
- call fooR(real(R1))
-c
-c FFEINTRIN_imp_INT_D:
-c
-c FFEINTRIN_specIDINT
- call fooI(IDINT(D1))
-c
-c FFEINTRIN_imp_INT_R:
-c
-c FFEINTRIN_specIFIX
- call fooI(IFIX(R1))
-c FFEINTRIN_specINT
- call fooI(INT(R1))
-c
-c FFEINTRIN_imp_REAL_D:
-c
-c FFEINTRIN_specSNGL
- call fooR(SNGL(D1))
-c
-c FFEINTRIN_imp_REAL_I:
-c
-c FFEINTRIN_specFLOAT
- call fooR(FLOAT(I1))
-c FFEINTRIN_specREAL
- call fooR(REAL(I1))
-c
- end
--------- (end input file to f2c)
-
--------- (begin output from providing above input file as input to:
--------- `f2c | gcc -E -C - | sed -e "s:/[*]*://:g" -e "s:[*]*[/]://:g" \
--------- -e "s:^#.*$::g"')
-
-// -- translated by f2c (version 19950223).
- You must link the resulting object file with the libraries:
- -lf2c -lm (in that order)
-//
-
-
-// f2c.h -- Standard Fortran to C header file //
-
-/// barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed."
-
- - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) //
-
-
-
-
-// F2C_INTEGER will normally be `int' but would be `long' on 16-bit systems //
-// we assume short, float are OK //
-typedef long int // long int // integer;
-typedef char *address;
-typedef short int shortint;
-typedef float real;
-typedef double doublereal;
-typedef struct { real r, i; } complex;
-typedef struct { doublereal r, i; } doublecomplex;
-typedef long int // long int // logical;
-typedef short int shortlogical;
-typedef char logical1;
-typedef char integer1;
-// typedef long long longint; // // system-dependent //
-
-
-
-
-// Extern is for use with -E //
-
-
-
-
-// I/O stuff //
-
-
-
-
-
-
-
-
-typedef long int // int or long int // flag;
-typedef long int // int or long int // ftnlen;
-typedef long int // int or long int // ftnint;
-
-
-//external read, write//
-typedef struct
-{ flag cierr;
- ftnint ciunit;
- flag ciend;
- char *cifmt;
- ftnint cirec;
-} cilist;
-
-//internal read, write//
-typedef struct
-{ flag icierr;
- char *iciunit;
- flag iciend;
- char *icifmt;
- ftnint icirlen;
- ftnint icirnum;
-} icilist;
-
-//open//
-typedef struct
-{ flag oerr;
- ftnint ounit;
- char *ofnm;
- ftnlen ofnmlen;
- char *osta;
- char *oacc;
- char *ofm;
- ftnint orl;
- char *oblnk;
-} olist;
-
-//close//
-typedef struct
-{ flag cerr;
- ftnint cunit;
- char *csta;
-} cllist;
-
-//rewind, backspace, endfile//
-typedef struct
-{ flag aerr;
- ftnint aunit;
-} alist;
-
-// inquire //
-typedef struct
-{ flag inerr;
- ftnint inunit;
- char *infile;
- ftnlen infilen;
- ftnint *inex; //parameters in standard's order//
- ftnint *inopen;
- ftnint *innum;
- ftnint *innamed;
- char *inname;
- ftnlen innamlen;
- char *inacc;
- ftnlen inacclen;
- char *inseq;
- ftnlen inseqlen;
- char *indir;
- ftnlen indirlen;
- char *infmt;
- ftnlen infmtlen;
- char *inform;
- ftnint informlen;
- char *inunf;
- ftnlen inunflen;
- ftnint *inrecl;
- ftnint *innrec;
- char *inblank;
- ftnlen inblanklen;
-} inlist;
-
-
-
-union Multitype { // for multiple entry points //
- integer1 g;
- shortint h;
- integer i;
- // longint j; //
- real r;
- doublereal d;
- complex c;
- doublecomplex z;
- };
-
-typedef union Multitype Multitype;
-
-typedef long Long; // No longer used; formerly in Namelist //
-
-struct Vardesc { // for Namelist //
- char *name;
- char *addr;
- ftnlen *dims;
- int type;
- };
-typedef struct Vardesc Vardesc;
-
-struct Namelist {
- char *name;
- Vardesc **vars;
- int nvars;
- };
-typedef struct Namelist Namelist;
-
-
-
-
-
-
-
-
-// procedure parameter types for -A and -C++ //
-
-
-
-
-typedef int // Unknown procedure type // (*U_fp)();
-typedef shortint (*J_fp)();
-typedef integer (*I_fp)();
-typedef real (*R_fp)();
-typedef doublereal (*D_fp)(), (*E_fp)();
-typedef // Complex // void (*C_fp)();
-typedef // Double Complex // void (*Z_fp)();
-typedef logical (*L_fp)();
-typedef shortlogical (*K_fp)();
-typedef // Character // void (*H_fp)();
-typedef // Subroutine // int (*S_fp)();
-
-// E_fp is for real functions when -R is not specified //
-typedef void C_f; // complex function //
-typedef void H_f; // character function //
-typedef void Z_f; // double complex function //
-typedef doublereal E_f; // real function with -R not specified //
-
-// undef any lower-case symbols that your C compiler predefines, e.g.: //
-
-
-// (No such symbols should be defined in a strict ANSI C compiler.
- We can avoid trouble with f2c-translated code by using
- gcc -ansi [-traditional].) //
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-// Main program // MAIN__()
-{
- // System generated locals //
- integer i__1;
- real r__1, r__2;
- doublereal d__1, d__2;
- complex q__1;
- doublecomplex z__1, z__2, z__3;
- logical L__1;
- char ch__1[1];
-
- // Builtin functions //
- void c_div();
- integer pow_ii();
- double pow_ri(), pow_di();
- void pow_ci();
- double pow_dd();
- void pow_zz();
- double acos(), r_imag(), r_int(), log(), r_lg10(), r_mod(), r_nint(),
- asin(), atan(), atan2(), c_abs();
- void c_cos(), c_exp(), c_log(), r_cnjg();
- double cos(), cosh();
- void c_sin(), c_sqrt();
- double d_dim(), exp(), r_dim(), d_int(), d_lg10(), d_mod(), d_nint(),
- d_sign(), sin(), sinh(), sqrt(), tan(), tanh();
- integer i_dim(), i_dnnt(), i_indx(), i_sign(), i_len();
- logical l_ge(), l_gt(), l_le(), l_lt();
- integer i_nint();
- double r_sign();
-
- // Local variables //
- extern // Subroutine // int fooa_(), fooc_(), food_(), fooi_(), foor_(),
- fool_(), fooz_(), getem_();
- static char a1[10], a2[10];
- static complex c1, c2;
- static doublereal d1, d2;
- static integer i1, i2;
- static real r1, r2;
-
-
- getem_(a1, a2, &c1, &c2, &i1, &i2, &r1, &r2, &d1, &d2, 10L, 10L);
-// / //
- i__1 = i1 / i2;
- fooi_(&i__1);
- r__1 = r1 / i1;
- foor_(&r__1);
- d__1 = d1 / i1;
- food_(&d__1);
- d__1 = (doublereal) i1;
- q__1.r = c1.r / d__1, q__1.i = c1.i / d__1;
- fooc_(&q__1);
- r__1 = r1 / r2;
- foor_(&r__1);
- d__1 = r1 / d1;
- food_(&d__1);
- d__1 = d1 / d2;
- food_(&d__1);
- d__1 = d1 / r1;
- food_(&d__1);
- c_div(&q__1, &c1, &c2);
- fooc_(&q__1);
- q__1.r = c1.r / r1, q__1.i = c1.i / r1;
- fooc_(&q__1);
- z__1.r = c1.r / d1, z__1.i = c1.i / d1;
- fooz_(&z__1);
-// ** //
- i__1 = pow_ii(&i1, &i2);
- fooi_(&i__1);
- r__1 = pow_ri(&r1, &i1);
- foor_(&r__1);
- d__1 = pow_di(&d1, &i1);
- food_(&d__1);
- pow_ci(&q__1, &c1, &i1);
- fooc_(&q__1);
- d__1 = (doublereal) r1;
- d__2 = (doublereal) r2;
- r__1 = pow_dd(&d__1, &d__2);
- foor_(&r__1);
- d__2 = (doublereal) r1;
- d__1 = pow_dd(&d__2, &d1);
- food_(&d__1);
- d__1 = pow_dd(&d1, &d2);
- food_(&d__1);
- d__2 = (doublereal) r1;
- d__1 = pow_dd(&d1, &d__2);
- food_(&d__1);
- z__2.r = c1.r, z__2.i = c1.i;
- z__3.r = c2.r, z__3.i = c2.i;
- pow_zz(&z__1, &z__2, &z__3);
- q__1.r = z__1.r, q__1.i = z__1.i;
- fooc_(&q__1);
- z__2.r = c1.r, z__2.i = c1.i;
- z__3.r = r1, z__3.i = 0.;
- pow_zz(&z__1, &z__2, &z__3);
- q__1.r = z__1.r, q__1.i = z__1.i;
- fooc_(&q__1);
- z__2.r = c1.r, z__2.i = c1.i;
- z__3.r = d1, z__3.i = 0.;
- pow_zz(&z__1, &z__2, &z__3);
- fooz_(&z__1);
-// FFEINTRIN_impABS //
- r__1 = (doublereal)(( r1 ) >= 0 ? ( r1 ) : -( r1 )) ;
- foor_(&r__1);
-// FFEINTRIN_impACOS //
- r__1 = acos(r1);
- foor_(&r__1);
-// FFEINTRIN_impAIMAG //
- r__1 = r_imag(&c1);
- foor_(&r__1);
-// FFEINTRIN_impAINT //
- r__1 = r_int(&r1);
- foor_(&r__1);
-// FFEINTRIN_impALOG //
- r__1 = log(r1);
- foor_(&r__1);
-// FFEINTRIN_impALOG10 //
- r__1 = r_lg10(&r1);
- foor_(&r__1);
-// FFEINTRIN_impAMAX0 //
- r__1 = (real) (( i1 ) >= ( i2 ) ? ( i1 ) : ( i2 )) ;
- foor_(&r__1);
-// FFEINTRIN_impAMAX1 //
- r__1 = (doublereal)(( r1 ) >= ( r2 ) ? ( r1 ) : ( r2 )) ;
- foor_(&r__1);
-// FFEINTRIN_impAMIN0 //
- r__1 = (real) (( i1 ) <= ( i2 ) ? ( i1 ) : ( i2 )) ;
- foor_(&r__1);
-// FFEINTRIN_impAMIN1 //
- r__1 = (doublereal)(( r1 ) <= ( r2 ) ? ( r1 ) : ( r2 )) ;
- foor_(&r__1);
-// FFEINTRIN_impAMOD //
- r__1 = r_mod(&r1, &r2);
- foor_(&r__1);
-// FFEINTRIN_impANINT //
- r__1 = r_nint(&r1);
- foor_(&r__1);
-// FFEINTRIN_impASIN //
- r__1 = asin(r1);
- foor_(&r__1);
-// FFEINTRIN_impATAN //
- r__1 = atan(r1);
- foor_(&r__1);
-// FFEINTRIN_impATAN2 //
- r__1 = atan2(r1, r2);
- foor_(&r__1);
-// FFEINTRIN_impCABS //
- r__1 = c_abs(&c1);
- foor_(&r__1);
-// FFEINTRIN_impCCOS //
- c_cos(&q__1, &c1);
- fooc_(&q__1);
-// FFEINTRIN_impCEXP //
- c_exp(&q__1, &c1);
- fooc_(&q__1);
-// FFEINTRIN_impCHAR //
- *(unsigned char *)&ch__1[0] = i1;
- fooa_(ch__1, 1L);
-// FFEINTRIN_impCLOG //
- c_log(&q__1, &c1);
- fooc_(&q__1);
-// FFEINTRIN_impCONJG //
- r_cnjg(&q__1, &c1);
- fooc_(&q__1);
-// FFEINTRIN_impCOS //
- r__1 = cos(r1);
- foor_(&r__1);
-// FFEINTRIN_impCOSH //
- r__1 = cosh(r1);
- foor_(&r__1);
-// FFEINTRIN_impCSIN //
- c_sin(&q__1, &c1);
- fooc_(&q__1);
-// FFEINTRIN_impCSQRT //
- c_sqrt(&q__1, &c1);
- fooc_(&q__1);
-// FFEINTRIN_impDABS //
- d__1 = (( d1 ) >= 0 ? ( d1 ) : -( d1 )) ;
- food_(&d__1);
-// FFEINTRIN_impDACOS //
- d__1 = acos(d1);
- food_(&d__1);
-// FFEINTRIN_impDASIN //
- d__1 = asin(d1);
- food_(&d__1);
-// FFEINTRIN_impDATAN //
- d__1 = atan(d1);
- food_(&d__1);
-// FFEINTRIN_impDATAN2 //
- d__1 = atan2(d1, d2);
- food_(&d__1);
-// FFEINTRIN_impDCOS //
- d__1 = cos(d1);
- food_(&d__1);
-// FFEINTRIN_impDCOSH //
- d__1 = cosh(d1);
- food_(&d__1);
-// FFEINTRIN_impDDIM //
- d__1 = d_dim(&d1, &d2);
- food_(&d__1);
-// FFEINTRIN_impDEXP //
- d__1 = exp(d1);
- food_(&d__1);
-// FFEINTRIN_impDIM //
- r__1 = r_dim(&r1, &r2);
- foor_(&r__1);
-// FFEINTRIN_impDINT //
- d__1 = d_int(&d1);
- food_(&d__1);
-// FFEINTRIN_impDLOG //
- d__1 = log(d1);
- food_(&d__1);
-// FFEINTRIN_impDLOG10 //
- d__1 = d_lg10(&d1);
- food_(&d__1);
-// FFEINTRIN_impDMAX1 //
- d__1 = (( d1 ) >= ( d2 ) ? ( d1 ) : ( d2 )) ;
- food_(&d__1);
-// FFEINTRIN_impDMIN1 //
- d__1 = (( d1 ) <= ( d2 ) ? ( d1 ) : ( d2 )) ;
- food_(&d__1);
-// FFEINTRIN_impDMOD //
- d__1 = d_mod(&d1, &d2);
- food_(&d__1);
-// FFEINTRIN_impDNINT //
- d__1 = d_nint(&d1);
- food_(&d__1);
-// FFEINTRIN_impDPROD //
- d__1 = (doublereal) r1 * r2;
- food_(&d__1);
-// FFEINTRIN_impDSIGN //
- d__1 = d_sign(&d1, &d2);
- food_(&d__1);
-// FFEINTRIN_impDSIN //
- d__1 = sin(d1);
- food_(&d__1);
-// FFEINTRIN_impDSINH //
- d__1 = sinh(d1);
- food_(&d__1);
-// FFEINTRIN_impDSQRT //
- d__1 = sqrt(d1);
- food_(&d__1);
-// FFEINTRIN_impDTAN //
- d__1 = tan(d1);
- food_(&d__1);
-// FFEINTRIN_impDTANH //
- d__1 = tanh(d1);
- food_(&d__1);
-// FFEINTRIN_impEXP //
- r__1 = exp(r1);
- foor_(&r__1);
-// FFEINTRIN_impIABS //
- i__1 = (( i1 ) >= 0 ? ( i1 ) : -( i1 )) ;
- fooi_(&i__1);
-// FFEINTRIN_impICHAR //
- i__1 = *(unsigned char *)a1;
- fooi_(&i__1);
-// FFEINTRIN_impIDIM //
- i__1 = i_dim(&i1, &i2);
- fooi_(&i__1);
-// FFEINTRIN_impIDNINT //
- i__1 = i_dnnt(&d1);
- fooi_(&i__1);
-// FFEINTRIN_impINDEX //
- i__1 = i_indx(a1, a2, 10L, 10L);
- fooi_(&i__1);
-// FFEINTRIN_impISIGN //
- i__1 = i_sign(&i1, &i2);
- fooi_(&i__1);
-// FFEINTRIN_impLEN //
- i__1 = i_len(a1, 10L);
- fooi_(&i__1);
-// FFEINTRIN_impLGE //
- L__1 = l_ge(a1, a2, 10L, 10L);
- fool_(&L__1);
-// FFEINTRIN_impLGT //
- L__1 = l_gt(a1, a2, 10L, 10L);
- fool_(&L__1);
-// FFEINTRIN_impLLE //
- L__1 = l_le(a1, a2, 10L, 10L);
- fool_(&L__1);
-// FFEINTRIN_impLLT //
- L__1 = l_lt(a1, a2, 10L, 10L);
- fool_(&L__1);
-// FFEINTRIN_impMAX0 //
- i__1 = (( i1 ) >= ( i2 ) ? ( i1 ) : ( i2 )) ;
- fooi_(&i__1);
-// FFEINTRIN_impMAX1 //
- i__1 = (integer) (doublereal)(( r1 ) >= ( r2 ) ? ( r1 ) : ( r2 )) ;
- fooi_(&i__1);
-// FFEINTRIN_impMIN0 //
- i__1 = (( i1 ) <= ( i2 ) ? ( i1 ) : ( i2 )) ;
- fooi_(&i__1);
-// FFEINTRIN_impMIN1 //
- i__1 = (integer) (doublereal)(( r1 ) <= ( r2 ) ? ( r1 ) : ( r2 )) ;
- fooi_(&i__1);
-// FFEINTRIN_impMOD //
- i__1 = i1 % i2;
- fooi_(&i__1);
-// FFEINTRIN_impNINT //
- i__1 = i_nint(&r1);
- fooi_(&i__1);
-// FFEINTRIN_impSIGN //
- r__1 = r_sign(&r1, &r2);
- foor_(&r__1);
-// FFEINTRIN_impSIN //
- r__1 = sin(r1);
- foor_(&r__1);
-// FFEINTRIN_impSINH //
- r__1 = sinh(r1);
- foor_(&r__1);
-// FFEINTRIN_impSQRT //
- r__1 = sqrt(r1);
- foor_(&r__1);
-// FFEINTRIN_impTAN //
- r__1 = tan(r1);
- foor_(&r__1);
-// FFEINTRIN_impTANH //
- r__1 = tanh(r1);
- foor_(&r__1);
-// FFEINTRIN_imp_CMPLX_C //
- r__1 = c1.r;
- r__2 = c2.r;
- q__1.r = r__1, q__1.i = r__2;
- fooc_(&q__1);
-// FFEINTRIN_imp_CMPLX_D //
- z__1.r = d1, z__1.i = d2;
- fooz_(&z__1);
-// FFEINTRIN_imp_CMPLX_I //
- r__1 = (real) i1;
- r__2 = (real) i2;
- q__1.r = r__1, q__1.i = r__2;
- fooc_(&q__1);
-// FFEINTRIN_imp_CMPLX_R //
- q__1.r = r1, q__1.i = r2;
- fooc_(&q__1);
-// FFEINTRIN_imp_DBLE_C //
- d__1 = (doublereal) c1.r;
- food_(&d__1);
-// FFEINTRIN_imp_DBLE_D //
- d__1 = d1;
- food_(&d__1);
-// FFEINTRIN_imp_DBLE_I //
- d__1 = (doublereal) i1;
- food_(&d__1);
-// FFEINTRIN_imp_DBLE_R //
- d__1 = (doublereal) r1;
- food_(&d__1);
-// FFEINTRIN_imp_INT_C //
- i__1 = (integer) c1.r;
- fooi_(&i__1);
-// FFEINTRIN_imp_INT_D //
- i__1 = (integer) d1;
- fooi_(&i__1);
-// FFEINTRIN_imp_INT_I //
- i__1 = i1;
- fooi_(&i__1);
-// FFEINTRIN_imp_INT_R //
- i__1 = (integer) r1;
- fooi_(&i__1);
-// FFEINTRIN_imp_REAL_C //
- r__1 = c1.r;
- foor_(&r__1);
-// FFEINTRIN_imp_REAL_D //
- r__1 = (real) d1;
- foor_(&r__1);
-// FFEINTRIN_imp_REAL_I //
- r__1 = (real) i1;
- foor_(&r__1);
-// FFEINTRIN_imp_REAL_R //
- r__1 = r1;
- foor_(&r__1);
-
-// FFEINTRIN_imp_INT_D: //
-
-// FFEINTRIN_specIDINT //
- i__1 = (integer) d1;
- fooi_(&i__1);
-
-// FFEINTRIN_imp_INT_R: //
-
-// FFEINTRIN_specIFIX //
- i__1 = (integer) r1;
- fooi_(&i__1);
-// FFEINTRIN_specINT //
- i__1 = (integer) r1;
- fooi_(&i__1);
-
-// FFEINTRIN_imp_REAL_D: //
-
-// FFEINTRIN_specSNGL //
- r__1 = (real) d1;
- foor_(&r__1);
-
-// FFEINTRIN_imp_REAL_I: //
-
-// FFEINTRIN_specFLOAT //
- r__1 = (real) i1;
- foor_(&r__1);
-// FFEINTRIN_specREAL //
- r__1 = (real) i1;
- foor_(&r__1);
-
-} // MAIN__ //
-
--------- (end output file from f2c)
-
-*/
+ /* See bottom of this file for f2c transforms used to determine
+ many of the above implementations. The info seems to confuse
+ Emacs's C mode indentation, which is why it's been moved to
+ the bottom of this source file. */
}
#endif
@@ -6173,10 +5575,10 @@ typedef doublereal E_f; // real function with -R not specified //
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree
-ffecom_expr_power_integer_ (ffebld left, ffebld right)
+ffecom_expr_power_integer_ (ffebld expr)
{
- tree l = ffecom_expr (left);
- tree r = ffecom_expr (right);
+ tree l = ffecom_expr (ffebld_left (expr));
+ tree r = ffecom_expr (ffebld_right (expr));
tree ltype = TREE_TYPE (l);
tree rtype = TREE_TYPE (r);
tree result = NULL_TREE;
@@ -6202,7 +5604,7 @@ ffecom_expr_power_integer_ (ffebld left, ffebld right)
result = ffecom_tree_divide_ (ltype,
convert (ltype, integer_one_node),
l,
- NULL_TREE, NULL, NULL);
+ NULL_TREE, NULL, NULL, NULL_TREE);
r = ffecom_1 (NEGATE_EXPR,
rtype,
r);
@@ -6221,7 +5623,8 @@ ffecom_expr_power_integer_ (ffebld left, ffebld right)
l = ffecom_tree_divide_ (ltype,
convert (ltype, integer_one_node),
l,
- NULL_TREE, NULL, NULL);
+ NULL_TREE, NULL, NULL,
+ ffebld_nonter_hook (expr));
r = ffecom_1 (NEGATE_EXPR, rtype, r);
assert (TREE_CODE (r) == INTEGER_CST);
@@ -6341,21 +5744,50 @@ ffecom_expr_power_integer_ (ffebld left, ffebld right)
{
tree rtmp;
tree ltmp;
+ tree divide;
tree basetypeof_l_is_int;
tree se;
+ tree t;
basetypeof_l_is_int
= build_int_2 ((TREE_CODE (ltype) == INTEGER_TYPE), 0);
se = expand_start_stmt_expr ();
- ffecom_push_calltemps ();
- rtmp = ffecom_push_tempvar (rtype, FFETARGET_charactersizeNONE, -1,
- TRUE);
- ltmp = ffecom_push_tempvar (ltype, FFETARGET_charactersizeNONE, -1,
- TRUE);
- result = ffecom_push_tempvar (ltype, FFETARGET_charactersizeNONE, -1,
- TRUE);
+ ffecom_start_compstmt ();
+
+#ifndef HAHA
+ rtmp = ffecom_make_tempvar ("power_r", rtype,
+ FFETARGET_charactersizeNONE, -1);
+ ltmp = ffecom_make_tempvar ("power_l", ltype,
+ FFETARGET_charactersizeNONE, -1);
+ result = ffecom_make_tempvar ("power_res", ltype,
+ FFETARGET_charactersizeNONE, -1);
+ if (TREE_CODE (ltype) == COMPLEX_TYPE
+ || TREE_CODE (ltype) == RECORD_TYPE)
+ divide = ffecom_make_tempvar ("power_div", ltype,
+ FFETARGET_charactersizeNONE, -1);
+ else
+ divide = NULL_TREE;
+#else /* HAHA */
+ {
+ tree hook;
+
+ hook = ffebld_nonter_hook (expr);
+ assert (hook);
+ assert (TREE_CODE (hook) == TREE_VEC);
+ assert (TREE_VEC_LENGTH (hook) == 4);
+ rtmp = TREE_VEC_ELT (hook, 0);
+ ltmp = TREE_VEC_ELT (hook, 1);
+ result = TREE_VEC_ELT (hook, 2);
+ divide = TREE_VEC_ELT (hook, 3);
+ if (TREE_CODE (ltype) == COMPLEX_TYPE
+ || TREE_CODE (ltype) == RECORD_TYPE)
+ assert (divide);
+ else
+ assert (! divide);
+ }
+#endif /* HAHA */
expand_expr_stmt (ffecom_modify (void_type_node,
rtmp,
@@ -6372,7 +5804,7 @@ ffecom_expr_power_integer_ (ffebld left, ffebld right)
result,
convert (ltype, integer_one_node)));
expand_start_else ();
- if (!integer_zerop (basetypeof_l_is_int))
+ if (! integer_zerop (basetypeof_l_is_int))
{
expand_start_cond (ffecom_2 (LT_EXPR, integer_type_node,
rtmp,
@@ -6385,7 +5817,8 @@ ffecom_expr_power_integer_ (ffebld left, ffebld right)
(ltype,
convert (ltype, integer_one_node),
ltmp,
- NULL_TREE, NULL, NULL)));
+ NULL_TREE, NULL, NULL,
+ divide)));
expand_start_cond (ffecom_truth_value
(ffecom_2 (TRUTH_ANDIF_EXPR, integer_type_node,
ffecom_2 (LT_EXPR, integer_type_node,
@@ -6429,7 +5862,8 @@ ffecom_expr_power_integer_ (ffebld left, ffebld right)
(ltype,
convert (ltype, integer_one_node),
ltmp,
- NULL_TREE, NULL, NULL)));
+ NULL_TREE, NULL, NULL,
+ divide)));
expand_expr_stmt (ffecom_modify (void_type_node,
rtmp,
ffecom_1 (NEGATE_EXPR, rtype,
@@ -6484,9 +5918,24 @@ ffecom_expr_power_integer_ (ffebld left, ffebld right)
expand_end_cond ();
expand_expr_stmt (result);
- ffecom_pop_calltemps ();
+ t = ffecom_end_compstmt ();
+
result = expand_end_stmt_expr (se);
- TREE_SIDE_EFFECTS (result) = 1;
+
+ /* This code comes from c-parse.in, after its expand_end_stmt_expr. */
+
+ if (TREE_CODE (t) == BLOCK)
+ {
+ /* Make a BIND_EXPR for the BLOCK already made. */
+ result = build (BIND_EXPR, TREE_TYPE (result),
+ NULL_TREE, result, t);
+ /* Remove the block from the tree at this point.
+ It gets put back at the proper place
+ when the BIND_EXPR is expanded. */
+ delete_block (t);
+ }
+ else
+ result = t;
}
return result;
@@ -6560,7 +6009,7 @@ tail_recurse: /* :::::::::::::::::::: */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static void
-ffecom_f2c_make_type_ (tree *type, int tcode, char *name)
+ffecom_f2c_make_type_ (tree *type, int tcode, const char *name)
{
switch (tcode)
{
@@ -6624,7 +6073,7 @@ ffecom_f2c_make_type_ (tree *type, int tcode, char *name)
pushdecl (build_decl (TYPE_DECL,
ffecom_get_invented_identifier ("__g77_f2c_%s",
- name, 0),
+ name, -1),
*type));
}
@@ -6760,7 +6209,7 @@ ffecom_finish_symbol_transform_ (ffesymbol s)
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree
-ffecom_get_appended_identifier_ (char us, char *name)
+ffecom_get_appended_identifier_ (char us, const char *name)
{
int i;
char *newname;
@@ -6789,7 +6238,7 @@ static tree
ffecom_get_external_identifier_ (ffesymbol s)
{
char us;
- char *name = ffesymbol_text (s);
+ const char *name = ffesymbol_text (s);
/* If name is a built-in name, just return it as is. */
@@ -6828,7 +6277,7 @@ ffecom_get_external_identifier_ (ffesymbol s)
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree
-ffecom_get_identifier_ (char *name)
+ffecom_get_identifier_ (const char *name)
{
/* If name does not contain an underscore, just return it as is. */
@@ -6894,8 +6343,6 @@ ffecom_gen_sfuncdef_ (ffesymbol s, ffeinfoBasictype bt, ffeinfoKindtype kt)
push_f_function_context ();
- ffecom_push_calltemps ();
-
if (charfunc)
type = void_type_node;
else
@@ -6924,7 +6371,7 @@ ffecom_gen_sfuncdef_ (ffesymbol s, ffeinfoBasictype bt, ffeinfoKindtype kt)
type = ffecom_tree_type[FFEINFO_basictypeCHARACTER][kt];
result = ffecom_get_invented_identifier ("__g77_%s",
- "result", 0);
+ "result", -1);
ffecom_char_enhance_arg_ (&type, s); /* Ignore returned length. */
@@ -6942,7 +6389,7 @@ ffecom_gen_sfuncdef_ (ffesymbol s, ffeinfoBasictype bt, ffeinfoKindtype kt)
store_parm_decls (0);
- ffecom_start_compstmt_ ();
+ ffecom_start_compstmt ();
if (expr != NULL)
{
@@ -6954,24 +6401,32 @@ ffecom_gen_sfuncdef_ (ffesymbol s, ffeinfoBasictype bt, ffeinfoKindtype kt)
result_length = build_int_2 (sz, 0);
TREE_TYPE (result_length) = ffecom_f2c_ftnlen_type_node;
+ ffecom_prepare_let_char_ (sz, expr);
+
+ ffecom_prepare_end ();
+
ffecom_let_char_ (result, result_length, sz, expr);
expand_null_return ();
}
else
- expand_return (ffecom_modify (NULL_TREE,
- DECL_RESULT (current_function_decl),
- ffecom_expr (expr)));
+ {
+ ffecom_prepare_expr (expr);
+
+ ffecom_prepare_end ();
+
+ expand_return (ffecom_modify (NULL_TREE,
+ DECL_RESULT (current_function_decl),
+ ffecom_expr (expr)));
+ }
clear_momentary ();
}
- ffecom_end_compstmt_ ();
+ ffecom_end_compstmt ();
func = current_function_decl;
finish_function (1);
- ffecom_pop_calltemps ();
-
pop_f_function_context ();
resume_momentary (yes);
@@ -6989,7 +6444,7 @@ ffecom_gen_sfuncdef_ (ffesymbol s, ffeinfoBasictype bt, ffeinfoKindtype kt)
#endif
#if FFECOM_targetCURRENT == FFECOM_targetGCC
-static char *
+static const char *
ffecom_gfrt_args_ (ffecomGfrt ix)
{
return ffecom_gfrt_argstring_[ix];
@@ -7095,9 +6550,7 @@ ffecom_intrinsic_ichar_ (tree tree_type, ffebld arg,
case FFEBLD_opARRAYREF:
case FFEBLD_opFUNCREF:
case FFEBLD_opSUBSTR:
- ffecom_push_calltemps ();
ffecom_char_args_ (&expr_tree, &length_tree, arg);
- ffecom_pop_calltemps ();
if ((expr_tree == error_mark_node)
|| (length_tree == error_mark_node))
@@ -7323,13 +6776,7 @@ ffecom_intrinsic_len_ (ffebld expr)
}
#endif
-/* ffecom_let_char_ -- Do assignment stuff for character type
-
- tree dest_tree; // destination (ADDR_EXPR)
- tree dest_length; // length (INT_CST/INDIRECT_REF(PARM_DECL))
- ffetargetCharacterSize dest_size; // length
- ffebld source; // source expression
- ffecom_let_char_(dest_tree,dest_length,dest_size,source);
+/* Handle CHARACTER assignments.
Generates code to do the assignment. Used by ordinary assignment
statement handler ffecom_let_stmt and by statement-function
@@ -7376,7 +6823,7 @@ ffecom_let_char_ (tree dest_tree, tree dest_length,
TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (expr_tree)))
= build_tree_list (NULL_TREE, source_length);
- expr_tree = ffecom_call_gfrt (FFECOM_gfrtCOPY, expr_tree);
+ expr_tree = ffecom_call_gfrt (FFECOM_gfrtCOPY, expr_tree, NULL_TREE);
TREE_SIDE_EFFECTS (expr_tree) = 1;
expand_expr_stmt (expr_tree);
@@ -7433,7 +6880,7 @@ ffecom_let_char_ (tree dest_tree, tree dest_length,
TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (expr_tree)))
= build_tree_list (NULL_TREE, source_length);
- expr_tree = ffecom_call_gfrt (FFECOM_gfrtCOPY, expr_tree);
+ expr_tree = ffecom_call_gfrt (FFECOM_gfrtCOPY, expr_tree, NULL_TREE);
TREE_SIDE_EFFECTS (expr_tree) = 1;
expand_expr_stmt (expr_tree);
@@ -7456,6 +6903,7 @@ ffecom_let_char_ (tree dest_tree, tree dest_length,
tree citem;
tree clength;
+#ifdef HOHO
length_array
= lengths
= ffecom_push_tempvar (ffecom_f2c_ftnlen_type_node,
@@ -7463,6 +6911,18 @@ ffecom_let_char_ (tree dest_tree, tree dest_length,
item_array = items = ffecom_push_tempvar (ffecom_f2c_address_type_node,
FFETARGET_charactersizeNONE,
count, TRUE);
+#else
+ {
+ tree hook;
+
+ hook = ffebld_nonter_hook (source);
+ assert (hook);
+ assert (TREE_CODE (hook) == TREE_VEC);
+ assert (TREE_VEC_LENGTH (hook) == 2);
+ length_array = lengths = TREE_VEC_ELT (hook, 0);
+ item_array = items = TREE_VEC_ELT (hook, 1);
+ }
+#endif
for (i = 0; i < count; ++i)
{
@@ -7515,7 +6975,7 @@ ffecom_let_char_ (tree dest_tree, tree dest_length,
TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (expr_tree))))
= build_tree_list (NULL_TREE, dest_length);
- expr_tree = ffecom_call_gfrt (FFECOM_gfrtCAT, expr_tree);
+ expr_tree = ffecom_call_gfrt (FFECOM_gfrtCAT, expr_tree, NULL_TREE);
TREE_SIDE_EFFECTS (expr_tree) = 1;
expand_expr_stmt (expr_tree);
@@ -7694,6 +7154,51 @@ ffecom_member_phase2_ (ffestorag mst, ffestorag st)
#endif
#endif
+/* Prepare source expression for assignment into a destination perhaps known
+ to be of a specific size. */
+
+static void
+ffecom_prepare_let_char_ (ffetargetCharacterSize dest_size, ffebld source)
+{
+ ffecomConcatList_ catlist;
+ int count;
+ int i;
+ tree ltmp;
+ tree itmp;
+ tree tempvar = NULL_TREE;
+
+ while (ffebld_op (source) == FFEBLD_opCONVERT)
+ source = ffebld_left (source);
+
+ catlist = ffecom_concat_list_new_ (source, dest_size);
+ count = ffecom_concat_list_count_ (catlist);
+
+ if (count >= 2)
+ {
+ ltmp
+ = ffecom_make_tempvar ("let_char_len", ffecom_f2c_ftnlen_type_node,
+ FFETARGET_charactersizeNONE, count);
+ itmp
+ = ffecom_make_tempvar ("let_char_item", ffecom_f2c_address_type_node,
+ FFETARGET_charactersizeNONE, count);
+
+ tempvar = make_tree_vec (2);
+ TREE_VEC_ELT (tempvar, 0) = ltmp;
+ TREE_VEC_ELT (tempvar, 1) = itmp;
+ }
+
+ for (i = 0; i < count; ++i)
+ ffecom_prepare_arg_ptr_to_expr (ffecom_concat_list_expr_ (catlist, i));
+
+ ffecom_concat_list_kill_ (catlist);
+
+ if (tempvar)
+ {
+ ffebld_nonter_set_hook (source, tempvar);
+ current_binding_level->prep_state = 1;
+ }
+}
+
/* ffecom_push_dummy_decls_ -- Transform dummy args, push parm decls in order
Ignores STAR (alternate-return) dummies. All other get exec-transitioned
@@ -7910,7 +7415,7 @@ ffecom_start_progunit_ ()
{
id = ffecom_get_invented_identifier ("__g77_masterfun_%s",
ffesymbol_text (fn),
- 0);
+ -1);
}
#if FFETARGET_isENFORCED_MAIN
else if (main_program)
@@ -7946,7 +7451,7 @@ ffecom_start_progunit_ ()
= build_decl (PARM_DECL,
ffecom_get_invented_identifier ("__g77_%s",
"which_entrypoint",
- 0),
+ -1),
integer_type_node);
push_parm_decl (ffecom_which_entrypoint_decl_);
}
@@ -7966,7 +7471,7 @@ ffecom_start_progunit_ ()
type = ffecom_multi_type_node_;
result = ffecom_get_invented_identifier ("__g77_%s",
- "result", 0);
+ "result", -1);
/* Make length arg _and_ enhance type info for CHAR arg itself. */
@@ -8005,7 +7510,9 @@ ffecom_start_progunit_ ()
if (TREE_CODE (current_function_decl) != ERROR_MARK)
store_parm_decls (main_program ? 1 : 0);
- ffecom_start_compstmt_ ();
+ ffecom_start_compstmt ();
+ /* Disallow temp vars at this level. */
+ current_binding_level->prep_state = 2;
lineno = old_lineno;
input_filename = old_input_filename;
@@ -8042,6 +7549,20 @@ ffecom_sym_transform_ (ffesymbol s)
int old_lineno = lineno;
char *old_input_filename = input_filename;
+ /* Must ensure special ASSIGN variables are declared at top of outermost
+ block, else they'll end up in the innermost block when their first
+ ASSIGN is seen, which leaves them out of scope when they're the
+ subject of a GOTO or I/O statement.
+
+ We make this variable even if -fugly-assign. Just let it go unused,
+ in case it turns out there are cases where we really want to use this
+ variable anyway (e.g. ASSIGN to INTEGER*2 variable). */
+
+ if (! ffecom_transform_only_dummies_
+ && ffesymbol_assigned (s)
+ && ! ffesymbol_hook (s).assign_tree)
+ s = ffecom_sym_transform_assign_ (s);
+
if (ffesymbol_sfdummyparent (s) == NULL)
{
input_filename = ffesymbol_where_filename (s);
@@ -8134,7 +7655,8 @@ ffecom_sym_transform_ (ffesymbol s)
switch (ffeinfo_where (ffesymbol_info (s)))
{
- case FFEINFO_whereCONSTANT: /* ~~debugging info needed? */
+ case FFEINFO_whereCONSTANT:
+ /* ~~Debugging info needed? */
assert (!ffecom_transform_only_dummies_);
t = error_mark_node; /* Shouldn't ever see this in expr. */
break;
@@ -8199,6 +7721,7 @@ ffecom_sym_transform_ (ffesymbol s)
build_int_2 (offset, 0));
t = convert (build_pointer_type (type),
t);
+ TREE_CONSTANT (t) = staticp (et);
addr = TRUE;
@@ -8537,13 +8060,13 @@ ffecom_sym_transform_ (ffesymbol s)
ffecom_integer_zero_node);
#endif
- /* ~~~gcc/stor-layout.c/layout_type should do this,
+ /* ~~~gcc/stor-layout.c (layout_type) should do this,
probably. Fixes 950302-1.f. */
if (TREE_CODE (low) != INTEGER_CST)
low = variable_size (low);
- /* ~~~similarly, this fixes dumb0.f. The C front end
+ /* ~~~Similarly, this fixes dumb0.f. The C front end
does this, which is why dumb0.c would work. */
if (high && TREE_CODE (high) != INTEGER_CST)
@@ -8715,6 +8238,7 @@ ffecom_sym_transform_ (ffesymbol s)
build_int_2 (offset, 0));
t = convert (build_pointer_type (type),
t);
+ TREE_CONSTANT (t) = 1;
addr = TRUE;
}
@@ -9112,7 +8636,7 @@ ffecom_sym_transform_assign_ (ffesymbol s)
t = build_decl (VAR_DECL,
ffecom_get_invented_identifier ("__g77_ASSIGN_%s",
ffesymbol_text (s),
- 0),
+ -1),
TREE_TYPE (null_pointer_node));
switch (ffesymbol_where (s))
@@ -9432,7 +8956,7 @@ ffecom_transform_equiv_ (ffestorag eqst)
ffesymbol_text
(ffestorag_symbol
(eqst)),
- 0),
+ -1),
eqtype);
DECL_EXTERNAL (eqt) = 0;
if (is_init
@@ -9837,7 +9361,8 @@ ffecom_tree_canonize_ref_ (tree *decl, tree *offset,
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree
ffecom_tree_divide_ (tree tree_type, tree left, tree right,
- tree dest_tree, ffebld dest, bool *dest_used)
+ tree dest_tree, ffebld dest, bool *dest_used,
+ tree hook)
{
if ((left == error_mark_node)
|| (right == error_mark_node))
@@ -9851,6 +9376,10 @@ ffecom_tree_divide_ (tree tree_type, tree left, tree right,
right);
case COMPLEX_TYPE:
+ if (! optimize_size)
+ return ffecom_2 (RDIV_EXPR, tree_type,
+ left,
+ right);
{
ffecomGfrt ix;
@@ -9876,7 +9405,7 @@ ffecom_tree_divide_ (tree tree_type, tree left, tree right,
tree_type,
left,
dest_tree, dest, dest_used,
- NULL_TREE, TRUE);
+ NULL_TREE, TRUE, hook);
}
break;
@@ -9906,7 +9435,7 @@ ffecom_tree_divide_ (tree tree_type, tree left, tree right,
tree_type,
left,
dest_tree, dest, dest_used,
- NULL_TREE, TRUE);
+ NULL_TREE, TRUE, hook);
}
break;
@@ -9918,16 +9447,7 @@ ffecom_tree_divide_ (tree tree_type, tree left, tree right,
}
#endif
-/* ffecom_type_localvar_ -- Build type info for non-dummy variable
-
- tree type;
- ffesymbol s; // the variable's symbol
- ffeinfoBasictype bt; // it's basictype
- ffeinfoKindtype kt; // it's kindtype
-
- type = ffecom_type_localvar_(s,bt,kt);
-
- Handles static arrays, CHARACTER type, etc. */
+/* Build type info for non-dummy variable. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree
@@ -10890,6 +10410,7 @@ ffecom_3s (enum tree_code code, tree type, tree node1,
}
#endif
+
/* ffecom_arg_expr -- Transform argument expr into gcc tree
See use by ffecom_list_expr.
@@ -10925,6 +10446,51 @@ ffecom_arg_expr (ffebld expr, tree *length)
}
#endif
+/* Transform expression into constant argument-pointer-to-expression tree.
+
+ If the expression can be transformed into a argument-pointer-to-expression
+ tree that is constant, that is done, and the tree returned. Else
+ NULL_TREE is returned.
+
+ That way, a caller can attempt to provide compile-time initialization
+ of a variable and, if that fails, *then* choose to start a new block
+ and resort to using temporaries, as appropriate. */
+
+tree
+ffecom_arg_ptr_to_const_expr (ffebld expr, tree *length)
+{
+ if (! expr)
+ return integer_zero_node;
+
+ if (ffebld_op (expr) == FFEBLD_opANY)
+ {
+ if (length)
+ *length = error_mark_node;
+ return error_mark_node;
+ }
+
+ if (ffebld_arity (expr) == 0
+ && (ffebld_op (expr) != FFEBLD_opSYMTER
+ || ffebld_where (expr) == FFEINFO_whereCOMMON
+ || ffebld_where (expr) == FFEINFO_whereGLOBAL
+ || ffebld_where (expr) == FFEINFO_whereINTRINSIC))
+ {
+ tree t;
+
+ t = ffecom_arg_ptr_to_expr (expr, length);
+ assert (TREE_CONSTANT (t));
+ assert (! length || TREE_CONSTANT (*length));
+ return t;
+ }
+
+ if (length
+ && ffebld_size (expr) != FFETARGET_charactersizeNONE)
+ *length = build_int_2 (ffebld_size (expr), 0);
+ else if (length)
+ *length = NULL_TREE;
+ return NULL_TREE;
+}
+
/* ffecom_arg_ptr_to_expr -- Transform argument expr into gcc tree
See use by ffecom_list_ptr_to_expr.
@@ -10972,6 +10538,9 @@ ffecom_arg_ptr_to_expr (ffebld expr, tree *length)
tree temp_length;
temp_exp = ffecom_arg_ptr_to_expr (ffebld_left (expr), &temp_length);
+ if (temp_exp == error_mark_node)
+ return error_mark_node;
+
return ffecom_1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (temp_exp)),
temp_exp);
}
@@ -11029,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))
{
@@ -11070,6 +10642,11 @@ ffecom_arg_ptr_to_expr (ffebld expr, tree *length)
tree known_length;
ffetargetCharacterSize sz;
+ sz = ffecom_concat_list_maxlen_ (catlist);
+ /* ~~Kludge! */
+ assert (sz != FFETARGET_charactersizeNONE);
+
+#ifdef HOHO
length_array
= lengths
= ffecom_push_tempvar (ffecom_f2c_ftnlen_type_node,
@@ -11078,6 +10655,21 @@ ffecom_arg_ptr_to_expr (ffebld expr, tree *length)
= items
= ffecom_push_tempvar (ffecom_f2c_address_type_node,
FFETARGET_charactersizeNONE, count, TRUE);
+ temporary = ffecom_push_tempvar (char_type_node,
+ sz, -1, TRUE);
+#else
+ {
+ tree hook;
+
+ hook = ffebld_nonter_hook (expr);
+ assert (hook);
+ assert (TREE_CODE (hook) == TREE_VEC);
+ assert (TREE_VEC_LENGTH (hook) == 3);
+ length_array = lengths = TREE_VEC_ELT (hook, 0);
+ item_array = items = TREE_VEC_ELT (hook, 1);
+ temporary = TREE_VEC_ELT (hook, 2);
+ }
+#endif
known_length = ffecom_f2c_ftnlen_zero_node;
@@ -11124,11 +10716,6 @@ ffecom_arg_ptr_to_expr (ffebld expr, tree *length)
lengths);
}
- sz = ffecom_concat_list_maxlen_ (catlist);
- assert (sz != FFETARGET_charactersizeNONE);
-
- temporary = ffecom_push_tempvar (char_type_node,
- sz, -1, TRUE);
temporary = ffecom_1 (ADDR_EXPR,
build_pointer_type (TREE_TYPE (temporary)),
temporary);
@@ -11155,7 +10742,7 @@ ffecom_arg_ptr_to_expr (ffebld expr, tree *length)
TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (item))))
= build_tree_list (NULL_TREE, num);
- item = ffecom_call_gfrt (FFECOM_gfrtCAT, item);
+ item = ffecom_call_gfrt (FFECOM_gfrtCAT, item, NULL_TREE);
TREE_SIDE_EFFECTS (item) = 1;
item = ffecom_2 (COMPOUND_EXPR, TREE_TYPE (temporary),
item,
@@ -11171,10 +10758,7 @@ ffecom_arg_ptr_to_expr (ffebld expr, tree *length)
}
#endif
-/* ffecom_call_gfrt -- Generate call to run-time function
-
- tree expr;
- expr = ffecom_call_gfrt(FFECOM_gfrtSTOPNIL,NULL_TREE);
+/* Generate call to run-time function.
The first arg is the GNU Fortran Run-Time function index, the second
arg is the list of arguments to pass to it. Returned is the expression
@@ -11183,23 +10767,17 @@ ffecom_arg_ptr_to_expr (ffebld expr, tree *length)
#if FFECOM_targetCURRENT == FFECOM_targetGCC
tree
-ffecom_call_gfrt (ffecomGfrt ix, tree args)
+ffecom_call_gfrt (ffecomGfrt ix, tree args, tree hook)
{
return ffecom_call_ (ffecom_gfrt_tree_ (ix),
ffecom_gfrt_kindtype (ix),
ffe_is_f2c_library () && ffecom_gfrt_complex_[ix],
NULL_TREE, args, NULL_TREE, NULL,
- NULL, NULL_TREE, TRUE);
+ NULL, NULL_TREE, TRUE, hook);
}
#endif
-/* ffecom_constantunion -- Transform constant-union to tree
-
- ffebldConstantUnion cu; // the constant to transform
- ffeinfoBasictype bt; // its basic type
- ffeinfoKindtype kt; // its kind type
- tree tree_type; // ffecom_tree_type[bt][kt]
- ffecom_constantunion(&cu,bt,kt,tree_type); */
+/* Transform constant-union to tree. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
tree
@@ -11471,12 +11049,49 @@ ffecom_constantunion (ffebldConstantUnion *cu, ffeinfoBasictype bt,
#endif
+/* Transform expression into constant tree.
+
+ If the expression can be transformed into a tree that is constant,
+ that is done, and the tree returned. Else NULL_TREE is returned.
+
+ That way, a caller can attempt to provide compile-time initialization
+ of a variable and, if that fails, *then* choose to start a new block
+ and resort to using temporaries, as appropriate. */
+
+tree
+ffecom_const_expr (ffebld expr)
+{
+ if (! expr)
+ return integer_zero_node;
+
+ if (ffebld_op (expr) == FFEBLD_opANY)
+ return error_mark_node;
+
+ if (ffebld_arity (expr) == 0
+ && (ffebld_op (expr) != FFEBLD_opSYMTER
+#if NEWCOMMON
+ /* ~~Enable once common/equivalence is handled properly? */
+ || ffebld_where (expr) == FFEINFO_whereCOMMON
+#endif
+ || ffebld_where (expr) == FFEINFO_whereGLOBAL
+ || ffebld_where (expr) == FFEINFO_whereINTRINSIC))
+ {
+ tree t;
+
+ t = ffecom_expr (expr);
+ assert (TREE_CONSTANT (t));
+ return t;
+ }
+
+ return NULL_TREE;
+}
+
/* Handy way to make a field in a struct/union. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
tree
ffecom_decl_field (tree context, tree prevfield,
- char *name, tree type)
+ const char *name, tree type)
{
tree field;
@@ -11509,6 +11124,16 @@ ffecom_decode_include_option (char *spec)
#endif
}
+/* End a compound statement (block). */
+
+#if FFECOM_targetCURRENT == FFECOM_targetGCC
+tree
+ffecom_end_compstmt (void)
+{
+ return bison_rule_compstmt_ ();
+}
+#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
+
/* ffecom_end_transition -- Perform end transition on all symbols
ffecom_end_transition();
@@ -11630,11 +11255,7 @@ ffecom_exec_transition ()
ffebad_set_inhibit (TRUE);
}
-/* ffecom_expand_let_stmt -- Compile let (assignment) statement
-
- ffebld dest;
- ffebld source;
- ffecom_expand_let_stmt(dest,source);
+/* Handle assignment statement.
Convert dest and source using ffecom_expr, then join them
with an ASSIGN op and pass the whole thing to expand_expr_stmt. */
@@ -11651,8 +11272,46 @@ ffecom_expand_let_stmt (ffebld dest, ffebld source)
if (ffeinfo_basictype (ffebld_info (dest)) != FFEINFO_basictypeCHARACTER)
{
bool dest_used;
+ tree assign_temp;
+
+ /* This attempts to replicate the test below, but must not be
+ true when the test below is false. (Always err on the side
+ of creating unused temporaries, to avoid ICEs.) */
+ if (ffebld_op (dest) != FFEBLD_opSYMTER
+ || ((dest_tree = ffesymbol_hook (ffebld_symter (dest)).decl_tree)
+ && (TREE_CODE (dest_tree) != VAR_DECL
+ || TREE_ADDRESSABLE (dest_tree))))
+ {
+ ffecom_prepare_expr_ (source, dest);
+ dest_used = TRUE;
+ }
+ else
+ {
+ ffecom_prepare_expr_ (source, NULL);
+ dest_used = FALSE;
+ }
+
+ ffecom_prepare_expr_w (NULL_TREE, dest);
+
+ /* For COMPLEX assignment like C1=C2, if partial overlap is possible,
+ create a temporary through which the assignment is to take place,
+ since MODIFY_EXPR doesn't handle partial overlap properly. */
+ if (ffebld_basictype (dest) == FFEINFO_basictypeCOMPLEX
+ && ffecom_possible_partial_overlap_ (dest, source))
+ {
+ assign_temp = ffecom_make_tempvar ("complex_let",
+ ffecom_tree_type
+ [ffebld_basictype (dest)]
+ [ffebld_kindtype (dest)],
+ FFETARGET_charactersizeNONE,
+ -1);
+ }
+ else
+ assign_temp = NULL_TREE;
- dest_tree = ffecom_expr_rw (dest);
+ ffecom_prepare_end ();
+
+ dest_tree = ffecom_expr_w (NULL_TREE, dest);
if (dest_tree == error_mark_node)
return;
@@ -11662,14 +11321,36 @@ ffecom_expand_let_stmt (ffebld dest, ffebld source)
FALSE, FALSE);
else
{
- source_tree = ffecom_expr (source);
+ assert (! dest_used);
dest_used = FALSE;
+ source_tree = ffecom_expr (source);
}
if (source_tree == error_mark_node)
return;
if (dest_used)
expr_tree = source_tree;
+ else if (assign_temp)
+ {
+#ifdef MOVE_EXPR
+ /* The back end understands a conceptual move (evaluate source;
+ store into dest), so use that, in case it can determine
+ that it is going to use, say, two registers as temporaries
+ anyway. So don't use the temp (and someday avoid generating
+ it, once this code starts triggering regularly). */
+ expr_tree = ffecom_2s (MOVE_EXPR, void_type_node,
+ dest_tree,
+ source_tree);
+#else
+ expr_tree = ffecom_2s (MODIFY_EXPR, void_type_node,
+ assign_temp,
+ source_tree);
+ expand_expr_stmt (expr_tree);
+ expr_tree = ffecom_2s (MODIFY_EXPR, void_type_node,
+ dest_tree,
+ assign_temp);
+#endif
+ }
else
expr_tree = ffecom_2s (MODIFY_EXPR, void_type_node,
dest_tree,
@@ -11679,11 +11360,14 @@ ffecom_expand_let_stmt (ffebld dest, ffebld source)
return;
}
- ffecom_push_calltemps ();
+ ffecom_prepare_let_char_ (ffebld_size_known (dest), source);
+ ffecom_prepare_expr_w (NULL_TREE, dest);
+
+ ffecom_prepare_end ();
+
ffecom_char_args_ (&dest_tree, &dest_length, dest);
ffecom_let_char_ (dest_tree, dest_length, ffebld_size_known (dest),
source);
- ffecom_pop_calltemps ();
}
#endif
@@ -11732,9 +11416,29 @@ ffecom_expr_assign_w (ffebld expr)
#if FFECOM_targetCURRENT == FFECOM_targetGCC
tree
-ffecom_expr_rw (ffebld expr)
+ffecom_expr_rw (tree type, ffebld expr)
+{
+ assert (expr != NULL);
+ /* Different target types not yet supported. */
+ assert (type == NULL_TREE || type == ffecom_type_expr (expr));
+
+ return stabilize_reference (ffecom_expr (expr));
+}
+
+#endif
+/* Transform expr for use as into write tree and stabilize the
+ reference. Not for use on CHARACTER expressions.
+
+ Recursive descent on expr while making corresponding tree nodes and
+ attaching type info and such. */
+
+#if FFECOM_targetCURRENT == FFECOM_targetGCC
+tree
+ffecom_expr_w (tree type, ffebld expr)
{
assert (expr != NULL);
+ /* Different target types not yet supported. */
+ assert (type == NULL_TREE || type == ffecom_type_expr (expr));
return stabilize_reference (ffecom_expr (expr));
}
@@ -11770,7 +11474,7 @@ ffecom_finish_decl (tree decl, tree init, bool is_top_level)
void
ffecom_finish_progunit ()
{
- ffecom_end_compstmt_ ();
+ ffecom_end_compstmt ();
ffecom_previous_function_decl_ = current_function_decl;
ffecom_which_entrypoint_decl_ = NULL_TREE;
@@ -11779,33 +11483,54 @@ ffecom_finish_progunit ()
}
#endif
-/* Wrapper for get_identifier. pattern is like "...%s...", text is
- inserted into final name in place of "%s", or if text is NULL,
- pattern is like "...%d..." and text form of number is inserted
- in place of "%d". */
+/* Wrapper for get_identifier. pattern is sprintf-like, assumed to contain
+ one %s if text is not NULL, assumed to contain one %d if number is
+ not -1. If both are assumed, the %s is assumed to precede the %d. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
tree
-ffecom_get_invented_identifier (char *pattern, char *text, int number)
+ffecom_get_invented_identifier (const char *pattern, const char *text,
+ int number)
{
tree decl;
char *nam;
mallocSize lenlen;
char space[66];
- if (text == NULL)
- lenlen = strlen (pattern) + 20;
- else
- lenlen = strlen (pattern) + strlen (text) - 1;
- if (lenlen > ARRAY_SIZE (space))
- nam = malloc_new_ks (malloc_pool_image (), pattern, lenlen);
+ lenlen = 0;
+ if (text)
+ lenlen += strlen (text);
+ if (number != -1)
+ lenlen += 20;
+ if (text || number != -1)
+ {
+ lenlen += strlen (pattern);
+ if (lenlen > ARRAY_SIZE (space))
+ nam = malloc_new_ks (malloc_pool_image (), pattern, lenlen);
+ else
+ nam = &space[0];
+ }
else
- nam = &space[0];
+ {
+ lenlen = 0;
+ nam = (char *) pattern;
+ }
+
if (text == NULL)
- sprintf (&nam[0], pattern, number);
+ {
+ if (number != -1)
+ sprintf (&nam[0], pattern, number);
+ }
else
- sprintf (&nam[0], pattern, text);
+ {
+ if (number == -1)
+ sprintf (&nam[0], pattern, text);
+ else
+ sprintf (&nam[0], pattern, text, number);
+ }
+
decl = get_identifier (nam);
+
if (lenlen > ARRAY_SIZE (space))
malloc_kill_ks (malloc_pool_image (), nam, lenlen);
@@ -11958,12 +11683,6 @@ ffecom_init_0 ()
}
}
- /* Set the sizetype before we do anything else. This _should_ be the
- first type we create. */
-
- t = make_unsigned_type (POINTER_SIZE);
- assert (t == sizetype);
-
#if FFECOM_GCC_INCLUDE
ffecom_initialize_char_syntax_ ();
#endif
@@ -11973,9 +11692,10 @@ ffecom_init_0 ()
named_labels = NULL_TREE;
current_binding_level = NULL_BINDING_LEVEL;
free_binding_level = NULL_BINDING_LEVEL;
- pushlevel (0); /* make the binding_level structure for
- global names */
+ /* Make the binding_level structure for global names. */
+ pushlevel (0);
global_binding_level = current_binding_level;
+ current_binding_level->prep_state = 2;
/* Define `int' and `char' first so that dbx will output them first. */
@@ -12007,9 +11727,6 @@ ffecom_init_0 ()
pushdecl (build_decl (TYPE_DECL, get_identifier ("long long unsigned int"),
long_long_unsigned_type_node));
- error_mark_node = make_node (ERROR_MARK);
- TREE_TYPE (error_mark_node) = error_mark_node;
-
short_integer_type_node = make_signed_type (SHORT_TYPE_SIZE);
pushdecl (build_decl (TYPE_DECL, get_identifier ("short int"),
short_integer_type_node));
@@ -12018,6 +11735,17 @@ ffecom_init_0 ()
pushdecl (build_decl (TYPE_DECL, get_identifier ("short unsigned int"),
short_unsigned_type_node));
+ /* Set the sizetype before we make other types. This *should* be the
+ first type we create. */
+
+ set_sizetype
+ (TREE_TYPE (IDENTIFIER_GLOBAL_VALUE (get_identifier (SIZE_TYPE))));
+ ffecom_typesize_pointer_
+ = TREE_INT_CST_LOW (TYPE_SIZE (sizetype)) / BITS_PER_UNIT;
+
+ error_mark_node = make_node (ERROR_MARK);
+ TREE_TYPE (error_mark_node) = error_mark_node;
+
/* Define both `signed char' and `unsigned char'. */
signed_char_type_node = make_signed_type (CHAR_TYPE_SIZE);
pushdecl (build_decl (TYPE_DECL, get_identifier ("signed char"),
@@ -12136,6 +11864,7 @@ ffecom_init_0 ()
TREE_INT_CST_LOW (TYPE_SIZE (t)) / CHAR_TYPE_SIZE,
type);
ffetype_set_kind (base_type, 1, type);
+ ffecom_typesize_integer1_ = ffetype_size (type);
assert (ffetype_size (type) == sizeof (ffetargetInteger1));
ffecom_tree_type[FFEINFO_basictypeHOLLERITH][FFEINFO_kindtypeINTEGER1]
@@ -12448,8 +12177,9 @@ ffecom_init_0 ()
FFETARGET_f2cTYLOGICAL2);
ffecom_f2c_set_lio_code_ (FFEINFO_basictypeLOGICAL, CHAR_TYPE_SIZE,
FFETARGET_f2cTYLOGICAL1);
+ /* ~~~Not really such a type in libf2c, e.g. I/O support? */
ffecom_f2c_set_lio_code_ (FFEINFO_basictypeLOGICAL, LONG_LONG_TYPE_SIZE,
- FFETARGET_f2cTYQUAD /* ~~~ */);
+ FFETARGET_f2cTYQUAD);
/* CHARACTER stuff is all special-cased, so it is not handled in the above
loop. CHARACTER items are built as arrays of unsigned char. */
@@ -12670,7 +12400,6 @@ ffecom_init_2 ()
ffecom_master_arglist_ = NULL;
++ffecom_num_fns_;
- ffecom_latest_temp_ = NULL;
ffecom_primary_entry_ = NULL;
ffecom_is_altreturning_ = FALSE;
ffecom_func_result_ = NULL_TREE;
@@ -12698,9 +12427,12 @@ ffecom_list_expr (ffebld expr)
while (expr != NULL)
{
- *plist
- = build_tree_list (NULL_TREE, ffecom_arg_expr (ffebld_head (expr),
- &length));
+ tree texpr = ffecom_arg_expr (ffebld_head (expr), &length);
+
+ if (texpr == error_mark_node)
+ return error_mark_node;
+
+ *plist = build_tree_list (NULL_TREE, texpr);
plist = &TREE_CHAIN (*plist);
expr = ffebld_trail (expr);
if (length != NULL_TREE)
@@ -12737,10 +12469,12 @@ ffecom_list_ptr_to_expr (ffebld expr)
while (expr != NULL)
{
- *plist
- = build_tree_list (NULL_TREE,
- ffecom_arg_ptr_to_expr (ffebld_head (expr),
- &length));
+ tree texpr = ffecom_arg_ptr_to_expr (ffebld_head (expr), &length);
+
+ if (texpr == error_mark_node)
+ return error_mark_node;
+
+ *plist = build_tree_list (NULL_TREE, texpr);
plist = &TREE_CHAIN (*plist);
expr = ffebld_trail (expr);
if (length != NULL_TREE)
@@ -13089,65 +12823,6 @@ ffecom_open_include (char *name, ffewhereLine l, ffewhereColumn c)
#endif
}
-/* Clean up after making automatically popped call-arg temps.
-
- Call this in pairs with push_calltemps around calls to
- ffecom_arg_ptr_to_expr if the latter might use temporaries.
- Any temporaries made within the outermost sequence of
- push_calltemps and pop_calltemps, that are marked as "auto-pop"
- meaning they won't be explicitly popped (freed), are popped
- at this point so they can be reused later.
-
- NOTE: when called by ffecom_gen_sfuncdef_, ffecom_pending_calls_
- should come in == 1, and all of the in-use auto-pop temps
- should have DECL_CONTEXT (temp->t) == current_function_decl.
- Moreover, these temps should _never_ be re-used in future
- calls to ffecom_push_tempvar -- since current_function_decl will
- never be the same again.
-
- SO, it could be a minor win in terms of compile time to just
- strip these temps off the list. That is, if the above assumptions
- are correct, just remove from the list of temps any temp
- that is both in-use and has DECL_CONTEXT (temp->t)
- == current_function_decl, when called from ffecom_gen_sfuncdef_. */
-
-#if FFECOM_targetCURRENT == FFECOM_targetGCC
-void
-ffecom_pop_calltemps ()
-{
- ffecomTemp_ temp;
-
- assert (ffecom_pending_calls_ > 0);
-
- if (--ffecom_pending_calls_ == 0)
- for (temp = ffecom_latest_temp_; temp != NULL; temp = temp->next)
- if (temp->auto_pop)
- temp->in_use = FALSE;
-}
-
-#endif
-/* Mark latest temp with given tree as no longer in use. */
-
-#if FFECOM_targetCURRENT == FFECOM_targetGCC
-void
-ffecom_pop_tempvar (tree t)
-{
- ffecomTemp_ temp;
-
- for (temp = ffecom_latest_temp_; temp != NULL; temp = temp->next)
- if (temp->in_use && (temp->t == t))
- {
- assert (!temp->auto_pop);
- temp->in_use = FALSE;
- return;
- }
- else
- assert (temp->t != t);
-
- assert ("couldn't ffecom_pop_tempvar!" != NULL);
-}
-
-#endif
/* ffecom_ptr_to_expr -- Transform expr into gcc tree with & in front
tree t;
@@ -13201,49 +12876,7 @@ ffecom_ptr_to_expr (ffebld expr)
return item;
case FFEBLD_opARRAYREF:
- {
- ffebld dims[FFECOM_dimensionsMAX];
- tree array;
- int i;
-
- item = ffecom_ptr_to_expr (ffebld_left (expr));
-
- if (item == error_mark_node)
- return item;
-
- if ((ffeinfo_where (ffebld_info (expr)) == FFEINFO_whereFLEETING)
- && !mark_addressable (item))
- return error_mark_node; /* Make sure non-const ref is to
- non-reg. */
-
- /* Build up ARRAY_REFs in reverse order (since we're column major
- here in Fortran land). */
-
- for (i = 0, expr = ffebld_right (expr);
- expr != NULL;
- expr = ffebld_trail (expr))
- dims[i++] = ffebld_head (expr);
-
- for (--i, array = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (item)));
- i >= 0;
- --i, array = TYPE_MAIN_VARIANT (TREE_TYPE (array)))
- {
- /* The initial subtraction should happen in the original type so
- that (possible) negative values are handled appropriately. */
- item
- = ffecom_2 (PLUS_EXPR,
- build_pointer_type (TREE_TYPE (array)),
- item,
- size_binop (MULT_EXPR,
- size_in_bytes (TREE_TYPE (array)),
- convert (sizetype,
- fold (build (MINUS_EXPR,
- TREE_TYPE (TYPE_MIN_VALUE (TYPE_DOMAIN (array))),
- ffecom_expr (dims[i]),
- TYPE_MIN_VALUE (TYPE_DOMAIN (array)))))));
- }
- }
- return item;
+ return ffecom_arrayref_ (NULL_TREE, expr, 1);
case FFEBLD_opCONTER:
@@ -13263,8 +12896,6 @@ ffecom_ptr_to_expr (ffebld expr)
return error_mark_node;
default:
- assert (ffecom_pending_calls_ > 0);
-
bt = ffeinfo_basictype (ffebld_info (expr));
kt = ffeinfo_kindtype (ffebld_info (expr));
@@ -13304,60 +12935,27 @@ ffecom_ptr_to_expr (ffebld expr)
}
#endif
-/* Prepare to make call-arg temps.
-
- Call this in pairs with pop_calltemps around calls to
- ffecom_arg_ptr_to_expr if the latter might use temporaries. */
-
-#if FFECOM_targetCURRENT == FFECOM_targetGCC
-void
-ffecom_push_calltemps ()
-{
- ffecom_pending_calls_++;
-}
-
-#endif
/* Obtain a temp var with given data type.
- Returns a VAR_DECL tree of a currently (that is, at the current
- statement being compiled) not in use and having the given data type,
- making a new one if necessary. size is FFETARGET_charactersizeNONE
- for a non-CHARACTER type or >= 0 for a CHARACTER type. elements is
- -1 for a scalar or > 0 for an array of type. auto_pop is TRUE if
- ffecom_pop_tempvar won't be called, meaning temp will be freed
- when #pending calls goes to zero. */
+ size is FFETARGET_charactersizeNONE for a non-CHARACTER type
+ or >= 0 for a CHARACTER type.
+
+ elements is -1 for a scalar or > 0 for an array of type. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
tree
-ffecom_push_tempvar (tree type, ffetargetCharacterSize size, int elements,
- bool auto_pop)
+ffecom_make_tempvar (const char *commentary, tree type,
+ ffetargetCharacterSize size, int elements)
{
- ffecomTemp_ temp;
int yes;
tree t;
static int mynumber;
- assert (!auto_pop || (ffecom_pending_calls_ > 0));
+ assert (current_binding_level->prep_state < 2);
if (type == error_mark_node)
return error_mark_node;
- for (temp = ffecom_latest_temp_; temp != NULL; temp = temp->next)
- {
- if (temp->in_use
- || (temp->type != type)
- || (temp->size != size)
- || (temp->elements != elements)
- || (DECL_CONTEXT (temp->t) != current_function_decl))
- continue;
-
- temp->in_use = TRUE;
- temp->auto_pop = auto_pop;
- return temp->t;
- }
-
- /* Create a new temp. */
-
yes = suspend_momentary ();
if (size != FFETARGET_charactersizeNONE)
@@ -13372,42 +12970,378 @@ ffecom_push_tempvar (tree type, ffetargetCharacterSize size, int elements,
build_int_2 (elements - 1,
0)));
t = build_decl (VAR_DECL,
- ffecom_get_invented_identifier ("__g77_expr_%d", NULL,
+ ffecom_get_invented_identifier ("__g77_%s_%d",
+ commentary,
mynumber++),
type);
- /* This temp must be put in the same scope as the containing BLOCK
- (aka function), but for reasons that should be explained elsewhere,
- the GBE normally decides it should be in a "phantom BLOCK" associated
- with the expand_start_stmt_expr() call. So push the topmost
- sequence back onto the GBE's internal stack before telling it
- about the decl, then restore it afterwards. */
- push_topmost_sequence ();
-
t = start_decl (t, FALSE);
finish_decl (t, NULL_TREE, FALSE);
- pop_topmost_sequence ();
-
resume_momentary (yes);
- temp = malloc_new_kp (ffe_pool_program_unit (), "ffecomTemp_",
- sizeof (*temp));
+ return t;
+}
+#endif
- temp->next = ffecom_latest_temp_;
- temp->type = type;
- temp->t = t;
- temp->size = size;
- temp->elements = elements;
- temp->in_use = TRUE;
- temp->auto_pop = auto_pop;
+/* Prepare argument pointer to expression.
- ffecom_latest_temp_ = temp;
+ Like ffecom_prepare_expr, except for expressions to be evaluated
+ via ffecom_arg_ptr_to_expr. */
- return t;
+void
+ffecom_prepare_arg_ptr_to_expr (ffebld expr)
+{
+ /* ~~For now, it seems to be the same thing. */
+ ffecom_prepare_expr (expr);
+ return;
+}
+
+/* End of preparations. */
+
+bool
+ffecom_prepare_end (void)
+{
+ int prep_state = current_binding_level->prep_state;
+
+ assert (prep_state < 2);
+ current_binding_level->prep_state = 2;
+
+ return (prep_state == 1) ? TRUE : FALSE;
+}
+
+/* Prepare expression.
+
+ This is called before any code is generated for the current block.
+ It scans the expression, declares any temporaries that might be needed
+ during evaluation of the expression, and stores those temporaries in
+ the appropriate "hook" fields of the expression. `dest', if not NULL,
+ specifies the destination that ffecom_expr_ will see, in case that
+ helps avoid generating unused temporaries.
+
+ ~~Improve to avoid allocating unused temporaries by taking `dest'
+ into account vis-a-vis aliasing requirements of complex/character
+ functions. */
+
+void
+ffecom_prepare_expr_ (ffebld expr, ffebld dest UNUSED)
+{
+ ffeinfoBasictype bt;
+ ffeinfoKindtype kt;
+ ffetargetCharacterSize sz;
+ tree tempvar = NULL_TREE;
+
+ assert (current_binding_level->prep_state < 2);
+
+ if (! expr)
+ return;
+
+ bt = ffeinfo_basictype (ffebld_info (expr));
+ kt = ffeinfo_kindtype (ffebld_info (expr));
+ sz = ffeinfo_size (ffebld_info (expr));
+
+ /* 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:
+ /* Don't make temps for SYMTER, CONTER, etc. */
+ if (ffebld_arity (expr) == 0)
+ break;
+
+ switch (bt)
+ {
+ case FFEINFO_basictypeCOMPLEX:
+ if (ffebld_op (expr) == FFEBLD_opFUNCREF)
+ {
+ ffesymbol s;
+
+ if (ffebld_op (ffebld_left (expr)) != FFEBLD_opSYMTER)
+ break;
+
+ s = ffebld_symter (ffebld_left (expr));
+ if (ffesymbol_where (s) == FFEINFO_whereCONSTANT
+ || (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)
+ {
+ /* Requires special treatment. There's no POW_CC function
+ in libg2c, so POW_ZZ is used, which means we always
+ need a double-complex temp, not a single-complex. */
+ kt = FFEINFO_kindtypeREAL2;
+ }
+ else if (ffebld_op (expr) != FFEBLD_opDIVIDE)
+ /* The other ops don't need temps for complex operands. */
+ break;
+
+ /* ~~~Avoid making temps for some intrinsics, such as AIMAG(C),
+ REAL(C). See 19990325-0.f, routine `check', for cases. */
+ tempvar = ffecom_make_tempvar ("complex",
+ ffecom_tree_type
+ [FFEINFO_basictypeCOMPLEX][kt],
+ FFETARGET_charactersizeNONE,
+ -1);
+ break;
+
+ case FFEINFO_basictypeCHARACTER:
+ if (ffebld_op (expr) != FFEBLD_opFUNCREF)
+ break;
+
+ if (sz == FFETARGET_charactersizeNONE)
+ /* ~~Kludge alert! This should someday be fixed. */
+ sz = 24;
+
+ tempvar = ffecom_make_tempvar ("char", char_type_node, sz, -1);
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+#ifdef HAHA
+ case FFEBLD_opPOWER:
+ {
+ tree rtype, ltype;
+ tree rtmp, ltmp, result;
+
+ ltype = ffecom_type_expr (ffebld_left (expr));
+ rtype = ffecom_type_expr (ffebld_right (expr));
+
+ rtmp = ffecom_make_tempvar (rtype, FFETARGET_charactersizeNONE, -1);
+ ltmp = ffecom_make_tempvar (ltype, FFETARGET_charactersizeNONE, -1);
+ result = ffecom_make_tempvar (ltype, FFETARGET_charactersizeNONE, -1);
+
+ tempvar = make_tree_vec (3);
+ TREE_VEC_ELT (tempvar, 0) = rtmp;
+ TREE_VEC_ELT (tempvar, 1) = ltmp;
+ TREE_VEC_ELT (tempvar, 2) = result;
+ }
+ break;
+#endif /* HAHA */
+
+ case FFEBLD_opCONCATENATE:
+ {
+ /* This gets special handling, because only one set of temps
+ is needed for a tree of these -- the tree is treated as
+ a flattened list of concatenations when generating code. */
+
+ ffecomConcatList_ catlist;
+ tree ltmp, itmp, result;
+ int count;
+ int i;
+
+ catlist = ffecom_concat_list_new_ (expr, FFETARGET_charactersizeNONE);
+ count = ffecom_concat_list_count_ (catlist);
+
+ if (count >= 2)
+ {
+ ltmp
+ = ffecom_make_tempvar ("concat_len",
+ ffecom_f2c_ftnlen_type_node,
+ FFETARGET_charactersizeNONE, count);
+ itmp
+ = ffecom_make_tempvar ("concat_item",
+ ffecom_f2c_address_type_node,
+ FFETARGET_charactersizeNONE, count);
+ result
+ = ffecom_make_tempvar ("concat_res",
+ char_type_node,
+ ffecom_concat_list_maxlen_ (catlist),
+ -1);
+
+ tempvar = make_tree_vec (3);
+ TREE_VEC_ELT (tempvar, 0) = ltmp;
+ TREE_VEC_ELT (tempvar, 1) = itmp;
+ TREE_VEC_ELT (tempvar, 2) = result;
+ }
+
+ for (i = 0; i < count; ++i)
+ ffecom_prepare_arg_ptr_to_expr (ffecom_concat_list_expr_ (catlist,
+ i));
+
+ ffecom_concat_list_kill_ (catlist);
+
+ if (tempvar)
+ {
+ ffebld_nonter_set_hook (expr, tempvar);
+ current_binding_level->prep_state = 1;
+ }
+ }
+ return;
+
+ case FFEBLD_opCONVERT:
+ if (bt == FFEINFO_basictypeCHARACTER
+ && ((ffebld_size_known (ffebld_left (expr))
+ == FFETARGET_charactersizeNONE)
+ || (ffebld_size_known (ffebld_left (expr)) >= sz)))
+ tempvar = ffecom_make_tempvar ("convert", char_type_node, sz, -1);
+ break;
+ }
+
+ if (tempvar)
+ {
+ ffebld_nonter_set_hook (expr, tempvar);
+ current_binding_level->prep_state = 1;
+ }
+
+ /* Prepare subexpressions for this expr. */
+
+ switch (ffebld_op (expr))
+ {
+ case FFEBLD_opPERCENT_LOC:
+ ffecom_prepare_ptr_to_expr (ffebld_left (expr));
+ break;
+
+ case FFEBLD_opPERCENT_VAL:
+ case FFEBLD_opPERCENT_REF:
+ ffecom_prepare_expr (ffebld_left (expr));
+ break;
+
+ case FFEBLD_opPERCENT_DESCR:
+ ffecom_prepare_arg_ptr_to_expr (ffebld_left (expr));
+ break;
+
+ case FFEBLD_opITEM:
+ {
+ ffebld item;
+
+ for (item = expr;
+ item != NULL;
+ item = ffebld_trail (item))
+ if (ffebld_head (item) != NULL)
+ ffecom_prepare_expr (ffebld_head (item));
+ }
+ break;
+
+ default:
+ /* Need to handle character conversion specially. */
+ switch (ffebld_arity (expr))
+ {
+ case 2:
+ ffecom_prepare_expr (ffebld_left (expr));
+ ffecom_prepare_expr (ffebld_right (expr));
+ break;
+
+ case 1:
+ ffecom_prepare_expr (ffebld_left (expr));
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return;
+}
+
+/* Prepare expression for reading and writing.
+
+ Like ffecom_prepare_expr, except for expressions to be evaluated
+ via ffecom_expr_rw. */
+
+void
+ffecom_prepare_expr_rw (tree type, ffebld expr)
+{
+ /* This is all we support for now. */
+ assert (type == NULL_TREE || type == ffecom_type_expr (expr));
+
+ /* ~~For now, it seems to be the same thing. */
+ ffecom_prepare_expr (expr);
+ return;
+}
+
+/* Prepare expression for writing.
+
+ Like ffecom_prepare_expr, except for expressions to be evaluated
+ via ffecom_expr_w. */
+
+void
+ffecom_prepare_expr_w (tree type, ffebld expr)
+{
+ /* This is all we support for now. */
+ assert (type == NULL_TREE || type == ffecom_type_expr (expr));
+
+ /* ~~For now, it seems to be the same thing. */
+ ffecom_prepare_expr (expr);
+ return;
+}
+
+/* Prepare expression for returning.
+
+ Like ffecom_prepare_expr, except for expressions to be evaluated
+ via ffecom_return_expr. */
+
+void
+ffecom_prepare_return_expr (ffebld expr)
+{
+ assert (current_binding_level->prep_state < 2);
+
+ if (ffecom_primary_entry_kind_ == FFEINFO_kindSUBROUTINE
+ && ffecom_is_altreturning_
+ && expr != NULL)
+ ffecom_prepare_expr (expr);
+}
+
+/* Prepare pointer to expression.
+
+ Like ffecom_prepare_expr, except for expressions to be evaluated
+ via ffecom_ptr_to_expr. */
+
+void
+ffecom_prepare_ptr_to_expr (ffebld expr)
+{
+ /* ~~For now, it seems to be the same thing. */
+ ffecom_prepare_expr (expr);
+ return;
+}
+
+/* Transform expression into constant pointer-to-expression tree.
+
+ If the expression can be transformed into a pointer-to-expression tree
+ that is constant, that is done, and the tree returned. Else NULL_TREE
+ is returned.
+
+ That way, a caller can attempt to provide compile-time initialization
+ of a variable and, if that fails, *then* choose to start a new block
+ and resort to using temporaries, as appropriate. */
+
+tree
+ffecom_ptr_to_const_expr (ffebld expr)
+{
+ if (! expr)
+ return integer_zero_node;
+
+ if (ffebld_op (expr) == FFEBLD_opANY)
+ return error_mark_node;
+
+ if (ffebld_arity (expr) == 0
+ && (ffebld_op (expr) != FFEBLD_opSYMTER
+ || ffebld_where (expr) == FFEINFO_whereCOMMON
+ || ffebld_where (expr) == FFEINFO_whereGLOBAL
+ || ffebld_where (expr) == FFEINFO_whereINTRINSIC))
+ {
+ tree t;
+
+ t = ffecom_ptr_to_expr (expr);
+ assert (TREE_CONSTANT (t));
+ return t;
+ }
+
+ return NULL_TREE;
}
-#endif
/* ffecom_return_expr -- Returns return-value expr given alt return expr
tree rtn; // NULL_TREE means use expand_null_return()
@@ -13503,6 +13437,16 @@ ffecom_save_tree (tree t)
}
#endif
+/* Start a compound statement (block). */
+
+#if FFECOM_targetCURRENT == FFECOM_targetGCC
+void
+ffecom_start_compstmt (void)
+{
+ bison_rule_pushlevel_ ();
+}
+#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
+
/* Public entry point for front end to access start_decl. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
@@ -13747,6 +13691,74 @@ ffecom_truth_value_invert (tree expr)
}
#endif
+
+/* Return the tree that is the type of the expression, as would be
+ returned in TREE_TYPE(ffecom_expr(expr)), without otherwise
+ transforming the expression, generating temporaries, etc. */
+
+tree
+ffecom_type_expr (ffebld expr)
+{
+ ffeinfoBasictype bt;
+ ffeinfoKindtype kt;
+ tree tree_type;
+
+ assert (expr != NULL);
+
+ bt = ffeinfo_basictype (ffebld_info (expr));
+ kt = ffeinfo_kindtype (ffebld_info (expr));
+ tree_type = ffecom_tree_type[bt][kt];
+
+ switch (ffebld_op (expr))
+ {
+ case FFEBLD_opCONTER:
+ case FFEBLD_opSYMTER:
+ case FFEBLD_opARRAYREF:
+ case FFEBLD_opUPLUS:
+ case FFEBLD_opPAREN:
+ case FFEBLD_opUMINUS:
+ case FFEBLD_opADD:
+ case FFEBLD_opSUBTRACT:
+ case FFEBLD_opMULTIPLY:
+ case FFEBLD_opDIVIDE:
+ case FFEBLD_opPOWER:
+ case FFEBLD_opNOT:
+ case FFEBLD_opFUNCREF:
+ case FFEBLD_opSUBRREF:
+ case FFEBLD_opAND:
+ case FFEBLD_opOR:
+ case FFEBLD_opXOR:
+ case FFEBLD_opNEQV:
+ case FFEBLD_opEQV:
+ case FFEBLD_opCONVERT:
+ case FFEBLD_opLT:
+ case FFEBLD_opLE:
+ case FFEBLD_opEQ:
+ case FFEBLD_opNE:
+ case FFEBLD_opGT:
+ case FFEBLD_opGE:
+ case FFEBLD_opPERCENT_LOC:
+ return tree_type;
+
+ case FFEBLD_opACCTER:
+ case FFEBLD_opARRTER:
+ case FFEBLD_opITEM:
+ case FFEBLD_opSTAR:
+ case FFEBLD_opBOUNDS:
+ case FFEBLD_opREPEAT:
+ case FFEBLD_opLABTER:
+ case FFEBLD_opLABTOK:
+ case FFEBLD_opIMPDO:
+ case FFEBLD_opCONCATENATE:
+ case FFEBLD_opSUBSTR:
+ default:
+ assert ("bad op for ffecom_type_expr" == NULL);
+ /* Fall through. */
+ case FFEBLD_opANY:
+ return error_mark_node;
+ }
+}
+
/* Return PARM_DECL for arg#1 of master fn containing alternate ENTRY points
If the PARM_DECL already exists, return it, else create it. It's an
@@ -13784,15 +13796,6 @@ ffecom_which_entrypoint_decl ()
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static void
-bison_rule_compstmt_ ()
-{
- emit_line_note (input_filename, lineno);
- expand_end_bindings (getdecls (), 1, 1);
- poplevel (1, 1, 0);
- pop_momentary ();
-}
-
-static void
bison_rule_pushlevel_ ()
{
emit_line_note (input_filename, lineno);
@@ -13802,6 +13805,24 @@ bison_rule_pushlevel_ ()
expand_start_bindings (0);
}
+static tree
+bison_rule_compstmt_ ()
+{
+ tree t;
+ int keep = kept_level_p ();
+
+ /* Make the temps go away. */
+ if (! keep)
+ current_binding_level->names = NULL_TREE;
+
+ emit_line_note (input_filename, lineno);
+ expand_end_bindings (getdecls (), keep, 0);
+ t = poplevel (keep, 1, 0);
+ pop_momentary ();
+
+ return t;
+}
+
/* Return a definition for a builtin function named NAME and whose data type
is TYPE. TYPE should be a function type with argument types.
FUNCTION_CODE tells later passes how to compile calls to this function.
@@ -13811,8 +13832,9 @@ bison_rule_pushlevel_ ()
the name to be called if we can't opencode the function. */
static tree
-builtin_function (char *name, tree type,
- enum built_in_function function_code, char *library_name)
+builtin_function (const char *name, tree type,
+ enum built_in_function function_code,
+ const char *library_name)
{
tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type);
DECL_EXTERNAL (decl) = 1;
@@ -14360,7 +14382,9 @@ finish_function (int nested)
if (!nested)
permanent_allocation (1);
- if (DECL_SAVED_INSNS (fndecl) == 0 && !nested && (TREE_CODE (fndecl) != ERROR_MARK))
+ if (TREE_CODE (fndecl) != ERROR_MARK
+ && !nested
+ && DECL_SAVED_INSNS (fndecl) == 0)
{
/* Stop pointing to the local nodes about to be freed. */
/* But DECL_INITIAL must remain nonzero so we know this was an actual
@@ -14416,7 +14440,7 @@ lang_print_error_function (file)
static ffesymbol last_s = NULL;
ffeglobal g;
ffesymbol s;
- char *kind;
+ const char *kind;
if ((ffecom_primary_entry_ == NULL)
|| (ffesymbol_global (ffecom_primary_entry_) == NULL))
@@ -14470,7 +14494,7 @@ lang_print_error_function (file)
fprintf (stderr, "Outside of any program unit:\n");
else
{
- char *name = ffesymbol_text (s);
+ const char *name = ffesymbol_text (s);
fprintf (stderr, "In %s `%s':\n", kind, name);
}
@@ -14538,7 +14562,8 @@ pop_f_function_context ()
IDENTIFIER_LABEL_VALUE (DECL_NAME (TREE_VALUE (link)))
= TREE_VALUE (link);
- if (DECL_SAVED_INSNS (current_function_decl) == 0)
+ if (current_function_decl != error_mark_node
+ && DECL_SAVED_INSNS (current_function_decl) == 0)
{
/* Stop pointing to the local nodes about to be freed. */
/* But DECL_INITIAL must remain nonzero so we know this was an actual
@@ -14642,6 +14667,9 @@ store_parm_decls (int is_main_program UNUSED)
{
register tree fndecl = current_function_decl;
+ if (fndecl == error_mark_node)
+ return;
+
/* This is a chain of PARM_DECLs from old-style parm declarations. */
DECL_ARGUMENTS (fndecl) = storedecls (nreverse (getdecls ()));
@@ -14777,6 +14805,7 @@ start_function (tree name, tree type, int nested, int public)
ffecom_outer_function_decl_ = current_function_decl;
pushlevel (0);
+ current_binding_level->prep_state = 2;
if (TREE_CODE (current_function_decl) != ERROR_MARK)
{
@@ -14869,9 +14898,9 @@ global_bindings_p ()
return current_binding_level == global_binding_level;
}
-/* Insert BLOCK at the end of the list of subblocks of the
- current binding level. This is used when a BIND_EXPR is expanded,
- to handle the BLOCK node inside the BIND_EXPR. */
+/* Print an error message for invalid use of an incomplete type.
+ VALUE is the expression that was used (or 0 if that isn't known)
+ and TYPE is the type that was invalid. */
void
incomplete_type_error (value, type)
@@ -14930,6 +14959,30 @@ finish_parse ()
fclose (finput);
}
+/* Delete the node BLOCK from the current binding level.
+ This is used for the block inside a stmt expr ({...})
+ so that the block can be reinserted where appropriate. */
+
+static void
+delete_block (block)
+ tree block;
+{
+ tree t;
+ if (current_binding_level->blocks == block)
+ current_binding_level->blocks = TREE_CHAIN (block);
+ for (t = current_binding_level->blocks; t;)
+ {
+ if (TREE_CHAIN (t) == block)
+ TREE_CHAIN (t) = TREE_CHAIN (block);
+ else
+ t = TREE_CHAIN (t);
+ }
+ TREE_CHAIN (block) = NULL;
+ /* Clear TREE_USED which is always set by poplevel.
+ The flag is set again if insert_block is called. */
+ TREE_USED (block) = 0;
+}
+
void
insert_block (block)
tree block;
@@ -14979,6 +15032,8 @@ lang_init_options ()
flag_move_all_movables = 1;
flag_reduce_all_givs = 1;
flag_argument_noalias = 2;
+ flag_errno_math = 0;
+ flag_complex_divide_method = 1;
}
void
@@ -15082,17 +15137,17 @@ poplevel (keep, reverse, functionbody)
int functionbody;
{
register tree link;
- /* The chain of decls was accumulated in reverse order. Put it into forward
- order, just for cleanliness. */
+ /* The chain of decls was accumulated in reverse order.
+ Put it into forward order, just for cleanliness. */
tree decls;
tree subblocks = current_binding_level->blocks;
tree block = 0;
tree decl;
int block_previously_created;
- /* Get the decls in the order they were written. Usually
- current_binding_level->names is in reverse order. But parameter decls
- were previously put in forward order. */
+ /* Get the decls in the order they were written.
+ Usually current_binding_level->names is in reverse order.
+ But parameter decls were previously put in forward order. */
if (reverse)
current_binding_level->names
@@ -15100,21 +15155,25 @@ poplevel (keep, reverse, functionbody)
else
decls = current_binding_level->names;
- /* Output any nested inline functions within this block if they weren't
- already output. */
+ /* Output any nested inline functions within this block
+ if they weren't already output. */
for (decl = decls; decl; decl = TREE_CHAIN (decl))
if (TREE_CODE (decl) == FUNCTION_DECL
- && !TREE_ASM_WRITTEN (decl)
+ && ! TREE_ASM_WRITTEN (decl)
&& DECL_INITIAL (decl) != 0
&& TREE_ADDRESSABLE (decl))
{
- /* If this decl was copied from a file-scope decl on account of a
- block-scope extern decl, propagate TREE_ADDRESSABLE to the
- file-scope decl. */
- if (DECL_ABSTRACT_ORIGIN (decl) != 0)
+ /* If this decl was copied from a file-scope decl
+ on account of a block-scope extern decl,
+ propagate TREE_ADDRESSABLE to the file-scope decl.
+
+ DECL_ABSTRACT_ORIGIN can be set to itself if warn_return_type is
+ true, since then the decl goes through save_for_inline_copying. */
+ if (DECL_ABSTRACT_ORIGIN (decl) != 0
+ && DECL_ABSTRACT_ORIGIN (decl) != decl)
TREE_ADDRESSABLE (DECL_ABSTRACT_ORIGIN (decl)) = 1;
- else
+ else if (DECL_SAVED_INSNS (decl) != 0)
{
push_function_context ();
output_inline_function (decl);
@@ -15122,9 +15181,9 @@ poplevel (keep, reverse, functionbody)
}
}
- /* If there were any declarations or structure tags in that level, or if
- this level is a function body, create a BLOCK to record them for the
- life of this function. */
+ /* If there were any declarations or structure tags in that level,
+ or if this level is a function body,
+ create a BLOCK to record them for the life of this function. */
block = 0;
block_previously_created = (current_binding_level->this_block != 0);
@@ -15163,15 +15222,16 @@ poplevel (keep, reverse, functionbody)
}
}
- /* If the level being exited is the top level of a function, check over all
- the labels, and clear out the current (function local) meanings of their
- names. */
+ /* If the level being exited is the top level of a function,
+ check over all the labels, and clear out the current
+ (function local) meanings of their names. */
if (functionbody)
{
- /* If this is the top level block of a function, the vars are the
- function's parameters. Don't leave them in the BLOCK because they
- are found in the FUNCTION_DECL instead. */
+ /* If this is the top level block of a function,
+ the vars are the function's parameters.
+ Don't leave them in the BLOCK because they are
+ found in the FUNCTION_DECL instead. */
BLOCK_VARS (block) = 0;
}
@@ -15187,7 +15247,8 @@ poplevel (keep, reverse, functionbody)
}
/* Dispose of the block that we just made inside some higher level. */
- if (functionbody)
+ if (functionbody
+ && current_function_decl != error_mark_node)
DECL_INITIAL (current_function_decl) = block;
else if (block)
{
@@ -15195,28 +15256,15 @@ poplevel (keep, reverse, functionbody)
current_binding_level->blocks
= chainon (current_binding_level->blocks, block);
}
- /* If we did not make a block for the level just exited, any blocks made
- for inner levels (since they cannot be recorded as subblocks in that
- level) must be carried forward so they will later become subblocks of
- something else. */
+ /* If we did not make a block for the level just exited,
+ any blocks made for inner levels
+ (since they cannot be recorded as subblocks in that level)
+ must be carried forward so they will later become subblocks
+ of something else. */
else if (subblocks)
current_binding_level->blocks
= chainon (current_binding_level->blocks, subblocks);
- /* Set the TYPE_CONTEXTs for all of the tagged types belonging to this
- binding contour so that they point to the appropriate construct, i.e.
- either to the current FUNCTION_DECL node, or else to the BLOCK node we
- just constructed.
-
- Note that for tagged types whose scope is just the formal parameter list
- for some function type specification, we can't properly set their
- TYPE_CONTEXTs here, because we don't have a pointer to the appropriate
- FUNCTION_TYPE node readily available to us. For those cases, the
- TYPE_CONTEXTs of the relevant tagged type nodes get set in
- `grokdeclarator' as soon as we have created the FUNCTION_TYPE node which
- will represent the "scope" for these "parameter list local" tagged
- types. */
-
if (block)
TREE_USED (block) = 1;
return block;
@@ -15372,6 +15420,27 @@ pushdecl (x)
return x;
}
+/* Nonzero if the current level needs to have a BLOCK made. */
+
+static int
+kept_level_p ()
+{
+ tree decl;
+
+ for (decl = current_binding_level->names;
+ decl;
+ decl = TREE_CHAIN (decl))
+ {
+ if (TREE_USED (decl) || TREE_CODE (decl) != VAR_DECL
+ || (DECL_NAME (decl) && ! DECL_ARTIFICIAL (decl)))
+ /* Currently, there aren't supposed to be non-artificial names
+ at other than the top block for a function -- they're
+ believed to always be temps. But it's wise to check anyway. */
+ return 1;
+ }
+ return 0;
+}
+
/* Enter a new binding level.
If TAG_TRANSPARENT is nonzero, do so only for the name space of variables,
not for that of tags. */
@@ -15382,7 +15451,12 @@ pushlevel (tag_transparent)
{
register struct binding_level *newlevel = NULL_BINDING_LEVEL;
- assert (!tag_transparent);
+ assert (! tag_transparent);
+
+ if (current_binding_level == global_binding_level)
+ {
+ named_labels = 0;
+ }
/* Reuse or create a struct for this binding level. */
@@ -15396,8 +15470,8 @@ pushlevel (tag_transparent)
newlevel = make_binding_level ();
}
- /* Add this level to the front of the chain (stack) of levels that are
- active. */
+ /* Add this level to the front of the chain (stack) of levels that
+ are active. */
*newlevel = clear_binding_level;
newlevel->level_chain = current_binding_level;
@@ -15414,7 +15488,7 @@ set_block (block)
current_binding_level->this_block = block;
}
-/* ~~tree.h SHOULD declare this, because toplev.c references it. */
+/* ~~gcc/tree.h *should* declare this, because toplev.c references it. */
/* Can't 'yydebug' a front end not generated by yacc/bison! */
@@ -15822,8 +15896,8 @@ unsigned_type (type)
/* Skip leading "./" from a directory name.
This may yield the empty string, which represents the current directory. */
-static char *
-skip_redundant_dir_prefix (char *dir)
+static const char *
+skip_redundant_dir_prefix (const char *dir)
{
while (dir[0] == '.' && dir[1] == '/')
for (dir += 2; *dir == '/'; dir++)
@@ -15921,10 +15995,9 @@ static void append_include_chain (struct file_name_list *first,
static FILE *open_include_file (char *filename,
struct file_name_list *searchptr);
static void print_containing_files (ffebadSeverity sev);
-static char *skip_redundant_dir_prefix (char *);
+static const char *skip_redundant_dir_prefix (const char *);
static char *read_filename_string (int ch, FILE *f);
-static struct file_name_map *read_name_map (char *dirname);
-static char *savestring (char *input);
+static struct file_name_map *read_name_map (const char *dirname);
/* Append a chain of `struct file_name_list's
to the end of the main include chain.
@@ -16046,8 +16119,8 @@ print_containing_files (ffebadSeverity sev)
FILE_BUF *ip = NULL;
int i;
int first = 1;
- char *str1;
- char *str2;
+ const char *str1;
+ const char *str2;
/* If stack of files hasn't changed since we last printed
this info, don't repeat it. */
@@ -16132,7 +16205,7 @@ read_filename_string (ch, f)
static struct file_name_map *
read_name_map (dirname)
- char *dirname;
+ const char *dirname;
{
/* This structure holds a linked list of file name maps, one per
directory. */
@@ -16158,7 +16231,7 @@ read_name_map (dirname)
map_list_ptr = ((struct file_name_map_list *)
xmalloc (sizeof (struct file_name_map_list)));
- map_list_ptr->map_list_name = savestring (dirname);
+ map_list_ptr->map_list_name = xstrdup (dirname);
map_list_ptr->map_list_map = NULL;
dirlen = strlen (dirname);
@@ -16219,16 +16292,6 @@ read_name_map (dirname)
return map_list_ptr->map_list_map;
}
-static char *
-savestring (input)
- char *input;
-{
- unsigned size = strlen (input);
- char *output = xmalloc (size + 1);
- strcpy (output, input);
- return output;
-}
-
static void
ffecom_file_ (char *name)
{
@@ -16508,3 +16571,877 @@ ffecom_open_include_ (char *name, ffewhereLine l, ffewhereColumn c)
return f;
}
#endif /* FFECOM_GCC_INCLUDE */
+
+/**INDENT* (Do not reformat this comment even with -fca option.)
+ Data-gathering files: Given the source file listed below, compiled with
+ f2c I obtained the output file listed after that, and from the output
+ file I derived the above code.
+
+-------- (begin input file to f2c)
+ implicit none
+ character*10 A1,A2
+ complex C1,C2
+ integer I1,I2
+ real R1,R2
+ double precision D1,D2
+C
+ call getem(A1,A2,C1,C2,I1,I2,R1,R2,D1,D2)
+c /
+ call fooI(I1/I2)
+ call fooR(R1/I1)
+ call fooD(D1/I1)
+ call fooC(C1/I1)
+ call fooR(R1/R2)
+ call fooD(R1/D1)
+ call fooD(D1/D2)
+ call fooD(D1/R1)
+ call fooC(C1/C2)
+ call fooC(C1/R1)
+ call fooZ(C1/D1)
+c **
+ call fooI(I1**I2)
+ call fooR(R1**I1)
+ call fooD(D1**I1)
+ call fooC(C1**I1)
+ call fooR(R1**R2)
+ call fooD(R1**D1)
+ call fooD(D1**D2)
+ call fooD(D1**R1)
+ call fooC(C1**C2)
+ call fooC(C1**R1)
+ call fooZ(C1**D1)
+c FFEINTRIN_impABS
+ call fooR(ABS(R1))
+c FFEINTRIN_impACOS
+ call fooR(ACOS(R1))
+c FFEINTRIN_impAIMAG
+ call fooR(AIMAG(C1))
+c FFEINTRIN_impAINT
+ call fooR(AINT(R1))
+c FFEINTRIN_impALOG
+ call fooR(ALOG(R1))
+c FFEINTRIN_impALOG10
+ call fooR(ALOG10(R1))
+c FFEINTRIN_impAMAX0
+ call fooR(AMAX0(I1,I2))
+c FFEINTRIN_impAMAX1
+ call fooR(AMAX1(R1,R2))
+c FFEINTRIN_impAMIN0
+ call fooR(AMIN0(I1,I2))
+c FFEINTRIN_impAMIN1
+ call fooR(AMIN1(R1,R2))
+c FFEINTRIN_impAMOD
+ call fooR(AMOD(R1,R2))
+c FFEINTRIN_impANINT
+ call fooR(ANINT(R1))
+c FFEINTRIN_impASIN
+ call fooR(ASIN(R1))
+c FFEINTRIN_impATAN
+ call fooR(ATAN(R1))
+c FFEINTRIN_impATAN2
+ call fooR(ATAN2(R1,R2))
+c FFEINTRIN_impCABS
+ call fooR(CABS(C1))
+c FFEINTRIN_impCCOS
+ call fooC(CCOS(C1))
+c FFEINTRIN_impCEXP
+ call fooC(CEXP(C1))
+c FFEINTRIN_impCHAR
+ call fooA(CHAR(I1))
+c FFEINTRIN_impCLOG
+ call fooC(CLOG(C1))
+c FFEINTRIN_impCONJG
+ call fooC(CONJG(C1))
+c FFEINTRIN_impCOS
+ call fooR(COS(R1))
+c FFEINTRIN_impCOSH
+ call fooR(COSH(R1))
+c FFEINTRIN_impCSIN
+ call fooC(CSIN(C1))
+c FFEINTRIN_impCSQRT
+ call fooC(CSQRT(C1))
+c FFEINTRIN_impDABS
+ call fooD(DABS(D1))
+c FFEINTRIN_impDACOS
+ call fooD(DACOS(D1))
+c FFEINTRIN_impDASIN
+ call fooD(DASIN(D1))
+c FFEINTRIN_impDATAN
+ call fooD(DATAN(D1))
+c FFEINTRIN_impDATAN2
+ call fooD(DATAN2(D1,D2))
+c FFEINTRIN_impDCOS
+ call fooD(DCOS(D1))
+c FFEINTRIN_impDCOSH
+ call fooD(DCOSH(D1))
+c FFEINTRIN_impDDIM
+ call fooD(DDIM(D1,D2))
+c FFEINTRIN_impDEXP
+ call fooD(DEXP(D1))
+c FFEINTRIN_impDIM
+ call fooR(DIM(R1,R2))
+c FFEINTRIN_impDINT
+ call fooD(DINT(D1))
+c FFEINTRIN_impDLOG
+ call fooD(DLOG(D1))
+c FFEINTRIN_impDLOG10
+ call fooD(DLOG10(D1))
+c FFEINTRIN_impDMAX1
+ call fooD(DMAX1(D1,D2))
+c FFEINTRIN_impDMIN1
+ call fooD(DMIN1(D1,D2))
+c FFEINTRIN_impDMOD
+ call fooD(DMOD(D1,D2))
+c FFEINTRIN_impDNINT
+ call fooD(DNINT(D1))
+c FFEINTRIN_impDPROD
+ call fooD(DPROD(R1,R2))
+c FFEINTRIN_impDSIGN
+ call fooD(DSIGN(D1,D2))
+c FFEINTRIN_impDSIN
+ call fooD(DSIN(D1))
+c FFEINTRIN_impDSINH
+ call fooD(DSINH(D1))
+c FFEINTRIN_impDSQRT
+ call fooD(DSQRT(D1))
+c FFEINTRIN_impDTAN
+ call fooD(DTAN(D1))
+c FFEINTRIN_impDTANH
+ call fooD(DTANH(D1))
+c FFEINTRIN_impEXP
+ call fooR(EXP(R1))
+c FFEINTRIN_impIABS
+ call fooI(IABS(I1))
+c FFEINTRIN_impICHAR
+ call fooI(ICHAR(A1))
+c FFEINTRIN_impIDIM
+ call fooI(IDIM(I1,I2))
+c FFEINTRIN_impIDNINT
+ call fooI(IDNINT(D1))
+c FFEINTRIN_impINDEX
+ call fooI(INDEX(A1,A2))
+c FFEINTRIN_impISIGN
+ call fooI(ISIGN(I1,I2))
+c FFEINTRIN_impLEN
+ call fooI(LEN(A1))
+c FFEINTRIN_impLGE
+ call fooL(LGE(A1,A2))
+c FFEINTRIN_impLGT
+ call fooL(LGT(A1,A2))
+c FFEINTRIN_impLLE
+ call fooL(LLE(A1,A2))
+c FFEINTRIN_impLLT
+ call fooL(LLT(A1,A2))
+c FFEINTRIN_impMAX0
+ call fooI(MAX0(I1,I2))
+c FFEINTRIN_impMAX1
+ call fooI(MAX1(R1,R2))
+c FFEINTRIN_impMIN0
+ call fooI(MIN0(I1,I2))
+c FFEINTRIN_impMIN1
+ call fooI(MIN1(R1,R2))
+c FFEINTRIN_impMOD
+ call fooI(MOD(I1,I2))
+c FFEINTRIN_impNINT
+ call fooI(NINT(R1))
+c FFEINTRIN_impSIGN
+ call fooR(SIGN(R1,R2))
+c FFEINTRIN_impSIN
+ call fooR(SIN(R1))
+c FFEINTRIN_impSINH
+ call fooR(SINH(R1))
+c FFEINTRIN_impSQRT
+ call fooR(SQRT(R1))
+c FFEINTRIN_impTAN
+ call fooR(TAN(R1))
+c FFEINTRIN_impTANH
+ call fooR(TANH(R1))
+c FFEINTRIN_imp_CMPLX_C
+ call fooC(cmplx(C1,C2))
+c FFEINTRIN_imp_CMPLX_D
+ call fooZ(cmplx(D1,D2))
+c FFEINTRIN_imp_CMPLX_I
+ call fooC(cmplx(I1,I2))
+c FFEINTRIN_imp_CMPLX_R
+ call fooC(cmplx(R1,R2))
+c FFEINTRIN_imp_DBLE_C
+ call fooD(dble(C1))
+c FFEINTRIN_imp_DBLE_D
+ call fooD(dble(D1))
+c FFEINTRIN_imp_DBLE_I
+ call fooD(dble(I1))
+c FFEINTRIN_imp_DBLE_R
+ call fooD(dble(R1))
+c FFEINTRIN_imp_INT_C
+ call fooI(int(C1))
+c FFEINTRIN_imp_INT_D
+ call fooI(int(D1))
+c FFEINTRIN_imp_INT_I
+ call fooI(int(I1))
+c FFEINTRIN_imp_INT_R
+ call fooI(int(R1))
+c FFEINTRIN_imp_REAL_C
+ call fooR(real(C1))
+c FFEINTRIN_imp_REAL_D
+ call fooR(real(D1))
+c FFEINTRIN_imp_REAL_I
+ call fooR(real(I1))
+c FFEINTRIN_imp_REAL_R
+ call fooR(real(R1))
+c
+c FFEINTRIN_imp_INT_D:
+c
+c FFEINTRIN_specIDINT
+ call fooI(IDINT(D1))
+c
+c FFEINTRIN_imp_INT_R:
+c
+c FFEINTRIN_specIFIX
+ call fooI(IFIX(R1))
+c FFEINTRIN_specINT
+ call fooI(INT(R1))
+c
+c FFEINTRIN_imp_REAL_D:
+c
+c FFEINTRIN_specSNGL
+ call fooR(SNGL(D1))
+c
+c FFEINTRIN_imp_REAL_I:
+c
+c FFEINTRIN_specFLOAT
+ call fooR(FLOAT(I1))
+c FFEINTRIN_specREAL
+ call fooR(REAL(I1))
+c
+ end
+-------- (end input file to f2c)
+
+-------- (begin output from providing above input file as input to:
+-------- `f2c | gcc -E -C - | sed -e "s:/[*]*://:g" -e "s:[*]*[/]://:g" \
+-------- -e "s:^#.*$::g"')
+
+// -- translated by f2c (version 19950223).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+//
+
+
+// f2c.h -- Standard Fortran to C header file //
+
+/// barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed."
+
+ - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) //
+
+
+
+
+// F2C_INTEGER will normally be `int' but would be `long' on 16-bit systems //
+// we assume short, float are OK //
+typedef long int // long int // integer;
+typedef char *address;
+typedef short int shortint;
+typedef float real;
+typedef double doublereal;
+typedef struct { real r, i; } complex;
+typedef struct { doublereal r, i; } doublecomplex;
+typedef long int // long int // logical;
+typedef short int shortlogical;
+typedef char logical1;
+typedef char integer1;
+// typedef long long longint; // // system-dependent //
+
+
+
+
+// Extern is for use with -E //
+
+
+
+
+// I/O stuff //
+
+
+
+
+
+
+
+
+typedef long int // int or long int // flag;
+typedef long int // int or long int // ftnlen;
+typedef long int // int or long int // ftnint;
+
+
+//external read, write//
+typedef struct
+{ flag cierr;
+ ftnint ciunit;
+ flag ciend;
+ char *cifmt;
+ ftnint cirec;
+} cilist;
+
+//internal read, write//
+typedef struct
+{ flag icierr;
+ char *iciunit;
+ flag iciend;
+ char *icifmt;
+ ftnint icirlen;
+ ftnint icirnum;
+} icilist;
+
+//open//
+typedef struct
+{ flag oerr;
+ ftnint ounit;
+ char *ofnm;
+ ftnlen ofnmlen;
+ char *osta;
+ char *oacc;
+ char *ofm;
+ ftnint orl;
+ char *oblnk;
+} olist;
+
+//close//
+typedef struct
+{ flag cerr;
+ ftnint cunit;
+ char *csta;
+} cllist;
+
+//rewind, backspace, endfile//
+typedef struct
+{ flag aerr;
+ ftnint aunit;
+} alist;
+
+// inquire //
+typedef struct
+{ flag inerr;
+ ftnint inunit;
+ char *infile;
+ ftnlen infilen;
+ ftnint *inex; //parameters in standard's order//
+ ftnint *inopen;
+ ftnint *innum;
+ ftnint *innamed;
+ char *inname;
+ ftnlen innamlen;
+ char *inacc;
+ ftnlen inacclen;
+ char *inseq;
+ ftnlen inseqlen;
+ char *indir;
+ ftnlen indirlen;
+ char *infmt;
+ ftnlen infmtlen;
+ char *inform;
+ ftnint informlen;
+ char *inunf;
+ ftnlen inunflen;
+ ftnint *inrecl;
+ ftnint *innrec;
+ char *inblank;
+ ftnlen inblanklen;
+} inlist;
+
+
+
+union Multitype { // for multiple entry points //
+ integer1 g;
+ shortint h;
+ integer i;
+ // longint j; //
+ real r;
+ doublereal d;
+ complex c;
+ doublecomplex z;
+ };
+
+typedef union Multitype Multitype;
+
+typedef long Long; // No longer used; formerly in Namelist //
+
+struct Vardesc { // for Namelist //
+ char *name;
+ char *addr;
+ ftnlen *dims;
+ int type;
+ };
+typedef struct Vardesc Vardesc;
+
+struct Namelist {
+ char *name;
+ Vardesc **vars;
+ int nvars;
+ };
+typedef struct Namelist Namelist;
+
+
+
+
+
+
+
+
+// procedure parameter types for -A and -C++ //
+
+
+
+
+typedef int // Unknown procedure type // (*U_fp)();
+typedef shortint (*J_fp)();
+typedef integer (*I_fp)();
+typedef real (*R_fp)();
+typedef doublereal (*D_fp)(), (*E_fp)();
+typedef // Complex // void (*C_fp)();
+typedef // Double Complex // void (*Z_fp)();
+typedef logical (*L_fp)();
+typedef shortlogical (*K_fp)();
+typedef // Character // void (*H_fp)();
+typedef // Subroutine // int (*S_fp)();
+
+// E_fp is for real functions when -R is not specified //
+typedef void C_f; // complex function //
+typedef void H_f; // character function //
+typedef void Z_f; // double complex function //
+typedef doublereal E_f; // real function with -R not specified //
+
+// undef any lower-case symbols that your C compiler predefines, e.g.: //
+
+
+// (No such symbols should be defined in a strict ANSI C compiler.
+ We can avoid trouble with f2c-translated code by using
+ gcc -ansi [-traditional].) //
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+// Main program // MAIN__()
+{
+ // System generated locals //
+ integer i__1;
+ real r__1, r__2;
+ doublereal d__1, d__2;
+ complex q__1;
+ doublecomplex z__1, z__2, z__3;
+ logical L__1;
+ char ch__1[1];
+
+ // Builtin functions //
+ void c_div();
+ integer pow_ii();
+ double pow_ri(), pow_di();
+ void pow_ci();
+ double pow_dd();
+ void pow_zz();
+ double acos(), r_imag(), r_int(), log(), r_lg10(), r_mod(), r_nint(),
+ asin(), atan(), atan2(), c_abs();
+ void c_cos(), c_exp(), c_log(), r_cnjg();
+ double cos(), cosh();
+ void c_sin(), c_sqrt();
+ double d_dim(), exp(), r_dim(), d_int(), d_lg10(), d_mod(), d_nint(),
+ d_sign(), sin(), sinh(), sqrt(), tan(), tanh();
+ integer i_dim(), i_dnnt(), i_indx(), i_sign(), i_len();
+ logical l_ge(), l_gt(), l_le(), l_lt();
+ integer i_nint();
+ double r_sign();
+
+ // Local variables //
+ extern // Subroutine // int fooa_(), fooc_(), food_(), fooi_(), foor_(),
+ fool_(), fooz_(), getem_();
+ static char a1[10], a2[10];
+ static complex c1, c2;
+ static doublereal d1, d2;
+ static integer i1, i2;
+ static real r1, r2;
+
+
+ getem_(a1, a2, &c1, &c2, &i1, &i2, &r1, &r2, &d1, &d2, 10L, 10L);
+// / //
+ i__1 = i1 / i2;
+ fooi_(&i__1);
+ r__1 = r1 / i1;
+ foor_(&r__1);
+ d__1 = d1 / i1;
+ food_(&d__1);
+ d__1 = (doublereal) i1;
+ q__1.r = c1.r / d__1, q__1.i = c1.i / d__1;
+ fooc_(&q__1);
+ r__1 = r1 / r2;
+ foor_(&r__1);
+ d__1 = r1 / d1;
+ food_(&d__1);
+ d__1 = d1 / d2;
+ food_(&d__1);
+ d__1 = d1 / r1;
+ food_(&d__1);
+ c_div(&q__1, &c1, &c2);
+ fooc_(&q__1);
+ q__1.r = c1.r / r1, q__1.i = c1.i / r1;
+ fooc_(&q__1);
+ z__1.r = c1.r / d1, z__1.i = c1.i / d1;
+ fooz_(&z__1);
+// ** //
+ i__1 = pow_ii(&i1, &i2);
+ fooi_(&i__1);
+ r__1 = pow_ri(&r1, &i1);
+ foor_(&r__1);
+ d__1 = pow_di(&d1, &i1);
+ food_(&d__1);
+ pow_ci(&q__1, &c1, &i1);
+ fooc_(&q__1);
+ d__1 = (doublereal) r1;
+ d__2 = (doublereal) r2;
+ r__1 = pow_dd(&d__1, &d__2);
+ foor_(&r__1);
+ d__2 = (doublereal) r1;
+ d__1 = pow_dd(&d__2, &d1);
+ food_(&d__1);
+ d__1 = pow_dd(&d1, &d2);
+ food_(&d__1);
+ d__2 = (doublereal) r1;
+ d__1 = pow_dd(&d1, &d__2);
+ food_(&d__1);
+ z__2.r = c1.r, z__2.i = c1.i;
+ z__3.r = c2.r, z__3.i = c2.i;
+ pow_zz(&z__1, &z__2, &z__3);
+ q__1.r = z__1.r, q__1.i = z__1.i;
+ fooc_(&q__1);
+ z__2.r = c1.r, z__2.i = c1.i;
+ z__3.r = r1, z__3.i = 0.;
+ pow_zz(&z__1, &z__2, &z__3);
+ q__1.r = z__1.r, q__1.i = z__1.i;
+ fooc_(&q__1);
+ z__2.r = c1.r, z__2.i = c1.i;
+ z__3.r = d1, z__3.i = 0.;
+ pow_zz(&z__1, &z__2, &z__3);
+ fooz_(&z__1);
+// FFEINTRIN_impABS //
+ r__1 = (doublereal)(( r1 ) >= 0 ? ( r1 ) : -( r1 )) ;
+ foor_(&r__1);
+// FFEINTRIN_impACOS //
+ r__1 = acos(r1);
+ foor_(&r__1);
+// FFEINTRIN_impAIMAG //
+ r__1 = r_imag(&c1);
+ foor_(&r__1);
+// FFEINTRIN_impAINT //
+ r__1 = r_int(&r1);
+ foor_(&r__1);
+// FFEINTRIN_impALOG //
+ r__1 = log(r1);
+ foor_(&r__1);
+// FFEINTRIN_impALOG10 //
+ r__1 = r_lg10(&r1);
+ foor_(&r__1);
+// FFEINTRIN_impAMAX0 //
+ r__1 = (real) (( i1 ) >= ( i2 ) ? ( i1 ) : ( i2 )) ;
+ foor_(&r__1);
+// FFEINTRIN_impAMAX1 //
+ r__1 = (doublereal)(( r1 ) >= ( r2 ) ? ( r1 ) : ( r2 )) ;
+ foor_(&r__1);
+// FFEINTRIN_impAMIN0 //
+ r__1 = (real) (( i1 ) <= ( i2 ) ? ( i1 ) : ( i2 )) ;
+ foor_(&r__1);
+// FFEINTRIN_impAMIN1 //
+ r__1 = (doublereal)(( r1 ) <= ( r2 ) ? ( r1 ) : ( r2 )) ;
+ foor_(&r__1);
+// FFEINTRIN_impAMOD //
+ r__1 = r_mod(&r1, &r2);
+ foor_(&r__1);
+// FFEINTRIN_impANINT //
+ r__1 = r_nint(&r1);
+ foor_(&r__1);
+// FFEINTRIN_impASIN //
+ r__1 = asin(r1);
+ foor_(&r__1);
+// FFEINTRIN_impATAN //
+ r__1 = atan(r1);
+ foor_(&r__1);
+// FFEINTRIN_impATAN2 //
+ r__1 = atan2(r1, r2);
+ foor_(&r__1);
+// FFEINTRIN_impCABS //
+ r__1 = c_abs(&c1);
+ foor_(&r__1);
+// FFEINTRIN_impCCOS //
+ c_cos(&q__1, &c1);
+ fooc_(&q__1);
+// FFEINTRIN_impCEXP //
+ c_exp(&q__1, &c1);
+ fooc_(&q__1);
+// FFEINTRIN_impCHAR //
+ *(unsigned char *)&ch__1[0] = i1;
+ fooa_(ch__1, 1L);
+// FFEINTRIN_impCLOG //
+ c_log(&q__1, &c1);
+ fooc_(&q__1);
+// FFEINTRIN_impCONJG //
+ r_cnjg(&q__1, &c1);
+ fooc_(&q__1);
+// FFEINTRIN_impCOS //
+ r__1 = cos(r1);
+ foor_(&r__1);
+// FFEINTRIN_impCOSH //
+ r__1 = cosh(r1);
+ foor_(&r__1);
+// FFEINTRIN_impCSIN //
+ c_sin(&q__1, &c1);
+ fooc_(&q__1);
+// FFEINTRIN_impCSQRT //
+ c_sqrt(&q__1, &c1);
+ fooc_(&q__1);
+// FFEINTRIN_impDABS //
+ d__1 = (( d1 ) >= 0 ? ( d1 ) : -( d1 )) ;
+ food_(&d__1);
+// FFEINTRIN_impDACOS //
+ d__1 = acos(d1);
+ food_(&d__1);
+// FFEINTRIN_impDASIN //
+ d__1 = asin(d1);
+ food_(&d__1);
+// FFEINTRIN_impDATAN //
+ d__1 = atan(d1);
+ food_(&d__1);
+// FFEINTRIN_impDATAN2 //
+ d__1 = atan2(d1, d2);
+ food_(&d__1);
+// FFEINTRIN_impDCOS //
+ d__1 = cos(d1);
+ food_(&d__1);
+// FFEINTRIN_impDCOSH //
+ d__1 = cosh(d1);
+ food_(&d__1);
+// FFEINTRIN_impDDIM //
+ d__1 = d_dim(&d1, &d2);
+ food_(&d__1);
+// FFEINTRIN_impDEXP //
+ d__1 = exp(d1);
+ food_(&d__1);
+// FFEINTRIN_impDIM //
+ r__1 = r_dim(&r1, &r2);
+ foor_(&r__1);
+// FFEINTRIN_impDINT //
+ d__1 = d_int(&d1);
+ food_(&d__1);
+// FFEINTRIN_impDLOG //
+ d__1 = log(d1);
+ food_(&d__1);
+// FFEINTRIN_impDLOG10 //
+ d__1 = d_lg10(&d1);
+ food_(&d__1);
+// FFEINTRIN_impDMAX1 //
+ d__1 = (( d1 ) >= ( d2 ) ? ( d1 ) : ( d2 )) ;
+ food_(&d__1);
+// FFEINTRIN_impDMIN1 //
+ d__1 = (( d1 ) <= ( d2 ) ? ( d1 ) : ( d2 )) ;
+ food_(&d__1);
+// FFEINTRIN_impDMOD //
+ d__1 = d_mod(&d1, &d2);
+ food_(&d__1);
+// FFEINTRIN_impDNINT //
+ d__1 = d_nint(&d1);
+ food_(&d__1);
+// FFEINTRIN_impDPROD //
+ d__1 = (doublereal) r1 * r2;
+ food_(&d__1);
+// FFEINTRIN_impDSIGN //
+ d__1 = d_sign(&d1, &d2);
+ food_(&d__1);
+// FFEINTRIN_impDSIN //
+ d__1 = sin(d1);
+ food_(&d__1);
+// FFEINTRIN_impDSINH //
+ d__1 = sinh(d1);
+ food_(&d__1);
+// FFEINTRIN_impDSQRT //
+ d__1 = sqrt(d1);
+ food_(&d__1);
+// FFEINTRIN_impDTAN //
+ d__1 = tan(d1);
+ food_(&d__1);
+// FFEINTRIN_impDTANH //
+ d__1 = tanh(d1);
+ food_(&d__1);
+// FFEINTRIN_impEXP //
+ r__1 = exp(r1);
+ foor_(&r__1);
+// FFEINTRIN_impIABS //
+ i__1 = (( i1 ) >= 0 ? ( i1 ) : -( i1 )) ;
+ fooi_(&i__1);
+// FFEINTRIN_impICHAR //
+ i__1 = *(unsigned char *)a1;
+ fooi_(&i__1);
+// FFEINTRIN_impIDIM //
+ i__1 = i_dim(&i1, &i2);
+ fooi_(&i__1);
+// FFEINTRIN_impIDNINT //
+ i__1 = i_dnnt(&d1);
+ fooi_(&i__1);
+// FFEINTRIN_impINDEX //
+ i__1 = i_indx(a1, a2, 10L, 10L);
+ fooi_(&i__1);
+// FFEINTRIN_impISIGN //
+ i__1 = i_sign(&i1, &i2);
+ fooi_(&i__1);
+// FFEINTRIN_impLEN //
+ i__1 = i_len(a1, 10L);
+ fooi_(&i__1);
+// FFEINTRIN_impLGE //
+ L__1 = l_ge(a1, a2, 10L, 10L);
+ fool_(&L__1);
+// FFEINTRIN_impLGT //
+ L__1 = l_gt(a1, a2, 10L, 10L);
+ fool_(&L__1);
+// FFEINTRIN_impLLE //
+ L__1 = l_le(a1, a2, 10L, 10L);
+ fool_(&L__1);
+// FFEINTRIN_impLLT //
+ L__1 = l_lt(a1, a2, 10L, 10L);
+ fool_(&L__1);
+// FFEINTRIN_impMAX0 //
+ i__1 = (( i1 ) >= ( i2 ) ? ( i1 ) : ( i2 )) ;
+ fooi_(&i__1);
+// FFEINTRIN_impMAX1 //
+ i__1 = (integer) (doublereal)(( r1 ) >= ( r2 ) ? ( r1 ) : ( r2 )) ;
+ fooi_(&i__1);
+// FFEINTRIN_impMIN0 //
+ i__1 = (( i1 ) <= ( i2 ) ? ( i1 ) : ( i2 )) ;
+ fooi_(&i__1);
+// FFEINTRIN_impMIN1 //
+ i__1 = (integer) (doublereal)(( r1 ) <= ( r2 ) ? ( r1 ) : ( r2 )) ;
+ fooi_(&i__1);
+// FFEINTRIN_impMOD //
+ i__1 = i1 % i2;
+ fooi_(&i__1);
+// FFEINTRIN_impNINT //
+ i__1 = i_nint(&r1);
+ fooi_(&i__1);
+// FFEINTRIN_impSIGN //
+ r__1 = r_sign(&r1, &r2);
+ foor_(&r__1);
+// FFEINTRIN_impSIN //
+ r__1 = sin(r1);
+ foor_(&r__1);
+// FFEINTRIN_impSINH //
+ r__1 = sinh(r1);
+ foor_(&r__1);
+// FFEINTRIN_impSQRT //
+ r__1 = sqrt(r1);
+ foor_(&r__1);
+// FFEINTRIN_impTAN //
+ r__1 = tan(r1);
+ foor_(&r__1);
+// FFEINTRIN_impTANH //
+ r__1 = tanh(r1);
+ foor_(&r__1);
+// FFEINTRIN_imp_CMPLX_C //
+ r__1 = c1.r;
+ r__2 = c2.r;
+ q__1.r = r__1, q__1.i = r__2;
+ fooc_(&q__1);
+// FFEINTRIN_imp_CMPLX_D //
+ z__1.r = d1, z__1.i = d2;
+ fooz_(&z__1);
+// FFEINTRIN_imp_CMPLX_I //
+ r__1 = (real) i1;
+ r__2 = (real) i2;
+ q__1.r = r__1, q__1.i = r__2;
+ fooc_(&q__1);
+// FFEINTRIN_imp_CMPLX_R //
+ q__1.r = r1, q__1.i = r2;
+ fooc_(&q__1);
+// FFEINTRIN_imp_DBLE_C //
+ d__1 = (doublereal) c1.r;
+ food_(&d__1);
+// FFEINTRIN_imp_DBLE_D //
+ d__1 = d1;
+ food_(&d__1);
+// FFEINTRIN_imp_DBLE_I //
+ d__1 = (doublereal) i1;
+ food_(&d__1);
+// FFEINTRIN_imp_DBLE_R //
+ d__1 = (doublereal) r1;
+ food_(&d__1);
+// FFEINTRIN_imp_INT_C //
+ i__1 = (integer) c1.r;
+ fooi_(&i__1);
+// FFEINTRIN_imp_INT_D //
+ i__1 = (integer) d1;
+ fooi_(&i__1);
+// FFEINTRIN_imp_INT_I //
+ i__1 = i1;
+ fooi_(&i__1);
+// FFEINTRIN_imp_INT_R //
+ i__1 = (integer) r1;
+ fooi_(&i__1);
+// FFEINTRIN_imp_REAL_C //
+ r__1 = c1.r;
+ foor_(&r__1);
+// FFEINTRIN_imp_REAL_D //
+ r__1 = (real) d1;
+ foor_(&r__1);
+// FFEINTRIN_imp_REAL_I //
+ r__1 = (real) i1;
+ foor_(&r__1);
+// FFEINTRIN_imp_REAL_R //
+ r__1 = r1;
+ foor_(&r__1);
+
+// FFEINTRIN_imp_INT_D: //
+
+// FFEINTRIN_specIDINT //
+ i__1 = (integer) d1;
+ fooi_(&i__1);
+
+// FFEINTRIN_imp_INT_R: //
+
+// FFEINTRIN_specIFIX //
+ i__1 = (integer) r1;
+ fooi_(&i__1);
+// FFEINTRIN_specINT //
+ i__1 = (integer) r1;
+ fooi_(&i__1);
+
+// FFEINTRIN_imp_REAL_D: //
+
+// FFEINTRIN_specSNGL //
+ r__1 = (real) d1;
+ foor_(&r__1);
+
+// FFEINTRIN_imp_REAL_I: //
+
+// FFEINTRIN_specFLOAT //
+ r__1 = (real) i1;
+ foor_(&r__1);
+// FFEINTRIN_specREAL //
+ r__1 = (real) i1;
+ foor_(&r__1);
+
+} // MAIN__ //
+
+-------- (end output file from f2c)
+
+*/
diff --git a/contrib/gcc/f/com.h b/contrib/gcc/f/com.h
index db8f469..baa2953 100644
--- a/contrib/gcc/f/com.h
+++ b/contrib/gcc/f/com.h
@@ -1,6 +1,6 @@
/* com.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995-1997 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -56,6 +56,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#if FFECOM_targetCURRENT == FFECOM_targetGCC
#define FFECOM_constantNULL NULL_TREE
+#define FFECOM_nonterNULL NULL_TREE
#define FFECOM_globalNULL NULL_TREE
#define FFECOM_labelNULL NULL_TREE
#define FFECOM_storageNULL NULL_TREE
@@ -202,6 +203,8 @@ typedef enum
typedef tree ffecomConstant;
#define FFECOM_constantHOOK
+typedef tree ffecomNonter;
+#define FFECOM_nonterHOOK
typedef tree ffecomLabel;
#define FFECOM_globalHOOK
typedef tree ffecomGlobal;
@@ -279,15 +282,20 @@ tree ffecom_3 (enum tree_code code, tree type, tree node1, tree node2,
tree ffecom_3s (enum tree_code code, tree type, tree node1, tree node2,
tree node3);
tree ffecom_arg_expr (ffebld expr, tree *length);
+tree ffecom_arg_ptr_to_const_expr (ffebld expr, tree *length);
tree ffecom_arg_ptr_to_expr (ffebld expr, tree *length);
-tree ffecom_call_gfrt (ffecomGfrt ix, tree args);
+tree ffecom_call_gfrt (ffecomGfrt ix, tree args, tree hook);
tree ffecom_constantunion (ffebldConstantUnion *cu, ffeinfoBasictype bt,
ffeinfoKindtype kt, tree tree_type);
-tree ffecom_decl_field (tree context, tree prevfield, char *name,
+tree ffecom_const_expr (ffebld expr);
+tree ffecom_decl_field (tree context, tree prevfield, const char *name,
tree type);
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
void ffecom_close_include (FILE *f);
int ffecom_decode_include_option (char *spec);
+#if FFECOM_targetCURRENT == FFECOM_targetGCC
+tree ffecom_end_compstmt (void);
+#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
void ffecom_end_transition (void);
void ffecom_exec_transition (void);
void ffecom_expand_let_stmt (ffebld dest, ffebld source);
@@ -295,11 +303,12 @@ void ffecom_expand_let_stmt (ffebld dest, ffebld source);
tree ffecom_expr (ffebld expr);
tree ffecom_expr_assign (ffebld expr);
tree ffecom_expr_assign_w (ffebld expr);
-tree ffecom_expr_rw (ffebld expr);
+tree ffecom_expr_rw (tree type, ffebld expr);
+tree ffecom_expr_w (tree type, ffebld expr);
void ffecom_finish_compile (void);
void ffecom_finish_decl (tree decl, tree init, bool is_top_level);
void ffecom_finish_progunit (void);
-tree ffecom_get_invented_identifier (char *pattern, char *text,
+tree ffecom_get_invented_identifier (const char *pattern, const char *text,
int number);
ffeinfoKindtype ffecom_gfrt_basictype (ffecomGfrt ix);
ffeinfoKindtype ffecom_gfrt_kindtype (ffecomGfrt ix);
@@ -308,6 +317,8 @@ void ffecom_init_2 (void);
tree ffecom_list_expr (ffebld list);
tree ffecom_list_ptr_to_expr (ffebld list);
tree ffecom_lookup_label (ffelab label);
+tree ffecom_make_tempvar (const char *commentary, tree type,
+ ffetargetCharacterSize size, int elements);
tree ffecom_modify (tree newtype, tree lhs, tree rhs);
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
void ffecom_file (char *name);
@@ -316,14 +327,18 @@ void ffecom_notify_init_symbol (ffesymbol s);
void ffecom_notify_primary_entry (ffesymbol fn);
FILE *ffecom_open_include (char *name, ffewhereLine l, ffewhereColumn c);
#if FFECOM_targetCURRENT == FFECOM_targetGCC
-void ffecom_pop_calltemps (void);
-void ffecom_pop_tempvar (tree var);
+void ffecom_prepare_arg_ptr_to_expr (ffebld expr);
+bool ffecom_prepare_end (void);
+void ffecom_prepare_expr_ (ffebld expr, ffebld dest);
+void ffecom_prepare_expr_rw (tree type, ffebld expr);
+void ffecom_prepare_expr_w (tree type, ffebld expr);
+void ffecom_prepare_ptr_to_expr (ffebld expr);
+void ffecom_prepare_return_expr (ffebld expr);
+tree ffecom_ptr_to_const_expr (ffebld expr);
tree ffecom_ptr_to_expr (ffebld expr);
-void ffecom_push_calltemps (void);
-tree ffecom_push_tempvar (tree type, ffetargetCharacterSize size,
- int elements, bool auto_pop);
tree ffecom_return_expr (ffebld expr);
tree ffecom_save_tree (tree t);
+void ffecom_start_compstmt (void);
tree ffecom_start_decl (tree decl, bool is_init);
void ffecom_sym_commit (ffesymbol s);
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
@@ -335,6 +350,7 @@ void ffecom_sym_retract (ffesymbol s);
tree ffecom_temp_label (void);
tree ffecom_truth_value (tree expr);
tree ffecom_truth_value_invert (tree expr);
+tree ffecom_type_expr (ffebld expr);
tree ffecom_which_entrypoint_decl (void);
/* These need to be in the front end with exactly these interfaces,
@@ -360,6 +376,7 @@ int mark_addressable (tree expr);
#define ffecom_f2c_typecode(bt,kt) ffecom_f2c_typecode_[(bt)][(kt)]
#define ffecom_label_kind() ffecom_label_kind_
#define ffecom_pointer_kind() ffecom_pointer_kind_
+#define ffecom_prepare_expr(e) ffecom_prepare_expr_ ((e), NULL)
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
#define ffecom_init_1()
diff --git a/contrib/gcc/f/config.j b/contrib/gcc/f/config.j
index 3fd1c11..fda03eb 100644
--- a/contrib/gcc/f/config.j
+++ b/contrib/gcc/f/config.j
@@ -1,6 +1,6 @@
/* config.j -- Wrapper for GCC's config.h
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/convert.j b/contrib/gcc/f/convert.j
index 85e3af8..76b8e02 100644
--- a/contrib/gcc/f/convert.j
+++ b/contrib/gcc/f/convert.j
@@ -1,6 +1,6 @@
/* convert.j -- Wrapper for GCC's convert.h
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/data.c b/contrib/gcc/f/data.c
index a8acd5c..51eb2b7 100644
--- a/contrib/gcc/f/data.c
+++ b/contrib/gcc/f/data.c
@@ -1,6 +1,6 @@
/* data.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -668,7 +668,7 @@ tail_recurse: /* :::::::::::::::::::: */
expression doesn't already exist in the cache) and then puts the result
in the cache. */
-ffebld
+static ffebld
ffedata_convert_ (ffebld source, ffelexToken source_token,
ffelexToken dest_token, ffeinfoBasictype bt,
ffeinfoKindtype kt, ffeinfoRank rk,
@@ -1119,7 +1119,7 @@ ffedata_eval_substr_end_ (ffebld expr, ffetargetCharacterSize min,
If st has any initialization info, transfer that info into mst and
clear st's info. */
-void
+static void
ffedata_gather_ (ffestorag mst, ffestorag st)
{
ffesymbol s;
diff --git a/contrib/gcc/f/data.h b/contrib/gcc/f/data.h
index 26c4f54..666612e 100644
--- a/contrib/gcc/f/data.h
+++ b/contrib/gcc/f/data.h
@@ -1,6 +1,6 @@
/* data.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/equiv.c b/contrib/gcc/f/equiv.c
index a9de49d..4d89622 100644
--- a/contrib/gcc/f/equiv.c
+++ b/contrib/gcc/f/equiv.c
@@ -1,6 +1,6 @@
/* equiv.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995-1998 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/equiv.h b/contrib/gcc/f/equiv.h
index daf0cee..0a0ce92 100644
--- a/contrib/gcc/f/equiv.h
+++ b/contrib/gcc/f/equiv.h
@@ -1,6 +1,6 @@
/* equiv.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/expr.c b/contrib/gcc/f/expr.c
index 7e7bf867..67b3765 100644
--- a/contrib/gcc/f/expr.c
+++ b/contrib/gcc/f/expr.c
@@ -1,6 +1,6 @@
/* expr.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995-1998 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -268,7 +268,7 @@ static void ffeexpr_update_impdo_sym_ (ffebld expr, ffesymbol dovar);
static ffeexprContext ffeexpr_context_outer_ (ffeexprStack_ s);
static ffeexprExpr_ ffeexpr_expr_new_ (void);
static void ffeexpr_fulfill_call_ (ffebld *expr, ffelexToken t);
-static bool ffeexpr_isdigits_ (char *p);
+static bool ffeexpr_isdigits_ (const char *p);
static ffelexHandler ffeexpr_token_first_lhs_ (ffelexToken t);
static ffelexHandler ffeexpr_token_first_lhs_1_ (ffelexToken t);
static ffelexHandler ffeexpr_token_first_rhs_ (ffelexToken t);
@@ -633,6 +633,10 @@ ffeexpr_collapse_convert (ffebld expr, ffelexToken t)
break;
}
+ /* If conversion operation is not implemented, return original expr. */
+ if (error == FFEBAD_NOCANDO)
+ return expr;
+
expr = ffebld_new_conter_with_orig
(ffebld_constant_new_integer1_val
(ffebld_cu_val_integer1 (u)), expr);
@@ -822,6 +826,10 @@ ffeexpr_collapse_convert (ffebld expr, ffelexToken t)
break;
}
+ /* If conversion operation is not implemented, return original expr. */
+ if (error == FFEBAD_NOCANDO)
+ return expr;
+
expr = ffebld_new_conter_with_orig
(ffebld_constant_new_integer2_val
(ffebld_cu_val_integer2 (u)), expr);
@@ -1011,6 +1019,10 @@ ffeexpr_collapse_convert (ffebld expr, ffelexToken t)
break;
}
+ /* If conversion operation is not implemented, return original expr. */
+ if (error == FFEBAD_NOCANDO)
+ return expr;
+
expr = ffebld_new_conter_with_orig
(ffebld_constant_new_integer3_val
(ffebld_cu_val_integer3 (u)), expr);
@@ -1200,6 +1212,10 @@ ffeexpr_collapse_convert (ffebld expr, ffelexToken t)
break;
}
+ /* If conversion operation is not implemented, return original expr. */
+ if (error == FFEBAD_NOCANDO)
+ return expr;
+
expr = ffebld_new_conter_with_orig
(ffebld_constant_new_integer4_val
(ffebld_cu_val_integer4 (u)), expr);
@@ -1317,6 +1333,10 @@ ffeexpr_collapse_convert (ffebld expr, ffelexToken t)
break;
}
+ /* If conversion operation is not implemented, return original expr. */
+ if (error == FFEBAD_NOCANDO)
+ return expr;
+
expr = ffebld_new_conter_with_orig
(ffebld_constant_new_logical1_val
(ffebld_cu_val_logical1 (u)), expr);
@@ -1424,6 +1444,10 @@ ffeexpr_collapse_convert (ffebld expr, ffelexToken t)
break;
}
+ /* If conversion operation is not implemented, return original expr. */
+ if (error == FFEBAD_NOCANDO)
+ return expr;
+
expr = ffebld_new_conter_with_orig
(ffebld_constant_new_logical2_val
(ffebld_cu_val_logical2 (u)), expr);
@@ -1531,6 +1555,10 @@ ffeexpr_collapse_convert (ffebld expr, ffelexToken t)
break;
}
+ /* If conversion operation is not implemented, return original expr. */
+ if (error == FFEBAD_NOCANDO)
+ return expr;
+
expr = ffebld_new_conter_with_orig
(ffebld_constant_new_logical3_val
(ffebld_cu_val_logical3 (u)), expr);
@@ -1638,6 +1666,10 @@ ffeexpr_collapse_convert (ffebld expr, ffelexToken t)
break;
}
+ /* If conversion operation is not implemented, return original expr. */
+ if (error == FFEBAD_NOCANDO)
+ return expr;
+
expr = ffebld_new_conter_with_orig
(ffebld_constant_new_logical4_val
(ffebld_cu_val_logical4 (u)), expr);
@@ -1796,6 +1828,10 @@ ffeexpr_collapse_convert (ffebld expr, ffelexToken t)
break;
}
+ /* If conversion operation is not implemented, return original expr. */
+ if (error == FFEBAD_NOCANDO)
+ return expr;
+
expr = ffebld_new_conter_with_orig
(ffebld_constant_new_real1_val
(ffebld_cu_val_real1 (u)), expr);
@@ -1944,6 +1980,10 @@ ffeexpr_collapse_convert (ffebld expr, ffelexToken t)
break;
}
+ /* If conversion operation is not implemented, return original expr. */
+ if (error == FFEBAD_NOCANDO)
+ return expr;
+
expr = ffebld_new_conter_with_orig
(ffebld_constant_new_real2_val
(ffebld_cu_val_real2 (u)), expr);
@@ -2092,6 +2132,10 @@ ffeexpr_collapse_convert (ffebld expr, ffelexToken t)
break;
}
+ /* If conversion operation is not implemented, return original expr. */
+ if (error == FFEBAD_NOCANDO)
+ return expr;
+
expr = ffebld_new_conter_with_orig
(ffebld_constant_new_real3_val
(ffebld_cu_val_real3 (u)), expr);
@@ -2240,6 +2284,10 @@ ffeexpr_collapse_convert (ffebld expr, ffelexToken t)
break;
}
+ /* If conversion operation is not implemented, return original expr. */
+ if (error == FFEBAD_NOCANDO)
+ return expr;
+
expr = ffebld_new_conter_with_orig
(ffebld_constant_new_real4_val
(ffebld_cu_val_real4 (u)), expr);
@@ -2398,6 +2446,10 @@ ffeexpr_collapse_convert (ffebld expr, ffelexToken t)
break;
}
+ /* If conversion operation is not implemented, return original expr. */
+ if (error == FFEBAD_NOCANDO)
+ return expr;
+
expr = ffebld_new_conter_with_orig
(ffebld_constant_new_complex1_val
(ffebld_cu_val_complex1 (u)), expr);
@@ -2546,6 +2598,10 @@ ffeexpr_collapse_convert (ffebld expr, ffelexToken t)
break;
}
+ /* If conversion operation is not implemented, return original expr. */
+ if (error == FFEBAD_NOCANDO)
+ return expr;
+
expr = ffebld_new_conter_with_orig
(ffebld_constant_new_complex2_val
(ffebld_cu_val_complex2 (u)), expr);
@@ -2694,6 +2750,10 @@ ffeexpr_collapse_convert (ffebld expr, ffelexToken t)
break;
}
+ /* If conversion operation is not implemented, return original expr. */
+ if (error == FFEBAD_NOCANDO)
+ return expr;
+
expr = ffebld_new_conter_with_orig
(ffebld_constant_new_complex3_val
(ffebld_cu_val_complex3 (u)), expr);
@@ -2842,6 +2902,10 @@ ffeexpr_collapse_convert (ffebld expr, ffelexToken t)
break;
}
+ /* If conversion operation is not implemented, return original expr. */
+ if (error == FFEBAD_NOCANDO)
+ return expr;
+
expr = ffebld_new_conter_with_orig
(ffebld_constant_new_complex4_val
(ffebld_cu_val_complex4 (u)), expr);
@@ -8520,7 +8584,7 @@ ffeexpr_context_outer_ (ffeexprStack_ s)
static ffeexprPercent_
ffeexpr_percent_ (ffelexToken t)
{
- char *p;
+ const char *p;
switch (ffelex_token_length (t))
{
@@ -9473,7 +9537,7 @@ ffeexpr_fulfill_call_ (ffebld *expr, ffelexToken t)
/* Check whether rest of string is all decimal digits. */
static bool
-ffeexpr_isdigits_ (char *p)
+ffeexpr_isdigits_ (const char *p)
{
for (; *p != '\0'; ++p)
if (! ISDIGIT (*p))
@@ -10314,7 +10378,7 @@ ffeexpr_reduced_concatenate_ (ffebld reduced, ffeexprExpr_ l, ffeexprExpr_ op,
if ((lkd != FFEINFO_kindANY)
&& ffebad_start (FFEBAD_CONCAT_ARG_KIND))
{
- char *what;
+ const char *what;
if (lrk != 0)
what = "an array";
@@ -10330,7 +10394,7 @@ ffeexpr_reduced_concatenate_ (ffebld reduced, ffeexprExpr_ l, ffeexprExpr_ op,
{
if (ffebad_start (FFEBAD_CONCAT_ARG_KIND))
{
- char *what;
+ const char *what;
if (rrk != 0)
what = "an array";
@@ -11602,7 +11666,7 @@ static ffelexHandler
ffeexpr_nil_real_ (ffelexToken t)
{
char d;
- char *p;
+ const char *p;
if (((ffelex_token_type (t) != FFELEX_typeNAME)
&& (ffelex_token_type (t) != FFELEX_typeNAMES))
@@ -11640,7 +11704,7 @@ static ffelexHandler
ffeexpr_nil_number_ (ffelexToken t)
{
char d;
- char *p;
+ const char *p;
if (ffeexpr_hollerith_count_ > 0)
ffelex_set_expecting_hollerith (0, '\0',
@@ -11715,7 +11779,7 @@ ffeexpr_nil_number_period_ (ffelexToken t)
{
ffelexHandler nexthandler;
char d;
- char *p;
+ const char *p;
switch (ffelex_token_type (t))
{
@@ -11772,7 +11836,7 @@ static ffelexHandler
ffeexpr_nil_number_real_ (ffelexToken t)
{
char d;
- char *p;
+ const char *p;
if (((ffelex_token_type (t) != FFELEX_typeNAME)
&& (ffelex_token_type (t) != FFELEX_typeNAMES))
@@ -12203,7 +12267,6 @@ again: /* :::::::::::::::::::: */
case FFEEXPR_contextINDEX_:
case FFEEXPR_contextSFUNCDEFINDEX_:
- case FFEEXPR_contextRETURN:
if ((error = (expr != NULL) && (ffeinfo_rank (info) != 0)))
break;
switch ((expr == NULL) ? FFEINFO_basictypeNONE
@@ -12226,7 +12289,6 @@ again: /* :::::::::::::::::::: */
break;
}
/* Fall through. */
- case FFEINFO_basictypeINTEGER:
case FFEINFO_basictypeHOLLERITH:
case FFEINFO_basictypeTYPELESS:
error = FALSE;
@@ -12235,6 +12297,11 @@ again: /* :::::::::::::::::::: */
FFEEXPR_contextLET);
break;
+ case FFEINFO_basictypeINTEGER:
+ /* Specifically, allow INTEGER(KIND=2), aka INTEGER*8, through
+ unmolested. Leave it to downstream to handle kinds. */
+ break;
+
default:
error = TRUE;
break;
@@ -12242,6 +12309,44 @@ again: /* :::::::::::::::::::: */
break; /* expr==NULL ok for substring; element case
caught by callback. */
+ case FFEEXPR_contextRETURN:
+ if ((error = (expr != NULL) && (ffeinfo_rank (info) != 0)))
+ break;
+ switch ((expr == NULL) ? FFEINFO_basictypeNONE
+ : ffeinfo_basictype (info))
+ {
+ case FFEINFO_basictypeNONE:
+ error = FALSE;
+ break;
+
+ case FFEINFO_basictypeLOGICAL:
+ expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeLOGICAL,
+ FFEINFO_kindtypeLOGICALDEFAULT, 0, FFETARGET_charactersizeNONE,
+ FFEEXPR_contextLET);
+ /* Fall through. */
+ case FFEINFO_basictypeREAL:
+ case FFEINFO_basictypeCOMPLEX:
+ if (ffe_is_pedantic ())
+ {
+ error = TRUE;
+ break;
+ }
+ /* Fall through. */
+ case FFEINFO_basictypeINTEGER:
+ case FFEINFO_basictypeHOLLERITH:
+ case FFEINFO_basictypeTYPELESS:
+ error = FALSE;
+ expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER,
+ FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE,
+ FFEEXPR_contextLET);
+ break;
+
+ default:
+ error = TRUE;
+ break;
+ }
+ break;
+
case FFEEXPR_contextDO:
if ((error = (expr == NULL) || (ffeinfo_rank (info) != 0)))
break;
@@ -12616,11 +12721,12 @@ again: /* :::::::::::::::::::: */
switch (ffeinfo_basictype (info))
{
case FFEINFO_basictypeLOGICAL:
- error = error && !ffe_is_ugly_logint ();
- if (!ffeexpr_stack_->is_rhs)
- break; /* Don't convert lhs variable. */
+ if (! ffe_is_ugly_logint ())
+ error = TRUE;
+ if (! ffeexpr_stack_->is_rhs)
+ break;
expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER,
- ffeinfo_kindtype (ffebld_info (expr)), 0,
+ ffeinfo_kindtype (info), 0,
FFETARGET_charactersizeNONE,
FFEEXPR_contextLET);
break;
@@ -12664,18 +12770,21 @@ again: /* :::::::::::::::::::: */
switch (ffeinfo_basictype (info))
{
case FFEINFO_basictypeLOGICAL:
- error = error
- && (ffeinfo_kindtype (info) != FFEINFO_kindtypeLOGICALDEFAULT);
- if (!ffeexpr_stack_->is_rhs)
- break; /* Don't convert lhs variable. */
+ if (! ffeexpr_stack_->is_rhs)
+ break;
expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER,
- FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE,
+ ffeinfo_kindtype (info), 0,
+ FFETARGET_charactersizeNONE,
FFEEXPR_contextLET);
- break;
-
+ /* Fall through. */
case FFEINFO_basictypeINTEGER:
- error = error &&
- (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT);
+ if (ffeexpr_stack_->is_rhs
+ && (ffeinfo_kindtype (ffebld_info (expr))
+ != FFEINFO_kindtypeINTEGERDEFAULT))
+ expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER,
+ FFEINFO_kindtypeINTEGERDEFAULT, 0,
+ FFETARGET_charactersizeNONE,
+ FFEEXPR_contextLET);
break;
case FFEINFO_basictypeHOLLERITH:
@@ -12853,7 +12962,11 @@ again: /* :::::::::::::::::::: */
: ffeinfo_basictype (info))
{
case FFEINFO_basictypeINTEGER:
- error = FALSE;
+ /* Maybe this should be supported someday, but, right now,
+ g77 can't generate a call to libf2c to write to an
+ integer other than the default size. */
+ error = ((! ffeexpr_stack_->is_rhs)
+ && ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT);
break;
default:
@@ -13584,7 +13697,7 @@ static ffelexHandler
ffeexpr_token_real_ (ffelexToken t)
{
char d;
- char *p;
+ const char *p;
if (((ffelex_token_type (t) != FFELEX_typeNAME)
&& (ffelex_token_type (t) != FFELEX_typeNAMES))
@@ -13741,7 +13854,7 @@ ffeexpr_token_number_ (ffelexToken t)
ffeexprExpr_ e;
ffeinfo ni;
char d;
- char *p;
+ const char *p;
if (ffeexpr_hollerith_count_ > 0)
ffelex_set_expecting_hollerith (0, '\0',
@@ -13897,7 +14010,7 @@ ffeexpr_token_number_period_ (ffelexToken t)
{
ffeexprExpr_ e;
ffelexHandler nexthandler;
- char *p;
+ const char *p;
char d;
switch (ffelex_token_type (t))
@@ -14015,7 +14128,7 @@ static ffelexHandler
ffeexpr_token_number_real_ (ffelexToken t)
{
char d;
- char *p;
+ const char *p;
if (((ffelex_token_type (t) != FFELEX_typeNAME)
&& (ffelex_token_type (t) != FFELEX_typeNAMES))
@@ -18530,7 +18643,8 @@ ffeexpr_token_elements_ (ffelexToken ft, ffebld expr, ffelexToken t)
ffeexpr_stack_->immediate = FALSE;
break;
}
- if (ffebld_op (expr) == FFEBLD_opCONTER)
+ if (ffebld_op (expr) == FFEBLD_opCONTER
+ && ffebld_kindtype (expr) == FFEINFO_kindtypeINTEGERDEFAULT)
{
val = ffebld_constant_integerdefault (ffebld_conter (expr));
@@ -18841,26 +18955,33 @@ ffeexpr_token_substring_1_ (ffelexToken ft, ffebld last, ffelexToken t)
ffetargetIntegerDefault last_val;
ffetargetCharacterSize size;
ffetargetCharacterSize strop_size_max;
+ bool first_known;
string = ffeexpr_stack_->exprstack;
strop = string->u.operand;
info = ffebld_info (strop);
- if ((first == NULL) || (ffebld_op (first) == FFEBLD_opCONTER))
+ if (first == NULL
+ || (ffebld_op (first) == FFEBLD_opCONTER
+ && ffebld_kindtype (first) == FFEINFO_kindtypeINTEGERDEFAULT))
{ /* The starting point is known. */
first_val = (first == NULL) ? 1
: ffebld_constant_integerdefault (ffebld_conter (first));
+ first_known = TRUE;
}
else
{ /* Assume start of the entity. */
first_val = 1;
+ first_known = FALSE;
}
- if ((last != NULL) && (ffebld_op (last) == FFEBLD_opCONTER))
+ if (last != NULL
+ && (ffebld_op (last) == FFEBLD_opCONTER
+ && ffebld_kindtype (last) == FFEINFO_kindtypeINTEGERDEFAULT))
{ /* The ending point is known. */
last_val = ffebld_constant_integerdefault (ffebld_conter (last));
- if ((first == NULL) || (ffebld_op (first) == FFEBLD_opCONTER))
+ if (first_known)
{ /* The beginning point is a constant. */
if (first_val <= last_val)
size = last_val - first_val + 1;
diff --git a/contrib/gcc/f/expr.h b/contrib/gcc/f/expr.h
index 04143e6..3f781f9 100644
--- a/contrib/gcc/f/expr.h
+++ b/contrib/gcc/f/expr.h
@@ -1,6 +1,6 @@
/* expr.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/ffe.texi b/contrib/gcc/f/ffe.texi
new file mode 100644
index 0000000..e303332
--- /dev/null
+++ b/contrib/gcc/f/ffe.texi
@@ -0,0 +1,2024 @@
+@c Copyright (C) 1999 Free Software Foundation, Inc.
+@c This is part of the G77 manual.
+@c For copying conditions, see the file g77.texi.
+
+@node Front End
+@chapter Front End
+@cindex GNU Fortran Front End (FFE)
+@cindex FFE
+@cindex @code{g77}, front end
+@cindex front end, @code{g77}
+
+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
+
+Don't poke the bear.
+
+The @code{g77} front end generates code
+via the @code{gcc} back end.
+
+@cindex GNU Back End (GBE)
+@cindex GBE
+@cindex @code{gcc}, back end
+@cindex back end, gcc
+@cindex code generator
+The @code{gcc} back end (GBE) is a large, complex
+labyrinth of intricate code
+written in a combination of the C language
+and specialized languages internal to @code{gcc}.
+
+While the @emph{code} that implements the GBE
+is written in a combination of languages,
+the GBE itself is,
+to the front end for a language like Fortran,
+best viewed as a @emph{compiler}
+that compiles its own, unique, language.
+
+The GBE's ``source'', then, is written in this language,
+which consists primarily of
+a combination of calls to GBE functions
+and @dfn{tree} nodes
+(which are, themselves, created
+by calling GBE functions).
+
+So, the @code{g77} generates code by, in effect,
+translating the Fortran code it reads
+into a form ``written'' in the ``language''
+of the @code{gcc} back end.
+
+@cindex GBEL
+@cindex GNU Back End Language (GBEL)
+This language will heretofore be referred to as @dfn{GBEL},
+for GNU Back End Language.
+
+GBEL is an evolving language,
+not fully specified in any published form
+as of this writing.
+It offers many facilities,
+but its ``core'' facilities
+are those that corresponding most directly
+to those needed to support @code{gcc}
+(compiling code written in GNU C).
+
+The @code{g77} Fortran Front End (FFE)
+is designed and implemented
+to navigate the currents and eddies
+of ongoing GBEL and @code{gcc} development
+while also delivering on the potential
+of an integrated FFE
+(as compared to using a converter like @code{f2c}
+and feeding the output into @code{gcc}).
+
+Goals of the FFE's code-generation strategy include:
+
+@itemize @bullet
+@item
+High likelihood of generation of correct code,
+or, failing that, producing a fatal diagnostic or crashing.
+
+@item
+Generation of highly optimized code,
+as directed by the user
+via GBE-specific (versus @code{g77}-specific) constructs,
+such as command-line options.
+
+@item
+Fast overall (FFE plus GBE) compilation.
+
+@item
+Preservation of source-level debugging information.
+@end itemize
+
+The strategies historically, and currently, used by the FFE
+to achieve these goals include:
+
+@itemize @bullet
+@item
+Use of GBEL constructs that most faithfully encapsulate
+the semantics of Fortran.
+
+@item
+Avoidance of GBEL constructs that are so rarely used,
+or limited to use in specialized situations not related to Fortran,
+that their reliability and performance has not yet been established
+as sufficient for use by the FFE.
+
+@item
+Flexible design, to readily accommodate changes to specific
+code-generation strategies, perhaps governed by command-line options.
+@end itemize
+
+@cindex Bear-poking
+@cindex Poking the bear
+``Don't poke the bear'' somewhat summarizes the above strategies.
+The GBE is the bear.
+The FFE is designed and implemented to avoid poking it
+in ways that are likely to just annoy it.
+The FFE usually either tackles it head-on,
+or avoids treating it in ways dissimilar to how
+the @code{gcc} front end treats it.
+
+For example, the FFE uses the native array facility in the back end
+instead of the lower-level pointer-arithmetic facility
+used by @code{gcc} when compiling @code{f2c} output).
+Theoretically, this presents more opportunities for optimization,
+faster compile times,
+and the production of more faithful debugging information.
+These benefits were not, however, immediately realized,
+mainly because @code{gcc} itself makes little or no use
+of the native array facility.
+
+Complex arithmetic is a case study of the evolution of this strategy.
+When originally implemented,
+the GBEL had just evolved its own native complex-arithmetic facility,
+so the FFE took advantage of that.
+
+When porting @code{g77} to 64-bit systems,
+it was discovered that the GBE didn't really
+implement its native complex-arithmetic facility properly.
+
+The short-term solution was to rewrite the FFE
+to instead use the lower-level facilities
+that'd be used by @code{gcc}-compiled code
+(assuming that code, itself, didn't use the native complex type
+provided, as an extension, by @code{gcc}),
+since these were known to work,
+and, in any case, if shown to not work,
+would likely be rapidly fixed
+(since they'd likely not work for vanilla C code in similar circumstances).
+
+However, the rewrite accommodated the original, native approach as well
+by offering a command-line option to select it over the emulated approach.
+This allowed users, and especially GBE maintainers, to try out
+fixes to complex-arithmetic support in the GBE
+while @code{g77} continued to default to compiling more code correctly,
+albeit producing (typically) slower executables.
+
+As of April 1999, it appeared that the last few bugs
+in the GBE's support of its native complex-arithmetic facility
+were worked out.
+The FFE was changed back to default to using that native facility,
+leaving emulation as an option.
+
+Other Fortran constructs---arrays, character strings,
+complex division, @code{COMMON} and @code{EQUIVALENCE} aggregates,
+and so on---involve issues similar to those pertaining to complex arithmetic.
+
+So, it is possible that the history
+of how the FFE handled complex arithmetic
+will be repeated, probably in modified form
+(and hopefully over shorter timeframes),
+for some of these other facilities.
+
+@node Two-pass Design
+@section Two-pass Design
+
+The FFE does not tell the GBE anything about a program unit
+until after the last statement in that unit has been parsed.
+(A program unit is a Fortran concept that corresponds, in the C world,
+mostly closely to functions definitions in ISO C.
+That is, a program unit in Fortran is like a top-level function in C.
+Nested functions, found among the extensions offered by GNU C,
+correspond roughly to Fortran's statement functions.)
+
+So, while parsing the code in a program unit,
+the FFE saves up all the information
+on statements, expressions, names, and so on,
+until it has seen the last statement.
+
+At that point, the FFE revisits the saved information
+(in what amounts to a second @dfn{pass} over the program unit)
+to perform the actual translation of the program unit into GBEL,
+ultimating in the generation of assembly code for it.
+
+Some lookahead is performed during this second pass,
+so the FFE could be viewed as a ``two-plus-pass'' design.
+
+@menu
+* Two-pass Code::
+* Why Two Passes::
+@end menu
+
+@node Two-pass Code
+@subsection Two-pass Code
+
+Most of the code that turns the first pass (parsing)
+into a second pass for code generation
+is in @file{@value{path-g77}/std.c}.
+
+It has external functions,
+called mainly by siblings in @file{@value{path-g77}/stc.c},
+that record the information on statements and expressions
+in the order they are seen in the source code.
+These functions save that information.
+
+It also has an external function that revisits that information,
+calling the siblings in @file{@value{path-g77}/ste.c},
+which handles the actual code generation
+(by generating GBEL code,
+that is, by calling GBE routines
+to represent and specify expressions, statements, and so on).
+
+@node Why Two Passes
+@subsection Why Two Passes
+
+The need for two passes was not immediately evident
+during the design and implementation of the code in the FFE
+that was to produce GBEL.
+Only after a few kludges,
+to handle things like incorrectly-guessed @code{ASSIGN} label nature,
+had been implemented,
+did enough evidence pile up to make it clear
+that @file{std.c} had to be introduced to intercept,
+save, then revisit as part of a second pass,
+the digested contents of a program unit.
+
+Other such missteps have occurred during the evolution of the FFE,
+because of the different goals of the FFE and the GBE.
+
+Because the GBE's original, and still primary, goal
+was to directly support the GNU C language,
+the GBEL, and the GBE itself,
+requires more complexity
+on the part of most front ends
+than it requires of @code{gcc}'s.
+
+For example,
+the GBEL offers an interface that permits the @code{gcc} front end
+to implement most, or all, of the language features it supports,
+without the front end having to
+make use of non-user-defined variables.
+(It's almost certainly the case that all of K&R C,
+and probably ANSI C as well,
+is handled by the @code{gcc} front end
+without declaring such variables.)
+
+The FFE, on the other hand, must resort to a variety of ``tricks''
+to achieve its goals.
+
+Consider the following C code:
+
+@smallexample
+int
+foo (int a, int b)
+@{
+ int c = 0;
+
+ if ((c = bar (c)) == 0)
+ goto done;
+
+ quux (c << 1);
+
+done:
+ return c;
+@}
+@end smallexample
+
+Note what kinds of objects are declared, or defined, before their use,
+and before any actual code generation involving them
+would normally take place:
+
+@itemize @bullet
+@item
+Return type of function
+
+@item
+Entry point(s) of function
+
+@item
+Dummy arguments
+
+@item
+Variables
+
+@item
+Initial values for variables
+@end itemize
+
+Whereas, the following items can, and do,
+suddenly appear ``out of the blue'' in C:
+
+@itemize @bullet
+@item
+Label references
+
+@item
+Function references
+@end itemize
+
+Not surprisingly, the GBE faithfully permits the latter set of items
+to be ``discovered'' partway through GBEL ``programs'',
+just as they are permitted to in C.
+
+Yet, the GBE has tended, at least in the past,
+to be reticent to fully support similar ``late'' discovery
+of items in the former set.
+
+This makes Fortran a poor fit for the ``safe'' subset of GBEL.
+Consider:
+
+@smallexample
+ FUNCTION X (A, ARRAY, ID1)
+ CHARACTER*(*) A
+ DOUBLE PRECISION X, Y, Z, TMP, EE, PI
+ REAL ARRAY(ID1*ID2)
+ COMMON ID2
+ EXTERNAL FRED
+
+ ASSIGN 100 TO J
+ CALL FOO (I)
+ IF (I .EQ. 0) PRINT *, A(0)
+ GOTO 200
+
+ ENTRY Y (Z)
+ ASSIGN 101 TO J
+200 PRINT *, A(1)
+ READ *, TMP
+ GOTO J
+100 X = TMP * EE
+ RETURN
+101 Y = TMP * PI
+ CALL FRED
+ DATA EE, PI /2.71D0, 3.14D0/
+ END
+@end smallexample
+
+Here are some observations about the above code,
+which, while somewhat contrived,
+conforms to the FORTRAN 77 and Fortran 90 standards:
+
+@itemize @bullet
+@item
+The return type of function @samp{X} is not known
+until the @samp{DOUBLE PRECISION} line has been parsed.
+
+@item
+Whether @samp{A} is a function or a variable
+is not known until the @samp{PRINT *, A(0)} statement
+has been parsed.
+
+@item
+The bounds of the array of argument @samp{ARRAY}
+depend on a computation involving
+the subsequent argument @samp{ID1}
+and the blank-common member @samp{ID2}.
+
+@item
+Whether @samp{Y} and @samp{Z} are local variables,
+additional function entry points,
+or dummy arguments to additional entry points
+is not known
+until the @code{ENTRY} statement is parsed.
+
+@item
+Similarly, whether @samp{TMP} is a local variable is not known
+until the @samp{READ *, TMP} statement is parsed.
+
+@item
+The initial values for @samp{EE} and @samp{PI}
+are not known until after the @code{DATA} statement is parsed.
+
+@item
+Whether @samp{FRED} is a function returning type @code{REAL}
+or a subroutine
+(which can be thought of as returning type @code{void}
+@emph{or}, to support alternate returns in a simple way,
+type @code{int})
+is not known
+until the @samp{CALL FRED} statement is parsed.
+
+@item
+Whether @samp{100} is a @code{FORMAT} label
+or the label of an executable statement
+is not known
+until the @samp{X =} statement is parsed.
+(These two types of labels get @emph{very} different treatment,
+especially when @code{ASSIGN}'ed.)
+
+@item
+That @samp{J} is a local variable is not known
+until the first @code{ASSIGN} statement is parsed.
+(This happens @emph{after} executable code has been seen.)
+@end itemize
+
+Very few of these ``discoveries''
+can be accommodated by the GBE as it has evolved over the years.
+The GBEL doesn't support several of them,
+and those it might appear to support
+don't always work properly,
+especially in combination with other GBEL and GBE features,
+as implemented in the GBE.
+
+(Had the GBE and its GBEL originally evolved to support @code{g77},
+the shoe would be on the other foot, so to speak---most, if not all,
+of the above would be directly supported by the GBEL,
+and a few C constructs would probably not, as they are in reality,
+be supported.
+Both this mythical, and today's real, GBE caters to its GBEL
+by, sometimes, scrambling around, cleaning up after itself---after
+discovering that assumptions it made earlier during code generation
+are incorrect.)
+
+So, the FFE handles these discrepancies---between the order in which
+it discovers facts about the code it is compiling,
+and the order in which the GBEL and GBE support such discoveries---by
+performing what amounts to two
+passes over each program unit.
+
+(A few ambiguities can remain at that point,
+such as whether, given @samp{EXTERNAL BAZ}
+and no other reference to @samp{BAZ} in the program unit,
+it is a subroutine, a function, or a block-data---which, in C-speak,
+governs its declared return type.
+Fortunately, these distinctions are easily finessed
+for the procedure, library, and object-file interfaces
+supported by @code{g77}.)
+
+@node Challenges Posed
+@section Challenges Posed
+
+Consider the following Fortran code, which uses various extensions
+(including some to Fortran 90):
+
+@smallexample
+SUBROUTINE X(A)
+CHARACTER*(*) A
+COMPLEX CFUNC
+INTEGER*2 CLOCKS(200)
+INTEGER IFUNC
+
+CALL SYSTEM_CLOCK (CLOCKS (IFUNC (CFUNC ('('//A//')'))))
+@end smallexample
+
+The above poses the following challenges to any Fortran compiler
+that uses run-time interfaces, and a run-time library, roughly similar
+to those used by @code{g77}:
+
+@itemize @bullet
+@item
+Assuming the library routine that supports @code{SYSTEM_CLOCK}
+expects to set an @code{INTEGER*4} variable via its @code{COUNT} argument,
+the compiler must make available to it a temporary variable of that type.
+
+@item
+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.)
+
+@item
+To determine the correct index into the @samp{CLOCKS} array,
+(putting aside the fact that the index, in this particular case,
+need not be computed until after
+the @code{SYSTEM_CLOCK} library routine returns),
+the compiler must ensure that the @code{IFUNC} function is called.
+
+That requires evaluating its argument,
+which requires, for @code{g77}
+(assuming @code{-ff2c} is in force),
+reserving a temporary variable of type @code{COMPLEX}
+for use as a repository for the return value
+being computed by @samp{CFUNC}.
+
+@item
+Before invoking @samp{CFUNC},
+is argument must be evaluated,
+which requires allocating, at run time,
+a temporary large enough to hold the result of the concatenation,
+as well as actually performing the concatenation.
+
+@item
+The large temporary needed during invocation of @code{CFUNC}
+should, ideally, be deallocated
+(or, at least, left to the GBE to dispose of, as it sees fit)
+as soon as @code{CFUNC} returns,
+which means before @code{IFUNC} is called
+(as it might need a lot of dynamically allocated memory).
+@end itemize
+
+@code{g77} currently doesn't support all of the above,
+but, so that it might someday, it has evolved to handle
+at least some of the above requirements.
+
+Meeting the above requirements is made more challenging
+by conforming to the requirements of the GBEL/GBE combination.
+
+@node Transforming Statements
+@section Transforming Statements
+
+Most Fortran statements are given their own block,
+and, for temporary variables they might need, their own scope.
+(A block is what distinguishes @samp{@{ foo (); @}}
+from just @samp{foo ();} in C.
+A scope is included with every such block,
+providing a distinct name space for local variables.)
+
+Label definitions for the statement precede this block,
+so @samp{10 PRINT *, I} is handled more like
+@samp{fl10: @{ @dots{} @}} than @samp{@{ fl10: @dots{} @}}
+(where @samp{fl10} is just a notation meaning ``Fortran Label 10''
+for the purposes of this document).
+
+@menu
+* Statements Needing Temporaries::
+* Transforming DO WHILE::
+* Transforming Iterative DO::
+* Transforming Block IF::
+* Transforming SELECT CASE::
+@end menu
+
+@node Statements Needing Temporaries
+@subsection Statements Needing Temporaries
+
+Any temporaries needed during, but not beyond,
+execution of a Fortran statement,
+are made local to the scope of that statement's block.
+
+This allows the GBE to share storage for these temporaries
+among the various statements without the FFE
+having to manage that itself.
+
+(The GBE could, of course, decide to optimize
+management of these temporaries.
+For example, it could, theoretically,
+schedule some of the computations involving these temporaries
+to occur in parallel.
+More practically, it might leave the storage for some temporaries
+``live'' beyond their scopes, to reduce the number of
+manipulations of the stack pointer at run time.)
+
+Temporaries needed across distinct statement boundaries usually
+are associated with Fortran blocks (such as @code{DO}/@code{END DO}).
+(Also, there might be temporaries not associated with blocks at all---these
+would be in the scope of the entire program unit.)
+
+Each Fortran block @emph{should} get its own block/scope in the GBE.
+This is best, because it allows temporaries to be more naturally handled.
+However, it might pose problems when handling labels
+(in particular, when they're the targets of @code{GOTO}s outside the Fortran
+block), and generally just hassling with replicating
+parts of the @code{gcc} front end
+(because the FFE needs to support
+an arbitrary number of nested back-end blocks
+if each Fortran block gets one).
+
+So, there might still be a need for top-level temporaries, whose
+``owning'' scope is that of the containing procedure.
+
+Also, there seems to be problems declaring new variables after
+generating code (within a block) in the back end, leading to, e.g.,
+@samp{label not defined before binding contour} or similar messages,
+when compiling with @samp{-fstack-check} or
+when compiling for certain targets.
+
+Because of that, and because sometimes these temporaries are not
+discovered until in the middle of of generating code for an expression
+statement (as in the case of the optimization for @samp{X**I}),
+it seems best to always
+pre-scan all the expressions that'll be expanded for a block
+before generating any of the code for that block.
+
+This pre-scan then handles discovering and declaring, to the back end,
+the temporaries needed for that block.
+
+It's also important to treat distinct items in an I/O list as distinct
+statements deserving their own blocks.
+That's because there's a requirement
+that each I/O item be fully processed before the next one,
+which matters in cases like @samp{READ (*,*), I, A(I)}---the
+element of @samp{A} read in the second item
+@emph{must} be determined from the value
+of @samp{I} read in the first item.
+
+@node Transforming DO WHILE
+@subsection Transforming DO WHILE
+
+@samp{DO WHILE(expr)} @emph{must} be implemented
+so that temporaries needed to evaluate @samp{expr}
+are generated just for the test, each time.
+
+Consider how @samp{DO WHILE (A//B .NE. 'END'); @dots{}; END DO} is transformed:
+
+@smallexample
+for (;;)
+ @{
+ int temp0;
+
+ @{
+ char temp1[large];
+
+ libg77_catenate (temp1, a, b);
+ temp0 = libg77_ne (temp1, 'END');
+ @}
+
+ if (! temp0)
+ break;
+
+ @dots{}
+ @}
+@end smallexample
+
+In this case, it seems like a time/space tradeoff
+between allocating and deallocating @samp{temp1} for each iteration
+and allocating it just once for the entire loop.
+
+However, if @samp{temp1} is allocated just once for the entire loop,
+it could be the wrong size for subsequent iterations of that loop
+in cases like @samp{DO WHILE (A(I:J)//B .NE. 'END')},
+because the body of the loop might modify @samp{I} or @samp{J}.
+
+So, the above implementation is used,
+though a more optimal one can be used
+in specific circumstances.
+
+@node Transforming Iterative DO
+@subsection Transforming Iterative DO
+
+An iterative @code{DO} loop
+(one that specifies an iteration variable)
+is required by the Fortran standards
+to be implemented as though an iteration count
+is computed before entering the loop body,
+and that iteration count used to determine
+the number of times the loop body is to be performed
+(assuming the loop isn't cut short via @code{GOTO} or @code{EXIT}).
+
+The FFE handles this by allocating a temporary variable
+to contain the computed number of iterations.
+Since this variable must be in a scope that includes the entire loop,
+a GBEL block is created for that loop,
+and the variable declared as belonging to the scope of that block.
+
+@node Transforming Block IF
+@subsection Transforming Block IF
+
+Consider:
+
+@smallexample
+SUBROUTINE X(A,B,C)
+CHARACTER*(*) A, B, C
+LOGICAL LFUNC
+
+IF (LFUNC (A//B)) THEN
+ CALL SUBR1
+ELSE IF (LFUNC (A//C)) THEN
+ CALL SUBR2
+ELSE
+ CALL SUBR3
+END
+@end smallexample
+
+The arguments to the two calls to @samp{LFUNC}
+require dynamic allocation (at run time),
+but are not required during execution of the @code{CALL} statements.
+
+So, the scopes of those temporaries must be within blocks inside
+the block corresponding to the Fortran @code{IF} block.
+
+This cannot be represented ``naturally''
+in vanilla C, nor in GBEL.
+The @code{if}, @code{elseif}, @code{else},
+and @code{endif} constructs
+provided by both languages must,
+for a given @code{if} block,
+share the same C/GBE block.
+
+Therefore, any temporaries needed during evaluation of @samp{expr}
+while executing @samp{ELSE IF(expr)}
+must either have been predeclared
+at the top of the corresponding @code{IF} block,
+or declared within a new block for that @code{ELSE IF}---a block that,
+since it cannot contain the @code{else} or @code{else if} itself
+(due to the above requirement),
+actually implements the rest of the @code{IF} block's
+@code{ELSE IF} and @code{ELSE} statements
+within an inner block.
+
+The FFE takes the latter approach.
+
+@node Transforming SELECT CASE
+@subsection Transforming SELECT CASE
+
+@code{SELECT CASE} poses a few interesting problems for code generation,
+if efficiency and frugal stack management are important.
+
+Consider @samp{SELECT CASE (I('PREFIX'//A))},
+where @samp{A} is @code{CHARACTER*(*)}.
+In a case like this---basically,
+in any case where largish temporaries are needed
+to evaluate the expression---those temporaries should
+not be ``live'' during execution of any of the @code{CASE} blocks.
+
+So, evaluation of the expression is best done within its own block,
+which in turn is within the @code{SELECT CASE} block itself
+(which contains the code for the CASE blocks as well,
+though each within their own block).
+
+Otherwise, we'd have the rough equivalent of this pseudo-code:
+
+@smallexample
+@{
+ char temp[large];
+
+ libg77_catenate (temp, 'prefix', a);
+
+ switch (i (temp))
+ @{
+ case 0:
+ @dots{}
+ @}
+@}
+@end smallexample
+
+And that would leave temp[large] in scope during the CASE blocks
+(although a clever back end *could* see that it isn't referenced
+in them, and thus free that temp before executing the blocks).
+
+So this approach is used instead:
+
+@smallexample
+@{
+ int temp0;
+
+ @{
+ char temp1[large];
+
+ libg77_catenate (temp1, 'prefix', a);
+ temp0 = i (temp1);
+ @}
+
+ switch (temp0)
+ @{
+ case 0:
+ @dots{}
+ @}
+@}
+@end smallexample
+
+Note how @samp{temp1} goes out of scope before starting the switch,
+thus making it easy for a back end to free it.
+
+The problem @emph{that} solution has, however,
+is with @samp{SELECT CASE('prefix'//A)}
+(which is currently not supported).
+
+Unless the GBEL is extended to support arbitrarily long character strings
+in its @code{case} facility,
+the FFE has to implement @code{SELECT CASE} on @code{CHARACTER}
+(probably excepting @code{CHARACTER*1})
+using a cascade of
+@code{if}, @code{elseif}, @code{else}, and @code{endif} constructs
+in GBEL.
+
+To prevent the (potentially large) temporary,
+needed to hold the selected expression itself (@samp{'prefix'//A}),
+from being in scope during execution of the @code{CASE} blocks,
+two approaches are available:
+
+@itemize @bullet
+@item
+Pre-evaluate all the @code{CASE} tests,
+producing an integer ordinal that is used,
+a la @samp{temp0} in the earlier example,
+as if @samp{SELECT CASE(temp0)} had been written.
+
+Each corresponding @code{CASE} is replaced with @samp{CASE(@var{i})},
+where @var{i} is the ordinal for that case,
+determined while, or before,
+generating the cascade of @code{if}-related constructs
+to cope with @code{CHARACTER} selection.
+
+@item
+Make @samp{temp0} above just
+large enough to hold the longest @code{CASE} string
+that'll actually be compared against the expression
+(in this case, @samp{'prefix'//A}).
+
+Since that length must be constant
+(because @code{CASE} expressions are all constant),
+it won't be so large,
+and, further, @samp{temp1} need not be dynamically allocated,
+since normal @code{CHARACTER} assignment can be used
+into the fixed-length @samp{temp0}.
+@end itemize
+
+Both of these solutions require @code{SELECT CASE} implementation
+to be changed so all the corresponding @code{CASE} statements
+are seen during the actual code generation for @code{SELECT CASE}.
+
+@node Transforming Expressions
+@section Transforming Expressions
+
+The interactions between statements, expressions, and subexpressions
+at program run time can be viewed as:
+
+@smallexample
+@var{action}(@var{expr})
+@end smallexample
+
+Here, @var{action} is the series of steps
+performed to effect the statement,
+and @var{expr} is the expression
+whose value is used by @var{action}.
+
+Expanding the above shows a typical order of events at run time:
+
+@smallexample
+Evaluate @var{expr}
+Perform @var{action}, using result of evaluation of @var{expr}
+Clean up after evaluating @var{expr}
+@end smallexample
+
+So, if evaluating @var{expr} requires allocating memory,
+that memory can be freed before performing @var{action}
+only if it is not needed to hold the result of evaluating @var{expr}.
+Otherwise, it must be freed no sooner than
+after @var{action} has been performed.
+
+The above are recursive definitions,
+in the sense that they apply to subexpressions of @var{expr}.
+
+That is, evaluating @var{expr} involves
+evaluating all of its subexpressions,
+performing the @var{action} that computes the
+result value of @var{expr},
+then cleaning up after evaluating those subexpressions.
+
+The recursive nature of this evaluation is implemented
+via recursive-descent transformation of the top-level statements,
+their expressions, @emph{their} subexpressions, and so on.
+
+However, that recursive-descent transformation is,
+due to the nature of the GBEL,
+focused primarily on generating a @emph{single} stream of code
+to be executed at run time.
+
+Yet, from the above, it's clear that multiple streams of code
+must effectively be simultaneously generated
+during the recursive-descent analysis of statements.
+
+The primary stream implements the primary @var{action} items,
+while at least two other streams implement
+the evaluation and clean-up items.
+
+Requirements imposed by expressions include:
+
+@itemize @bullet
+@item
+Whether the caller needs to have a temporary ready
+to hold the value of the expression.
+
+@item
+Other stuff???
+@end itemize
+
+@node Internal Naming Conventions
+@section Internal Naming Conventions
+
+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/contrib/gcc/f/fini.c b/contrib/gcc/f/fini.c
index 439ecca..1b7c981 100644
--- a/contrib/gcc/f/fini.c
+++ b/contrib/gcc/f/fini.c
@@ -1,6 +1,6 @@
/* fini.c
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -19,9 +19,12 @@ along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
+#define USE_HCONFIG
+
#include "proj.h"
#include "malloc.h"
+#undef MAXNAMELEN
#define MAXNAMELEN 100
typedef struct _name_ *name;
@@ -59,7 +62,7 @@ static FILE *out;
static char prefix[32];
static char postfix[32];
static char storage[32];
-static char *spaces[]
+static const char *xspaces[]
=
{
"", /* 0 */
@@ -633,7 +636,7 @@ testname (bool nested, int indent, name first, name last)
int numhalf;
assert (!nested || indent >= 2);
- assert (((size_t) indent) + 4 < ARRAY_SIZE (spaces));
+ assert (((size_t) indent) + 4 < ARRAY_SIZE (xspaces));
num = 0;
numhalf = 0;
@@ -651,15 +654,15 @@ testname (bool nested, int indent, name first, name last)
"\
%s{\n\
",
- spaces[indent - 2]);
+ xspaces[indent - 2]);
fprintf (out,
"\
%sif ((c = ffesrc_strcmp_2c (ffe_case_match (), p, \"%s\", \"%s\", \"%s\")) == 0)\n\
%sreturn %s%s%s;\n\
",
- spaces[indent], nhalf->name_uc, nhalf->name_lc, nhalf->name_ic,
- spaces[indent + 2], prefix, nhalf->kwname, postfix);
+ xspaces[indent], nhalf->name_uc, nhalf->name_lc, nhalf->name_ic,
+ xspaces[indent + 2], prefix, nhalf->kwname, postfix);
if (num != 1)
{
@@ -667,14 +670,14 @@ testname (bool nested, int indent, name first, name last)
"\
%selse if (c < 0)\n\
",
- spaces[indent]);
+ xspaces[indent]);
if (numhalf == 0)
fprintf (out,
"\
%s;\n\
",
- spaces[indent + 2]);
+ xspaces[indent + 2]);
else
testname (TRUE, indent + 4, first, nhalf->previous);
@@ -684,7 +687,7 @@ testname (bool nested, int indent, name first, name last)
"\
%selse\n\
",
- spaces[indent]);
+ xspaces[indent]);
testname (TRUE, indent + 4, nhalf->next, last);
}
@@ -695,7 +698,7 @@ testname (bool nested, int indent, name first, name last)
"\
%s}\n\
",
- spaces[indent - 2]);
+ xspaces[indent - 2]);
}
void
@@ -707,7 +710,7 @@ testnames (bool nested, int indent, int len, name first, name last)
int numhalf;
assert (!nested || indent >= 2);
- assert (((size_t) indent) + 4 < ARRAY_SIZE (spaces));
+ assert (((size_t) indent) + 4 < ARRAY_SIZE (xspaces));
num = 0;
numhalf = 0;
@@ -725,15 +728,15 @@ testnames (bool nested, int indent, int len, name first, name last)
"\
%s{\n\
",
- spaces[indent - 2]);
+ xspaces[indent - 2]);
fprintf (out,
"\
%sif ((c = ffesrc_strncmp_2c (ffe_case_match (), p, \"%s\", \"%s\", \"%s\", %d)) == 0)\n\
%sreturn %s%s%s;\n\
",
- spaces[indent], nhalf->name_uc, nhalf->name_lc, nhalf->name_ic,
- len, spaces[indent + 2], prefix, nhalf->kwname, postfix);
+ xspaces[indent], nhalf->name_uc, nhalf->name_lc, nhalf->name_ic,
+ len, xspaces[indent + 2], prefix, nhalf->kwname, postfix);
if (num != 1)
{
@@ -741,14 +744,14 @@ testnames (bool nested, int indent, int len, name first, name last)
"\
%selse if (c < 0)\n\
",
- spaces[indent]);
+ xspaces[indent]);
if (numhalf == 0)
fprintf (out,
"\
%s;\n\
",
- spaces[indent + 2]);
+ xspaces[indent + 2]);
else
testnames (TRUE, indent + 4, len, first, nhalf->previous);
@@ -758,7 +761,7 @@ testnames (bool nested, int indent, int len, name first, name last)
"\
%selse\n\
",
- spaces[indent]);
+ xspaces[indent]);
testnames (TRUE, indent + 4, len, nhalf->next, last);
}
@@ -769,5 +772,5 @@ testnames (bool nested, int indent, int len, name first, name last)
"\
%s}\n\
",
- spaces[indent - 2]);
+ xspaces[indent - 2]);
}
diff --git a/contrib/gcc/f/flags.j b/contrib/gcc/f/flags.j
index 02742d8..44587a4 100644
--- a/contrib/gcc/f/flags.j
+++ b/contrib/gcc/f/flags.j
@@ -1,6 +1,6 @@
/* flags.j -- Wrapper for GCC's flags.h
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/g77.1 b/contrib/gcc/f/g77.1
index d6a465b..3f20af9 100644
--- a/contrib/gcc/f/g77.1
+++ b/contrib/gcc/f/g77.1
@@ -1,7 +1,7 @@
.\" Copyright (c) 1995-1997 Free Software Foundation -*-Text-*-
.\" See section COPYING for conditions for redistribution
.\" FIXME: no info here on predefines. Should there be? extra for F77...
-.TH G77 1 "1998-09-01" "GNU Tools" "GNU Tools"
+.TH G77 1 "1999-02-14" "GNU Tools" "GNU Tools"
.de BP
.sp
.ti \-.2i
@@ -88,14 +88,18 @@ For complete documentation on GNU Fortran, type `\|\c
F77 source files use the suffix `\|\c
.B .f\c
-\&\|' or `\|\c
+\&\|', `\|\c
.B .for\c
+\&\|', or `\|\c
+.B .FOR\c
\&\|'; F77 files to be preprocessed by
.BR cpp ( 1 )
use the suffix `\|\c
.B .F\c
-\&\|' or `\|\c
+\&\|', `\|\c
.B .fpp\c
+\&\|', or `\|\c
+.B .FPP\c
\&\|'; Ratfor source files use the suffix `\|\c
.B .r\c
\&\|' (though
@@ -250,10 +254,14 @@ file.f Fortran source file
.br
file.for Fortran source file
.br
+file.FOR Fortran source file
+.br
file.F preprocessed Fortran source file
.br
file.fpp preprocessed Fortran source file
.br
+file.FPP preprocessed Fortran source file
+.br
file.r Ratfor source file (ratfor not included)
.br
file.s assembly language file
diff --git a/contrib/gcc/f/g77.texi b/contrib/gcc/f/g77.texi
index 48c36e9..eaab254 100644
--- a/contrib/gcc/f/g77.texi
+++ b/contrib/gcc/f/g77.texi
@@ -1,28 +1,15 @@
\input texinfo @c -*-texinfo-*-
-@c fix @set inside @example:
-@tex
-\gdef\set{\begingroup\catcode` =10 \parsearg\setxxx}
-\gdef\setyyy#1 #2\endsetyyy{%
- \def\temp{#2}%
- \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty
- \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted.
- \fi
- \endgroup
-}
-@end tex
-
-@c %**start of header
+@c %**start of header
@setfilename g77.info
-@set last-up-date 1999-03-11
-@set version-g77 0.5.24
-@set version-egcs 1.1.2
-@set email-general egcs@@egcs.cygnus.com
-@set email-bugs egcs-bugs@@egcs.cygnus.com
-@set email-burley craig@@jcb-sc.com
-@set path-g77 egcs/gcc/f
-@set path-libf2c egcs/libf2c
-@set which-g77 @code{egcs}-@value{version-egcs}
+@set last-update 1999-06-06
+@set copyrights-g77 1995-1999
+
+@include root.texi
+
+@c This tells @include'd files that they're part of the overall G77 doc
+@c set. (They might be part of a higher-level doc set too.)
+@set DOC-G77
@c @setfilename useg77.info
@c @setfilename portg77.info
@@ -37,9 +24,13 @@
@c and make sure the following does NOT begin with '@c':
@c @clear USING
-@c (For FSF printing, turn on smallbook; that is all that is needed.)
+@c 6/27/96 FSF DO wants smallbook fmt for 1st bound edition. (from gcc.texi)
+@c @smallbook
-@c smallbook
+@c i also commented out the finalout command, so if there *are* any
+@c overfulls, you'll (hopefully) see the rectangle in the right hand
+@c margin. -- burley 1999-03-13 (from mew's comment in gcc.texi).
+@c @finalout
@ifset INTERNALS
@ifset USING
@@ -52,7 +43,7 @@
@end ifclear
@ifclear USING
@settitle Porting GNU Fortran
-@end ifclear
+@end ifclear
@c then again, have some fun
@ifclear INTERNALS
@ifclear USING
@@ -63,16 +54,48 @@
@syncodeindex fn cp
@syncodeindex vr cp
@c %**end of header
-@setchapternewpage odd
+
+@c Cause even numbered pages to be printed on the left hand side of
+@c the page and odd numbered pages to be printed on the right hand
+@c side of the page. Using this, you can print on both sides of a
+@c sheet of paper and have the text on the same part of the sheet.
+
+@c The text on right hand pages is pushed towards the right hand
+@c margin and the text on left hand pages is pushed toward the left
+@c hand margin.
+@c (To provide the reverse effect, set bindingoffset to -0.75in.)
+
+@c @tex
+@c \global\bindingoffset=0.75in
+@c \global\normaloffset =0.75in
+@c @end tex
@ifinfo
-This file explains how to use the GNU Fortran system.
+@dircategory Programming
+@direntry
+* g77: (g77). The GNU Fortran compiler.
+@end direntry
+@ifset INTERNALS
+@ifset USING
+This file documents the use and the internals of the GNU Fortran (@code{g77})
+compiler.
+It corresponds to the @value{which-g77} version of @code{g77}.
+@end ifset
+@end ifset
+@ifclear USING
+This file documents the internals of the GNU Fortran (@code{g77}) compiler.
+It corresponds to the @value{which-g77} version of @code{g77}.
+@end ifclear
+@ifclear INTERNALS
+This file documents the use of the GNU Fortran (@code{g77}) compiler.
+It corresponds to the @value{which-g77} version of @code{g77}.
+@end ifclear
Published by the Free Software Foundation
59 Temple Place - Suite 330
Boston, MA 02111-1307 USA
-Copyright (C) 1995-1997 Free Software Foundation, Inc.
+Copyright (C) @value{copyrights-g77} Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -106,23 +129,32 @@ Contributed by James Craig Burley (@email{@value{email-burley}}).
Inspired by a first pass at translating @file{g77-0.5.16/f/DOC} that
was contributed to Craig by David Ronis (@email{ronis@@onsager.chem.mcgill.ca}).
-@finalout
+@setchapternewpage odd
+@c @finalout
@titlepage
-@comment The title is printed in a large font.
-@center @titlefont{Using GNU Fortran}
+@ifset INTERNALS
+@ifset USING
+@center @titlefont{Using and Porting GNU Fortran}
+
+@end ifset
+@end ifset
+@ifclear INTERNALS
+@title Using GNU Fortran
+@end ifclear
+@ifclear USING
+@title Porting GNU Fortran
+@end ifclear
@sp 2
@center James Craig Burley
@sp 3
-@center Last updated @value{last-up-date}
+@center Last updated @value{last-update}
@sp 1
-@c The version number appears some more times in this file.
-
@center for version @value{version-g77}
@page
@vskip 0pt plus 1filll
-Copyright @copyright{} 1995-1997 Free Software Foundation, Inc.
+Copyright @copyright{} @value{copyrights-g77} Free Software Foundation, Inc.
@sp 2
-For GNU Fortran Version @value{version-g77}*
+For the @value{which-g77} Version*
@sp 1
Published by the Free Software Foundation @*
59 Temple Place - Suite 330@*
@@ -155,40 +187,50 @@ original English.
@ifinfo
-@dircategory Programming
-@direntry
-* g77: (g77). The GNU Fortran compiler.
-@end direntry
@node Top, Copying,, (DIR)
@top Introduction
@cindex Introduction
@ifset INTERNALS
@ifset USING
-This manual documents how to run, install and port the GNU Fortran
-compiler, as well as its new features and incompatibilities, and how to
-report bugs. It corresponds to GNU Fortran version @value{version-g77}.
+This manual documents how to run, install and port @code{g77},
+as well as its new features and incompatibilities,
+and how to report bugs.
+It corresponds to the @value{which-g77} version of @code{g77}.
@end ifset
@end ifset
@ifclear INTERNALS
-This manual documents how to run and install the GNU Fortran compiler,
+This manual documents how to run and install @code{g77},
as well as its new features and incompatibilities, and how to report
-bugs. It corresponds to GNU Fortran version @value{version-g77}.
+bugs.
+It corresponds to the @value{which-g77} version of @code{g77}.
@end ifclear
@ifclear USING
-This manual documents how to port the GNU Fortran compiler,
-as well as its new features and incompatibilities, and how to report
-bugs. It corresponds to GNU Fortran version @value{version-g77}.
+This manual documents how to port @code{g77},
+as well as its new features and incompatibilities,
+and how to report bugs.
+It corresponds to the @value{which-g77} version of @code{g77}.
@end ifclear
-An online, ``live'' version of this document
-(derived directly from the up-to-date mainline version
-of @code{g77} within @code{egcs})
-is available at
-@uref{http://egcs.cygnus.com/onlinedocs/g77_toc.html}.
-
@end ifinfo
+
+@ifset DEVELOPMENT
+@emph{Warning:} This document is still under development,
+and might not accurately reflect the @code{g77} code base
+of which it is a part.
+Efforts are made to keep it somewhat up-to-date,
+but they are particularly concentrated
+on any version of this information
+that is distributed as part of a @emph{released} @code{g77}.
+
+In particular, while this document is intended to apply to
+the @value{which-g77} version of @code{g77},
+only an official @emph{release} of that version
+is expected to contain documentation that is
+most consistent with the @code{g77} product in that version.
+@end ifset
+
@menu
* Copying:: GNU General Public License says
how you can copy and share GNU Fortran.
@@ -219,6 +261,7 @@ is available at
@ifset INTERNALS
* Adding Options:: Guidance on teaching @code{g77} about new options.
* Projects:: Projects for @code{g77} internals hackers.
+* Front End:: Design and implementation of the @code{g77} front end.
@end ifset
* M: Diagnostics. Diagnostics produced by @code{g77}.
@@ -567,9 +610,9 @@ the ``copyright'' line and a pointer to where the full notice is found.
@var{one line to give the program's name and a brief idea of what it does.}
Copyright (C) 19@var{yy} @var{name of author}
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@@ -590,8 +633,8 @@ when it starts in an interactive mode:
@smallexample
Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
-type `show w'.
-This is free software, and you are welcome to redistribute it
+type `show w'.
+This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
@end smallexample
@@ -786,6 +829,8 @@ without royalty; alteration is not permitted.
Work on GNU Fortran is still being done mostly by its author,
James Craig Burley (@email{@value{email-burley}}), who is a volunteer
for, not an employee of, the Free Software Foundation (FSF).
+(He has a web page at @uref{@value{www-burley}}.)
+
As with other GNU software, funding is important because it can pay for
needed equipment, personnel, and so on.
@@ -810,7 +855,7 @@ continuing operation of the FSF offices, their workstations, their
network connections, and so on, which are invaluable to volunteers.
(Similarly, hiring Cygnus Support can help a project like GNU
Fortran---Cygnus has been a long-time donor of equipment usage to the author
-of GNU Fortran, and this too has been invaluable---@xref{Contributors}.)
+of GNU Fortran, and this too has been invaluable---see @ref{Contributors}.)
Currently, the only way to directly fund the author of GNU Fortran
in his work on that project is to hire him for the work you want
@@ -838,7 +883,7 @@ Email @email{@value{email-general}} to volunteer for this work.
@node Look and Feel
@chapter Protect Your Freedom---Fight ``Look And Feel''
-@c the above chapter heading overflows onto the next line. --mew 1/26/93
+@c the above chapter heading overflows onto the next line. --mew 1/26/93
To preserve the ability to write free software, including replacements
for proprietary software, authors must be free to replicate the
@@ -872,7 +917,7 @@ Everyone except experienced @code{g77} users should
see @ref{Invoking G77}.
If you're acquainted with previous versions of @code{g77},
-you should see @ref{News}.
+you should see @ref{News,,News About GNU Fortran}.
Further, if you've actually used previous versions of @code{g77},
especially if you've written or modified Fortran code to
be compiled by previous versions of @code{g77}, you
@@ -966,8 +1011,8 @@ to make big mistakes.
@cindex debugger
@cindex bugs, finding
-@cindex gdb command
-@cindex commands, gdb
+@cindex @code{gdb}, command
+@cindex commands, @code{gdb}
@item
They provide information in the generated machine code
that can make it easier to find bugs in the program
@@ -976,8 +1021,8 @@ such as @code{gdb}).
@cindex libraries
@cindex linking
-@cindex ld command
-@cindex commands, ld
+@cindex @code{ld} command
+@cindex commands, @code{ld}
@item
They locate and gather machine code already generated
to perform actions requested by statements in
@@ -1036,11 +1081,11 @@ of the language), how much time to spend making
the generated machine code run faster, and so on.
@cindex components of g77
-@cindex g77, components of
+@cindex @code{g77}, components of
@code{g77} consists of several components:
-@cindex gcc command
-@cindex commands, gcc
+@cindex @code{gcc}, command
+@cindex commands, @code{gcc}
@itemize @bullet
@item
A modified version of the @code{gcc} command, which also might be
@@ -1051,8 +1096,8 @@ might be a non-GNU compiler, or an older version
of @code{gcc} considered more stable or that is
used to build the operating system kernel.)
-@cindex g77 command
-@cindex commands, g77
+@cindex @code{g77}, command
+@cindex commands, @code{g77}
@item
The @code{g77} command itself, which also might be installed as the
system's @code{f77} command.
@@ -1061,7 +1106,7 @@ system's @code{f77} command.
@cindex libf2c library
@cindex libraries, libf2c
@cindex libraries, libg2c
-@cindex run-time library
+@cindex run-time, library
@item
The @code{libg2c} run-time library.
This library contains the machine code needed to support
@@ -1079,11 +1124,11 @@ on the system.
The maintainer of @code{libf2c} currently is
@email{dmg@@bell-labs.com}.
-@cindex f771 program
-@cindex programs, f771
+@cindex @code{f771}, program
+@cindex programs, @code{f771}
@cindex assembler
-@cindex as command
-@cindex commands, as
+@cindex @code{as} command
+@cindex commands, @code{as}
@cindex assembly code
@cindex code, assembly
@item
@@ -1103,7 +1148,7 @@ preprocessing, compiling (in a variety of possible languages), assembling,
and linking.
@cindex driver, gcc command as
-@cindex gcc command as driver
+@cindex @code{gcc}, command as driver
@cindex executable file
@cindex files, executable
@cindex cc1 program
@@ -1124,14 +1169,14 @@ As another example, the command @samp{gcc foo.cc} would do much the same as
@samp{gcc foo.c}, but instead of using the C compiler named @code{cc1},
@code{gcc} would use the C++ compiler (named @code{cc1plus}).
-@cindex f771 program
-@cindex programs, f771
+@cindex @code{f771}, program
+@cindex programs, @code{f771}
In a GNU Fortran installation, @code{gcc} recognizes Fortran source
files by name just like it does C and C++ source files.
It knows to use the Fortran compiler named @code{f771}, instead of
@code{cc1} or @code{cc1plus}, to compile Fortran files.
-@cindex gcc not recognizing Fortran source
+@cindex @code{gcc}, not recognizing Fortran source
@cindex unrecognized file format
@cindex file format not recognized
Non-Fortran-related operation of @code{gcc} is generally
@@ -1141,8 +1186,8 @@ GNU Fortran version, @code{gcc} will not be able to compile
and link Fortran programs---and since @code{g77} uses @code{gcc}
to do most of the actual work, neither will @code{g77}!
-@cindex g77 command
-@cindex commands, g77
+@cindex @code{g77}, command
+@cindex commands, @code{g77}
The @code{g77} command is essentially just a front-end for
the @code{gcc} command.
Fortran users will normally use @code{g77} instead of @code{gcc},
@@ -1201,7 +1246,7 @@ large chunks of code.
@cindex GNU Back End (GBE)
@cindex GBE
-@cindex gcc back end
+@cindex @code{gcc}, back end
@cindex back end, gcc
@cindex code generator
One chunk is the so-called @dfn{GNU Back End}, or GBE,
@@ -1214,8 +1259,8 @@ whenever the distinction is important.
@cindex GNU Fortran Front End (FFE)
@cindex FFE
-@cindex g77 front end
-@cindex front end, g77
+@cindex @code{g77}, front end
+@cindex front end, @code{g77}
The other chunk of @code{f771} is the
majority of what is unique about GNU Fortran---the code that knows how
to interpret Fortran programs to determine what they are intending to
@@ -1245,8 +1290,8 @@ of generated code (in terms of speed and size) is roughly similar
@cindex compiling programs
@cindex programs, compiling
-@cindex gcc command
-@cindex commands, gcc
+@cindex @code{gcc}, command
+@cindex commands, @code{gcc}
A GNU Fortran installation includes a modified version of the @code{gcc}
command.
@@ -1262,8 +1307,8 @@ but apply to other languages as well.
for information on the way different languages are handled
by the GNU CC compiler (@code{gcc}).
-@cindex g77 command
-@cindex commands, g77
+@cindex @code{g77}, command
+@cindex commands, @code{g77}
Also provided as part of GNU Fortran is the @code{g77} command.
The @code{g77} command is designed to make compiling and linking Fortran
programs somewhat easier than when using the @code{gcc} command for
@@ -1272,7 +1317,7 @@ It does this by analyzing the command line somewhat and changing it
appropriately before submitting it to the @code{gcc} command.
@cindex -v option
-@cindex g77 options, -v
+@cindex @code{g77} options, -v
@cindex options, -v
Use the @samp{-v} option with @code{g77}
to see what is going on---the first line of output is the invocation
@@ -1343,7 +1388,7 @@ by type. Explanations are in the following sections.
@item Shorthand Options
@xref{Shorthand Options}.
@smallexample
--ff66 -fno-f66 -ff77 -fno-f77 -fugly -fno-ugly
+-ff66 -fno-f66 -ff77 -fno-f77 -fno-ugly
@end smallexample
@item Fortran Language Options
@@ -1422,10 +1467,11 @@ by type. Explanations are in the following sections.
-fpcc-struct-return -freg-struct-return
-fshort-double -fno-common -fpack-struct
-fzeros -fno-second-underscore
--fdebug-kludge -fno-emulate-complex
+-fdebug-kludge -femulate-complex
-falias-check -fargument-alias
-fargument-noalias -fno-argument-noalias-global
--fno-globals
+-fno-globals -fflatten-arrays
+-fbounds-check -ffortran-bounds-check
@end smallexample
@end table
@@ -1473,15 +1519,20 @@ Suffixes specific to GNU Fortran are listed below.
information on suffixes recognized by GNU CC.
@table @code
+@cindex .f filename suffix
+@cindex .for filename suffix
+@cindex .FOR filename suffix
@item @var{file}.f
@item @var{file}.for
+@item @var{file}.FOR
Fortran source code that should not be preprocessed.
Such source code cannot contain any preprocessor directives, such
as @code{#include}, @code{#define}, @code{#if}, and so on.
-You can force @samp{.f} files to be preprocessed by @samp{cpp} by using
-@samp{-x f77-cpp-input}, @ref{LEX}.
+You can force @samp{.f} files to be preprocessed by @code{cpp} by using
+@samp{-x f77-cpp-input}.
+@xref{LEX}.
@cindex preprocessor
@cindex C preprocessor
@@ -1491,8 +1542,10 @@ You can force @samp{.f} files to be preprocessed by @samp{cpp} by using
@cindex programs, cpp
@cindex .F filename suffix
@cindex .fpp filename suffix
+@cindex .FPP filename suffix
@item @var{file}.F
@item @var{file}.fpp
+@item @var{file}.FPP
Fortran source code that must be preprocessed (by the C preprocessor
@code{cpp}, which is part of GNU CC).
@@ -1501,9 +1554,9 @@ files included by the @code{INCLUDE} directive---the @code{#include}
preprocessor directive must be used instead.
@cindex Ratfor preprocessor
-@cindex programs, ratfor
-@cindex .r filename suffix
-@pindex ratfor
+@cindex programs, @code{ratfor}
+@cindex @samp{.r} filename suffix
+@cindex @code{ratfor}
@item @var{file}.r
Ratfor source code, which must be preprocessed by the @code{ratfor}
command, which is available separately (as it is not yet part of the GNU
@@ -1584,12 +1637,18 @@ by the @code{g77} and @code{gcc} commands in a GNU Fortran installation:
@cindex options, -fversion
@cindex printing version information
@cindex version information, printing
+@cindex consistency checks
+@cindex internal consistency checks
+@cindex checks, of internal consistency
@item -fversion
Ensure that the @code{g77}-specific version of the compiler phase is reported,
-if run.
-(This is supplied automatically when @samp{-v} or @samp{--verbose}
+if run,
+and, starting in @code{egcs} version 1.1,
+that internal consistency checks in the @file{f771} program are run.
+
+This option is supplied automatically when @samp{-v} or @samp{--verbose}
is specified as a command-line option for @code{g77} or @code{gcc}
-and when the resulting commands compile Fortran source files.)
+and when the resulting commands compile Fortran source files.
@cindex -fset-g77-defaults option
@cindex options, -fset-g77-defaults
@@ -1597,7 +1656,13 @@ and when the resulting commands compile Fortran source files.)
@emph{Version info:}
This option is obsolete in @code{egcs}
as of version 1.1.
+The effect is instead achieved
+by the @code{lang_init_options} routine
+in @file{egcs/gcc/f/com.c}.
+@cindex consistency checks
+@cindex internal consistency checks
+@cindex checks, of internal consistency
Set up whatever @code{gcc} options are to apply to Fortran
compilations, and avoid running internal consistency checks
that might take some time.
@@ -1623,10 +1688,10 @@ with a diagnostic if it detects an inconsistency.
@cindex -fno-silent option
@cindex options, -fno-silent
-@cindex @code{f2c} compatibility
-@cindex compatibility, @code{f2c}
+@cindex f2c compatibility
+@cindex compatibility, f2c
@cindex status, compilation
-@cindex compilation status
+@cindex compilation, status
@cindex reporting compilation status
@cindex printing compilation status
@item -fno-silent
@@ -1656,6 +1721,10 @@ for other options accepted by the compiler:
@item -fugly
@cindex ugly features
@cindex features, ugly
+@emph{Note:} This option is no longer supported.
+The information, below, is provided to aid
+in the conversion of old scripts.
+
Specify that certain ``ugly'' constructs are to be quietly accepted.
Same as:
@@ -1670,14 +1739,6 @@ or well-maintained portable Fortran code, but widely used
in old code.
@xref{Distensions}, for more information.
-@emph{Note:} The @samp{-fugly} option is likely to
-be removed in a future version.
-Implicitly enabling all the @samp{-fugly-*} options
-is unlikely to be feasible, or sensible, in the future,
-so users should learn to specify only those
-@samp{-fugly-*} options they really need for a
-particular source file.
-
@cindex -fno-ugly option
@cindex options, -fno-ugly
@item -fno-ugly
@@ -1713,10 +1774,10 @@ existing and obsolete Fortran implementations.
@cindex options, -ff77
@item -ff77
@cindex UNIX f77
-@cindex @code{f2c} compatibility
-@cindex compatibility, @code{f2c}
-@cindex @code{f77} compatibility
-@cindex compatibility, @code{f77}
+@cindex f2c compatibility
+@cindex compatibility, f2c
+@cindex f77 compatibility
+@cindex compatibility, f77
Specify that the program is written in idiomatic UNIX FORTRAN 77
and/or the dialect accepted by the @code{f2c} product.
Same as @samp{-fbackslash -fno-typeless-boz}.
@@ -1743,7 +1804,7 @@ existing and obsolete Fortran implementations.
@node Fortran Dialect Options
@section Options Controlling Fortran Dialect
@cindex dialect options
-@cindex language dialect options
+@cindex language, dialect options
@cindex options, dialect
The following options control the dialect of Fortran
@@ -1754,10 +1815,10 @@ that the compiler accepts:
@cindex options, -ffree-form
@cindex -fno-fixed-form option
@cindex options, -fno-fixed-form
-@cindex source file form
+@cindex source file format
@cindex free form
@cindex fixed form
-@cindex Fortran 90 features
+@cindex Fortran 90, features
@item -ffree-form
@item -fno-fixed-form
Specify that the source file is written in free form
@@ -1765,7 +1826,7 @@ Specify that the source file is written in free form
@cindex -ff90 option
@cindex options, -ff90
-@cindex Fortran 90 features
+@cindex Fortran 90, features
@item -ff90
Allow certain Fortran-90 constructs.
@@ -1781,8 +1842,8 @@ current level of support for Fortran 90.)
@cindex -fvxt option
@cindex options, -fvxt
@item -fvxt
-@cindex Fortran 90 features
-@cindex VXT features
+@cindex Fortran 90, features
+@cindex VXT extensions
Specify the treatment of certain constructs that have different
meanings depending on whether the code is written in
GNU Fortran (based on FORTRAN 77 and akin to Fortran 90)
@@ -1922,14 +1983,16 @@ For example, automatic conversion between @code{INTEGER} and
@cindex options, -fonetrip
@item -fonetrip
@cindex FORTRAN 66
-@cindex DO loops, one-trip
-@cindex one-trip DO loops
+@cindex @code{DO} loops, one-trip
+@cindex one-trip @code{DO} loops
+@cindex @code{DO} loops, zero-trip
+@cindex zero-trip @code{DO} loops
@cindex compatibility, FORTRAN 66
-Imperative executable @code{DO} loops are to be executed at
+Executable iterative @code{DO} loops are to be executed at
least once each time they are reached.
ANSI FORTRAN 77 and more recent versions of the Fortran standard
-specify that the body of an imperative @code{DO} loop is not executed
+specify that the body of an iterative @code{DO} loop is not executed
if the number of iterations calculated from the parameters of the
loop is less than 1.
(For example, @samp{DO 10 I = 1, 0}.)
@@ -1947,7 +2010,7 @@ standard did not specify this behavior.
The @samp{-fonetrip} option specifies that the source file(s) being
compiled require one-trip loops.
-This option affects only those loops specified by the (imperative) @code{DO}
+This option affects only those loops specified by the (iterative) @code{DO}
statement and by implied-@code{DO} lists in I/O statements.
Loops specified by implied-@code{DO} lists in @code{DATA} and
specification (non-executable) statements are not affected.
@@ -2096,8 +2159,8 @@ variables named @samp{i} and @samp{I} to a procedure named @samp{Foo}.)
@cindex -fbadu77-intrinsics-enable option
@cindex options, -fbadu77-intrinsics-enable
@item -fbadu77-intrinsics-enable
-@cindex badu77 intrinsics
-@cindex intrinsics, badu77
+@cindex @code{badu77} intrinsics
+@cindex intrinsics, @code{badu77}
Specify status of UNIX intrinsics having inappropriate forms.
@samp{-fbadu77-intrinsics-enable} is the default.
@xref{Intrinsic Groups}.
@@ -2114,8 +2177,8 @@ Specify status of UNIX intrinsics having inappropriate forms.
@cindex -ff2c-intrinsics-enable option
@cindex options, -ff2c-intrinsics-enable
@item -ff2c-intrinsics-enable
-@cindex f2c intrinsics
-@cindex intrinsics, f2c
+@cindex @code{f2c} intrinsics
+@cindex intrinsics, @code{f2c}
Specify status of f2c-specific intrinsics.
@samp{-ff2c-intrinsics-enable} is the default.
@xref{Intrinsic Groups}.
@@ -2132,7 +2195,7 @@ Specify status of f2c-specific intrinsics.
@cindex -ff90-intrinsics-enable option
@cindex options, -ff90-intrinsics-enable
@item -ff90-intrinsics-enable
-@cindex Fortran 90 intrinsics
+@cindex Fortran 90, intrinsics
@cindex intrinsics, Fortran 90
Specify status of F90-specific intrinsics.
@samp{-ff90-intrinsics-enable} is the default.
@@ -2151,8 +2214,8 @@ Specify status of F90-specific intrinsics.
@cindex options, -fgnu-intrinsics-enable
@item -fgnu-intrinsics-enable
@cindex Digital Fortran features
-@cindex COMPLEX intrinsics
-@cindex intrinsics, COMPLEX
+@cindex @code{COMPLEX} intrinsics
+@cindex intrinsics, @code{COMPLEX}
Specify status of Digital's COMPLEX-related intrinsics.
@samp{-fgnu-intrinsics-enable} is the default.
@xref{Intrinsic Groups}.
@@ -2215,9 +2278,10 @@ Specify status of VXT intrinsics.
@cindex options, -ffixed-line-length-@var{n}
@item -ffixed-line-length-@var{n}
@cindex source file format
-@cindex line length
+@cindex lines, length
@cindex length of source lines
-@cindex fixed-form line length
+@cindex fixed form
+@cindex limits, lengths of source lines
Set column after which characters are ignored in typical fixed-form
lines in the source file, and through which spaces are assumed (as
if padded to that length) after the ends of short fixed-form lines.
@@ -2238,8 +2302,8 @@ to them to fill out the line.
@node Warning Options
@section Options to Request or Suppress Warnings
-@cindex options to control warnings
-@cindex warning messages
+@cindex options, warnings
+@cindex warnings, suppressing
@cindex messages, warning
@cindex suppressing warnings
@@ -2413,12 +2477,12 @@ use, on occasion, in clean programs.
@table @code
@c @item -W
@c Print extra warning messages for these events:
-@c
+@c
@c @itemize @bullet
@c @item
@c If @samp{-Wall} or @samp{-Wunused} is also specified, warn about unused
@c arguments.
-@c
+@c
@c @end itemize
@c
@cindex -Wsurprising option
@@ -2650,11 +2714,7 @@ and data sets.
this option does not apply, generally speaking, to Fortran
code compiled by @code{g77}.
-@emph{Also note:} @samp{-malign-double} applies only to
-statically-allocated data.
-Double-precision data on the stack can still
-cause problems due to misalignment.
-@xref{Aligned Data}.
+@xref{Aligned Data}, for more information on alignment issues.
@emph{Also also note:} The negative form of @samp{-malign-double}
is @samp{-mno-align-double}, not @samp{-benign-double}.
@@ -2662,16 +2722,16 @@ is @samp{-mno-align-double}, not @samp{-benign-double}.
@cindex -ffloat-store option
@cindex options, -ffloat-store
@item -ffloat-store
-@cindex IEEE conformance
-@cindex conformance, IEEE
-@cindex floating point precision
+@cindex IEEE 754 conformance
+@cindex conformance, IEEE 754
+@cindex floating-point, precision
Might help a Fortran program that depends on exact IEEE conformance on
some machines, but might slow down a program that doesn't.
-This option is effective when the floating point unit is set to work in
+This option is effective when the floating-point unit is set to work in
IEEE 854 `extended precision'---as it typically is on x86 and m68k GNU
-systems---rather than IEEE 754 double precision. @code{-ffloat-store}
-tries to remove the extra precision by spilling data from floating point
+systems---rather than IEEE 754 double precision. @samp{-ffloat-store}
+tries to remove the extra precision by spilling data from floating-point
registers into memory and this typically involves a big performance
hit. However, it doesn't affect intermediate results, so that it is
only partially effective. `Excess precision' is avoided in code like:
@@ -2684,8 +2744,8 @@ but not in code like:
d = (b + c) * e
@end smallexample
-For another, potentially better, way of controlling the precision
-@ref{Floating point precision}.
+For another, potentially better, way of controlling the precision,
+see @ref{Floating-point precision}.
@cindex -fforce-mem option
@cindex options, -fforce-mem
@@ -2694,13 +2754,13 @@ For another, potentially better, way of controlling the precision
@cindex options, -fforce-addr
@item -fforce-addr
@cindex loops, speeding up
-@cindex speeding up loops
+@cindex speed, of loops
Might improve optimization of loops.
@cindex -fno-inline option
@cindex options, -fno-inline
@item -fno-inline
-@cindex in-line compilation
+@cindex in-line code
@cindex compilation, in-line
@c DL: Only relevant for -O3?
Don't compile statement functions inline.
@@ -2711,8 +2771,8 @@ Note that if you are not optimizing, no functions can be expanded inline.
@cindex -ffast-math option
@cindex options, -ffast-math
@item -ffast-math
-@cindex IEEE conformance
-@cindex conformance, IEEE
+@cindex IEEE 754 conformance
+@cindex conformance, IEEE 754
Might allow some programs designed to not be too dependent
on IEEE behavior for floating-point to run faster, or die trying.
@@ -2720,7 +2780,7 @@ on IEEE behavior for floating-point to run faster, or die trying.
@cindex options, -fstrength-reduce
@item -fstrength-reduce
@cindex loops, speeding up
-@cindex speeding up loops
+@cindex speed, of loops
@c DL: normally defaulted?
Might make some loops run faster.
@@ -2750,14 +2810,19 @@ Might improve performance on some code.
@item -funroll-loops
@cindex loops, unrolling
@cindex unrolling loops
-@cindex loop optimization
+@cindex loops, optimizing
+@cindex indexed (iterative) @code{DO}
+@cindex iterative @code{DO}
@c DL: fixme: Craig doesn't like `indexed' but f95 doesn't seem to
@c provide a suitable term
-Typically improves performance on code using indexed @code{DO} loops by
+@c CB: I've decided on `iterative', for the time being, and changed
+@c my previous, rather bizarre, use of `imperative' to that
+@c (though `precomputed-trip' would be a more precise adjective)
+Typically improves performance on code using iterative @code{DO} loops by
unrolling them and is probably generally appropriate for Fortran, though
-it is not turned on at any optimization level.
+it is not turned on at any optimization level.
Note that outer loop unrolling isn't done specifically; decisions about
-whether to unroll a loop are made on the basis of its instruction count.
+whether to unroll a loop are made on the basis of its instruction count.
@c DL: Fixme: This should obviously go somewhere else...
Also, no `loop discovery'@footnote{@dfn{loop discovery} refers to the
@@ -2773,18 +2838,18 @@ constructed out of lower-level constructs (such as @code{IF} and
@code{GOTO}) can lead to generation of more optimal code
than otherwise.} is done, so only loops written with @code{DO}
benefit from loop optimizations, including---but not limited
-to---unrolling. Loops written with @code{IF} and @code{GOTO} will not
-be recognized as such. This option only unrolls indexed @code{DO}
-loops, not @code{DO WHILE} loops.
+to---unrolling. Loops written with @code{IF} and @code{GOTO} are not
+currently recognized as such. This option unrolls only iterative
+@code{DO} loops, not @code{DO WHILE} loops.
@cindex -funroll-all-loops option
@cindex options, -funroll-all-loops
-@cindex @code{DO WHILE}
+@cindex DO WHILE
@item -funroll-all-loops
@c DL: Check my understanding of -funroll-all-loops v. -funroll-loops is correct.
Probably improves performance on code using @code{DO WHILE} loops by
-unrolling them in addition to indexed @code{DO} loops. In the absence
-of @code{DO WHILE}, this option is equivalent to @code{-funroll-loops}
+unrolling them in addition to iterative @code{DO} loops. In the absence
+of @code{DO WHILE}, this option is equivalent to @samp{-funroll-loops}
but possibly slower.
@item -fno-move-all-movables
@@ -2857,7 +2922,7 @@ contains preprocessor directives.
@node Directory Options
@section Options for Directory Search
-@cindex directory options
+@cindex directory, options
@cindex options, directory search
@cindex search path
@@ -2881,9 +2946,10 @@ These options are:
@cindex -Idir option
@cindex options, -Idir
@item -I@var{dir}
-@cindex directory search paths for inclusion
+@cindex directory, search paths for inclusion
@cindex inclusion, directory search paths for
-@cindex searching for included files
+@cindex search paths, for included files
+@cindex paths, search
These affect interpretation of the @code{INCLUDE} directive
(as well as of the @code{#include} directive of the @code{cpp}
preprocessor).
@@ -2905,9 +2971,9 @@ gcc,Using and Porting GNU CC}, for information on the @samp{-I} option.
@node Code Gen Options
@section Options for Code Generation Conventions
-@cindex code generation conventions
-@cindex options, code generation
-@cindex run-time options
+@cindex code generation, conventions
+@cindex options, code generation
+@cindex run-time, options
These machine-independent options control the interface conventions
used in code generation.
@@ -2935,7 +3001,7 @@ the name @samp{-static}.)
@item -finit-local-zero
@cindex DATA statement
@cindex statements, DATA
-@cindex initialization of local variables
+@cindex initialization, of local variables
@cindex variables, initialization of
@cindex uninitialized variables
@cindex variables, uninitialized
@@ -3009,7 +3075,7 @@ generating code for an incompatible library.
@cindex -fno-underscoring option
@cindex options, -fno-underscoring
@item -fno-underscoring
-@cindex underscores
+@cindex underscore
@cindex symbol names, underscores
@cindex transforming symbol names
@cindex symbol names, transforming
@@ -3084,7 +3150,7 @@ interfaces.
@cindex -fno-second-underscore option
@cindex options, -fno-second-underscore
@item -fno-second-underscore
-@cindex underscores
+@cindex underscore
@cindex symbol names, underscores
@cindex transforming symbol names
@cindex symbol names, transforming
@@ -3184,7 +3250,7 @@ $6 = "At (EQUIVALENCE) `__g77_equiv_xx' plus 20 bytes"
(gdb) p xx
$7 = "At (EQUIVALENCE) `__g77_equiv_xx' plus 1 bytes"
(gdb) set language fortran
-(gdb)
+(gdb)
@end smallexample
@noindent
@@ -3197,44 +3263,36 @@ Current plans call for this to happen when published versions of @code{g77}
and @code{gdb} exist that provide proper access to debugging information on
@code{COMMON} and @code{EQUIVALENCE} members.
-@cindex -fno-emulate-complex option
-@cindex options, -fno-emulate-complex
-@item -fno-emulate-complex
-Implement @code{COMPLEX} arithmetic using the facilities in
+@cindex -femulate-complex option
+@cindex options, -femulate-complex
+@item -femulate-complex
+Implement @code{COMPLEX} arithmetic via emulation,
+instead of using the facilities of
the @code{gcc} back end that provide direct support of
-@code{complex} arithmetic, instead of emulating the arithmetic.
+@code{complex} arithmetic.
-@code{gcc} has some known problems in its back-end support
+(@code{gcc} had some bugs in its back-end support
for @code{complex} arithmetic, due primarily to the support not being
-completed as of version 2.7.2.2.
-Other front ends for the @code{gcc} back end avoid this problem
-by emulating @code{complex} arithmetic at a higher level, so the
-back end sees arithmetic on the real and imaginary components.
-To make @code{g77} more portable to systems where @code{complex}
-support in the @code{gcc} back end is particularly troublesome,
-@code{g77} now defaults to performing the same kinds of emulations
-done by these other front ends.
-
-Use @samp{-fno-emulate-complex} to try the @code{complex} support
-in the @code{gcc} back end, in case it works and produces faster
-programs.
-So far, all the known bugs seem to involve compile-time crashes,
-rather than the generation of incorrect code.
+completed as of version 2.8.1 and @code{egcs} 1.1.2.)
+
+Use @samp{-femulate-complex} if you suspect code-generation bugs,
+or experience compiler crashes,
+that might result from @code{g77} using the @code{COMPLEX} support
+in the @code{gcc} back end.
+If using that option fixes the bugs or crashes you are seeing,
+that indicates a likely @code{g77} bugs
+(though, all compiler crashes are considered bugs),
+so, please report it.
+(Note that the known bugs, now believed fixed, produced compiler crashes
+rather than causing the generation of incorrect code.)
Use of this option should not affect how Fortran code compiled
by @code{g77} works in terms of its interfaces to other code,
e.g. that compiled by @code{f2c}.
-@emph{Caution:} Future versions of @code{g77} are likely to change
-the default for this option to
-@samp{-fno-emulate-complex}, and perhaps someday ignore both forms
+@emph{Caution:} Future versions of @code{g77} might ignore both forms
of this option.
-Also, it is possible that use of the @samp{-fno-emulate-complex} option
-could result in incorrect code being silently produced by @code{g77}.
-But, this is generally true of compilers anyway, so, as usual, test
-the programs you compile before assuming they are working.
-
@cindex -falias-check option
@cindex options, -falias-check
@cindex -fargument-alias option
@@ -3275,6 +3333,8 @@ arguments.
@item -fno-globals
@cindex global names, warning
@cindex warnings, global names
+@cindex in-line code
+@cindex compilation, in-line
Disable diagnostics about inter-procedural
analysis problems, such as disagreements about the
type of a function or a procedure's argument,
@@ -3291,9 +3351,8 @@ code that would otherwise be diagnosed.
As such, this option might be quite useful when
compiling existing, ``working'' code that happens
-to have a few bugs that do not generally show
-themselves, but @code{g77} exposes via a
-diagnostic.
+to have a few bugs that do not generally show themselves,
+but which @code{g77} diagnoses.
Use of this option therefore has the effect of
instructing @code{g77} to behave more like it did
@@ -3307,7 +3366,92 @@ Without this option, @code{g77} defaults to performing
the potentially inlining procedures as it started doing
in version 0.5.20, but as of version 0.5.21, it also
diagnoses disagreements that might cause such inlining
-to crash the compiler.
+to crash the compiler as (fatal) errors,
+and warns about similar disagreements
+that are currently believed to not
+likely to result in the compiler later crashing
+or producing incorrect code.
+
+@cindex -fflatten-arrays option
+@item -fflatten-arrays
+@cindex array performance
+@cindex arrays, flattening
+Use back end's C-like constructs
+(pointer plus offset)
+instead of its @code{ARRAY_REF} construct
+to handle all array references.
+
+@emph{Note:} This option is not supported.
+It is intended for use only by @code{g77} developers,
+to evaluate code-generation issues.
+It might be removed at any time.
+
+@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
+@cindex subscript checking
+@cindex substring checking
+@cindex checking subscripts
+@cindex checking substrings
+Enable generation of run-time checks for array subscripts
+and substring start and end points
+against the (locally) declared minimum and maximum values.
+
+The current implementation uses the @code{libf2c}
+library routine @code{s_rnge} to print the diagnostic.
+
+However, whereas @code{f2c} generates a single check per
+reference for a multi-dimensional array, of the computed
+offset against the valid offset range (0 through the size of the array),
+@code{g77} generates a single check per @emph{subscript} expression.
+This catches some cases of potential bugs that @code{f2c} does not,
+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.
+
+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 the @code{libg2c} run-time library routine @code{s_rnge}
+with somewhat differently-formatted information.
+Here's a sample diagnostic:
+
+@smallexample
+Subscript out of range on file line 4, procedure rnge.f/bf.
+Attempt to access the -6-th element of variable b[subscript-2-of-2].
+Aborted
+@end smallexample
+
+The above message indicates that the offending source line is
+line 4 of the file @file{rnge.f},
+within the program unit (or statement function) named @samp{bf}.
+The offended array is named @samp{b}.
+The offended array dimension is the second for a two-dimensional array,
+and the offending, computed subscript expression was @samp{-6}.
+
+For a @code{CHARACTER} substring reference, the second line has
+this appearance:
+
+@smallexample
+Attempt to access the 11-th element of variable a[start-substring].
+@end smallexample
+
+This indicates that the offended @code{CHARACTER} variable or array
+is named @samp{a},
+the offended substring position is the starting (leftmost) position,
+and the offending substring expression is @samp{11}.
+
+(Though the verbage of @code{s_rnge} is not ideal
+for the purpose of the @code{g77} compiler,
+the above information should provide adequate diagnostic abilities
+to it users.)
@end table
@xref{Code Gen Options,,Options for Code Generation Conventions,
@@ -3362,798 +3506,9 @@ variables.
@include news.texi
-@node Changes
-@chapter User-visible Changes
-@cindex versions, recent
-@cindex recent versions
-@cindex changes, user-visible
-@cindex user-visible changes
-
-This section describes changes to @code{g77} that are visible
-to the programmers who actually write and maintain Fortran
-code they compile with @code{g77}.
-Information on changes to installation procedures,
-changes to the documentation, and bug fixes is
-not provided here, unless it is likely to affect how
-users use @code{g77}.
-@xref{News,,News About GNU Fortran}, for information on
-such changes to @code{g77}.
-
-To find out about existing bugs and ongoing plans for GNU
-Fortran, retrieve @uref{ftp://alpha.gnu.org/g77.plan}
-or, if you cannot do that, email
-@email{fortran@@gnu.org} asking for a recent copy of the
-GNU Fortran @file{.plan} file.
-
-@heading In @code{egcs} 1.1 (versus 0.5.24):
-@itemize @bullet
-@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
-
-@heading In @code{egcs} 1.1 (versus @code{egcs} 1.0.3):
-@itemize @bullet
-@item
-Support @samp{FORMAT(I<@var{expr}>)} when @var{expr} is a
-compile-time constant @code{INTEGER} expression.
-
-@item
-Fix @code{g77} @samp{-g} option so procedures that
-use @samp{ENTRY} can be stepped through, line by line,
-in @code{gdb}.
-
-@item
-Allow any @code{REAL} argument to intrinsics
-@code{Second} and @code{CPU_Time}.
-
-@item
-Use @code{tempnam}, if available, to open scratch files
-(as in @samp{OPEN(STATUS='SCRATCH')})
-so that the @code{TMPDIR} environment variable,
-if present, is used.
-
-@item
-@code{g77}'s version of @code{libf2c} separates out
-the setting of global state
-(such as command-line arguments and signal handling)
-from @file{main.o} into distinct, new library
-archive members.
-
-This should make it easier to write portable applications
-that have their own (non-Fortran) @code{main()} routine
-properly set up the @code{libf2c} environment, even
-when @code{libf2c} (now @code{libg2c}) is a shared library.
-
-@item
-The @code{g77} command now expects the run-time library
-to be named @code{libg2c.a} instead of @code{libf2c.a},
-to ensure that a version other than the one built and
-installed as part of the same @code{g77} version is picked up.
-
-@item
-Some diagnostics have been changed from warnings to errors,
-to prevent inadvertent use of the resulting, probably buggy,
-programs.
-These mostly include diagnostics about use of unsupported features
-in the @code{OPEN}, @code{INQUIRE}, @code{READ}, and
-@code{WRITE} statements,
-and about truncations of various sorts of constants.
-@end itemize
-
-@heading In 0.5.24 and @code{egcs} 1.1 (versus 0.5.23):
-@itemize @bullet
-@item
-@code{g77} now treats @samp{%LOC(@var{expr})} and
-@samp{LOC(@var{expr})} as ``ordinary'' expressions
-when they are used as arguments in procedure calls.
-This change applies only to global (filewide) analysis,
-making it consistent with
-how @code{g77} actually generates code
-for these cases.
-
-Previously, @code{g77} treated these expressions
-as denoting special ``pointer'' arguments
-for the purposes of filewide analysis.
-
-@item
-The @code{g77} driver now ensures that @samp{-lg2c}
-is specified in the link phase prior to any
-occurrence of @samp{-lm}.
-This prevents accidentally linking to a routine
-in the SunOS4 @samp{-lm} library
-when the generated code wants to link to the one
-in @code{libf2c} (@code{libg2c}).
-
-@item
-@code{g77} emits more debugging information when
-@samp{-g} is used.
-
-This new information allows, for example,
-@kbd{which __g77_length_a} to be used in @code{gdb}
-to determine the type of the phantom length argument
-supplied with @samp{CHARACTER} variables.
-
-This information pertains to internally-generated
-type, variable, and other information,
-not to the longstanding deficiencies vis-a-vis
-@samp{COMMON} and @samp{EQUIVALENCE}.
-
-@item
-The F90 @samp{Date_and_Time} intrinsic now is
-supported.
-
-@item
-The F90 @samp{System_Clock} intrinsic allows
-the optional arguments (except for the @samp{Count}
-argument) to be omitted.
-@end itemize
-
-@heading In 0.5.23:
-@itemize @bullet
-@item
-This release contains several regressions against
-version 0.5.22 of @code{g77}, due to using the
-``vanilla'' @code{gcc} back end instead of patching
-it to fix a few bugs and improve performance in a
-few cases.
-
-@xref{Actual Bugs,,Actual Bugs We Haven't Fixed Yet},
-available in plain-text format in @code{gcc/f/BUGS},
-for information on the known bugs in this version,
-including the regressions.
-
-Features that have been dropped from this version
-of @code{g77} due to their being implemented
-via @code{g77}-specific patches to the @code{gcc}
-back end in previous releases include:
-
-@itemize --
-@item
-Support for @code{__restrict__} keyword,
-the options @samp{-fargument-alias}, @samp{-fargument-noalias},
-and @samp{-fargument-noalias-global},
-and the corresponding alias-analysis code.
-
-(@code{egcs} has the alias-analysis
-code, but not the @code{__restrict__} keyword.
-@code{egcs} @code{g77} users benefit from the alias-analysis
-code despite the lack of the @code{__restrict__} keyword,
-which is a C-language construct.)
-
-@item
-Support for the GNU compiler options
-@samp{-fmove-all-movables},
-@samp{-freduce-all-givs},
-and @samp{-frerun-loop-opt}.
-
-(@code{egcs} supports these options.
-@code{g77} users of @code{egcs} benefit from them even if
-they are not explicitly specified,
-because the defaults are optimized for @code{g77} users.)
-
-@item
-Support for the @samp{-W} option warning about
-integer division by zero.
-
-@item
-The Intel x86-specific option @samp{-malign-double}
-applying to stack-allocated data
-as well as statically-allocate data.
-@end itemize
-
-@item
-Support @code{gcc} version 2.8,
-and remove support for prior versions of @code{gcc}.
-
-@cindex -@w{}-driver option
-@cindex g77 options, -@w{}-driver
-@cindex options, -@w{}-driver
-@item
-Remove support for the @samp{--driver} option,
-as @code{g77} now does all the driving,
-just like @code{gcc}.
-
-@item
-The @code{g77} command now expects the run-time library
-to be named @code{libg2c.a} instead of @code{libf2c.a},
-to ensure that a version other than the one built and
-installed as part of the same @code{g77} version is picked up.
-
-@item
-@code{g77}'s version of @code{libf2c} separates out
-the setting of global state
-(such as command-line arguments and signal handling)
-from @file{main.o} into distinct, new library
-archive members.
-
-This should make it easier to write portable applications
-that have their own (non-Fortran) @code{main()} routine
-properly set up the @code{libf2c} environment, even
-when @code{libf2c} (now @code{libg2c}) is a shared library.
-
-@item
-Some diagnostics have been changed from warnings to errors,
-to prevent inadvertent use of the resulting, probably buggy,
-programs.
-These mostly include diagnostics about use of unsupported features
-in the @code{OPEN}, @code{INQUIRE}, @code{READ}, and
-@code{WRITE} statements,
-and about truncations of various sorts of constants.
-@end itemize
-
-@heading In 0.5.22:
-@itemize @bullet
-@item
-Fix @code{Signal} intrinsic so it offers portable
-support for 64-bit systems (such as Digital Alphas
-running GNU/Linux).
-
-@item
-Support @samp{FORMAT(I<@var{expr}>)} when @var{expr} is a
-compile-time constant @code{INTEGER} expression.
-
-@item
-Fix @code{g77} @samp{-g} option so procedures that
-use @samp{ENTRY} can be stepped through, line by line,
-in @code{gdb}.
-
-@item
-Allow any @code{REAL} argument to intrinsics
-@code{Second} and @code{CPU_Time}.
-
-@item
-Allow any numeric argument to intrinsics
-@code{Int2} and @code{Int8}.
-
-@item
-Use @code{tempnam}, if available, to open scratch files
-(as in @samp{OPEN(STATUS='SCRATCH')})
-so that the @code{TMPDIR} environment variable,
-if present, is used.
-
-@item
-Rename the @code{gcc} keyword @code{restrict} to
-@code{__restrict__}, to avoid rejecting valid, existing,
-C programs.
-Support for @code{restrict} is now more like support
-for @code{complex}.
-
-@item
-Fix @samp{-fugly-comma} to affect invocations of
-only external procedures.
-Restore rejection of gratuitous trailing omitted
-arguments to intrinsics, as in @samp{I=MAX(3,4,,)}.
-
-@item
-Fix compiler so it accepts @samp{-fgnu-intrinsics-*} and
-@samp{-fbadu77-intrinsics-*} options.
-@end itemize
-
-@heading In @code{egcs} 1.0.2 (versus @code{egcs} 1.0.1):
-@itemize @bullet
-@item
-Fix compiler so it accepts @samp{-fgnu-intrinsics-*} and
-@samp{-fbadu77-intrinsics-*} options.
-@end itemize
-
-@heading In @code{egcs} 1.0 (versus 0.5.21):
-@itemize @bullet
-@item
-Version 1.0 of @code{egcs}
-contains several regressions against
-version 0.5.21 of @code{g77},
-due to using the
-``vanilla'' @code{gcc} back end instead of patching
-it to fix a few bugs and improve performance in a
-few cases.
-
-@xref{Actual Bugs,,Actual Bugs We Haven't Fixed Yet},
-available in plain-text format in @code{gcc/f/BUGS},
-for information on the known bugs in this version,
-including the regressions.
-
-Features that have been dropped from this version
-of @code{g77} due to their being implemented
-via @code{g77}-specific patches to the @code{gcc}
-back end in previous releases include:
-
-@itemize --
-@item
-Support for the C-language @code{restrict} keyword.
-
-@item
-Support for the @samp{-W} option warning about
-integer division by zero.
-
-@item
-The Intel x86-specific option @samp{-malign-double}
-applying to stack-allocated data
-as well as statically-allocate data.
-@end itemize
-
-@cindex -@w{}-driver option
-@cindex g77 options, -@w{}-driver
-@cindex options, -@w{}-driver
-@item
-Remove support for the @samp{--driver} option,
-as @code{g77} now does all the driving,
-just like @code{gcc}.
-
-@item
-Allow any numeric argument to intrinsics
-@code{Int2} and @code{Int8}.
-@end itemize
-
-@heading In 0.5.21:
-@itemize @bullet
-@item
-When the @samp{-W} option is specified, @code{gcc}, @code{g77},
-and other GNU compilers that incorporate the @code{gcc}
-back end as modified by @code{g77}, issue
-a warning about integer division by constant zero.
-
-@item
-New option @samp{-Wno-globals} disables warnings
-about ``suspicious'' use of a name both as a global
-name and as the implicit name of an intrinsic, and
-warnings about disagreements over the number or natures of
-arguments passed to global procedures, or the
-natures of the procedures themselves.
-
-The default is to issue such warnings, which are
-new as of this version of @code{g77}.
-
-@item
-New option @samp{-fno-globals} disables diagnostics
-about potentially fatal disagreements
-analysis problems, such as disagreements over the
-number or natures of arguments passed to global
-procedures, or the natures of those procedures themselves.
-
-The default is to issue such diagnostics and flag
-the compilation as unsuccessful.
-With this option, the diagnostics are issued as
-warnings, or, if @samp{-Wno-globals} is specified,
-are not issued at all.
-
-This option also disables inlining of global procedures,
-to avoid compiler crashes resulting from coding errors
-that these diagnostics normally would identify.
-
-@item
-Fix @code{libU77} routines that accept file and other names
-to strip trailing blanks from them, for consistency
-with other implementations.
-Blanks may be forcibly appended to such names by
-appending a single null character (@samp{CHAR(0)})
-to the significant trailing blanks.
-
-@item
-Fix @code{CHMOD} intrinsic to work with file names
-that have embedded blanks, commas, and so on.
-
-@item
-Fix @code{SIGNAL} intrinsic so it accepts an
-optional third @samp{Status} argument.
-
-@item
-Make many changes to @code{libU77} intrinsics to
-support existing code more directly.
-
-Such changes include allowing both subroutine and
-function forms of many routines, changing @code{MCLOCK()}
-and @code{TIME()} to return @code{INTEGER(KIND=1)} values,
-introducing @code{MCLOCK8()} and @code{TIME8()} to
-return @code{INTEGER(KIND=2)} values,
-and placing functions that are intended to perform
-side effects in a new intrinsic group, @code{badu77}.
-
-@item
-Add options @samp{-fbadu77-intrinsics-delete},
-@samp{-fbadu77-intrinsics-hide}, and so on.
-
-@item
-Add @code{INT2} and @code{INT8} intrinsics.
-
-@item
-Add @code{CPU_TIME} intrinsic.
-
-@item
-Add @code{ALARM} intrinsic.
-
-@item
-@code{CTIME} intrinsic now accepts any @code{INTEGER}
-argument, not just @code{INTEGER(KIND=2)}.
-
-@item
-@code{g77} driver now prints version information (such as produced
-by @kbd{g77 -v}) to @code{stderr} instead of @code{stdout}.
-
-@item
-The @samp{.r} suffix now designates a Ratfor source file,
-to be preprocessed via the @code{ratfor} command, available
-separately.
-@end itemize
-
-@heading In 0.5.20:
-@itemize @bullet
-@item
-The @samp{-fno-typeless-boz} option is now the default.
-
-This option specifies that non-decimal-radix
-constants using the prefixed-radix form (such as @samp{Z'1234'})
-are to be interpreted as @code{INTEGER(KIND=1)} constants.
-Specify @samp{-ftypeless-boz} to cause such
-constants to be interpreted as typeless.
-
-(Version 0.5.19 introduced @samp{-fno-typeless-boz} and
-its inverse.)
-
-@xref{Fortran Dialect Options,,Options Controlling Fortran Dialect},
-for information on the @samp{-ftypeless-boz} option.
-
-@item
-Options @samp{-ff90-intrinsics-enable} and
-@samp{-fvxt-intrinsics-enable} now are the
-defaults.
-
-Some programs might use names that clash with
-intrinsic names defined (and now enabled) by these
-options or by the new @code{libU77} intrinsics.
-Users of such programs might need to compile them
-differently (using, for example, @samp{-ff90-intrinsics-disable})
-or, better yet, insert appropriate @code{EXTERNAL}
-statements specifying that these names are not intended
-to be names of intrinsics.
-
-@item
-The @samp{ALWAYS_FLUSH} macro is no longer defined when
-building @code{libf2c}, which should result in improved
-I/O performance, especially over NFS.
-
-@emph{Note:} If you have code that depends on the behavior
-of @code{libf2c} when built with @samp{ALWAYS_FLUSH} defined,
-you will have to modify @code{libf2c} accordingly before
-building it from this and future versions of @code{g77}.
-
-@xref{Output Assumed To Flush}, for more information.
-
-@item
-Dave Love's implementation of @code{libU77} has been
-added to the version of @code{libf2c} distributed with
-and built as part of @code{g77}.
-@code{g77} now knows about the routines in this library
-as intrinsics.
-
-@item
-New option @samp{-fvxt} specifies that the
-source file is written in VXT Fortran, instead of GNU Fortran.
-
-@xref{VXT Fortran}, for more information on the constructs
-recognized when the @samp{-fvxt} option is specified.
-
-@item
-The @samp{-fvxt-not-f90} option has been deleted,
-along with its inverse, @samp{-ff90-not-vxt}.
-
-If you used one of these deleted options, you should
-re-read the pertinent documentation to determine which
-options, if any, are appropriate for compiling your
-code with this version of @code{g77}.
-
-@xref{Other Dialects}, for more information.
-
-@item
-The @samp{-fugly} option now issues a warning, as it
-likely will be removed in a future version.
-
-(Enabling all the @samp{-fugly-*} options is unlikely
-to be feasible, or sensible, in the future,
-so users should learn to specify only those
-@samp{-fugly-*} options they really need for a
-particular source file.)
-
-@item
-The @samp{-fugly-assumed} option, introduced in
-version 0.5.19, has been changed to
-better accommodate old and new code.
-@xref{Ugly Assumed-Size Arrays}, for more information.
-
-@item
-Related to supporting Alpha (AXP) machines, the @code{LOC()}
-intrinsic and @code{%LOC()} construct now return
-values of @code{INTEGER(KIND=0)} type,
-as defined by the GNU Fortran language.
-
-This type is wide enough
-(holds the same number of bits)
-as the character-pointer type on the machine.
-
-On most machines, this won't make a difference,
-whereas, on Alphas and other systems with 64-bit pointers,
-the @code{INTEGER(KIND=0)} type is equivalent to @code{INTEGER(KIND=2)}
-(often referred to as @code{INTEGER*8})
-instead of the more common @code{INTEGER(KIND=1)}
-(often referred to as @code{INTEGER*4}).
-
-@item
-Emulate @code{COMPLEX} arithmetic in the @code{g77} front
-end, to avoid bugs in @code{complex} support in the
-@code{gcc} back end.
-New option @samp{-fno-emulate-complex}
-causes @code{g77} to revert the 0.5.19 behavior.
-
-@item
-Dummy arguments are no longer assumed to potentially alias
-(overlap)
-other dummy arguments or @code{COMMON} areas when any of
-these are defined (assigned to) by Fortran code.
-
-This can result in faster and/or smaller programs when
-compiling with optimization enabled, though on some
-systems this effect is observed only when @samp{-fforce-addr}
-also is specified.
-
-New options @samp{-falias-check}, @samp{-fargument-alias},
-@samp{-fargument-noalias},
-and @samp{-fno-argument-noalias-global} control the
-way @code{g77} handles potential aliasing.
-
-@xref{Aliasing Assumed To Work}, for detailed information on why the
-new defaults might result in some programs no longer working the way they
-did when compiled by previous versions of @code{g77}.
-
-@item
-New option @samp{-fugly-assign} specifies that the
-same memory locations are to be used to hold the
-values assigned by both statements @samp{I = 3} and
-@samp{ASSIGN 10 TO I}, for example.
-(Normally, @code{g77} uses a separate memory location
-to hold assigned statement labels.)
-
-@xref{Ugly Assigned Labels}, for more information.
-
-@item
-@code{FORMAT} and @code{ENTRY} statements now are allowed to
-precede @code{IMPLICIT NONE} statements.
-
-@item
-Enable full support of @code{INTEGER(KIND=2)}
-(often referred to as @code{INTEGER*8})
-available in
-@code{libf2c} and @file{f2c.h} so that @code{f2c} users
-may make full use of its features via the @code{g77}
-version of @file{f2c.h} and the @code{INTEGER(KIND=2)}
-support routines in the @code{g77} version of @code{libf2c}.
-
-@item
-Improve @code{g77} driver and @code{libf2c} so that @samp{g77 -v}
-yields version information on the library.
-
-@item
-The @code{SNGL} and @code{FLOAT} intrinsics now are
-specific intrinsics, instead of synonyms for the
-generic intrinsic @code{REAL}.
-
-@item
-New intrinsics have been added.
-These are @code{REALPART}, @code{IMAGPART},
-@code{COMPLEX},
-@code{LONG}, and @code{SHORT}.
-
-@item
-A new group of intrinsics, @samp{gnu}, has been added
-to contain the new @code{REALPART}, @code{IMAGPART},
-and @code{COMPLEX} intrinsics.
-An old group, @samp{dcp}, has been removed.
-
-@item
-Complain about industry-wide ambiguous references
-@samp{REAL(@var{expr})} and @samp{AIMAG(@var{expr})},
-where @var{expr} is @code{DOUBLE COMPLEX} (or any
-complex type other than @code{COMPLEX}), unless
-@samp{-ff90} option specifies Fortran 90 interpretation
-or new @samp{-fugly-complex} option, in conjunction with
-@samp{-fnot-f90}, specifies @code{f2c} interpretation.
-@end itemize
-
-@heading In 0.5.19:
-
-@itemize @bullet
-@item
-A temporary kludge option provides bare-bones information on
-@code{COMMON} and @code{EQUIVALENCE} members at debug time.
-@xref{Code Gen Options,,Options for Code Generation Conventions},
-for information on the @samp{-fdebug-kludge} option.
-
-@item
-New @samp{-fonetrip} option specifies FORTRAN-66-style
-one-trip @code{DO} loops.
-
-@item
-New @samp{-fno-silent} option causes names of program units
-to be printed as they are compiled, in a fashion similar to
-UNIX @code{f77} and @code{f2c}.
-
-@item
-New @samp{-fugly-assumed} option specifies that arrays
-dimensioned via @samp{DIMENSION X(1)}, for example, are to be
-treated as assumed-size.
-
-@item
-New @samp{-fno-typeless-boz} option specifies that non-decimal-radix
-constants using the prefixed-radix form (such as @samp{Z'1234'})
-are to be interpreted as @code{INTEGER(KIND=1)} constants.
-
-@item
-New @samp{-ff66} option is a ``shorthand'' option that specifies
-behaviors considered appropriate for FORTRAN 66 programs.
-
-@item
-New @samp{-ff77} option is a ``shorthand'' option that specifies
-behaviors considered appropriate for UNIX @code{f77} programs.
-
-@item
-New @samp{-fugly-comma} and @samp{-fugly-logint} options provided
-to perform some of what @samp{-fugly} used to do.
-@samp{-fugly} and @samp{-fno-ugly} are now ``shorthand'' options,
-in that they do nothing more than enable (or disable) other
-@samp{-fugly-*} options.
-
-@item
-Change code generation for list-directed I/O so it allows
-for new versions of @code{libf2c} that might return non-zero
-status codes for some operations previously assumed to always
-return zero.
-
-This change not only affects how @code{IOSTAT=} variables
-are set by list-directed I/O, it also affects whether
-@code{END=} and @code{ERR=} labels are reached by these
-operations.
-
-@item
-Add intrinsic support for new @code{FTELL} and @code{FSEEK}
-procedures in @code{libf2c}.
-
-@item
-Add options @samp{--help} and @samp{--version} to the
-@code{g77} command, to conform to GNU coding guidelines.
-Also add printing of @code{g77} version number when
-the @samp{--verbose} (@samp{-v}) option is used.
-@end itemize
-
-@heading In 0.5.18:
-
-@itemize @bullet
-@item
-The @code{BYTE} and @code{WORD} statements now are supported,
-to a limited extent.
-
-@item
-@code{INTEGER*1}, @code{INTEGER*2}, @code{INTEGER*8},
-and their @code{LOGICAL}
-equivalents, now are supported to a limited extent.
-Among the missing elements are complete intrinsic and constant
-support.
-
-@item
-Support automatic arrays in procedures.
-For example, @samp{REAL A(N)}, where @samp{A} is
-not a dummy argument, specifies that @samp{A} is
-an automatic array.
-The size of @samp{A} is calculated from the value
-of @samp{N} each time the procedure is called,
-that amount of space is allocated, and that space
-is freed when the procedure returns to its caller.
-
-@item
-Add @samp{-fno-zeros} option, enabled by default,
-to reduce compile-time CPU and memory usage for
-code that provides initial zero values for variables
-and arrays.
-
-@item
-Introduce three new options that apply to all compilations
-by @code{g77}-aware GNU compilers---@samp{-fmove-all-movables},
-@samp{-freduce-all-givs}, and @samp{-frerun-loop-opt}---which
-can improve the run-time performance of some programs.
-
-@item
-Replace much of the existing documentation with a single
-Info document.
-
-@item
-New option @samp{-fno-second-underscore}.
-@end itemize
-
-@heading In 0.5.17:
-
-@itemize @bullet
-@item
-The @code{ERF()} and @code{ERFC()} intrinsics now are generic
-intrinsics, mapping to @code{ERF}/@code{DERF} and
-@code{ERFC}/@code{DERFC}, respectively.
-@emph{Note:} Use @samp{INTRINSIC ERF,ERFC} in any code that
-might reference these as generic intrinsics, to
-improve the likelihood of diagnostics (instead of subtle run-time
-bugs) when using compilers that don't support these as intrinsics.
-
-@item
-New option @samp{-Wsurprising}.
-
-@item
-DO loops with non-@code{INTEGER} variables now diagnosed only when
-@samp{-Wsurprising} specified.
-Previously, this was diagnosed @emph{unless} @samp{-fpedantic} or
-@samp{-fugly} was specified.
-@end itemize
-
-@heading In 0.5.16:
-
-@itemize @bullet
-@item
-@code{libf2c} changed to output a leading zero (0) digit for floating-point
-values output via list-directed and formatted output (to bring @code{g77}
-more into line with many existing Fortran implementations---the
-ANSI FORTRAN 77 standard leaves this choice to the implementation).
-
-@item
-@code{libf2c} no longer built with debugging information
-intact, making it much smaller.
-
-@item
-Automatic installation of the @code{g77} command now works.
-
-@item
-Diagnostic messages now more informative, a la @code{gcc},
-including messages like @samp{In function `foo':} and @samp{In file
-included from...:}.
-
-@item
-New group of intrinsics called @samp{unix}, including @code{ABORT},
-@code{DERF}, @code{DERFC}, @code{ERF}, @code{ERFC}, @code{EXIT},
-@code{FLUSH}, @code{GETARG}, @code{GETENV}, @code{SIGNAL}, and
-@code{SYSTEM}.
-
-@item
-@samp{-funix-intrinsics-@{delete,hide,disable,enable@}}
-options added.
-
-@item
-@samp{-fno-underscoring} option added.
-
-@item
-@samp{--driver} option added to the @code{g77} command.
-
-@item
-Support for the @code{gcc} options @samp{-fident} and @samp{-fno-ident}
-added.
-
-@item
-@samp{g77 -v} returns much more version info, making the submission
-of better bug reports easily.
-
-@item
-Many improvements to the @code{g77} command to better fulfill its role as
-a front-end to the @code{gcc} driver.
-For example, @code{g77} now
-recognizes @samp{--verbose} as a verbose way of specifying @samp{-v}.
-
-@item
-Compiling preprocessed (@file{*.F} and @file{*.fpp}) files now
-results in better diagnostics and debugging information, as the
-source-location info now is passed all the
-way through the compilation process instead of being lost.
-@end itemize
+@set USERVISONLY
+@include news.texi
+@clear USERVISONLY
@node Language
@chapter The GNU Fortran Language
@@ -4223,7 +3578,7 @@ Extensions to the ANSI FORTRAN 77 standard:
@section Direction of Language Development
@cindex direction of language development
@cindex features, language
-@cindex language features
+@cindex language, features
The purpose of the following description of the GNU Fortran
language is to promote wide portability of GNU Fortran programs.
@@ -4368,8 +3723,8 @@ of @code{g77}).
@node Standard Support
@section ANSI FORTRAN 77 Standard Support
@cindex ANSI FORTRAN 77 support
-@cindex standard support
-@cindex support for ANSI FORTRAN 77
+@cindex standard, support for
+@cindex support, FORTRAN 77
@cindex compatibility, FORTRAN 77
@cindex FORTRAN 77 compatibility
@@ -4600,7 +3955,7 @@ For example: @samp{PRINT *, 'My name is Bob'}.
@item
A metasyntactic variable---that is, a name used in this document
to serve as a placeholder for whatever text is used by the
-user or programmer--appears as shown in the following example:
+user or programmer---appears as shown in the following example:
``The @code{INTEGER @var{ivar}} statement specifies that
@var{ivar} is a variable or array of type @code{INTEGER}.''
@@ -4644,6 +3999,7 @@ for the relevant aspects of GNU Fortran.)
(Corresponds to Section 2.2 of ANSI X3.9-1978 FORTRAN 77.)
+@cindex limits, lengths of names
In GNU Fortran, a symbolic name is at least one character long,
and has no arbitrary upper limit on length.
However, names of entities requiring external linkage (such as
@@ -4660,8 +4016,13 @@ character (which must be a letter).
(Corresponds to Section 2.3 of ANSI X3.9-1978 FORTRAN 77.)
-@cindex comments, trailing
-@cindex trailing comments
+@cindex trailing comment
+@cindex comment
+@cindex characters, comment
+@cindex !
+@cindex exclamation point
+@cindex continuation character
+@cindex characters, continuation
Use of an exclamation point (@samp{!}) to begin a
trailing comment (a comment that extends to the end of the same
source line) is permitted under the following conditions:
@@ -4685,7 +4046,8 @@ That is, a trailing comment may contain exclamation points
in their commentary text.
@end itemize
-@cindex semicolons
+@cindex ;
+@cindex semicolon
@cindex statements, separated by semicolon
Use of a semicolon (@samp{;}) as a statement separator
is permitted under the following conditions:
@@ -4771,36 +4133,65 @@ Special characters include:
@itemize @bullet
@item
+@cindex ;
+@cindex semicolon
Semicolon (@samp{;})
@item
+@cindex !
+@cindex exclamation point
Exclamation point (@samp{!})
@item
+@cindex "
+@cindex double quote
Double quote (@samp{"})
@item
+@cindex \
+@cindex backslash
Backslash (@samp{\})
@item
+@cindex ?
+@cindex question mark
Question mark (@samp{?})
@item
+@cindex #
+@cindex hash mark
+@cindex pound sign
Hash mark (@samp{#})
@item
+@cindex &
+@cindex ampersand
Ampersand (@samp{&})
@item
+@cindex %
+@cindex percent sign
Percent sign (@samp{%})
@item
+@cindex _
+@cindex underscore
Underscore (@samp{_})
@item
+@cindex <
+@cindex open angle
+@cindex left angle
+@cindex open bracket
+@cindex left bracket
Open angle (@samp{<})
@item
+@cindex >
+@cindex close angle
+@cindex right angle
+@cindex close bracket
+@cindex right bracket
Close angle (@samp{>})
@item
@@ -4810,7 +4201,9 @@ The FORTRAN 77 special characters (@key{SPC}, @samp{=},
and @samp{:})
@end itemize
-@cindex blanks (spaces)
+@cindex blank
+@cindex space
+@cindex SPC
Note that this document refers to @key{SPC} as @dfn{space},
while X3.9-1978 FORTRAN 77 refers to it as @dfn{blank}.
@@ -4818,8 +4211,8 @@ while X3.9-1978 FORTRAN 77 refers to it as @dfn{blank}.
@subsection Lines
@cindex lines
@cindex source file format
-@cindex source form
-@cindex files, source
+@cindex source format
+@cindex file, source
@cindex source code
@cindex code, source
@cindex fixed form
@@ -4850,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
@@ -4861,7 +4254,9 @@ The end-of-file marker (@code{EOF}) also serves to end the line
of text that precedes it (and that does not contain a newline).
@item
-@cindex blanks (spaces)
+@cindex blank
+@cindex space
+@cindex SPC
Any line of text that is shorter than 72 characters is padded to that length
with spaces (called ``blanks'' in the standard).
@@ -4890,10 +4285,10 @@ line containing 72 spaces.
@node Continuation Line
@subsection Continuation Line
-@cindex continuation lines, number of
+@cindex continuation line, number of
@cindex lines, continuation
@cindex number of continuation lines
-@cindex limits on continuation lines
+@cindex limits, continuation lines
(Corresponds to Section 3.2.3 of ANSI X3.9-1978 FORTRAN 77.)
@@ -5007,7 +4402,7 @@ An @code{END BLOCK DATA} statement, if the program unit is a block data.
@node INCLUDE
@subsection Including Source Text
-@cindex INCLUDE
+@cindex INCLUDE directive
Additional source text may be included in the processing of
the source file via the @code{INCLUDE} directive:
@@ -5096,8 +4491,9 @@ This permits long names to be used for @var{filename}.
@cindex #
@cindex preprocessor
-@code{cpp} output-style @code{#} directives @xref{C Preprocessor
-Output,,, cpp, The C Preprocessor}, are recognized by the compiler even
+@code{cpp} output-style @code{#} directives
+(@pxref{C Preprocessor Output,,, cpp, The C Preprocessor})
+are recognized by the compiler even
when the preprocessor isn't run on the input (as it is when compiling
@samp{.F} files). (Note the distinction between these @code{cpp}
@code{#} @emph{output} directives and @code{#line} @emph{input}
@@ -5901,6 +5297,10 @@ as appropriate.
@node CYCLE and EXIT
@subsection The @code{CYCLE} and @code{EXIT} Statements
+@cindex CYCLE statement
+@cindex EXIT statement
+@cindex statements, CYCLE
+@cindex statements, EXIT
The @code{CYCLE} and @code{EXIT} statements specify that
the remaining statements in the current iteration of a
particular active (enclosing) @code{DO} loop are to be skipped.
@@ -6237,12 +5637,12 @@ are given arguments that do not conform to their stated requirements:
@smallexample
PROGRAM JCB002
C Version 1:
+C Modified 1999-02-15 (Burley) to delete my email address.
C Modified 1997-05-21 (Burley) to accommodate compilers that implement
C INT(I1-I2) as INT(I1)-INT(I2) given INTEGER*2 I1,I2.
C
C Version 0:
C Written by James Craig Burley 1997-02-20.
-C Contact via Internet email: burley@@gnu.org
C
C Purpose:
C Determine how compilers handle non-standard IDIM
@@ -6345,7 +5745,7 @@ These disagreements strongly suggest that Fortran programmers,
and certainly existing Fortran programs, disagree about the
meaning of such invocations.
-The first version of @samp{JCB002} didn't accommodate some compilers'
+The first version of @code{JCB002} didn't accommodate some compilers'
treatment of @samp{INT(I1-I2)} where @samp{I1} and @samp{I2} are
@code{INTEGER*2}.
In such a case, these compilers apparently convert both
@@ -6357,7 +5757,7 @@ However, the results of the careful analyses done on the outputs
of programs compiled by these various compilers show that they
all implement either @samp{Interp 1} or @samp{Interp 2} above.
-Specifically, it is believed that the new version of @samp{JCB002}
+Specifically, it is believed that the new version of @code{JCB002}
above will confirm that:
@itemize @bullet
@@ -6380,10 +5780,10 @@ worth adding to the above list, please let us know the details
@node REAL() and AIMAG() of Complex
@subsection @code{REAL()} and @code{AIMAG()} of Complex
-@cindex REAL intrinsic
-@cindex intrinsics, REAL
-@cindex AIMAG intrinsic
-@cindex intrinsics, AIMAG
+@cindex @code{Real} intrinsic
+@cindex intrinsics, @code{Real}
+@cindex @code{AImag} intrinsic
+@cindex intrinsics, @code{AImag}
The GNU Fortran language disallows @code{REAL(@var{expr})}
and @code{AIMAG(@var{expr})},
@@ -6440,8 +5840,8 @@ treated as @samp{REAL(REALPART(@var{expr}))}.
@node CMPLX() of DOUBLE PRECISION
@subsection @code{CMPLX()} of @code{DOUBLE PRECISION}
-@cindex CMPLX intrinsic
-@cindex intrinsics, CMPLX
+@cindex @code{Cmplx} intrinsic
+@cindex intrinsics, @code{Cmplx}
In accordance with Fortran 90 and at least some (perhaps all)
other compilers, the GNU Fortran language defines @code{CMPLX()}
@@ -6604,7 +6004,7 @@ did not exist, would leave this document in far worse shape!)
@node Scope and Classes of Names
@section Scope and Classes of Symbolic Names
-@cindex symbolic names
+@cindex symbol names, scope and classes
@cindex scope
(The following information augments or overrides the information in
@@ -6619,7 +6019,7 @@ for the relevant aspects of GNU Fortran.)
@node Underscores in Symbol Names
@subsection Underscores in Symbol Names
-@cindex underscores
+@cindex underscore
Underscores (@samp{_}) are accepted in symbol names after the first
character (which must be a letter).
@@ -6641,12 +6041,16 @@ Edit descriptors in @code{FORMAT} statements may contain compile-time
The @code{OPEN} specifier @code{NAME=} is equivalent to @code{FILE=}.
-These Fortran 90 features are supported:
+These Fortran 90 features are supported:
@itemize @bullet
@item
+@cindex FORMAT descriptors
@cindex Z edit descriptor
@cindex edit descriptor, Z
-The @code{Z} edit descriptor is supported.
+@cindex O edit descriptor
+@cindex edit descriptor, O
+The @code{O} and @code{Z} edit descriptors are supported for I/O of
+integers in octal and hexadecimal formats, respectively.
@item
The @code{FILE=} specifier may be omitted in an @code{OPEN} statement if
@code{STATUS='SCRATCH'} is supplied. The @code{STATUS='REPLACE'}
@@ -6656,25 +6060,21 @@ specifier is supported.
@node Fortran 90 Features
@section Fortran 90 Features
@cindex Fortran 90
+@cindex extensions, from Fortran 90
For convenience this section collects a list (probably incomplete) of
the Fortran 90 features supported by the GNU Fortran language, even if
they are documented elsewhere.
-@c makeinfo 1.68 objects to the nested parens
-@ifnotinfo
-@xref{Characters Lines Sequence,,{Characters, Lines, and Execution Sequence}},
-@end ifnotinfo
-@ifinfo
-@xref{Characters Lines Sequence},
-@end ifinfo
-for information on additional fixed source form lexical issues. In
-addition, the free source form is supported through the
+@xref{Characters Lines Sequence,,@asis{Characters, Lines, and Execution Sequence}},
+for information on additional fixed source form lexical issues.
@cindex @samp{-ffree-form}
-@samp{-ffree-form} option. Other Fortran 90 features can be turned on
-by the
+Further, the free source form is supported through the
+@samp{-ffree-form} option.
@cindex @samp{-ff90}
-@samp{-ff90} option, @ref{Fortran 90}. For information on the Fortran
-90 intrinsics available @ref{Table of Intrinsic Functions}.
+Other Fortran 90 features can be turned on by the @samp{-ff90} option;
+see @ref{Fortran 90}.
+For information on the Fortran 90 intrinsics available,
+see @ref{Table of Intrinsic Functions}.
@table @asis
@item Automatic arrays in procedures
@@ -6688,12 +6088,11 @@ Strings may have zero length and substrings of character constants are
permitted. Character constants may be enclosed in double quotes
(@code{"}) as well as single quotes. @xref{Character Type}.
@item Construct names
-(Symbolic tags on blocks.) @xref{Construct Names }.
+(Symbolic tags on blocks.) @xref{Construct Names}.
@item @code{CYCLE} and @code{EXIT}
@xref{CYCLE and EXIT,,The @code{CYCLE} and @code{EXIT} Statements}.
@item @code{DOUBLE COMPLEX}
-@xref{DOUBLE COMPLEX,,@code{DOUBLE COMPLEX} Statement
-}.
+@xref{DOUBLE COMPLEX,,@code{DOUBLE COMPLEX} Statement}.
@item @code{DO WHILE}
@xref{DO WHILE}.
@item @code{END} decoration
@@ -6704,21 +6103,29 @@ permitted. Character constants may be enclosed in double quotes
@item @code{IMPLICIT NONE}
@item @code{INCLUDE} statements
@xref{INCLUDE}.
-@item List directed and namelist i/o on internal files
+@item List-directed and namelist I/O on internal files
@item Binary, octal and hexadecimal constants
These are supported more generally than required by Fortran 90.
@xref{Integer Type}.
+@item @samp{O} and @samp{Z} edit descriptors
@item @code{NAMELIST}
@xref{NAMELIST}.
@item @code{OPEN} specifiers
@code{STATUS='REPLACE'} is supported.
+The @code{FILE=} specifier may be omitted in an @code{OPEN} statement if
+@code{STATUS='SCRATCH'} is supplied.
+@item @code{FORMAT} edit descriptors
+@cindex FORMAT descriptors
+@cindex Z edit descriptor
+@cindex edit descriptor, Z
+The @code{Z} edit descriptor is supported.
@item Relational operators
The operators @code{<}, @code{<=}, @code{==}, @code{/=}, @code{>} and
@code{>=} may be used instead of @code{.LT.}, @code{.LE.}, @code{.EQ.},
@code{.NE.}, @code{.GT.} and @code{.GE.} respectively.
@item @code{SELECT CASE}
-Not fully implemented. @xref{SELECT CASE on CHARACTER Type,,
-@code{SELECT CASE} on @code{CHARACTER} Type}.
+Not fully implemented.
+@xref{SELECT CASE on CHARACTER Type,, @code{SELECT CASE} on @code{CHARACTER} Type}.
@item Specification statements
A limited subset of the Fortran 90 syntax and semantics for variable
declarations is supported, including @code{KIND}. @xref{Kind Notation}.
@@ -6765,8 +6172,8 @@ of work!}
@node Source Form
@section Source Form
@cindex source file format
-@cindex source form
-@cindex files, source
+@cindex source format
+@cindex file, source
@cindex source code
@cindex code, source
@cindex fixed form
@@ -6815,7 +6222,8 @@ inside such constants.
@node Tabs
@subsection Tabs
-@cindex tab characters
+@cindex tab character
+@cindex horizontal tab
A source line with a @key{TAB} character anywhere in it is treated as
entirely significant---however long it is---instead of ending in
@@ -6849,8 +6257,7 @@ the way continued character/Hollerith constants are interpreted).
@node Short Lines
@subsection Short Lines
@cindex short source lines
-@cindex space-padding
-@cindex spaces
+@cindex space, padding with
@cindex source lines, short
@cindex lines, short
@@ -6876,7 +6283,7 @@ like @samp{-ffixed-line-length-none}, for example.
@node Long Lines
@subsection Long Lines
@cindex long source lines
-@cindex truncation
+@cindex truncation, of long lines
@cindex lines, long
@cindex source lines, long
@@ -6903,8 +6310,11 @@ continuation line, imitating the behavior of @code{f2c}.
@section Trailing Comment
@cindex trailing comment
-@cindex comment, trailing
+@cindex comment
+@cindex characters, comment
@cindex /*
+@cindex !
+@cindex exclamation point
@code{g77} supports use of @samp{/*} to start a trailing
comment.
In the GNU Fortran language, @samp{!} is used for this purpose.
@@ -7058,7 +6468,7 @@ but that seems to be overkill for a product in beta test.
Note 2: Rules for InitialCaps names are:
-@itemize --
+@itemize @minus
@item
Must be a single uppercase letter, @strong{or}
@item
@@ -7071,7 +6481,7 @@ valid InitialCaps names, but @samp{AB}, @samp{A2}, and @samp{ABC} are
not.
Note that most, but not all, built-in names meet these
requirements---the exceptions are some of the two-letter format
-specifiers, such as @samp{BN} and @samp{BZ}.
+specifiers, such as @code{BN} and @code{BZ}.
Here are the names of the corresponding command-line options:
@@ -7265,7 +6675,7 @@ meaning is to be assumed.
@code{g77} treats double-quote (@samp{"})
as beginning an octal constant of @code{INTEGER(KIND=1)} type
-when the @code{-fvxt} option is specified.
+when the @samp{-fvxt} option is specified.
The form of this octal constant is
@example
@@ -7276,7 +6686,7 @@ The form of this octal constant is
where @var{octal-digits} is a nonempty string of characters in
the set @samp{01234567}.
-For example, the @code{-fvxt} option permits this:
+For example, the @samp{-fvxt} option permits this:
@example
PRINT *, "20
@@ -7297,7 +6707,8 @@ both constructs in the general case, since statements like
@node Exclamation Point
@subsection Meaning of Exclamation Point in Column 6
-@cindex exclamation points
+@cindex !
+@cindex exclamation point
@cindex continuation character
@cindex characters, continuation
@cindex comment character
@@ -7308,7 +6719,7 @@ a fixed-form source file
as a continuation character rather than
as the beginning of a comment
(as it does in any other column)
-when the @code{-fvxt} option is specified.
+when the @samp{-fvxt} option is specified.
The following program, when run, prints a message indicating
whether it is interpreted according to GNU Fortran (and Fortran 90)
@@ -7331,7 +6742,7 @@ marks a line as a continuation line when it appears in column 6.)
@node Fortran 90
@section Fortran 90
@cindex compatibility, Fortran 90
-@cindex Fortran 90 compatibility
+@cindex Fortran 90, compatibility
The GNU Fortran language includes a number of features that are
part of Fortran 90, even when the @samp{-ff90} option is not specified.
@@ -7419,7 +6830,7 @@ provided for by that standard.
Automatic conversion of numeric
expressions to @code{INTEGER(KIND=1)} in contexts such as:
-@itemize --
+@itemize @minus
@item
Array-reference indexes.
@item
@@ -7538,18 +6949,6 @@ portable constructs, are accepted.
These are humorously referred to as ``distensions'',
extensions that just plain look ugly in the harsh light of day.
-@emph{Note:} The @samp{-fugly} option, which currently serves
-as shorthand to enable all of the distensions below, is likely to
-be removed in a future version of @code{g77}.
-That's because it's likely new distensions will be added that
-conflict with existing ones in terms of assigning meaning to
-a given chunk of code.
-(Also, it's pretty clear that users should not use @samp{-fugly}
-as shorthand when the next release of @code{g77} might add a
-distension to that that causes their existing code, when recompiled,
-to behave differently---perhaps even fail to compile or run
-correctly.)
-
@menu
* Ugly Implicit Argument Conversion:: Disabled via @samp{-fno-ugly-args}.
* Ugly Assumed-Size Arrays:: Enabled via @samp{-fugly-assumed}.
@@ -7684,8 +7083,9 @@ without conversion.
@node Ugly Null Arguments
@subsection Ugly Null Arguments
-@cindex trailing commas
-@cindex commas, trailing
+@cindex trailing comma
+@cindex comma, trailing
+@cindex characters, comma
@cindex null arguments
@cindex arguments, null
@@ -7842,7 +7242,7 @@ ASSIGN 10 TO I
Normally, for portability and improved diagnostics, @code{g77}
reserves distinct storage for a ``sibling'' of @samp{I}, used
only for @code{ASSIGN} statements to that variable (along with
-the corresponding assigned-@code{GOTO} and assigned-@samp{FORMAT}-I/O
+the corresponding assigned-@code{GOTO} and assigned-@code{FORMAT}-I/O
statements that reference the variable).
However, some code (that violates the ANSI FORTRAN 77 standard)
@@ -7899,6 +7299,7 @@ of work!}
@menu
* Compiler Limits::
+* Run-time Environment Limits::
* Compiler Types::
* Compiler Constants::
* Compiler Intrinsics::
@@ -7917,6 +7318,8 @@ symbols in a program, and so on.
@cindex -Nl option
@cindex options, -Nx
@cindex -Nx option
+@cindex limits, continuation lines
+@cindex limits, lengths of names
For example, some other Fortran compiler have an option
(such as @samp{-Nl@var{x}}) to increase the limit on the
number of continuation lines.
@@ -7932,9 +7335,315 @@ limits in these areas.
@cindex maximum rank
@cindex number of dimensions, maximum
@cindex maximum number of dimensions
+@cindex limits, rank
+@cindex limits, array dimensions
@code{g77} does currently limit the number of dimensions in an array
to the same degree as do the Fortran standards---seven (7).
-This restriction might well be lifted in a future version.
+This restriction might be lifted in a future version.
+
+@node Run-time Environment Limits
+@section Run-time Environment Limits
+@cindex limits, run-time library
+@cindex wraparound
+
+As a portable Fortran implementation,
+@code{g77} offers its users direct access to,
+and otherwise depends upon,
+the underlying facilities of the system
+used to build @code{g77},
+the system on which @code{g77} itself is used to compile programs,
+and the system on which the @code{g77}-compiled program is actually run.
+(For most users, the three systems are of the same
+type---combination of operating environment and hardware---often
+the same physical system.)
+
+The run-time environment for a particular system
+inevitably imposes some limits on a program's use
+of various system facilities.
+These limits vary from system to system.
+
+Even when such limits might be well beyond the
+possibility of being encountered on a particular system,
+the @code{g77} run-time environment
+has certain built-in limits,
+usually, but not always, stemming from intrinsics
+with inherently limited interfaces.
+
+Currently, the @code{g77} run-time environment
+does not generally offer a less-limiting environment
+by augmenting the underlying system's own environment.
+
+Therefore, code written in the GNU Fortran language,
+while syntactically and semantically portable,
+might nevertheless make non-portable assumptions
+about the run-time environment---assumptions that
+prove to be false for some particular environments.
+
+The GNU Fortran language,
+the @code{g77} compiler and run-time environment,
+and the @code{g77} documentation
+do not yet offer comprehensive portable work-arounds for such limits,
+though programmers should be able to
+find their own in specific instances.
+
+Not all of the limitations are described in this document.
+Some of the known limitations include:
+
+@menu
+* Timer Wraparounds::
+* Year 2000 (Y2K) Problems::
+* Array Size::
+* Character-variable Length::
+* Year 10000 (Y10K) Problems::
+@end menu
+
+@node Timer Wraparounds
+@subsection Timer Wraparounds
+
+Intrinsics that return values computed from system timers,
+whether elapsed (wall-clock) timers,
+process CPU timers,
+or other kinds of timers,
+are prone to experiencing wrap-around errors
+(or returning wrapped-around values from successive calls)
+due to insufficient ranges
+offered by the underlying system's timers.
+
+@cindex negative time
+@cindex short time
+@cindex long time
+Some of the symptoms of such behaviors include
+apparently negative time being computed for a duration,
+an extremely short amount of time being computed for a long duration,
+and an extremely long amount of time being computed for a short duration.
+
+See the following for intrinsics
+known to have potential problems in these areas
+on at least some systems:
+@ref{CPU_Time Intrinsic},
+@ref{DTime Intrinsic (function)}, @ref{DTime Intrinsic (subroutine)},
+@ref{ETime Intrinsic (function)}, @ref{ETime Intrinsic (subroutine)},
+@ref{MClock Intrinsic}, @ref{MClock8 Intrinsic},
+@ref{Secnds Intrinsic},
+@ref{Second Intrinsic (function)}, @ref{Second Intrinsic (subroutine)},
+@ref{System_Clock Intrinsic},
+@ref{Time Intrinsic (UNIX)}, @ref{Time Intrinsic (VXT)},
+@ref{Time8 Intrinsic}.
+
+@node Year 2000 (Y2K) Problems
+@subsection Year 2000 (Y2K) Problems
+@cindex Y2K compliance
+@cindex Year 2000 compliance
+
+While the @code{g77} compiler itself is believed to
+be Year-2000 (Y2K) compliant,
+some intrinsics are not,
+and, potentially, some underlying systems are not,
+perhaps rendering some Y2K-compliant intrinsics
+non-compliant when used on those particular systems.
+
+Fortran code that uses non-Y2K-compliant intrinsics
+(listed below)
+is, itself, almost certainly not compliant,
+and should be modified to use Y2K-compliant intrinsics instead.
+
+Fortran code that uses no non-Y2K-compliant intrinsics,
+but which currently is running on a non-Y2K-compliant system,
+can be made more Y2K compliant by compiling and
+linking it for use on a new Y2K-compliant system,
+such as a new version of an old, non-Y2K-compliant, system.
+
+Currently, information on Y2K and related issues
+is being maintained at
+@uref{http://www.gnu.org/software/year2000-list.html}.
+
+See the following for intrinsics
+known to have potential problems in these areas
+on at least some systems:
+@ref{Date Intrinsic},
+@ref{IDate Intrinsic (VXT)}.
+
+@cindex y2kbuggy
+@cindex date_y2kbuggy_0
+@cindex vxtidate_y2kbuggy_0
+@cindex G77_date_y2kbuggy_0
+@cindex G77_vxtidate_y2kbuggy_0
+The @code{libg2c} library
+shipped with any @code{g77} that warns
+about invocation of a non-Y2K-compliant intrinsic
+has renamed the @code{EXTERNAL} procedure names
+of those intrinsics.
+This is done so that
+the @code{libg2c} implementations of these intrinsics
+cannot be directly linked to
+as @code{EXTERNAL} names
+(which normally would avoid the non-Y2K-intrinsic warning).
+
+The renamed forms of the @code{EXTERNAL} names
+of these renamed procedures
+may be linked to
+by appending the string @samp{_y2kbug}
+to the name of the procedure
+in the source code.
+For example:
+
+@smallexample
+CHARACTER*20 STR
+INTEGER YY, MM, DD
+EXTERNAL DATE_Y2KBUG, VXTIDATE_Y2KBUG
+CALL DATE_Y2KBUG (STR)
+CALL VXTIDATE_Y2KBUG (MM, DD, YY)
+@end smallexample
+
+(Note that the @code{EXTERNAL} statement
+is not actually required,
+since the modified names are not recognized as intrinsics
+by the current version of @code{g77}.
+But it is shown in this specific case,
+for purposes of illustration.)
+
+The renaming of @code{EXTERNAL} procedure names of these intrinsics
+causes unresolved references at link time.
+For example, @samp{EXTERNAL DATE; CALL DATE(STR)}
+is normally compiled by @code{g77}
+as, in C, @samp{date_(&str, 20);}.
+This, in turn, links to the @code{date_} procedure
+in the @code{libE77} portion of @code{libg2c},
+which purposely calls a nonexistent procedure
+named @code{G77_date_y2kbuggy_0}.
+The resulting link-time error is designed, via this name,
+to encourage the programmer to look up the
+index entries to this portion of the @code{g77} documentation.
+
+Generally, we recommend that the @code{EXTERNAL} method
+of invoking procedures in @code{libg2c}
+@emph{not} be used.
+When used, some of the correctness checking
+normally performed by @code{g77}
+is skipped.
+
+In particular, it is probably better to use the
+@code{INTRINSIC} method of invoking
+non-Y2K-compliant procedures,
+so anyone compiling the code
+can quickly notice the potential Y2K problems
+(via the warnings printing by @code{g77})
+without having to even look at the code itself.
+
+If there are problems linking @code{libg2c}
+to code compiled by @code{g77}
+that involve the string @samp{y2kbug},
+and these are not explained above,
+that probably indicates
+that a version of @code{libg2c}
+older than @code{g77}
+is being linked to,
+or that the new library is being linked
+to code compiled by an older version of @code{g77}.
+
+That's because, as of the version that warns about
+non-Y2K-compliant intrinsic invocation,
+@code{g77} references the @code{libg2c} implementations
+of those intrinsics
+using new names, containing the string @samp{y2kbug}.
+
+So, linking newly-compiled code
+(invoking one of the intrinsics in question)
+to an old library
+might yield an unresolved reference
+to @code{G77_date_y2kbug_0}.
+(The old library calls it @code{G77_date_0}.)
+
+Similarly, linking previously-compiled code
+to a new library
+might yield an unresolved reference
+to @code{G77_vxtidate_0}.
+(The new library calls it @code{G77_vxtidate_y2kbug_0}.)
+
+The proper fix for the above problems
+is to obtain the latest release of @code{g77}
+and related products
+(including @code{libg2c})
+and install them on all systems,
+then recompile, relink, and install
+(as appropriate)
+all existing Fortran programs.
+
+(Normally, this sort of renaming is steadfastly avoided.
+In this case, however, it seems more important to highlight
+potential Y2K problems
+than to ease the transition
+of potentially non-Y2K-compliant code
+to new versions of @code{g77} and @code{libg2c}.)
+
+@node Array Size
+@subsection Array Size
+@cindex limits, array size
+@cindex array size
+
+Currently, @code{g77} uses the default @code{INTEGER} type
+for array indexes,
+which limits the sizes of single-dimension arrays
+on systems offering a larger address space
+than can be addressed by that type.
+(That @code{g77} puts all arrays in memory
+could be considered another limitation---it
+could use large temporary files---but that decision
+is left to the programmer as an implementation choice
+by most Fortran implementations.)
+
+@c ??? Investigate this, to offer a more clear statement
+@c than the following paragraphs do. -- burley 1999-02-17
+It is not yet clear whether this limitation
+never, sometimes, or always applies to the
+sizes of multiple-dimension arrays as a whole.
+
+For example, on a system with 64-bit addresses
+and 32-bit default @code{INTEGER},
+an array with a size greater than can be addressed
+by a 32-bit offset
+can be declared using multiple dimensions.
+Such an array is therefore larger
+than a single-dimension array can be,
+on the same system.
+
+@cindex limits, multi-dimension arrays
+@cindex multi-dimension arrays
+@cindex arrays, dimensioning
+Whether large multiple-dimension arrays are reliably supported
+depends mostly on the @code{gcc} back end (code generator)
+used by @code{g77}, and has not yet been fully investigated.
+
+@node Character-variable Length
+@subsection Character-variable Length
+@cindex limits, on character-variable length
+@cindex character-variable length
+
+Currently, @code{g77} uses the default @code{INTEGER} type
+for the lengths of @code{CHARACTER} variables
+and array elements.
+
+This means that, for example,
+a system with a 64-bit address space
+and a 32-bit default @code{INTEGER} type
+does not, under @code{g77},
+support a @code{CHARACTER*@var{n}} declaration
+where @var{n} is greater than 2147483647.
+
+@node Year 10000 (Y10K) Problems
+@subsection Year 10000 (Y10K) Problems
+@cindex Y10K compliance
+@cindex Year 10000 compliance
+
+Most intrinsics returning, or computing values based on,
+date information are prone to Year-10000 (Y10K) problems,
+due to supporting only 4 digits for the year.
+
+See the following for examples:
+@ref{FDate Intrinsic (function)}, @ref{FDate Intrinsic (subroutine)},
+@ref{IDate Intrinsic (UNIX)},
+@ref{Time Intrinsic (VXT)},
+@ref{Date_and_Time Intrinsic}.
@node Compiler Types
@section Compiler Types
@@ -8470,7 +8179,7 @@ command.
of work!}
@menu
-* Interoperating with C and C++::
+* Interoperating with C and C++::
@end menu
@node Interoperating with C and C++
@@ -8511,7 +8220,7 @@ options @code{g77} passes by running @samp{g77 -v}.
@pindex f2c
@cindex cfortran.h
@cindex Netlib
-Even if you don't actually use it as a compiler, @samp{f2c} from
+Even if you don't actually use it as a compiler, @code{f2c} from
@uref{ftp://ftp.netlib.org/f2c/src}, can be a useful tool when you're
interfacing (linking) Fortran and C@.
@xref{f2c Skeletons and Prototypes,,Generating Skeletons and Prototypes with @code{f2c}}.
@@ -8538,7 +8247,7 @@ Generally, C code written to link with
called from Fortran---should @samp{#include <g2c.h>} to define the C
versions of the Fortran types.
Don't assume Fortran @code{INTEGER} types
-correspond to C @samp{int}s, for instance; instead, declare them as
+correspond to C @code{int}s, for instance; instead, declare them as
@code{integer}, a type defined by @file{g2c.h}.
@file{g2c.h} is installed where @code{gcc} will find it by
default, assuming you use a copy of @code{gcc} compatible with
@@ -8553,7 +8262,7 @@ A simple and foolproof way to write @code{g77}-callable C routines---e.g.@: to
interface with an existing library---is to write a file (named, for
example, @file{fred.f}) of dummy Fortran
skeletons comprising just the declaration of the routine(s) and dummy
-arguments plus @samp{END} statements.
+arguments plus @code{END} statements.
Then run @code{f2c} on file @file{fred.f} to produce @file{fred.c}
into which you can edit
useful code, confident the calling sequence is correct, at least.
@@ -8567,7 +8276,7 @@ as the return type of a @code{REAL} @code{FUNCTION}.)
@samp{-P} option to generate C prototypes appropriate for calling the
Fortran.@footnote{The files generated like this can also be used for
inter-unit consistency checking of dummy and actual arguments, although
-the @samp{ftnchek} tool from @uref{ftp://ftp.netlib.org/fortran}
+the @code{ftnchek} tool from @uref{ftp://ftp.netlib.org/fortran}
or @uref{ftp://ftp.dsm.fordham.edu} is
probably better for this purpose.}
If the Fortran code containing any
@@ -8599,8 +8308,8 @@ avoid clashes with C++ reserved words in addition to those in C@.
@subsection Startup Code
@cindex startup code
-@cindex runtime initialization
-@cindex initialization, runtime
+@cindex run-time, initialization
+@cindex initialization, run-time
Unlike with some runtime systems,
it shouldn't be necessary
(unless there are bugs)
@@ -8813,11 +8522,11 @@ described in this section.
@cindex statements, PROGRAM
When @code{g77} compiles a main program unit, it gives it the public
-procedure name @samp{MAIN__}.
+procedure name @code{MAIN__}.
The @code{libg2c} library has the actual @code{main()} procedure
as is typical of C-based environments, and
it is this procedure that performs some initial start-up
-activity and then calls @samp{MAIN__}.
+activity and then calls @code{MAIN__}.
Generally, @code{g77} and @code{libg2c} are designed so that you need not
include a main program unit written in Fortran in your program---it
@@ -8835,10 +8544,10 @@ file @file{@value{path-libf2c}/libF77/main.c}, to see what kinds of things
might need to be done by your @code{main()} in order to provide the
Fortran environment your Fortran code is expecting.
-@cindex IARGC() intrinsic
-@cindex intrinsics, IARGC()
-@cindex GETARG() intrinsic
-@cindex intrinsics, GETARG()
+@cindex @code{IArgC} intrinsic
+@cindex intrinsics, @code{IArgC}
+@cindex @code{GetArg} intrinsic
+@cindex intrinsics, @code{GetArg}
For example, @code{libg2c}'s @code{main()} sets up the information used by
the @code{IARGC} and @code{GETARG} intrinsics.
Bypassing @code{libg2c}'s @code{main()}
@@ -8859,7 +8568,7 @@ Fortran code.
The standard way to get around this problem is to set a break
point (a one-time, or temporary, break point will do) at
-the entrance to @samp{MAIN__}, and then run the program.
+the entrance to @code{MAIN__}, and then run the program.
A convenient way to do so is to add the @code{gdb} command
@example
@@ -8876,7 +8585,7 @@ unit of your program.
Of course, if you really want to set a break point at some
other place in your program and just start the program
-running, without first breaking at @samp{MAIN__},
+running, without first breaking at @code{MAIN__},
that should work fine.
@node Procedures
@@ -9009,7 +8718,7 @@ functions return @code{float}.
@node Names
@section Names
@cindex symbol names
-@cindex transformation of symbol names
+@cindex transforming symbol names
Fortran permits each implementation to decide how to represent
names as far as how they're seen in other contexts, such as debuggers
@@ -9109,8 +8818,8 @@ could be used to inhibit the appending of the underscore to the name.
@node Common Blocks
@section Common Blocks (COMMON)
@cindex common blocks
-@cindex COMMON statement
-@cindex statements, COMMON
+@cindex @code{COMMON} statement
+@cindex statements, @code{COMMON}
@code{g77} names and lays out @code{COMMON} areas
the same way @code{f2c} does,
@@ -9224,7 +8933,7 @@ previous method in the documentation.)
@node Complex Variables
@section Complex Variables (COMPLEX)
@cindex complex variables
-@cindex imaginary part of complex
+@cindex imaginary part
@cindex COMPLEX statement
@cindex statements, COMPLEX
@@ -9252,11 +8961,6 @@ mode afterward.
(In @code{gdb}, this is accomplished via @samp{set lang c} and
either @samp{set lang fortran} or @samp{set lang auto}.)
-@emph{Note:} Compiling with the @samp{-fno-emulate-complex} option
-avoids the debugging problem, but is known to cause other problems
-like compiler crashes and generation of incorrect code, so it is
-not recommended.
-
@node Arrays
@section Arrays (DIMENSION)
@cindex DIMENSION statement
@@ -9678,7 +9382,7 @@ Instead, make a separate @code{INCLUDE} file that defines
so you can more easily change the actual numbers in the future.
The information below is culled from the definition
-of @samp{F_err} in @file{f/runtime/libI77/err.c} in the
+of @code{F_err} in @file{f/runtime/libI77/err.c} in the
@code{g77} source tree.
@smallexample
@@ -9772,7 +9476,8 @@ is not intended to be comprehensive.
@menu
* Language Extensions:: Features used by Fortran code.
-* Compiler Options:: Features helpful during development.
+* Diagnostic Abilities:: Abilities to spot problems early.
+* Compiler Options:: Features helpful to accommodate legacy code, etc.
* Compiler Speed:: Speed of the compilation process.
* Program Speed:: Speed of the generated, optimized code.
* Ease of Debugging:: Debugging ease-of-use at the source level.
@@ -9782,25 +9487,114 @@ is not intended to be comprehensive.
@node Language Extensions
@subsection Language Extensions
-@code{g77} offers several extensions to the Fortran language that @code{f2c}
-doesn't.
+@code{g77} offers several extensions to FORTRAN 77 language that @code{f2c}
+doesn't:
+
+@itemize @bullet
+@item
+Automatic arrays
+
+@item
+@code{CYCLE} and @code{EXIT}
+
+@item
+Construct names
+
+@item
+@code{SELECT CASE}
+
+@item
+@code{KIND=} and @code{LEN=} notation
+
+@item
+Semicolon as statement separator
+
+@item
+Constant expressions in @code{FORMAT} statements
+(such as @samp{FORMAT(I<J>)},
+where @samp{J} is a @code{PARAMETER} named constant)
+
+@item
+@code{MvBits} intrinsic
+
+@item
+@code{libU77} (Unix-compatibility) library,
+with routines known to compiler as intrinsics
+(so they work even when compiler options are used
+to change the interfaces used by Fortran routines)
+@end itemize
+
+@code{g77} also implements iterative @code{DO} loops
+so that they work even in the presence of certain ``extreme'' inputs,
+unlike @code{f2c}.
+@xref{Loops}.
+
+However, @code{f2c} offers a few that @code{g77} doesn't, such as:
+
+@itemize @bullet
+@item
+Intrinsics in @code{PARAMETER} statements
+
+@item
+Array bounds expressions (such as @samp{REAL M(N(2))})
+
+@item
+@code{AUTOMATIC} statement
+@end itemize
-However, @code{f2c} offers a few that @code{g77} doesn't, like
-fairly complete support for @code{INTEGER*2}.
It is expected that @code{g77} will offer some or all of these missing
features at some time in the future.
-(Version 0.5.18 of @code{g77} offers some rudimentary support for some
-of these features.)
+
+@node Diagnostic Abilities
+@subsection Diagnostic Abilities
+
+@code{g77} offers better diagnosis of problems in @code{FORMAT} statements.
+@code{f2c} doesn't, for example, emit any diagnostic for
+@samp{FORMAT(XZFAJG10324)},
+leaving that to be diagnosed, at run time, by
+the @code{libf2c} run-time library.
@node Compiler Options
@subsection Compiler Options
-@code{g77} offers a whole bunch of compiler options that @code{f2c} doesn't.
+@code{g77} offers compiler options that @code{f2c} doesn't,
+most of which are designed to more easily accommodate
+legacy code:
+
+@itemize @bullet
+@item
+Two that control the automatic appending of extra
+underscores to external names
+
+@item
+One that allows dollar signs (@samp{$}) in symbol names
+
+@item
+A variety that control acceptance of various
+``ugly'' constructs
+
+@item
+Several that specify acceptable use of upper and lower case
+in the source code
+
+@item
+Many that enable, disable, delete, or hide
+groups of intrinsics
-However, @code{f2c} offers a few that @code{g77} doesn't, like an
-option to generate code to check array subscripts at run time.
-It is expected that @code{g77} will offer some or all of these
-missing options at some time in the future.
+@item
+One to specify the length of fixed-form source lines
+(normally 72)
+
+@item
+One to specify the the source code is written in
+Fortran-90-style free-form
+@end itemize
+
+However, @code{f2c} offers a few that @code{g77} doesn't,
+like an option to have @code{REAL} default to @code{REAL*8}.
+It is expected that @code{g77} will offer all of the
+missing options pertinent to being a Fortran compiler
+at some time in the future.
@node Compiler Speed
@subsection Compiler Speed
@@ -9948,8 +9742,8 @@ Microsoft's rumored patent on the digits 0 and 1 is upheld.)
@cindex BLOCK DATA statement
@cindex statements, BLOCK DATA
@cindex libraries, containing BLOCK DATA
-@cindex @code{f2c} compatibility
-@cindex compatibility, @code{f2c}
+@cindex f2c compatibility
+@cindex compatibility, f2c
To ensure that block data program units are linked, especially a concern
when they are put into libraries, give each one a name (as in
@@ -10049,7 +9843,7 @@ The meaning of a @code{DO} loop in Fortran is precisely specified
in the Fortran standard@dots{}and is quite different from what
many programmers might expect.
-In particular, Fortran indexed @code{DO} loops are implemented as if
+In particular, Fortran iterative @code{DO} loops are implemented as if
the number of trips through the loop is calculated @emph{before}
the loop is entered.
@@ -10233,7 +10027,7 @@ tracking down bugs in such programs.
* Aliasing Assumed To Work::
* Output Assumed To Flush::
* Large File Unit Numbers::
-* Floating point precision::
+* Floating-point precision::
* Inconsistent Calling Sequences::
@end menu
@@ -10292,7 +10086,7 @@ are given types and then evaluated.
@node Variables Assumed To Be Zero
@subsection Variables Assumed To Be Zero
@cindex zero-initialized variables
-@cindex variables assumed to be zero
+@cindex variables, assumed to be zero
@cindex uninitialized variables
Many Fortran programs were developed on systems that provided
@@ -10317,7 +10111,7 @@ options using @code{g77}.
@node Variables Assumed To Be Saved
@subsection Variables Assumed To Be Saved
-@cindex variables retaining values across calls
+@cindex variables, retaining values across calls
@cindex saved variables
@cindex static variables
@@ -10590,7 +10384,7 @@ it provides either form of detection are welcome.
For several versions prior to 0.5.20, @code{g77} configured its
version of the @code{libf2c} run-time library so that one of
-its configuration macros, @samp{ALWAYS_FLUSH}, was defined.
+its configuration macros, @code{ALWAYS_FLUSH}, was defined.
This was done as a result of a belief that many programs expected
output to be flushed to the operating system (under UNIX, via
@@ -10615,7 +10409,7 @@ non-flushing library routines.)
@xref{Always Flush Output}, for information on how to modify
the @code{g77} source tree so that a version of @code{libg2c}
-can be built and installed with the @samp{ALWAYS_FLUSH} macro defined.
+can be built and installed with the @code{ALWAYS_FLUSH} macro defined.
@node Large File Unit Numbers
@subsection Large File Unit Numbers
@@ -10634,13 +10428,13 @@ file unit number that is out of the range accepted by
@code{libg2c}.
Normally, this range is 0 through 99, and the high end
of the range is controlled by a @code{libg2c} source-file
-macro named @samp{MXUNIT}.
+macro named @code{MXUNIT}.
If you can easily change your program to use unit numbers
in the range 0 through 99, you should do so.
Otherwise, see @ref{Larger File Unit Numbers}, for information on how
-to change @samp{MXUNIT} in @code{libg2c} so you can build and
+to change @code{MXUNIT} in @code{libg2c} so you can build and
install a new version of @code{libg2c} that supports the larger
unit numbers you need.
@@ -10652,23 +10446,26 @@ open by a running program.
Information on how to increase these limits should be found
in your system's documentation.
-@node Floating point precision
-@subsection Floating point precision
+@node Floating-point precision
+@subsection Floating-point precision
-@cindex IEEE 754
-@cindex IEEE conformance
-@cindex conformance, IEEE
-@cindex floating point precision
-If your program depends on exact IEEE 754 floating point handling it may
+@cindex IEEE 754 conformance
+@cindex conformance, IEEE 754
+@cindex floating-point, precision
+@cindex ix86 floating-point
+@cindex x86 floating-point
+If your program depends on exact IEEE 754 floating-point handling it may
help on some systems---specifically x86 or m68k hardware---to use
-the @code{-ffloat-store} option or to reset the precision flag on the
-floating point unit @xref{Optimize Options}.
+the @samp{-ffloat-store} option or to reset the precision flag on the
+floating-point unit.
+@xref{Optimize Options}.
However, it might be better simply to put the FPU into double precision
-mode and not take the performance hit of @code{-ffloat-store}. On x86
+mode and not take the performance hit of @samp{-ffloat-store}. On x86
and m68k GNU systems you can do this with a technique similar to that
-for turning on floating point exceptions @xref{Floating-point Exception
-Handling}. The control word could be set to double precision by
+for turning on floating-point exceptions
+(@pxref{Floating-point Exception Handling}).
+The control word could be set to double precision by
replacing the @code{__setfpucw} call with one like this:
@smallexample
__setfpucw ((_FPU_DEFAULT & ~_FPU_EXTENDED) | _FPU_DOUBLE);
@@ -10677,34 +10474,30 @@ replacing the @code{__setfpucw} call with one like this:
maths library, but we have no evidence of it causing trouble.)
Some targets (such as the Alpha) may need special options for full IEEE
-conformance @xref{Submodel Options,,Hardware Models and
-Configurations,gcc,Using and Porting GNU CC}.
+conformance.
+@xref{Submodel Options,,Hardware Models and Configurations,gcc,Using and Porting GNU CC}.
@node Inconsistent Calling Sequences
@subsection Inconsistent Calling Sequences
@pindex ftnchek
-@cindex floating point errors
+@cindex floating-point, errors
+@cindex ix86 FPU stack
@cindex x86 FPU stack
Code containing inconsistent calling sequences in the same file is
-normally rejected @xref{GLOBALS}. (Use, say, @code{ftnchek} to ensure
-consistency across source files
-@c makeinfo 1.68 objects to the nested parens
-@ifinfo
-@xref{f2c Skeletons and Prototypes}.)
-@end ifinfo
-@ifnotinfo
+normally rejected---see @ref{GLOBALS}.
+(Use, say, @code{ftnchek} to ensure
+consistency across source files.
@xref{f2c Skeletons and Prototypes,,
-{Generating Skeletons and Prototypes with @code{f2c}}}.)
-@end ifnotinfo
+Generating Skeletons and Prototypes with @code{f2c}}.)
Mysterious errors, which may appear to be code generation problems, can
appear specifically on the x86 architecture with some such
-inconsistencies. On x86 hardware, floating point return values of
-functions are placed on the floating point unit's register stack, not
+inconsistencies. On x86 hardware, floating-point return values of
+functions are placed on the floating-point unit's register stack, not
the normal stack. Thus calling a @code{REAL} or @code{DOUBLE PRECISION}
@code{FUNCTION} as some other sort of procedure, or vice versa,
-scrambles the floating point stack. This may break unrelated code
+scrambles the floating-point stack. This may break unrelated code
executed later. Similarly if, say, external C routines are written
incorrectly.
@@ -10784,15 +10577,6 @@ Currently, @code{g77} supports only automatic arrays, not
@code{RECURSIVE} procedures or other means of explicitly
specifying that variables or arrays are automatic.
-@cindex -fugly option
-@cindex options, -fugly
-@item -fugly
-Fix the source code so that @samp{-fno-ugly} will work.
-Note that, for many programs, it is difficult to practically
-avoid using the features enabled via @samp{-fugly-init}, and these
-features pose the lowest risk of writing nonportable code, among the
-various ``ugly'' features.
-
@cindex -f@var{group}-intrinsics-hide option
@cindex options, -f@var{group}-intrinsics-hide
@item -f@var{group}-intrinsics-hide
@@ -10803,7 +10587,7 @@ It is easy to find these using @samp{-f@var{group}-intrinsics-disable}.
@node Faster Programs
@section Faster Programs
-@cindex speeding up programs
+@cindex speed, of programs
@cindex programs, speeding up
Aside from the usual @code{gcc} options, such as @samp{-O},
@@ -10820,12 +10604,13 @@ it working).
@node Aligned Data
@subsection Aligned Data
+@cindex alignment
@cindex data, aligned
@cindex stack, aligned
@cindex aligned data
@cindex aligned stack
@cindex Pentium optimizations
-@cindex optimizations, Pentium
+@cindex optimization, for Pentium
On some systems, such as those with Pentium Pro CPUs, programs
that make heavy use of @code{REAL(KIND=2)} (@code{DOUBLE PRECISION})
@@ -10847,8 +10632,8 @@ There are a variety of approaches to use to address this problem:
@itemize @bullet
@item
-@cindex COMMON, layout
-@cindex layout of common blocks
+@cindex @code{COMMON} layout
+@cindex layout of @code{COMMON} blocks
Order your @code{COMMON} and @code{EQUIVALENCE} areas such
that the variables and arrays with the widest alignment
guidelines come first.
@@ -10878,7 +10663,7 @@ avoid having to carefully count the number of bytes
occupied by each entity to determine whether the
actual alignment of each subsequent entity meets the
alignment guidelines for the type of that entity.
-
+
If you don't ensure correct alignment of @code{COMMON} elements, the
compiler may be forced by some systems to violate the Fortran semantics by
adding padding to get @code{DOUBLE PRECISION} data properly aligned.
@@ -10921,12 +10706,6 @@ of the FORTRAN 77 standard,
or uses @code{EQUIVALENCE} or different layouts
in ways that assume no padding is ever inserted by the compiler.
-@emph{Note:} @samp{-malign-double} applies only to
-statically-allocated data.
-Double-precision data on the stack can still
-cause problems due to misalignment.
-@xref{Aligned Data}.
-
@item
Ensure that @file{crt0.o} or @file{crt1.o}
on your system guarantees a 64-bit
@@ -10943,6 +10722,13 @@ Progress is being made on making this work
@code{gcc}, and some of the relevant operating systems
(such as GNU/Linux).
+@cindex alignment testing
+@cindex testing alignment
+A package that tests the degree to which a Fortran compiler
+(such as @code{g77})
+aligns 64-bit floating-point variables and arrays
+is available at @uref{ftp://alpha.gnu.org/gnu/g77/align/}.
+
@node Prefer Automatic Uninitialized Variables
@subsection Prefer Automatic Uninitialized Variables
@@ -10988,30 +10774,25 @@ compiler, typically @code{gcc}.)
@node Use Submodel Options
@subsection Use Submodel Options
-@cindex Pentium optimizations
-@cindex optimizations, 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
@@ -11033,20 +10814,20 @@ or installing @code{g77} is not provided here.
@xref{Problems Installing}.
To find out about major bugs discovered in the current release and
-possible workarounds for them, retrieve
+possible workarounds for them, see
@uref{ftp://alpha.gnu.org/g77.plan}.
(Note that some of this portion of the manual is lifted
directly from the @code{gcc} manual, with minor modifications
to tailor it to users of @code{g77}.
Anytime a bug seems to have more to do with the @code{gcc}
-portion of @code{g77},
-@xref{Trouble,,Known Causes of Trouble with GNU CC,
+portion of @code{g77}, see
+@ref{Trouble,,Known Causes of Trouble with GNU CC,
gcc,Using and Porting GNU CC}.)
@menu
* But-bugs:: Bugs really in other programs or elsewhere.
-* Actual Bugs:: Bugs and misfeatures we will fix later.
+* Known Bugs:: Bugs known to be in this version of @code{g77}.
* Missing Features:: Features we already know we want to add later.
* Disappointments:: Regrettable things we can't change.
* Non-bugs:: Things we think are right, but some others disagree.
@@ -11140,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.
@@ -11155,8 +10936,8 @@ a reference to it in future versions of this manual.
@cindex unresolved reference (various)
@cindex linking error for user code
@cindex code, user
-@cindex ld error for user code
-@cindex ld can't find strange names
+@cindex @code{ld}, error linking user code
+@cindex @code{ld}, can't find strange names
On some systems, perhaps just those with out-of-date (shared?)
libraries, unresolved-reference errors happen when linking @code{g77}-compiled
programs (which should be done using @code{g77}).
@@ -11172,10 +10953,10 @@ systems where @samp{-lg2c -lm} is insufficient to resolve code produced
by @code{g77}.
@cindex undefined reference (_main)
-@cindex linking error for user code
-@cindex ld error for user code
+@cindex linking error, user code
+@cindex @code{ld}, error linking user code
@cindex code, user
-@cindex ld can't find _main
+@cindex @code{ld}, can't find @samp{_main}
If your program doesn't link due to unresolved references to names
like @samp{_main}, make sure you're using the @code{g77} command to do the
link, since this command ensures that the necessary libraries are
@@ -11192,8 +10973,8 @@ command line, in case that helps.
@subsection Large Common Blocks
@cindex common blocks, large
@cindex large common blocks
-@cindex linker errors
-@cindex ld errors
+@cindex linking, errors
+@cindex @code{ld}, errors
@cindex errors, linker
On some older GNU/Linux systems, programs with common blocks larger
than 16MB cannot be linked without some kind of error
@@ -11204,7 +10985,7 @@ more recent versions of @code{binutils}, such as version 2.6.
@node Debugger Problems
@subsection Debugger Problems
-@cindex @code{gdb} support
+@cindex @code{gdb}, support
@cindex support, @code{gdb}
There are some known problems when using @code{gdb} on code
compiled by @code{g77}.
@@ -11274,7 +11055,7 @@ not enough.)
@node Stack Overflow
@subsection Stack Overflow
-@cindex stack overflow
+@cindex stack, overflow
@cindex segmentation violation
@code{g77} code might fail at runtime (probably with a ``segmentation
violation'') due to overflowing the stack.
@@ -11326,9 +11107,9 @@ simply too large for the system, or buggy.)
@node Nothing Happens
@subsection Nothing Happens
@cindex nothing happens
-@cindex naming programs @samp{test}
-@cindex @samp{test} programs
-@cindex programs named @samp{test}
+@cindex naming programs
+@cindex @code{test} programs
+@cindex programs, @code{test}
It is occasionally reported that a ``simple'' program,
such as a ``Hello, World!'' program, does nothing when
it is run, even though the compiler reported no errors,
@@ -11336,7 +11117,7 @@ despite the program containing nothing other than a
simple @code{PRINT} statement.
This most often happens because the program has been
-compiled and linked on a UNIX system and named @samp{test},
+compiled and linked on a UNIX system and named @code{test},
though other names can lead to similarly unexpected
run-time behavior on various systems.
@@ -11392,6 +11173,8 @@ 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{-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
passed to a procedure and the dummy arguments as declared by that
@@ -11405,18 +11188,20 @@ That is, these bugs can be quite sensitive to data, including
data representing the placement of other data in memory (that is,
pointers, such as the placement of stack frames in memory).
-Plans call for improving @code{g77} so that it can offer the
+@code{g77} now offers the
ability to catch and report some of these problems at compile, link, or
run time, such as by generating code to detect references to
-beyond the bounds of an array, or checking for agreement between
-calling and called procedures.
+beyond the bounds of most arrays (except assumed-size arrays),
+and checking for agreement between calling and called procedures.
+Future improvements are likely to be made in the procedure-mismatch area,
+at least.
In the meantime, finding and fixing the programming
bugs that lead to these behaviors is, ultimately, the user's
responsibility, as difficult as that task can sometimes be.
-@cindex ``infinite spaces'' printed
-@cindex spaces, endless printing of
+@cindex infinite spaces printed
+@cindex space, endless printing of
@cindex libc, non-ANSI or non-default
@cindex C library
@cindex linking against non-standard library
@@ -11503,7 +11288,7 @@ used by @code{g77}, handles only double-precision values.
Since @samp{0.2} in the program is a single-precision value, it
is converted to double precision (still in binary notation)
before being converted back to decimal.
-The conversion to binary appends _binary_ zero digits to the
+The conversion to binary appends @emph{binary} zero digits to the
original value---which, again, is an inexact approximation of
0.2---resulting in an approximation that is much less exact
than is connoted by the use of double precision.
@@ -11548,15 +11333,15 @@ with that produced by some other Fortran implementations.
A useful source of information on floating-point computation is David
Goldberg, `What Every Computer Scientist Should Know About
Floating-Point Arithmetic', Computing Surveys, 23, March 1991, pp.@:
-5--48.
+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
@@ -11588,7 +11373,7 @@ as an option, or perhaps even as the default behavior.)
The GNU C library provides routines for controlling the FPU, and other
documentation about this.
-@xref{Floating point precision}, regarding IEEE 754 conformance.
+@xref{Floating-point precision}, regarding IEEE 754 conformance.
@include bugs.texi
@@ -11604,6 +11389,7 @@ GNU Fortran language:
* Better Source Model::
* Fortran 90 Support::
* Intrinsics in PARAMETER Statements::
+* Arbitrary Concatenation::
* SELECT CASE on CHARACTER Type::
* RECURSIVE Keyword::
* Popular Non-standard Types::
@@ -11611,6 +11397,7 @@ GNU Fortran language:
* Array Bounds Expressions::
* POINTER Statements::
* Sensible Non-standard Constructs::
+* READONLY Keyword::
* FLUSH Statement::
* Expressions in FORMAT Statements::
* Explicit Assembler Code::
@@ -11622,9 +11409,11 @@ GNU Fortran dialects:
* STRUCTURE UNION RECORD MAP::
* OPEN CLOSE and INQUIRE Keywords::
* ENCODE and DECODE::
+* AUTOMATIC Statement::
* Suppressing Space Padding::
* Fortran Preprocessor::
* Bit Operations on Floating-point Data::
+* Really Ugly Character Assignments::
New facilities:
* POSIX Standard::
@@ -11633,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::
@@ -11650,8 +11441,9 @@ Better diagnostics:
Run-time facilities:
* Uninitialized Variables at Run Time::
-* Bounds Checking at Run Time::
* Portable Unformatted Files::
+* Better List-directed I/O::
+* Default to Console I/O::
Debugging:
* Labels Visible to Debugger::
@@ -11695,11 +11487,11 @@ but one of the most frequent bugs encountered by new users is
accidentally writing fixed-form source code into and beyond
column 73.
So, maybe the users of old code would be able to more easily handle
-having to specify, say, a @code{-Wno-col73to80} option.
+having to specify, say, a @samp{-Wno-col73to80} option.
@node Fortran 90 Support
@subsection Fortran 90 Support
-@cindex Fortran 90 support
+@cindex Fortran 90, support
@cindex support, Fortran 90
@code{g77} does not support many of the features that
@@ -11743,6 +11535,22 @@ But, if the @code{gcc} back end is enhanced to provide
such a facility, @code{g77} will likely use that facility
in implementing this feature soon afterwards.
+@node Arbitrary Concatenation
+@subsection Arbitrary Concatenation
+@cindex concatenation
+@cindex CHARACTER*(*)
+@cindex run-time, dynamic allocation
+
+@code{g77} doesn't support arbitrary operands for concatenation
+in contexts where run-time allocation is required.
+For example:
+
+@smallexample
+SUBROUTINE X(A)
+CHARACTER*(*) A
+CALL FOO(A // 'suffix')
+@end smallexample
+
@node SELECT CASE on CHARACTER Type
@subsection @code{SELECT CASE} on @code{CHARACTER} Type
@@ -11767,6 +11575,7 @@ but the result is not pretty.
@node Increasing Precision/Range
@subsection Increasing Precision/Range
@cindex -r8
+@cindex -qrealsize=8
@cindex -i8
@cindex f2c
@cindex increasing precision
@@ -11776,7 +11585,8 @@ but the result is not pretty.
@cindex Toolpack
@cindex Netlib
-Some compilers, such as @code{f2c}, have an option (@samp{-r8} or
+Some compilers, such as @code{f2c}, have an option (@samp{-r8},
+@samp{-qrealsize=8} or
similar) that provides automatic treatment of @code{REAL}
entities such that they have twice the storage size, and
a corresponding increase in the range and precision, of what
@@ -11809,8 +11619,10 @@ alleviate this problem).
@node Popular Non-standard Types
@subsection Popular Non-standard Types
-@cindex INTEGER*2 support
-@cindex LOGICAL*1 support
+@cindex @code{INTEGER*2} support
+@cindex types, @code{INTEGER*2}
+@cindex @code{LOGICAL*1} support
+@cindex types, @code{LOGICAL*1}
@code{g77} doesn't fully support @code{INTEGER*2}, @code{LOGICAL*1},
and similar.
@@ -11822,7 +11634,10 @@ for them.
@node Full Support for Compiler Types
@subsection Full Support for Compiler Types
-@cindex REAL*16 support
+@cindex @code{REAL*16} support
+@cindex types, @code{REAL*16}
+@cindex @code{INTEGER*8} support
+@cindex types, @code{INTEGER*8}
@code{g77} doesn't support @code{INTEGER}, @code{REAL}, and @code{COMPLEX} equivalents
for @emph{all} applicable back-end-supported types (@code{char}, @code{short int},
@code{int}, @code{long int}, @code{long long int}, and @code{long double}).
@@ -11838,8 +11653,8 @@ This is scheduled for version 0.6.
@cindex array elements, in adjustable array bounds
@cindex function references, in adjustable array bounds
@cindex array bounds, adjustable
-@cindex DIMENSION statement
-@cindex statements, DIMENSION
+@cindex @code{DIMENSION} statement
+@cindex statements, @code{DIMENSION}
@code{g77} doesn't support more general expressions to dimension
arrays, such as array element references, function
@@ -11931,6 +11746,34 @@ specification of an attribute), please submit a
bug report with an explanation, so we can consider
fixing @code{g77} just for cases like yours.
+@node READONLY Keyword
+@subsection @code{READONLY} Keyword
+@cindex READONLY
+
+Support for @code{READONLY}, in @code{OPEN} statements,
+requires @code{libg2c} support,
+to make sure that @samp{CLOSE(@dots{},STATUS='DELETE')}
+does not delete a file opened on a unit
+with the @code{READONLY} keyword,
+and perhaps to trigger a fatal diagnostic
+if a @code{WRITE} or @code{PRINT}
+to such a unit is attempted.
+
+@emph{Note:} It is not sufficient for @code{g77} and @code{libg2c}
+(its version of @code{libf2c})
+to assume that @code{READONLY} does not need some kind of explicit support
+at run time,
+due to UNIX systems not (generally) needing it.
+@code{g77} is not just a UNIX-based compiler!
+
+Further, mounting of non-UNIX filesystems on UNIX systems
+(such as via NFS)
+might require proper @code{READONLY} support.
+
+@cindex SHARED
+(Similar issues might be involved with supporting the @code{SHARED}
+keyword.)
+
@node FLUSH Statement
@subsection @code{FLUSH} Statement
@@ -12073,7 +11916,7 @@ require much more work on @code{libg2c}.
@cindex FORM='PRINT'
@cindex ANS carriage control
-@cindex carraige control
+@cindex carriage control
@pindex asa
@pindex fpr
@code{g77} doesn't support @code{FORM='PRINT'} or an equivalent to
@@ -12148,6 +11991,44 @@ with:
It is entirely possible that @code{ENCODE} and @code{DECODE} will
be supported by a future version of @code{g77}.
+@node AUTOMATIC Statement
+@subsection @code{AUTOMATIC} Statement
+@cindex @code{AUTOMATIC} statement
+@cindex statements, @code{AUTOMATIC}
+@cindex automatic variables
+@cindex variables, automatic
+
+@code{g77} doesn't support the @code{AUTOMATIC} statement that
+@code{f2c} does.
+
+@code{AUTOMATIC} would identify a variable or array
+as not being @code{SAVE}'d, which is normally the default,
+but which would be especially useful for code that, @emph{generally},
+needed to be compiled with the @samp{-fno-automatic} option.
+
+@code{AUTOMATIC} also would serve as a hint to the compiler that placing
+the variable or array---even a very large array--on the stack is acceptable.
+
+@code{AUTOMATIC} would not, by itself, designate the containing procedure
+as recursive.
+
+@code{AUTOMATIC} should work syntactically like @code{SAVE},
+in that @code{AUTOMATIC} with no variables listed should apply to
+all pertinent variables and arrays
+(which would not include common blocks or their members).
+
+Variables and arrays denoted as @code{AUTOMATIC}
+would not be permitted to be initialized via @code{DATA}
+or other specification of any initial values,
+requiring explicit initialization,
+such as via assignment statements.
+
+@cindex UNSAVE
+@cindex STATIC
+Perhaps @code{UNSAVE} and @code{STATIC},
+as strict semantic opposites to @code{SAVE} and @code{AUTOMATIC},
+should be provided as well.
+
@node Suppressing Space Padding
@subsection Suppressing Space Padding of Source Lines
@@ -12194,18 +12075,18 @@ files included via the @code{INCLUDE} directive.
@node Bit Operations on Floating-point Data
@subsection Bit Operations on Floating-point Data
-@cindex AND intrinsic
-@cindex intrinsics, AND
-@cindex OR intrinsic
-@cindex intrinsics, OR
-@cindex SHIFT intrinsic
-@cindex intrinsics, SHIFT
+@cindex @code{And} intrinsic
+@cindex intrinsics, @code{And}
+@cindex @code{Or} intrinsic
+@cindex intrinsics, @code{Or}
+@cindex @code{Shift} intrinsic
+@cindex intrinsics, @code{Shift}
@code{g77} does not allow @code{REAL} and other non-integral types for
-arguments to intrinsics like @code{AND}, @code{OR}, and @code{SHIFT}.
+arguments to intrinsics like @code{And}, @code{Or}, and @code{Shift}.
For example, this program is rejected by @code{g77}, because
-the intrinsic @code{IAND} does not accept @code{REAL} arguments:
+the intrinsic @code{Iand} does not accept @code{REAL} arguments:
@smallexample
DATA A/7.54/, B/9.112/
@@ -12213,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
@@ -12220,8 +12119,8 @@ END
@node Floating-point Exception Handling
@subsection Floating-point Exception Handling
-@cindex floating point exceptions
-@cindex exceptions, floating point
+@cindex floating-point, exceptions
+@cindex exceptions, floating-point
@cindex FPE handling
@cindex NaN values
@@ -12254,7 +12153,7 @@ A convenient trick is to compile this something like:
@smallexample
gcc -o libtrapfpe.a trapfpe.c
@end smallexample
-and then use it by adding @code{-trapfpe} to the @code{g77} command line
+and then use it by adding @samp{-trapfpe} to the @code{g77} command line
when linking.
@node Nonportable Conversions
@@ -12269,7 +12168,7 @@ is type @code{REAL}), that other compilers might
quietly accept.
Some of these conversions are accepted by @code{g77}
-when the @samp{-fugly} option is specified.
+when the @samp{-fugly-logint} option is specified.
Perhaps it should accept more or all of them.
@node Large Automatic Arrays
@@ -12293,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
@@ -12461,15 +12427,6 @@ some kinds of uninitialized variables at run time.
Note that use of the options @samp{-O -Wuninitialized} can catch
many such bugs at compile time.
-@node Bounds Checking at Run Time
-@subsection Bounds Checking at Run Time
-
-@code{g77} should offer run-time bounds-checking of array/subscript references
-in a fashion similar to @code{f2c}.
-
-Note that @code{g77} already warns about references to out-of-bounds
-elements of arrays when it detects these at compile time.
-
@node Portable Unformatted Files
@subsection Portable Unformatted Files
@@ -12500,6 +12457,7 @@ A number giving the length of the record contents;
@item
the length of record contents again (for backspace).
@end enumerate
+
The record length is of C type
@code{long}; this means that it is 8 bytes on 64-bit systems such as
Alpha GNU/Linux and 4 bytes on other systems, such as x86 GNU/Linux.
@@ -12519,7 +12477,7 @@ written.
Thus for exchanging a sequential or direct access unformatted file
between big- and little-endian 32-bit systems using IEEE 754 floating
point it would be sufficient to reverse the bytes in consecutive words
-in the file @emph{iff} only @code{REAL*4}, @code{COMPLEX},
+in the file if, and @emph{only} if, only @code{REAL*4}, @code{COMPLEX},
@code{INTEGER*4} and/or @code{LOGICAL*4} data have been written to it by
@code{g77}.
@@ -12540,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
@@ -12568,7 +12569,7 @@ way around them for now.
@cindex external names
@cindex common blocks
@cindex name space
-@cindex underscores
+@cindex underscore
The current external-interface design, which includes naming of
external procedures, COMMON blocks, and the library interface,
@@ -12588,8 +12589,8 @@ with popular existing compilers.
@cindex block data
@cindex BLOCK DATA statement
@cindex statements, BLOCK DATA
-@cindex COMMON statement
-@cindex statements, COMMON
+@cindex @code{COMMON} statement
+@cindex statements, @code{COMMON}
@cindex naming conflicts
@code{g77} doesn't allow a common block and an external procedure or
@@ -12651,8 +12652,8 @@ we do not make because we think GNU Fortran is better without them.
@node Backslash in Constants
@subsection Backslash in Constants
@cindex backslash
-@cindex f77 support
-@cindex support, f77
+@cindex @code{f77} support
+@cindex support, @code{f77}
In the opinion of many experienced Fortran users,
@samp{-fno-backslash} should be the default, not @samp{-fbackslash},
@@ -12944,7 +12945,7 @@ could be very helpful.
@cindex logical expressions, comparing
Use of @code{.EQ.} and @code{.NE.} on @code{LOGICAL} operands
-is not supported, except via @samp{-fugly}, which is not
+is not supported, except via @samp{-fugly-logint}, which is not
recommended except for legacy code (where the behavior expected
by the @emph{code} is assumed).
@@ -13002,6 +13003,20 @@ that were well-designed in the first place.
you, without knowing more context, whether the @samp{&} and @samp{-}
operators are infix (binary) or unary!)
+Most dangerous of all is the fact that,
+even assuming consensus on its meaning,
+an expression like @samp{L.AND.M.EQ.N},
+if it is the result of a typographical error,
+doesn't @emph{look} like it has such a typo.
+Even experienced Fortran programmers would not likely notice that
+@samp{L.AND.M.EQV.N} was, in fact, intended.
+
+So, this is a prime example of a circumstance in which
+a quality compiler diagnoses the code,
+instead of leaving it up to someone debugging it
+to know to turn on special compiler options
+that might diagnose it.
+
@node Order of Side Effects
@subsection Order of Side Effects
@cindex side effects, order of evaluation
@@ -13067,7 +13082,7 @@ warnings.
Each kind has a different purpose:
@itemize @w{}
-@item
+@item
@emph{Errors} report problems that make it impossible to compile your
program.
GNU Fortran reports errors with the source file name, line
@@ -13152,7 +13167,7 @@ Bug reports are your contribution to the maintenance of GNU Fortran.
Since the maintainers are very overloaded, we cannot respond to every
bug report.
However, if the bug has not been fixed, we are likely to
-send you a patch and ask you to tell us whether it works.
+send you a patch and ask you to tell us whether it works.
In order for a bug report to serve its purpose, you must include the
information that makes for fixing the bug.
@@ -13463,23 +13478,30 @@ the bug in the current version of GNU Fortran.
@cindex programs, cpp
@pindex cpp
A complete input file that will reproduce the bug.
-If the bug is in the compiler proper (@file{f771}) and
-you are using the C preprocessor, run your
-source file through the C preprocessor by doing @samp{g77 -E
-@var{sourcefile} > @var{outfile}}, then include the contents of
-@var{outfile} in the bug report. (When you do this, use the same
-@samp{-I}, @samp{-D} or @samp{-U} options that you used in actual
+
+If your source file(s) require preprocessing
+(for example, their names have suffixes like
+@samp{.F}, @samp{.fpp}, @samp{.FPP}, and @samp{.r}),
+and the bug is in the compiler proper (@file{f771})
+or in a subsequent phase of processing,
+run your source file through the C preprocessor
+by doing @samp{g77 -E @var{sourcefile} > @var{newfile}}.
+Then, include the contents of @var{newfile} in the bug report.
+(When you do this, use the same preprocessor options---such as
+@samp{-I}, @samp{-D}, and @samp{-U}---that you used in actual
compilation.)
A single statement is not enough of an example.
In order to compile it,
-it must be embedded in a complete file of compiler input; and the bug
-might depend on the details of how this is done.
+it must be embedded in a complete file of compiler input.
+The bug might depend on the details of how this is done.
-Without a real example one can compile, all anyone can do about your bug
-report is wish you luck. It would be futile to try to guess how to
-provoke the bug. For example, bugs in register allocation and reloading
-frequently depend on every little detail of the function they happen in.
+Without a real example one can compile,
+all anyone can do about your bug report is wish you luck.
+It would be futile to try to guess how to provoke the bug.
+For example, bugs in register allocation and reloading
+can depend on every little detail of the source and include files
+that trigger them.
@item
@cindex included files
@@ -13851,13 +13873,13 @@ when compiling most any kind of program.
which is used during the build of @code{gcc} to
build a list of all options that are accepted by
at least one language's compiler.
-This list goes into the @samp{lang_options} array
+This list goes into the @code{lang_options} array
in @file{gcc/toplev.c}, which uses this array to
determine whether a particular option should be
offered to the linked-in front end for processing
-by calling @samp{lang_option_decode}, which, for
+by calling @code{lang_option_decode}, which, for
@code{g77}, is in @file{@value{path-g77}/com.c} and just
-calls @samp{ffe_decode_option}.
+calls @code{ffe_decode_option}.
If the linked-in front end ``rejects'' a
particular option passed to it, @file{toplev.c}
@@ -13867,7 +13889,7 @@ language's compiler is willing to accept it.
This allows commands like @samp{gcc -fno-asm foo.c bar.f}
to work, even though Fortran compilation does
not currently support the @samp{-fno-asm} option;
-even though the @code{f771} version of @samp{lang_decode_option}
+even though the @code{f771} version of @code{lang_decode_option}
rejects @samp{-fno-asm}, @file{toplev.c} doesn't
produce a diagnostic because some other language (C)
does accept it.
@@ -13880,7 +13902,7 @@ a warning about this would be helpful if it were
possible.
Code that processes Fortran options is found in
-@file{@value{path-g77}/top.c}, function @samp{ffe_decode_option}.
+@file{@value{path-g77}/top.c}, function @code{ffe_decode_option}.
This code needs to check positive and negative forms
of each option.
@@ -13900,9 +13922,9 @@ Accessor macros for Fortran options, used by code
in the @code{g77} FFE, are defined in @file{@value{path-g77}/top.h}.
@emph{Compiler options} are listed in @file{gcc/toplev.c}
-in the array @samp{f_options}.
-An option not listed in @samp{lang_options} is
-looked up in @samp{f_options} and handled from there.
+in the array @code{f_options}.
+An option not listed in @code{lang_options} is
+looked up in @code{f_options} and handled from there.
The defaults for compiler options are set in the
global definitions for the corresponding variables,
@@ -13910,11 +13932,25 @@ some of which are in @file{gcc/toplev.c}.
You can set different defaults for @emph{Fortran-oriented}
or @emph{Fortran-reticent} compiler options by changing
-the way @code{f771} handles the @samp{-fset-g77-defaults}
+the source code of @code{g77} and rebuilding.
+How to do this depends on the version of @code{g77}:
+
+@table @code
+@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}.
-This code is in @samp{ffe_decode_options} in @file{@value{path-g77}/top.c}.
+This code is in @code{ffe_decode_options} in @file{@value{path-g77}/top.c}.
Have it change just the variables that you want to default
to a different setting for Fortran compiles compared to
compiles of other languages.
@@ -13933,6 +13969,7 @@ 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.
+@end table
@node Projects
@chapter Projects
@@ -13967,7 +14004,7 @@ them show up only given certain kinds of (popular) input.
@itemize @bullet
@item
-Improve @samp{malloc} package and its uses to specify more info about
+Improve @code{malloc} package and its uses to specify more info about
memory pools and, where feasible, use obstacks to implement them.
@item
@@ -13994,11 +14031,11 @@ unimplemented-statement catch-all.
@item
Throughout @code{g77}, don't pass line/column pairs where
-a simple @samp{ffewhere} type, which points to the error as much as is
-desired by the configuration, will do, and don't pass @samp{ffelexToken} types
-where a simple @samp{ffewhere} type will do.
+a simple @code{ffewhere} type, which points to the error as much as is
+desired by the configuration, will do, and don't pass @code{ffelexToken} types
+where a simple @code{ffewhere} type will do.
Then, allow new default
-configuration of @samp{ffewhere} such that the source line text is not
+configuration of @code{ffewhere} such that the source line text is not
preserved, and leave it to things like Emacs' next-error function
to point to them (now that @samp{next-error} supports column,
or, perhaps, character-offset, numbers).
@@ -14048,7 +14085,7 @@ that are at all worth inlining.
@item
When doing @samp{CHAR_VAR = CHAR_FUNC(@dots{})},
and it's clear that types line up
-and @samp{CHAR_VAR} is addressable or not a @samp{VAR_DECL},
+and @samp{CHAR_VAR} is addressable or not a @code{VAR_DECL},
make @samp{CHAR_VAR}, not a
temporary, be the receiver for @samp{CHAR_FUNC}.
(This is now done for @code{COMPLEX} variables.)
@@ -14096,7 +14133,7 @@ external names for @code{COMPLEX} functions in some cases once @code{g77} uses
@code{gcc} rather than @code{f2c} calling conventions.)
@item
-Do something useful with @samp{doiter} references where possible.
+Do something useful with @code{doiter} references where possible.
For example, @samp{CALL FOO(I)} cannot modify @samp{I} if within
a @code{DO} loop that uses @samp{I} as the
iteration variable, and the back end might find that info useful
@@ -14171,12 +14208,6 @@ sprinkled throughout.
It is not worth repeating them here.
@item
-@cindex concatenation
-@cindex CHARACTER*(*)
-Support arbitrary operands for concatenation, even in contexts where
-run-time allocation is required.
-
-@item
Consider adding a @code{NUMERIC} type to designate typeless numeric constants,
named and unnamed.
The idea is to provide a forward-looking, effective
@@ -14252,7 +14283,7 @@ provides it via its configuration.
@itemize @bullet
@item
-Switch to using @samp{REAL_VALUE_TYPE} to represent floating-point constants
+Switch to using @code{REAL_VALUE_TYPE} to represent floating-point constants
exclusively so the target float format need not be required.
This
means changing the way @code{g77} handles initialization of aggregate areas
@@ -14281,6 +14312,9 @@ Better info on how @code{g77} works and how to port it is needed.
Much of this should be done only after the redesign planned for
0.6 is complete.
+@xref{Front End}, which contains some information
+on @code{g77} internals.
+
@node Internals Improvements
@section Internals Improvements
@@ -14305,13 +14339,13 @@ Come up with better naming conventions for @samp{-D} to establish requirements
to achieve desired implementation dialect via @file{proj.h}.
@item
-Clean up used tokens and @samp{ffewhere}s in @samp{ffeglobal_terminate_1}.
+Clean up used tokens and @code{ffewhere}s in @code{ffeglobal_terminate_1}.
@item
-Replace @file{sta.c} @samp{outpooldisp} mechanism with @samp{malloc_pool_use}.
+Replace @file{sta.c} @code{outpooldisp} mechanism with @code{malloc_pool_use}.
@item
-Check for @samp{opANY} in more places in @file{com.c}, @file{std.c},
+Check for @code{opANY} in more places in @file{com.c}, @file{std.c},
and @file{ste.c}, and get rid of the @samp{opCONVERT(opANY)} kludge
(after determining if there is indeed no real need for it).
@@ -14353,22 +14387,22 @@ to the official standard, or put documentation of the rules as used
in the code@dots{}uh@dots{}in the code.
@item
-Some @samp{ffebld_new} calls (those outside of @file{ffeexpr.c} or
-inside but invoked via paths not involving @samp{ffeexpr_lhs} or
-@samp{ffeexpr_rhs}) might be creating things
+Some @code{ffebld_new} calls (those outside of @file{ffeexpr.c} or
+inside but invoked via paths not involving @code{ffeexpr_lhs} or
+@code{ffeexpr_rhs}) might be creating things
in improper pools, leading to such things staying around too long or
(doubtful, but possible and dangerous) not long enough.
@item
-Some @samp{ffebld_list_new} (or whatever) calls might not be matched by
-@samp{ffebld_list_bottom} (or whatever) calls, which might someday matter.
+Some @code{ffebld_list_new} (or whatever) calls might not be matched by
+@code{ffebld_list_bottom} (or whatever) calls, which might someday matter.
(It definitely is not a problem just yet.)
@item
Probably not doing clean things when we fail to @code{EQUIVALENCE} something
due to alignment/mismatch or other problems---they end up without
-@samp{ffestorag} objects, so maybe the backend (and other parts of the front
-end) can notice that and handle like an @samp{opANY} (do what it wants, just
+@code{ffestorag} objects, so maybe the backend (and other parts of the front
+end) can notice that and handle like an @code{opANY} (do what it wants, just
don't complain or crash).
Most of this seems to have been addressed
by now, but a code review wouldn't hurt.
@@ -14386,7 +14420,7 @@ clutter.
@item
When @code{FUNCTION} and @code{ENTRY} point types disagree (@code{CHARACTER}
lengths, type classes, and so on),
-@samp{ANY}-ize the offending @code{ENTRY} point and any @emph{new} dummies
+@code{ANY}-ize the offending @code{ENTRY} point and any @emph{new} dummies
it specifies.
@item
@@ -14407,6 +14441,9 @@ END
is processed in the context of executable, not specification,
statements.)
@end itemize
+
+@include ffe.texi
+
@end ifset
@ifset USING
@@ -14452,7 +14489,8 @@ as the above is just a sample, no such section exists.
* INTGLOB:: Intrinsic also used as name of global.
* LEX:: Various lexer messages
* GLOBALS:: Disagreements about globals.
-* LINKFAIL:: When linking @samp{f771} fails.
+* LINKFAIL:: When linking @code{f771} fails.
+* Y2KBAD:: Use of non-Y2K-compliant intrinsic.
@end menu
@node CMPAMBIG
@@ -14570,8 +14608,8 @@ expects the Fortran 90 interpretation, you can:
@itemize @bullet
@item
Change it to @samp{DBLE(@var{expr})} (if @var{intrinsic} is
-@samp{REAL}) or @samp{DIMAG(@var{expr})} (if @var{intrinsic}
-is @samp{AIMAG})
+@code{REAL}) or @samp{DIMAG(@var{expr})} (if @var{intrinsic}
+is @code{AIMAG})
if it expected the Fortran 90 interpretation.
This assumes @var{expr} is @code{COMPLEX(KIND=2)}---if it is
@@ -14624,7 +14662,6 @@ The following sample program might help:
PROGRAM JCB003
C
C Written by James Craig Burley 1997-02-23.
-C Contact via Internet email: burley@@gnu.org
C
C Determine how compilers handle non-standard REAL
C and AIMAG on DOUBLE COMPLEX operands.
@@ -14800,6 +14837,8 @@ was not specified on the command line to compile it.
Free form is a newer form for Fortran code.
The older, classic form is called fixed form.
+@cindex continuation character
+@cindex characters, continuation
Fixed-form code is visually fairly distinctive, because
numerical labels and comments are all that appear in
the first five columns of a line, the sixth column is
@@ -14808,8 +14847,15 @@ and actual statements start at or beyond column 7.
Spaces generally are not significant, so if you
see statements such as @samp{REALX,Y} and @samp{DO10I=1,100},
you are looking at fixed-form code.
+@cindex *
+@cindex asterisk
Comment lines are indicated by the letter @samp{C} or the symbol
@samp{*} in column 1.
+@cindex trailing comment
+@cindex comment
+@cindex characters, comment
+@cindex !
+@cindex exclamation point
(Some code uses @samp{!} or @samp{/*} to begin in-line comments,
which many compilers support.)
@@ -14851,13 +14897,13 @@ C On XYZZY systems, remove "C" on next line:
CALL XYZZY_RESET
@end smallexample
-However, that leaves the first @samp{C} in the @samp{CALL}
+However, that leaves the first @samp{C} in the @code{CALL}
statement in column 6, making it a comment line, which is
not really what the author intended, and which is likely
to result in one of the above-listed diagnostics.
@emph{Replacing} the @samp{C} in column 1 with a space
-is the proper change to make, to ensure the @samp{CALL}
+is the proper change to make, to ensure the @code{CALL}
keyword starts in or after column 7.
Another common mistake like this is to forget that fixed-form
@@ -14875,12 +14921,15 @@ A source file containing lines beginning with @code{#define},
@code{#include}, @code{#if}, and so on is likely one that
requires preprocessing.
-If the file's suffix is @samp{.f} or @samp{.for}, the file
-will normally be compiled @emph{without} preprocessing by @code{g77}.
+If the file's suffix is @samp{.f}, @samp{.for}, or @samp{.FOR},
+the file normally will be compiled @emph{without} preprocessing
+by @code{g77}.
-Change the file's suffix from @samp{.f} to @samp{.F} (or, on
-systems with case-insensitive file names, to @samp{.fpp}) or
-from @samp{.for} to @samp{.fpp}.
+Change the file's suffix from @samp{.f} to @samp{.F}
+(or, on systems with case-insensitive file names,
+to @samp{.fpp} or @samp{.FPP}),
+from @samp{.for} to @samp{.fpp},
+or from @samp{.FOR} to @samp{.FPP}.
@code{g77} compiles files with such names @emph{with}
preprocessing.
@@ -14924,29 +14973,54 @@ Argument #@var{n} of @var{name} is @dots{}
@end smallexample
These messages all identify disagreements about the
-global procedure named @var{name} among different program
-units (usually including @var{name} itself).
-
-These disagreements, if not diagnosed, could result in a
-compiler crash if the compiler attempted to inline a reference
-to @var{name} within a calling program unit that disagreed
-with the @var{name} program unit regarding whether the
-procedure is a subroutine or function, the type of the
-return value of the procedure (if it is a function), the
-number of arguments the procedure accepts, or the type
-of each argument.
-
-Such disagreements @emph{should} be fixed in the Fortran
-code itself.
-However, if that is not immediately practical, and the code
-has been working for some time, it is possible it will work
-when compiled by @code{g77} with the @samp{-fno-globals} option.
-
-The @samp{-fno-globals} option disables these diagnostics, and
-also disables all inlining of references to global procedures
-to avoid compiler crashes.
-The diagnostics are actually produced, but as warnings, unless
-the @samp{-Wno-globals} option also is specified.
+global procedure named @var{name} among different program units
+(usually including @var{name} itself).
+
+Whether a particular disagreement is reported
+as a warning or an error
+can depend on the relative order
+of the disagreeing portions of the source file.
+
+Disagreements between a procedure invocation
+and the @emph{subsequent} procedure itself
+are, usually, diagnosed as errors
+when the procedure itself @emph{precedes} the invocation.
+Other disagreements are diagnosed via warnings.
+
+@cindex forward references
+@cindex in-line code
+@cindex compilation, in-line
+This distinction, between warnings and errors,
+is due primarily to the present tendency of the @code{gcc} back end
+to inline only those procedure invocations that are
+@emph{preceded} by the corresponding procedure definitions.
+If the @code{gcc} back end is changed
+to inline ``forward references'',
+in which invocations precede definitions,
+the @code{g77} front end will be changed
+to treat both orderings as errors, accordingly.
+
+The sorts of disagreements that are diagnosed by @code{g77} include
+whether a procedure is a subroutine or function;
+if it is a function, the type of the return value of the procedure;
+the number of arguments the procedure accepts;
+and the type of each argument.
+
+Disagreements regarding global names among program units
+in a Fortran program @emph{should} be fixed in the code itself.
+However, if that is not immediately practical,
+and the code has been working for some time,
+it is possible it will work
+when compiled with the @samp{-fno-globals} option.
+
+The @samp{-fno-globals} option
+causes these diagnostics to all be warnings
+and disables all inlining of references to global procedures
+(to avoid subsequent compiler crashes and bad-code generation).
+Use of the @samp{-Wno-globals} option as well as @samp{-fno-globals}
+suppresses all of these diagnostics.
+(@samp{-Wno-globals} by itself disables only the warnings,
+not the errors.)
After using @samp{-fno-globals} to work around these problems,
it is wise to stop using that option and address them by fixing
@@ -14988,6 +15062,24 @@ might solve this problem, e.g.@: by adding
BOOT_CFLAGS='-mminimal-toc -O2 -g'
@end smallexample
to the @code{make bootstrap} command line.
+
+@node Y2KBAD
+@section @code{Y2KBAD}
+@cindex Y2K compliance
+@cindex Year 2000 compliance
+
+@noindent
+@smallexample
+Intrinsic `@var{name}', invoked at (^), known to be non-Y2K-compliant@dots{}
+@end smallexample
+
+This diagnostic indicates that
+the specific intrinsic invoked by the name @var{name}
+is known to have an interface
+that is not Year-2000 (Y2K) compliant.
+
+@xref{Year 2000 (Y2K) Problems}.
+
@end ifset
@node Index
diff --git a/contrib/gcc/f/g77spec.c b/contrib/gcc/f/g77spec.c
index 79d3637..50e7738 100644
--- a/contrib/gcc/f/g77spec.c
+++ b/contrib/gcc/f/g77spec.c
@@ -1,5 +1,5 @@
/* Specific flags and argument handling of the Fortran front-end.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -46,7 +46,6 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
-#include "gansidecl.h"
#include <f/version.h>
#ifndef MATH_LIBRARY
@@ -93,8 +92,6 @@ static void (*g77_fn)();
static int g77_newargc;
static char **g77_newargv;
-extern char *xmalloc PROTO((size_t));
-
extern char *version_string;
/* --- This comes from gcc.c (2.8.1) verbatim: */
@@ -289,6 +286,9 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
2 => last two args were -l<library> -lm. */
int saw_library = 0;
+ /* By default, we throw on the math library if we have one. */
+ int need_math = (MATH_LIBRARY[0] != '\0');
+
/* The number of input and output files in the incoming arg list. */
int n_infiles = 0;
int n_outfiles = 0;
@@ -427,7 +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@cygnus.org>.\n");
+For bug reporting instructions, please see:\n\
+<URL:http://www.gnu.org/software/gcc/faq.html#bugreport>.\n");
exit (0);
break;
#endif
@@ -469,7 +470,7 @@ Report bugs to <egcs-bugs@cygnus.org>.\n");
{
/* Not a filename or library. */
- if (saw_library == 1) /* -l<library>. */
+ if (saw_library == 1 && need_math) /* -l<library>. */
append_arg (MATH_LIBRARY);
saw_library = 0;
@@ -524,7 +525,7 @@ Report bugs to <egcs-bugs@cygnus.org>.\n");
saw_library = 1; /* -l<library>. */
else
{ /* Other library, or filename. */
- if (saw_library == 1)
+ if (saw_library == 1 && need_math)
append_arg (MATH_LIBRARY);
saw_library = 0;
}
@@ -544,7 +545,8 @@ Report bugs to <egcs-bugs@cygnus.org>.\n");
case 0:
append_arg (library);
case 1:
- append_arg (MATH_LIBRARY);
+ if (need_math)
+ append_arg (MATH_LIBRARY);
default:
break;
}
diff --git a/contrib/gcc/f/glimits.j b/contrib/gcc/f/glimits.j
index 5d5406c..0262258 100644
--- a/contrib/gcc/f/glimits.j
+++ b/contrib/gcc/f/glimits.j
@@ -1,6 +1,6 @@
/* glimits.j -- Wrapper for GCC's glimits.h
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/global.c b/contrib/gcc/f/global.c
index 8be7d0c4..85311f1 100644
--- a/contrib/gcc/f/global.c
+++ b/contrib/gcc/f/global.c
@@ -1,6 +1,6 @@
/* global.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995, 1997 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -60,7 +60,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#if FFEGLOBAL_ENABLED
static ffenameSpace ffeglobal_filewide_ = NULL;
-static char *ffeglobal_type_string_[] =
+static const char *ffeglobal_type_string_[] =
{
[FFEGLOBAL_typeNONE] "??",
[FFEGLOBAL_typeMAIN] "main program",
@@ -86,7 +86,7 @@ static char *ffeglobal_type_string_[] =
#if FFEGLOBAL_ENABLED
void
-ffeglobal_drive (ffeglobal (*fn) ())
+ffeglobal_drive (ffeglobal (*fn) (ffeglobal))
{
if (ffeglobal_filewide_ != NULL)
ffename_space_drive_global (ffeglobal_filewide_, fn);
@@ -181,6 +181,7 @@ ffeglobal_init_common (ffesymbol s, ffelexToken t)
{
if (g->u.common.blank)
{
+ /* Not supposed to initialize blank common, though it works. */
ffebad_start (FFEBAD_COMMON_BLANK_INIT);
ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t));
ffebad_finish ();
@@ -229,10 +230,13 @@ ffeglobal_new_common (ffesymbol s, ffelexToken t, bool blank)
{
if (g->type == FFEGLOBAL_typeCOMMON)
{
+ /* The names match, so the "blankness" should match too! */
assert (g->u.common.blank == blank);
}
else
{
+ /* This global name has already been established,
+ but as something other than a common block. */
if (ffe_is_globals () || ffe_is_warn_globals ())
{
ffebad_start (ffe_is_globals ()
@@ -258,6 +262,10 @@ ffeglobal_new_common (ffesymbol s, ffelexToken t, bool blank)
&& !g->explicit_intrinsic
&& ffe_is_warn_globals ())
{
+ /* Common name previously used as intrinsic. Though it works,
+ warn, because the intrinsic reference might have been intended
+ as a ref to an external procedure, but g77's vast list of
+ intrinsics happened to snarf the name. */
ffebad_start (FFEBAD_INTRINSIC_GLOBAL);
ffebad_string (ffelex_token_text (t));
ffebad_string ("common block");
@@ -308,6 +316,7 @@ ffeglobal_new_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type)
|| (g->type == FFEGLOBAL_typeBDATA))
&& g->u.proc.defined)
{
+ /* This program unit has already been defined. */
if (ffe_is_globals () || ffe_is_warn_globals ())
{
ffebad_start (ffe_is_globals ()
@@ -327,6 +336,13 @@ ffeglobal_new_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type)
&& (g->type != FFEGLOBAL_typeEXT)
&& (g->type != type))
{
+ /* A reference to this program unit has been seen, but its
+ context disagrees about the new definition regarding
+ what kind of program unit it is. (E.g. `call foo' followed
+ by `function foo'.) But `external foo' alone doesn't mean
+ disagreement with either a function or subroutine, though
+ g77 normally interprets it as a request to force-load
+ a block data program unit by that name (to cope with libs). */
if (ffe_is_globals () || ffe_is_warn_globals ())
{
ffebad_start (ffe_is_globals ()
@@ -353,11 +369,16 @@ ffeglobal_new_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type)
g->u.proc.other_t = NULL;
}
else if ((ffesymbol_basictype (s) != FFEINFO_basictypeNONE)
+ && (g->type == FFEGLOBAL_typeFUNC)
&& ((ffesymbol_basictype (s) != g->u.proc.bt)
|| (ffesymbol_kindtype (s) != g->u.proc.kt)
|| ((ffesymbol_size (s) != FFETARGET_charactersizeNONE)
&& (ffesymbol_size (s) != g->u.proc.sz))))
{
+ /* The previous reference and this new function definition
+ disagree about the type of the function. I (Burley) think
+ this rarely occurs, because when this code is reached,
+ the type info doesn't appear to be filled in yet. */
if (ffe_is_globals () || ffe_is_warn_globals ())
{
ffebad_start (ffe_is_globals ()
@@ -377,6 +398,10 @@ ffeglobal_new_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type)
&& !g->explicit_intrinsic
&& ffe_is_warn_globals ())
{
+ /* This name, previously used as an intrinsic, now is known
+ to also be a global procedure name. Warn, since the previous
+ use as an intrinsic might have been intended to refer to
+ this procedure. */
ffebad_start (FFEBAD_INTRINSIC_GLOBAL);
ffebad_string (ffelex_token_text (t));
ffebad_string ("global");
@@ -395,10 +420,12 @@ ffeglobal_new_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type)
g->u.proc.kt = ffesymbol_kindtype (s);
g->u.proc.sz = ffesymbol_size (s);
}
- g->tick = ffe_count_2;
+ /* If there's a known disagreement about the kind of program
+ unit, then don't even bother tracking arglist argreement. */
if ((g->tick != 0)
&& (g->type != type))
g->u.proc.n_args = -1;
+ g->tick = ffe_count_2;
g->type = type;
g->u.proc.defined = TRUE;
}
@@ -487,7 +514,7 @@ ffeglobal_pad_common (ffesymbol s, ffetargetAlign pad, ffewhereLine wl,
/* Collect info for a global's argument. */
void
-ffeglobal_proc_def_arg (ffesymbol s, int argno, char *name, ffeglobalArgSummary as,
+ffeglobal_proc_def_arg (ffesymbol s, int argno, const char *name, ffeglobalArgSummary as,
ffeinfoBasictype bt, ffeinfoKindtype kt,
bool array)
{
@@ -511,8 +538,8 @@ ffeglobal_proc_def_arg (ffesymbol s, int argno, char *name, ffeglobalArgSummary
if ((ai->t != NULL)
&& ffe_is_warn_globals ())
{
- char *refwhy = NULL;
- char *defwhy = NULL;
+ const char *refwhy = NULL;
+ const char *defwhy = NULL;
bool warn = FALSE;
switch (as)
@@ -789,8 +816,8 @@ ffeglobal_proc_ref_arg (ffesymbol s, int argno, ffeglobalArgSummary as,
if (ai->t != NULL)
{
- char *refwhy = NULL;
- char *defwhy = NULL;
+ const char *refwhy = NULL;
+ const char *defwhy = NULL;
bool fail = FALSE;
bool warn = FALSE;
@@ -1160,6 +1187,10 @@ ffeglobal_ref_intrinsic (ffesymbol s, ffelexToken t, bool explicit)
&& ! g->intrinsic
&& ffe_is_warn_globals ())
{
+ /* This name, previously used as a global, now is used
+ for an intrinsic. Warn, since this new use as an
+ intrinsic might have been intended to refer to
+ the global procedure. */
ffebad_start (FFEBAD_INTRINSIC_GLOBAL);
ffebad_string (ffelex_token_text (t));
ffebad_string ("intrinsic");
@@ -1186,6 +1217,11 @@ ffeglobal_ref_intrinsic (ffesymbol s, ffelexToken t, bool explicit)
&& (g->tick != ffe_count_2)
&& ffe_is_warn_globals ())
{
+ /* An earlier reference to this intrinsic disagrees with
+ this reference vis-a-vis explicit `intrinsic foo',
+ which suggests that the one relying on implicit
+ intrinsicacity might have actually intended to refer
+ to a global of the same name. */
ffebad_start (FFEBAD_INTRINSIC_EXPIMP);
ffebad_string (ffelex_token_text (t));
ffebad_string (explicit ? "explicit" : "implicit");
@@ -1235,10 +1271,13 @@ ffeglobal_ref_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type)
if ((g != NULL)
&& (g->type != FFEGLOBAL_typeNONE)
- && (g->type != type)
&& (g->type != FFEGLOBAL_typeEXT)
+ && (g->type != type)
&& (type != FFEGLOBAL_typeEXT))
{
+ /* Disagreement about (fully refined) class of program unit
+ (main, subroutine, function, block data). Treat EXTERNAL/
+ COMMON disagreements distinctly. */
if ((((type == FFEGLOBAL_typeBDATA)
&& (g->type != FFEGLOBAL_typeCOMMON))
|| ((g->type == FFEGLOBAL_typeBDATA)
@@ -1248,6 +1287,7 @@ ffeglobal_ref_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type)
#if 0 /* This is likely to just annoy people. */
if (ffe_is_warn_globals ())
{
+ /* Warn about EXTERNAL of a COMMON name, though it works. */
ffebad_start (FFEBAD_FILEWIDE_TIFF);
ffebad_string (ffelex_token_text (t));
ffebad_string (ffeglobal_type_string_[type]);
@@ -1260,23 +1300,11 @@ ffeglobal_ref_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type)
}
#endif
}
- else if (ffe_is_globals ())
+ else if (ffe_is_globals () || ffe_is_warn_globals ())
{
- ffebad_start (FFEBAD_FILEWIDE_DISAGREEMENT);
- ffebad_string (ffelex_token_text (t));
- ffebad_string (ffeglobal_type_string_[type]);
- ffebad_string (ffeglobal_type_string_[g->type]);
- ffebad_here (0, ffelex_token_where_line (t),
- ffelex_token_where_column (t));
- ffebad_here (1, ffelex_token_where_line (g->t),
- ffelex_token_where_column (g->t));
- ffebad_finish ();
- g->type = FFEGLOBAL_typeANY;
- return FALSE;
- }
- else if (ffe_is_warn_globals ())
- {
- ffebad_start (FFEBAD_FILEWIDE_DISAGREEMENT_W);
+ ffebad_start (ffe_is_globals ()
+ ? FFEBAD_FILEWIDE_DISAGREEMENT
+ : FFEBAD_FILEWIDE_DISAGREEMENT_W);
ffebad_string (ffelex_token_text (t));
ffebad_string (ffeglobal_type_string_[type]);
ffebad_string (ffeglobal_type_string_[g->type]);
@@ -1286,7 +1314,7 @@ ffeglobal_ref_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type)
ffelex_token_where_column (g->t));
ffebad_finish ();
g->type = FFEGLOBAL_typeANY;
- return TRUE;
+ return (! ffe_is_globals ());
}
}
@@ -1302,39 +1330,65 @@ ffeglobal_ref_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type)
g->u.proc.kt = ffesymbol_kindtype (s);
g->u.proc.sz = ffesymbol_size (s);
}
- /* Else, make sure there is type agreement. */
- else if ((g->u.proc.bt != FFEINFO_basictypeNONE)
- && (ffesymbol_basictype (s) != FFEINFO_basictypeNONE)
- && ((ffesymbol_basictype (s) != g->u.proc.bt)
- || (ffesymbol_kindtype (s) != g->u.proc.kt)
- || ((ffesymbol_size (s) != g->u.proc.sz)
- && g->u.proc.defined
- && (g->u.proc.sz != FFETARGET_charactersizeNONE))))
+ /* Make sure there is type agreement. */
+ if (g->type == FFEGLOBAL_typeFUNC
+ && g->u.proc.bt != FFEINFO_basictypeNONE
+ && ffesymbol_basictype (s) != FFEINFO_basictypeNONE
+ && (ffesymbol_basictype (s) != g->u.proc.bt
+ || ffesymbol_kindtype (s) != g->u.proc.kt
+ /* CHARACTER*n disagreements matter only once a
+ definition is involved, since the definition might
+ be CHARACTER*(*), which accepts all references. */
+ || (g->u.proc.defined
+ && ffesymbol_size (s) != g->u.proc.sz
+ && ffesymbol_size (s) != FFETARGET_charactersizeNONE
+ && g->u.proc.sz != FFETARGET_charactersizeNONE)))
{
- if (ffe_is_globals ())
+ int error;
+
+ /* Type mismatch between function reference/definition and
+ this subsequent reference (which might just be the filling-in
+ of type info for the definition, but we can't reach here
+ if that's the case and there was a previous definition).
+
+ It's an error given a previous definition, since that
+ implies inlining can crash the compiler, unless the user
+ asked for no such inlining. */
+ error = (g->tick != ffe_count_2
+ && g->u.proc.defined
+ && ffe_is_globals ());
+ if (error || ffe_is_warn_globals ())
{
- ffebad_start (FFEBAD_FILEWIDE_TYPE_MISMATCH);
+ ffebad_start (error
+ ? FFEBAD_FILEWIDE_TYPE_MISMATCH
+ : FFEBAD_FILEWIDE_TYPE_MISMATCH_W);
ffebad_string (ffelex_token_text (t));
- ffebad_here (0, ffelex_token_where_line (t),
- ffelex_token_where_column (t));
- ffebad_here (1, ffelex_token_where_line (g->t),
- ffelex_token_where_column (g->t));
+ if (g->tick == ffe_count_2)
+ {
+ /* Current reference fills in type info for definition.
+ The current token doesn't necessarily point to the actual
+ definition of the function, so use the definition pointer
+ and the pointer to the pre-definition type info. */
+ ffebad_here (0, ffelex_token_where_line (g->t),
+ ffelex_token_where_column (g->t));
+ ffebad_here (1, ffelex_token_where_line (g->u.proc.other_t),
+ ffelex_token_where_column (g->u.proc.other_t));
+ }
+ else
+ {
+ /* Current reference is not a filling-in of a current
+ definition. The current token is fine, as is
+ the previous-mention token. */
+ ffebad_here (0, ffelex_token_where_line (t),
+ ffelex_token_where_column (t));
+ ffebad_here (1, ffelex_token_where_line (g->t),
+ ffelex_token_where_column (g->t));
+ }
ffebad_finish ();
- g->type = FFEGLOBAL_typeANY;
+ if (error)
+ g->type = FFEGLOBAL_typeANY;
return FALSE;
}
- if (ffe_is_warn_globals ())
- {
- ffebad_start (FFEBAD_FILEWIDE_TYPE_MISMATCH_W);
- ffebad_string (ffelex_token_text (t));
- ffebad_here (0, ffelex_token_where_line (t),
- ffelex_token_where_column (t));
- ffebad_here (1, ffelex_token_where_line (g->t),
- ffelex_token_where_column (g->t));
- ffebad_finish ();
- }
- g->type = FFEGLOBAL_typeANY;
- return TRUE;
}
}
@@ -1357,6 +1411,9 @@ ffeglobal_ref_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type)
&& (g->tick != ffe_count_2)
&& ffe_is_warn_globals ())
{
+ /* Now known as a global, this name previously was seen as an
+ intrinsic. Warn, in case the previous reference was intended
+ for the same global. */
ffebad_start (FFEBAD_INTRINSIC_GLOBAL);
ffebad_string (ffelex_token_text (t));
ffebad_string ("global");
diff --git a/contrib/gcc/f/global.h b/contrib/gcc/f/global.h
index 38cf8d5..eaf9921 100644
--- a/contrib/gcc/f/global.h
+++ b/contrib/gcc/f/global.h
@@ -1,6 +1,6 @@
/* global.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995, 1997 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -128,14 +128,14 @@ struct _ffeglobal_
/* Declare functions with prototypes. */
-void ffeglobal_drive (ffeglobal (*fn) ());
+void ffeglobal_drive (ffeglobal (*fn) (ffeglobal));
void ffeglobal_init_1 (void);
void ffeglobal_init_common (ffesymbol s, ffelexToken t);
void ffeglobal_new_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type);
void ffeglobal_new_common (ffesymbol s, ffelexToken t, bool blank);
void ffeglobal_pad_common (ffesymbol s, ffetargetAlign pad, ffewhereLine wl,
ffewhereColumn wc);
-void ffeglobal_proc_def_arg (ffesymbol s, int argno, char *name, ffeglobalArgSummary as,
+void ffeglobal_proc_def_arg (ffesymbol s, int argno, const char *name, ffeglobalArgSummary as,
ffeinfoBasictype bt, ffeinfoKindtype kt,
bool array);
void ffeglobal_proc_def_nargs (ffesymbol s, int n_args);
diff --git a/contrib/gcc/f/hconfig.j b/contrib/gcc/f/hconfig.j
index a2fc0d1..c73930c 100644
--- a/contrib/gcc/f/hconfig.j
+++ b/contrib/gcc/f/hconfig.j
@@ -1,6 +1,6 @@
/* hconfig.j -- Wrapper for GCC's hconfig.h
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/implic.c b/contrib/gcc/f/implic.c
index bee8edf..7e0c61b 100644
--- a/contrib/gcc/f/implic.c
+++ b/contrib/gcc/f/implic.c
@@ -1,6 +1,6 @@
/* implic.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -73,7 +73,7 @@ static struct _ffeimplic_ ffeimplic_table_['z' - 'A' + 1];
/* Static functions (internal). */
-static ffeimplic_ ffeimplic_lookup_ (char c);
+static ffeimplic_ ffeimplic_lookup_ (unsigned char c);
/* Internal macros. */
@@ -89,7 +89,7 @@ static ffeimplic_ ffeimplic_lookup_ (char c);
data type. */
static ffeimplic_
-ffeimplic_lookup_ (char c)
+ffeimplic_lookup_ (unsigned char c)
{
/* NOTE: This is definitely ASCII-specific!! */
if (ISALPHA (c) || (c == '_'))
@@ -331,7 +331,7 @@ ffeimplic_none ()
/* ffeimplic_peek_symbol_type -- Determine implicit type of a symbol
ffesymbol s;
- char *name; // name for s in case it is NULL, or NULL if s never NULL
+ const char *name; // name for s in case it is NULL, or NULL if s never NULL
if (ffeimplic_peek_symbol_type(s,name) == FFEINFO_basictypeCHARACTER)
// is or will be a CHARACTER-typed name
@@ -348,7 +348,7 @@ ffeimplic_none ()
needed anyway (as when ffecom calls it). */
ffeinfoBasictype
-ffeimplic_peek_symbol_type (ffesymbol s, char *name)
+ffeimplic_peek_symbol_type (ffesymbol s, const char *name)
{
char c;
ffeimplic_ imp;
diff --git a/contrib/gcc/f/implic.h b/contrib/gcc/f/implic.h
index 7550e0d..ae96653 100644
--- a/contrib/gcc/f/implic.h
+++ b/contrib/gcc/f/implic.h
@@ -1,6 +1,6 @@
/* implic.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -55,7 +55,7 @@ bool ffeimplic_establish_initial (char c, ffeinfoBasictype basic_type,
bool ffeimplic_establish_symbol (ffesymbol s);
void ffeimplic_init_2 (void);
void ffeimplic_none (void);
-ffeinfoBasictype ffeimplic_peek_symbol_type (ffesymbol s, char *name);
+ffeinfoBasictype ffeimplic_peek_symbol_type (ffesymbol s, const char *name);
void ffeimplic_terminate_2 (void);
/* Define macros. */
diff --git a/contrib/gcc/f/info-b.def b/contrib/gcc/f/info-b.def
index 30df25e..088d108 100644
--- a/contrib/gcc/f/info-b.def
+++ b/contrib/gcc/f/info-b.def
@@ -1,6 +1,6 @@
/* info-b.def -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/info-k.def b/contrib/gcc/f/info-k.def
index a1441c9..30fb382 100644
--- a/contrib/gcc/f/info-k.def
+++ b/contrib/gcc/f/info-k.def
@@ -1,6 +1,6 @@
/* info-k.def -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/info-w.def b/contrib/gcc/f/info-w.def
index 54a1b364..57e3f8c 100644
--- a/contrib/gcc/f/info-w.def
+++ b/contrib/gcc/f/info-w.def
@@ -1,6 +1,6 @@
/* info-w.def -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/info.c b/contrib/gcc/f/info.c
index 05a6e26..784e699 100644
--- a/contrib/gcc/f/info.c
+++ b/contrib/gcc/f/info.c
@@ -1,6 +1,6 @@
/* info.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -55,21 +55,21 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* Static objects accessed by functions in this module. */
-static char *ffeinfo_basictype_string_[]
+static const char *ffeinfo_basictype_string_[]
=
{
#define FFEINFO_BASICTYPE(KWD,LNAM,SNAM) SNAM,
#include "info-b.def"
#undef FFEINFO_BASICTYPE
};
-static char *ffeinfo_kind_message_[]
+static const char *ffeinfo_kind_message_[]
=
{
#define FFEINFO_KIND(KWD,LNAM,SNAM) LNAM,
#include "info-k.def"
#undef FFEINFO_KIND
};
-static char *ffeinfo_kind_string_[]
+static const char *ffeinfo_kind_string_[]
=
{
#define FFEINFO_KIND(KWD,LNAM,SNAM) SNAM,
@@ -77,7 +77,7 @@ static char *ffeinfo_kind_string_[]
#undef FFEINFO_KIND
};
static ffeinfoBasictype ffeinfo_combine_[FFEINFO_basictype][FFEINFO_basictype];
-static char *ffeinfo_kindtype_string_[]
+static const char *ffeinfo_kindtype_string_[]
=
{
"",
@@ -91,7 +91,7 @@ static char *ffeinfo_kindtype_string_[]
"8",
"*",
};
-static char *ffeinfo_where_string_[]
+static const char *ffeinfo_where_string_[]
=
{
#define FFEINFO_WHERE(KWD,LNAM,SNAM) SNAM,
@@ -129,7 +129,7 @@ ffeinfo_basictype_combine (ffeinfoBasictype l, ffeinfoBasictype r)
Returns the string based on the basic type. */
-char *
+const char *
ffeinfo_basictype_string (ffeinfoBasictype basictype)
{
if (basictype >= ARRAY_SIZE (ffeinfo_basictype_string_))
@@ -186,7 +186,7 @@ ffeinfo_init_0 ()
Returns the string based on the kind. */
-char *
+const char *
ffeinfo_kind_message (ffeinfoKind kind)
{
if (kind >= ARRAY_SIZE (ffeinfo_kind_message_))
@@ -201,7 +201,7 @@ ffeinfo_kind_message (ffeinfoKind kind)
Returns the string based on the kind. */
-char *
+const char *
ffeinfo_kind_string (ffeinfoKind kind)
{
if (kind >= ARRAY_SIZE (ffeinfo_kind_string_))
@@ -232,7 +232,7 @@ ffeinfo_kindtype_max(ffeinfoBasictype bt,
Returns the string based on the kind type. */
-char *
+const char *
ffeinfo_kindtype_string (ffeinfoKindtype kind_type)
{
if (kind_type >= ARRAY_SIZE (ffeinfo_kindtype_string_))
@@ -267,7 +267,7 @@ ffeinfo_type (ffeinfoBasictype basictype, ffeinfoKindtype kindtype)
Returns the string based on the where. */
-char *
+const char *
ffeinfo_where_string (ffeinfoWhere where)
{
if (where >= ARRAY_SIZE (ffeinfo_where_string_))
diff --git a/contrib/gcc/f/info.h b/contrib/gcc/f/info.h
index 8eaaa5d..bbf4e94 100644
--- a/contrib/gcc/f/info.h
+++ b/contrib/gcc/f/info.h
@@ -1,6 +1,6 @@
/* info.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -127,15 +127,15 @@ struct _ffeinfo_
ffeinfoBasictype ffeinfo_basictype_combine (ffeinfoBasictype l,
ffeinfoBasictype r);
-char *ffeinfo_basictype_string (ffeinfoBasictype basictype);
+const char *ffeinfo_basictype_string (ffeinfoBasictype basictype);
void ffeinfo_init_0 (void);
-char *ffeinfo_kind_message (ffeinfoKind kind);
-char *ffeinfo_kind_string (ffeinfoKind kind);
+const char *ffeinfo_kind_message (ffeinfoKind kind);
+const char *ffeinfo_kind_string (ffeinfoKind kind);
ffeinfoKindtype ffeinfo_kindtype_max(ffeinfoBasictype bt,
ffeinfoKindtype k1,
ffeinfoKindtype k2);
-char *ffeinfo_kindtype_string (ffeinfoKindtype kind_type);
-char *ffeinfo_where_string (ffeinfoWhere where);
+const char *ffeinfo_kindtype_string (ffeinfoKindtype kind_type);
+const char *ffeinfo_where_string (ffeinfoWhere where);
ffeinfo ffeinfo_new (ffeinfoBasictype basictype, ffeinfoKindtype kindtype,
ffeinfoRank rank, ffeinfoKind kind, ffeinfoWhere where,
ffetargetCharacterSize size);
diff --git a/contrib/gcc/f/input.j b/contrib/gcc/f/input.j
index 1444de2..cc9ff24 100644
--- a/contrib/gcc/f/input.j
+++ b/contrib/gcc/f/input.j
@@ -1,6 +1,6 @@
/* input.j -- Wrapper for GCC's input.h
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/intdoc.c b/contrib/gcc/f/intdoc.c
index 0ac39ff..7e0a630 100644
--- a/contrib/gcc/f/intdoc.c
+++ b/contrib/gcc/f/intdoc.c
@@ -1,6 +1,6 @@
/* intdoc.c
Copyright (C) 1997 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -46,30 +46,30 @@ typedef enum
#define FFEINTRIN_DOC 1
#include "intrin.h"
-char *family_name (ffeintrinFamily family);
+const char *family_name (ffeintrinFamily family);
static void dumpif (ffeintrinFamily fam);
static void dumpendif (void);
static void dumpclearif (void);
static void dumpem (void);
-static void dumpgen (int menu, char *name, char *name_uc,
+static void dumpgen (int menu, const char *name, const char *name_uc,
ffeintrinGen gen);
-static void dumpspec (int menu, char *name, char *name_uc,
+static void dumpspec (int menu, const char *name, const char *name_uc,
ffeintrinSpec spec);
-static void dumpimp (int menu, char *name, char *name_uc, size_t genno, ffeintrinFamily family,
+static void dumpimp (int menu, const char *name, const char *name_uc, size_t genno, ffeintrinFamily family,
ffeintrinImp imp, ffeintrinSpec spec);
-static char *argument_info_ptr (ffeintrinImp imp, int argno);
-static char *argument_info_string (ffeintrinImp imp, int argno);
-static char *argument_name_ptr (ffeintrinImp imp, int argno);
-static char *argument_name_string (ffeintrinImp imp, int argno);
+static const char *argument_info_ptr (ffeintrinImp imp, int argno);
+static const char *argument_info_string (ffeintrinImp imp, int argno);
+static const char *argument_name_ptr (ffeintrinImp imp, int argno);
+static const char *argument_name_string (ffeintrinImp imp, int argno);
#if 0
-static char *elaborate_if_complex (ffeintrinImp imp, int argno);
-static char *elaborate_if_maybe_complex (ffeintrinImp imp, int argno);
-static char *elaborate_if_real (ffeintrinImp imp, int argno);
+static const char *elaborate_if_complex (ffeintrinImp imp, int argno);
+static const char *elaborate_if_maybe_complex (ffeintrinImp imp, int argno);
+static const char *elaborate_if_real (ffeintrinImp imp, int argno);
#endif
-static void print_type_string (char *c);
+static void print_type_string (const char *c);
int
-main (int argc, char **argv)
+main (int argc, char **argv ATTRIBUTE_UNUSED)
{
if (argc != 1)
{
@@ -86,22 +86,22 @@ Usage: intdoc > intdoc.texi\n\
struct _ffeintrin_name_
{
- char *name_uc;
- char *name_lc;
- char *name_ic;
+ const char *name_uc;
+ const char *name_lc;
+ const char *name_ic;
ffeintrinGen generic;
ffeintrinSpec specific;
};
struct _ffeintrin_gen_
{
- char *name; /* Name as seen in program. */
+ const char *name; /* Name as seen in program. */
ffeintrinSpec specs[2];
};
struct _ffeintrin_spec_
{
- char *name; /* Uppercase name as seen in source code,
+ const char *name; /* Uppercase name as seen in source code,
lowercase if no source name, "none" if no
name at all (NONE case). */
bool is_actualarg; /* Ok to pass as actual arg if -pedantic. */
@@ -111,11 +111,11 @@ struct _ffeintrin_spec_
struct _ffeintrin_imp_
{
- char *name; /* Name of implementation. */
+ const char *name; /* Name of implementation. */
#if 0 /* FFECOM_targetCURRENT == FFECOM_targetGCC */
ffecomGfrt gfrt; /* gfrt index in library. */
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
- char *control;
+ const char *control;
};
static struct _ffeintrin_name_ names[] = {
@@ -124,11 +124,13 @@ static struct _ffeintrin_name_ names[] = {
#define DEFGEN(CODE,NAME,SPEC1,SPEC2)
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
};
static struct _ffeintrin_gen_ gens[] = {
@@ -137,11 +139,13 @@ static struct _ffeintrin_gen_ gens[] = {
{ NAME, { SPEC1, SPEC2, }, },
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
};
static struct _ffeintrin_imp_ imps[] = {
@@ -151,9 +155,13 @@ static struct _ffeintrin_imp_ imps[] = {
#if 0 /* FFECOM_targetCURRENT == FFECOM_targetGCC */
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
{ NAME, FFECOM_gfrt ## GFRT, CONTROL },
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \
+ { NAME, FFECOM_gfrt ## GFRT, CONTROL },
#elif 1 /* FFECOM_targetCURRENT == FFECOM_targetFFE */
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
{ NAME, CONTROL },
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \
+ { NAME, CONTROL },
#else
#error
#endif
@@ -162,6 +170,7 @@ static struct _ffeintrin_imp_ imps[] = {
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
};
static struct _ffeintrin_spec_ specs[] = {
@@ -170,29 +179,31 @@ static struct _ffeintrin_spec_ specs[] = {
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) \
{ NAME, CALLABLE, FAMILY, IMP, },
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
};
-struct cc_pair { ffeintrinImp imp; char *text; };
+struct cc_pair { ffeintrinImp imp; const char *text; };
-static char *descriptions[FFEINTRIN_imp] = { 0 };
+static const char *descriptions[FFEINTRIN_imp] = { 0 };
static struct cc_pair cc_descriptions[] = {
#define DEFDOC(IMP,SUMMARY,DESCRIPTION) { FFEINTRIN_imp ## IMP, DESCRIPTION },
#include "intdoc.h0"
#undef DEFDOC
};
-static char *summaries[FFEINTRIN_imp] = { 0 };
+static const char *summaries[FFEINTRIN_imp] = { 0 };
static struct cc_pair cc_summaries[] = {
#define DEFDOC(IMP,SUMMARY,DESCRIPTION) { FFEINTRIN_imp ## IMP, SUMMARY },
#include "intdoc.h0"
#undef DEFDOC
};
-char *
+const char *
family_name (ffeintrinFamily family)
{
switch (family)
@@ -313,7 +324,7 @@ dumpem ()
}
static void
-dumpgen (int menu, char *name, char *name_uc, ffeintrinGen gen)
+dumpgen (int menu, const char *name, const char *name_uc, ffeintrinGen gen)
{
size_t i;
int total = 0;
@@ -366,7 +377,7 @@ For information on other intrinsics with the same name:\n");
}
static void
-dumpspec (int menu, char *name, char *name_uc, ffeintrinSpec spec)
+dumpspec (int menu, const char *name, const char *name_uc, ffeintrinSpec spec)
{
dumpif (specs[spec].family);
dumpimp (menu, name, name_uc, 0, specs[spec].family, specs[spec].implementation,
@@ -375,13 +386,13 @@ dumpspec (int menu, char *name, char *name_uc, ffeintrinSpec spec)
}
static void
-dumpimp (int menu, char *name, char *name_uc, size_t genno, ffeintrinFamily family, ffeintrinImp imp,
- ffeintrinSpec spec)
+dumpimp (int menu, const char *name, const char *name_uc, size_t genno,
+ ffeintrinFamily family, ffeintrinImp imp, ffeintrinSpec spec)
{
- char *c;
+ const char *c;
bool subr;
- char *argc;
- char *argi;
+ const char *argc;
+ const char *argi;
int colon;
int argno;
@@ -399,7 +410,7 @@ dumpimp (int menu, char *name, char *name_uc, size_t genno, ffeintrinFamily fami
|| (summaries[imp] != NULL))
{
int spaces = INDENT_SUMMARY - 14 - strlen (name);
- char *c;
+ const char *c;
if (spec != FFEINTRIN_specNONE)
spaces -= (3 + strlen (specs[spec].name)); /* See XYZZY1 above */
@@ -509,8 +520,8 @@ external procedure.\n\
if (!subr)
{
int other_arg;
- char *arg_string;
- char *arg_info;
+ const char *arg_string;
+ const char *arg_info;
if ((c[colon + 1] >= '0')
&& (c[colon + 1] <= '9'))
@@ -1019,7 +1030,7 @@ Intrinsic groups: ");
if (descriptions[imp] != NULL)
{
- char *c = descriptions[imp];
+ const char *c = descriptions[imp];
printf ("\
@noindent\n\
@@ -1056,10 +1067,10 @@ Description:\n\
}
}
-static char *
+static const char *
argument_info_ptr (ffeintrinImp imp, int argno)
{
- char *c = imps[imp].control;
+ const char *c = imps[imp].control;
static char arginfos[8][32];
static int argx = 0;
int i;
@@ -1099,20 +1110,20 @@ argument_info_ptr (ffeintrinImp imp, int argno)
return c;
}
-static char *
+static const char *
argument_info_string (ffeintrinImp imp, int argno)
{
- char *p;
+ const char *p;
p = argument_info_ptr (imp, argno);
assert (p != NULL);
return p;
}
-static char *
+static const char *
argument_name_ptr (ffeintrinImp imp, int argno)
{
- char *c = imps[imp].control;
+ const char *c = imps[imp].control;
static char argnames[8][32];
static int argx = 0;
int i;
@@ -1148,10 +1159,10 @@ argument_name_ptr (ffeintrinImp imp, int argno)
return c;
}
-static char *
+static const char *
argument_name_string (ffeintrinImp imp, int argno)
{
- char *p;
+ const char *p;
p = argument_name_ptr (imp, argno);
assert (p != NULL);
@@ -1159,7 +1170,7 @@ argument_name_string (ffeintrinImp imp, int argno)
}
static void
-print_type_string (char *c)
+print_type_string (const char *c)
{
char basic = c[0];
char kind = c[1];
diff --git a/contrib/gcc/f/intdoc.in b/contrib/gcc/f/intdoc.in
index 203dd61..565b771 100644
--- a/contrib/gcc/f/intdoc.in
+++ b/contrib/gcc/f/intdoc.in
@@ -1043,9 +1043,9 @@ and returns that string as the function value.
")
DEFDOC (CTIME_subr, "Convert time to Day Mon dd hh:mm:ss yyyy.", "\
-Converts @var{@2@}, a system time value, such as returned by
+Converts @var{@1@}, a system time value, such as returned by
@code{TIME8()}, to a string of the form @samp{Sat Aug 19 18:13:14 1995},
-and returns that string in @var{@1@}.
+and returns that string in @var{@2@}.
@xref{Time8 Intrinsic}.
@@ -1059,7 +1059,11 @@ representing the numeric day of the month @var{dd}, a three-character
abbreviation of the month name @var{mmm} and the last two digits of
the year @var{yy}, e.g.@: @samp{25-Nov-96}.
+@cindex Y2K compliance
+@cindex Year 2000 compliance
This intrinsic is not recommended, due to the year 2000 approaching.
+Therefore, programs making use of this intrinsic
+might not be Year 2000 (Y2K) compliant.
@xref{CTime Intrinsic (subroutine)}, for information on obtaining more digits
for the current (or any) date.
")
@@ -1075,6 +1079,16 @@ The functions' value is equal to @samp{@var{@1@}(1) + @var{@1@}(2)}.
Subsequent invocations of @samp{@0@()} return values accumulated since the
previous invocation.
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
+
Due to the side effects performed by this intrinsic, the function
form is not recommended.
")
@@ -1082,14 +1096,24 @@ form is not recommended.
DEFDOC (DTIME_subr, "Get elapsed time since last time.", "\
Initially, return the number of seconds of runtime
since the start of the process's execution
-in @var{@1@},
-and the user and system components of this in @samp{@var{@2@}(1)}
-and @samp{@var{@2@}(2)} respectively.
-The value of @var{@1@} is equal to @samp{@var{@2@}(1) + @var{@2@}(2)}.
+in @var{@2@},
+and the user and system components of this in @samp{@var{@1@}(1)}
+and @samp{@var{@1@}(2)} respectively.
+The value of @var{@2@} is equal to @samp{@var{@1@}(1) + @var{@1@}(2)}.
Subsequent invocations of @samp{@0@()} set values based on accumulations
since the previous invocation.
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
+
Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine.
")
@@ -1101,15 +1125,35 @@ as the function value,
and the user and system components of this in @samp{@var{@1@}(1)}
and @samp{@var{@1@}(2)} respectively.
The functions' value is equal to @samp{@var{@1@}(1) + @var{@1@}(2)}.
+
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
")
DEFDOC (ETIME_subr, "Get elapsed time for process.", "\
Return the number of seconds of runtime
since the start of the process's execution
-in @var{@1@},
-and the user and system components of this in @samp{@var{@2@}(1)}
-and @samp{@var{@2@}(2)} respectively.
-The value of @var{@1@} is equal to @samp{@var{@2@}(1) + @var{@2@}(2)}.
+in @var{@2@},
+and the user and system components of this in @samp{@var{@1@}(1)}
+and @samp{@var{@1@}(2)} respectively.
+The value of @var{@2@} is equal to @samp{@var{@1@}(1) + @var{@1@}(2)}.
+
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine.
@@ -1124,6 +1168,17 @@ Equivalent to:
CTIME(TIME8())
@end example
+@cindex Y10K compliance
+@cindex Year 10000 compliance
+@cindex wraparound, Y10K
+@cindex limits, Y10K
+Programs making use of this intrinsic
+might not be Year 10000 (Y10K) compliant.
+For example, the date might appear,
+to such programs, to wrap around
+(change from a larger value to a smaller one)
+as of the Year 10000.
+
@xref{CTime Intrinsic (function)}.
")
@@ -1137,6 +1192,17 @@ Equivalent to:
CALL CTIME(@var{@1@}, TIME8())
@end example
+@cindex Y10K compliance
+@cindex Year 10000 compliance
+@cindex wraparound, Y10K
+@cindex limits, Y10K
+Programs making use of this intrinsic
+might not be Year 10000 (Y10K) compliant.
+For example, the date might appear,
+to such programs, to wrap around
+(change from a larger value to a smaller one)
+as of the Year 10000.
+
@xref{CTime Intrinsic (subroutine)}.
Some non-GNU implementations of Fortran provide this intrinsic as
@@ -1226,6 +1292,17 @@ Fills @var{@1@} with the numerical values at the current local time
of day, month (in the range 1--12), and year in elements 1, 2, and 3,
respectively.
The year has four significant digits.
+
+@cindex Y10K compliance
+@cindex Year 10000 compliance
+@cindex wraparound, Y10K
+@cindex limits, Y10K
+Programs making use of this intrinsic
+might not be Year 10000 (Y10K) compliant.
+For example, the date might appear,
+to such programs, to wrap around
+(change from a larger value to a smaller one)
+as of the Year 10000.
")
DEFDOC (IDATE_vxt, "Get local time info (VAX/VMS).", "\
@@ -1234,7 +1311,20 @@ The month (in the range 1--12) is returned in @var{@1@},
the day (in the range 1--7) in @var{@2@},
and the year in @var{@3@} (in the range 0--99).
+@cindex Y2K compliance
+@cindex Year 2000 compliance
+@cindex wraparound, Y2K
+@cindex limits, Y2K
This intrinsic is not recommended, due to the year 2000 approaching.
+Therefore, programs making use of this intrinsic
+might not be Year 2000 (Y2K) compliant.
+For example, the date might appear,
+to such programs, to wrap around
+(change from a larger value to a smaller one)
+as of the Year 2000.
+
+@xref{IDate Intrinsic (UNIX)}, for information on obtaining more digits
+for the current date.
")
DEFDOC (ITIME, "Get local time of day.", "\
@@ -1246,9 +1336,16 @@ DEFDOC (MCLOCK, "Get number of clock ticks for process.", "\
Returns the number of clock ticks since the start of the process.
Supported on systems with @code{clock(3)} (q.v.).
+@cindex wraparound, timings
+@cindex limits, timings
This intrinsic is not fully portable, such as to systems
with 32-bit @code{INTEGER} types but supporting times
wider than 32 bits.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
+
@xref{MClock8 Intrinsic}, for information on a
similar intrinsic that might be portable to more
GNU Fortran implementations, though to fewer
@@ -1262,12 +1359,18 @@ DEFDOC (MCLOCK8, "Get number of clock ticks for process.", "\
Returns the number of clock ticks since the start of the process.
Supported on systems with @code{clock(3)} (q.v.).
+@cindex wraparound, timings
+@cindex limits, timings
@emph{Warning:} this intrinsic does not increase the range
of the timing values over that returned by @code{clock(3)}.
On a system with a 32-bit @code{clock(3)},
@code{@0@} will return a 32-bit value,
even though converted to an @samp{INTEGER(KIND=2)} value.
That means overflows of the 32-bit value can still occur.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
No Fortran implementations other than GNU Fortran are
known to support this intrinsic at the time of this
@@ -1283,17 +1386,45 @@ If the system does not support @code{clock(3)},
DEFDOC (SECNDS, "Get local time offset since midnight.", "\
Returns the local time in seconds since midnight minus the value
@var{@1@}.
+
+@cindex wraparound, timings
+@cindex limits, timings
+This values returned by this intrinsic
+become numerically less than previous values
+(they wrap around) during a single run of the
+compiler program, under normal circumstances
+(such as running through the midnight hour).
")
DEFDOC (SECOND_func, "Get CPU time for process in seconds.", "\
Returns the process's runtime in seconds---the same value as the
UNIX function @code{etime} returns.
+
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
")
DEFDOC (SECOND_subr, "Get CPU time for process@99@in seconds.", "\
Returns the process's runtime in seconds in @var{@1@}---the same value
as the UNIX function @code{etime} returns.
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
+
This routine is known from Cray Fortran. @xref{CPU_Time Intrinsic},
for a standard equivalent.
")
@@ -1307,12 +1438,32 @@ isn't in general.
@var{@3@} is the maximum value this can take, which isn't very useful
in this implementation since it's just the maximum C @code{unsigned
int} value.
+
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
")
DEFDOC (CPU_TIME, "Get current CPU time.", "\
Returns in @var{@1@} the current value of the system time.
This implementation of the Fortran 95 intrinsic is just an alias for
@code{second} @xref{Second Intrinsic (subroutine)}.
+
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
")
DEFDOC (TIME8, "Get current time as time value.", "\
@@ -1321,12 +1472,18 @@ Returns the current time encoded as a long integer
This value is suitable for passing to @code{CTIME},
@code{GMTIME}, and @code{LTIME}.
+@cindex wraparound, timings
+@cindex limits, timings
@emph{Warning:} this intrinsic does not increase the range
of the timing values over that returned by @code{time(3)}.
On a system with a 32-bit @code{time(3)},
@code{@0@} will return a 32-bit value,
even though converted to an @samp{INTEGER(KIND=2)} value.
That means overflows of the 32-bit value can still occur.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
No Fortran implementations other than GNU Fortran are
known to support this intrinsic at the time of this
@@ -1342,9 +1499,16 @@ Returns the current time encoded as an integer
This value is suitable for passing to @code{CTIME},
@code{GMTIME}, and @code{LTIME}.
+@cindex wraparound, timings
+@cindex limits, timings
This intrinsic is not fully portable, such as to systems
with 32-bit @code{INTEGER} types but supporting times
wider than 32 bits.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
+
@xref{Time8 Intrinsic}, for information on a
similar intrinsic that might be portable to more
GNU Fortran implementations, though to fewer
@@ -1378,7 +1542,7 @@ See @code{erf(3m)}, which provides the implementation.
DEFDOC (ERFC, "Complementary error function.", "\
Returns the complementary error function of @var{@1@}:
-@samp{ERFC(R) = 1 - ERF(R)} (except that the result may be more
+@samp{ERFC(R) = 1 - ERF(R)} (except that the result might be more
accurate than explicitly evaluating that formulae would give).
See @code{erfc(3m)}, which provides the implementation.
")
@@ -1458,7 +1622,7 @@ See @code{chdir(3)}.
@emph{Caution:} Using this routine during I/O to a unit connected with a
non-absolute file name can cause subsequent I/O on such a unit to fail
-because the I/O library may reopen files by name.
+because the I/O library might reopen files by name.
Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the
@@ -1472,7 +1636,7 @@ See @code{chdir(3)}.
@emph{Caution:} Using this routine during I/O to a unit connected with a
non-absolute file name can cause subsequent I/O on such a unit to fail
-because the I/O library may reopen files by name.
+because the I/O library might reopen files by name.
Due to the side effects performed by this intrinsic, the function
form is not recommended.
@@ -1492,7 +1656,7 @@ Returns 0 on success or a non-zero error code otherwise.
Note that this currently works
by actually invoking @code{/bin/chmod} (or the @code{chmod} found when
-the library was configured) and so may fail in some circumstances and
+the library was configured) and so might fail in some circumstances and
will, anyway, be slow.
Due to the side effects performed by this intrinsic, the function
@@ -1514,7 +1678,7 @@ If the @var{@3@} argument is supplied, it contains
Note that this currently works
by actually invoking @code{/bin/chmod} (or the @code{chmod} found when
-the library was configured) and so may fail in some circumstances and
+the library was configured) and so might fail in some circumstances and
will, anyway, be slow.
Some non-GNU implementations of Fortran provide this intrinsic as
@@ -2077,7 +2241,7 @@ Fills @var{@1@} with the system's host name returned by
@code{gethostname(2)}, returning 0 on success or a non-zero error code
(@code{ENOSYS} if the system does not provide @code{gethostname(2)}).
-On some systems (specifically SCO) it may be necessary to link the
+On some systems (specifically SCO) it might be necessary to link the
``socket'' library if you call this routine.
Typically this means adding @samp{-lg2c -lsocket -lm}
to the @code{g77} command line when linking the program.
@@ -2094,7 +2258,7 @@ Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the
(optional) @var{@2@} argument.
-On some systems (specifically SCO) it may be necessary to link the
+On some systems (specifically SCO) it might be necessary to link the
``socket'' library if you call this routine.
Typically this means adding @samp{-lg2c -lsocket -lm}
to the @code{g77} command line when linking the program.
@@ -2217,8 +2381,8 @@ terminal.
")
DEFDOC (TTYNAM_subr, "Get name of terminal device for unit.", "\
-Sets @var{@1@} to the name of the terminal device open on logical unit
-@var{@2@} or a blank string if @var{@2@} is not connected to a
+Sets @var{@2@} to the name of the terminal device open on logical unit
+@var{@1@} or to a blank string if @var{@1@} is not connected to a
terminal.
Some non-GNU implementations of Fortran provide this intrinsic as
@@ -2415,7 +2579,18 @@ DEFDOC (TIME_vxt, "Get the time as a character value.", "\
Returns in @var{@1@} a character representation of the current time as
obtained from @code{ctime(3)}.
-@xref{Fdate Intrinsic (subroutine)}, for an equivalent routine.
+@cindex Y10K compliance
+@cindex Year 10000 compliance
+@cindex wraparound, Y10K
+@cindex limits, Y10K
+Programs making use of this intrinsic
+might not be Year 10000 (Y10K) compliant.
+For example, the date might appear,
+to such programs, to wrap around
+(change from a larger value to a smaller one)
+as of the Year 10000.
+
+@xref{FDate Intrinsic (subroutine)}, for an equivalent routine.
")
DEFDOC (IBCLR, "Clear a bit.", "\
@@ -2445,8 +2620,7 @@ All bits representing @var{@1@} are shifted @var{@2@} places.
indicates no shift and @samp{@var{@2@}.LT.0} indicates a right shift.
If the absolute value of the shift count is greater than
@samp{BIT_SIZE(@var{@1@})}, the result is undefined.
-Bits shifted out from the left end or the right end, as the case may be,
-are lost.
+Bits shifted out from the left end or the right end are lost.
Zeros are shifted in from the opposite end.
@xref{IShftC Intrinsic}, for the circular-shift equivalent.
@@ -2514,6 +2688,17 @@ of the minute, and milliseconds
of the second in successive values of the array.
@end table
+@cindex Y10K compliance
+@cindex Year 10000 compliance
+@cindex wraparound, Y10K
+@cindex limits, Y10K
+Programs making use of this intrinsic
+might not be Year 10000 (Y10K) compliant.
+For example, the date might appear,
+to such programs, to wrap around
+(change from a larger value to a smaller one)
+as of the Year 10000.
+
On systems where a millisecond timer isn't available, the millisecond
value is returned as zero.
")
diff --git a/contrib/gcc/f/intdoc.texi b/contrib/gcc/f/intdoc.texi
index a507d41..a34f700 100644
--- a/contrib/gcc/f/intdoc.texi
+++ b/contrib/gcc/f/intdoc.texi
@@ -274,10 +274,10 @@
* DTanH Intrinsic:: Hyperbolic tangent (archaic).
@end ifset
@ifset familyF2U
-* Dtime Intrinsic (subroutine):: Get elapsed time since last time.
+* DTime Intrinsic (subroutine):: Get elapsed time since last time.
@end ifset
@ifset familyBADU77
-* Dtime Intrinsic (function):: Get elapsed time since last time.
+* DTime Intrinsic (function):: Get elapsed time since last time.
@end ifset
@ifset familyF90
* EOShift Intrinsic:: (Reserved for future use.)
@@ -297,8 +297,8 @@
* Exponent Intrinsic:: (Reserved for future use.)
@end ifset
@ifset familyF2U
-* Fdate Intrinsic (subroutine):: Get current time as Day Mon dd hh:mm:ss yyyy.
-* Fdate Intrinsic (function):: Get current time as Day Mon dd hh:mm:ss yyyy.
+* FDate Intrinsic (subroutine):: Get current time as Day Mon dd hh:mm:ss yyyy.
+* FDate Intrinsic (function):: Get current time as Day Mon dd hh:mm:ss yyyy.
* FGet Intrinsic (subroutine):: Read a character from unit 5 stream-wise.
@end ifset
@ifset familyBADU77
@@ -2231,7 +2231,7 @@ See @code{chdir(3)}.
@emph{Caution:} Using this routine during I/O to a unit connected with a
non-absolute file name can cause subsequent I/O on such a unit to fail
-because the I/O library may reopen files by name.
+because the I/O library might reopen files by name.
Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the
@@ -2270,7 +2270,7 @@ See @code{chdir(3)}.
@emph{Caution:} Using this routine during I/O to a unit connected with a
non-absolute file name can cause subsequent I/O on such a unit to fail
-because the I/O library may reopen files by name.
+because the I/O library might reopen files by name.
Due to the side effects performed by this intrinsic, the function
form is not recommended.
@@ -2319,7 +2319,7 @@ If the @var{Status} argument is supplied, it contains
Note that this currently works
by actually invoking @code{/bin/chmod} (or the @code{chmod} found when
-the library was configured) and so may fail in some circumstances and
+the library was configured) and so might fail in some circumstances and
will, anyway, be slow.
Some non-GNU implementations of Fortran provide this intrinsic as
@@ -2369,7 +2369,7 @@ Returns 0 on success or a non-zero error code otherwise.
Note that this currently works
by actually invoking @code{/bin/chmod} (or the @code{chmod} found when
-the library was configured) and so may fail in some circumstances and
+the library was configured) and so might fail in some circumstances and
will, anyway, be slow.
Due to the side effects performed by this intrinsic, the function
@@ -2626,6 +2626,16 @@ Returns in @var{Seconds} the current value of the system time.
This implementation of the Fortran 95 intrinsic is just an alias for
@code{second} @xref{Second Intrinsic (subroutine)}.
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
+
@node CShift Intrinsic
@subsubsection CShift Intrinsic
@cindex CShift intrinsic
@@ -2699,14 +2709,14 @@ to one type for @var{X}.
@noindent
@example
-CALL CTime(@var{Result}, @var{STime})
+CALL CTime(@var{STime}, @var{Result})
@end example
@noindent
-@var{Result}: @code{CHARACTER}; scalar; INTENT(OUT).
+@var{STime}: @code{INTEGER}; scalar; INTENT(IN).
@noindent
-@var{STime}: @code{INTEGER}; scalar; INTENT(IN).
+@var{Result}: @code{CHARACTER}; scalar; INTENT(OUT).
@noindent
Intrinsic groups: @code{unix}.
@@ -2966,7 +2976,11 @@ representing the numeric day of the month @var{dd}, a three-character
abbreviation of the month name @var{mmm} and the last two digits of
the year @var{yy}, e.g.@: @samp{25-Nov-96}.
+@cindex Y2K compliance
+@cindex Year 2000 compliance
This intrinsic is not recommended, due to the year 2000 approaching.
+Therefore, programs making use of this intrinsic
+might not be Year 2000 (Y2K) compliant.
@xref{CTime Intrinsic (subroutine)}, for information on obtaining more digits
for the current (or any) date.
@@ -3017,6 +3031,17 @@ of the minute, and milliseconds
of the second in successive values of the array.
@end table
+@cindex Y10K compliance
+@cindex Year 10000 compliance
+@cindex wraparound, Y10K
+@cindex limits, Y10K
+Programs making use of this intrinsic
+might not be Year 10000 (Y10K) compliant.
+For example, the date might appear,
+to such programs, to wrap around
+(change from a larger value to a smaller one)
+as of the Year 10000.
+
On systems where a millisecond timer isn't available, the millisecond
value is returned as zero.
@@ -4088,21 +4113,21 @@ to one type for @var{X}.
@end ifset
@ifset familyF2U
-@node Dtime Intrinsic (subroutine)
-@subsubsection Dtime Intrinsic (subroutine)
-@cindex Dtime intrinsic
-@cindex intrinsics, Dtime
+@node DTime Intrinsic (subroutine)
+@subsubsection DTime Intrinsic (subroutine)
+@cindex DTime intrinsic
+@cindex intrinsics, DTime
@noindent
@example
-CALL Dtime(@var{Result}, @var{TArray})
+CALL DTime(@var{TArray}, @var{Result})
@end example
@noindent
-@var{Result}: @code{REAL(KIND=1)}; scalar; INTENT(OUT).
+@var{TArray}: @code{REAL(KIND=1)}; DIMENSION(2); INTENT(OUT).
@noindent
-@var{TArray}: @code{REAL(KIND=1)}; DIMENSION(2); INTENT(OUT).
+@var{Result}: @code{REAL(KIND=1)}; scalar; INTENT(OUT).
@noindent
Intrinsic groups: @code{unix}.
@@ -4120,26 +4145,36 @@ The value of @var{Result} is equal to @samp{@var{TArray}(1) + @var{TArray}(2)}.
Subsequent invocations of @samp{DTIME()} set values based on accumulations
since the previous invocation.
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
+
Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine.
For information on other intrinsics with the same name:
-@xref{Dtime Intrinsic (function)}.
+@xref{DTime Intrinsic (function)}.
@end ifset
@ifset familyBADU77
-@node Dtime Intrinsic (function)
-@subsubsection Dtime Intrinsic (function)
-@cindex Dtime intrinsic
-@cindex intrinsics, Dtime
+@node DTime Intrinsic (function)
+@subsubsection DTime Intrinsic (function)
+@cindex DTime intrinsic
+@cindex intrinsics, DTime
@noindent
@example
-Dtime(@var{TArray})
+DTime(@var{TArray})
@end example
@noindent
-Dtime: @code{REAL(KIND=1)} function.
+DTime: @code{REAL(KIND=1)} function.
@noindent
@var{TArray}: @code{REAL(KIND=1)}; DIMENSION(2); INTENT(OUT).
@@ -4160,11 +4195,21 @@ The functions' value is equal to @samp{@var{TArray}(1) + @var{TArray}(2)}.
Subsequent invocations of @samp{DTIME()} return values accumulated since the
previous invocation.
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
+
Due to the side effects performed by this intrinsic, the function
form is not recommended.
For information on other intrinsics with the same name:
-@xref{Dtime Intrinsic (subroutine)}.
+@xref{DTime Intrinsic (subroutine)}.
@end ifset
@ifset familyF90
@@ -4238,7 +4283,7 @@ Intrinsic groups: @code{unix}.
Description:
Returns the complementary error function of @var{X}:
-@samp{ERFC(R) = 1 - ERF(R)} (except that the result may be more
+@samp{ERFC(R) = 1 - ERF(R)} (except that the result might be more
accurate than explicitly evaluating that formulae would give).
See @code{erfc(3m)}, which provides the implementation.
@@ -4249,14 +4294,14 @@ See @code{erfc(3m)}, which provides the implementation.
@noindent
@example
-CALL ETime(@var{Result}, @var{TArray})
+CALL ETime(@var{TArray}, @var{Result})
@end example
@noindent
-@var{Result}: @code{REAL(KIND=1)}; scalar; INTENT(OUT).
+@var{TArray}: @code{REAL(KIND=1)}; DIMENSION(2); INTENT(OUT).
@noindent
-@var{TArray}: @code{REAL(KIND=1)}; DIMENSION(2); INTENT(OUT).
+@var{Result}: @code{REAL(KIND=1)}; scalar; INTENT(OUT).
@noindent
Intrinsic groups: @code{unix}.
@@ -4271,6 +4316,16 @@ and the user and system components of this in @samp{@var{TArray}(1)}
and @samp{@var{TArray}(2)} respectively.
The value of @var{Result} is equal to @samp{@var{TArray}(1) + @var{TArray}(2)}.
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
+
Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine.
@@ -4306,6 +4361,16 @@ and the user and system components of this in @samp{@var{TArray}(1)}
and @samp{@var{TArray}(2)} respectively.
The functions' value is equal to @samp{@var{TArray}(1) + @var{TArray}(2)}.
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
+
For information on other intrinsics with the same name:
@xref{ETime Intrinsic (subroutine)}.
@@ -4376,14 +4441,14 @@ external procedure.
@end ifset
@ifset familyF2U
-@node Fdate Intrinsic (subroutine)
-@subsubsection Fdate Intrinsic (subroutine)
-@cindex Fdate intrinsic
-@cindex intrinsics, Fdate
+@node FDate Intrinsic (subroutine)
+@subsubsection FDate Intrinsic (subroutine)
+@cindex FDate intrinsic
+@cindex intrinsics, FDate
@noindent
@example
-CALL Fdate(@var{Date})
+CALL FDate(@var{Date})
@end example
@noindent
@@ -4404,26 +4469,37 @@ Equivalent to:
CALL CTIME(@var{Date}, TIME8())
@end example
+@cindex Y10K compliance
+@cindex Year 10000 compliance
+@cindex wraparound, Y10K
+@cindex limits, Y10K
+Programs making use of this intrinsic
+might not be Year 10000 (Y10K) compliant.
+For example, the date might appear,
+to such programs, to wrap around
+(change from a larger value to a smaller one)
+as of the Year 10000.
+
@xref{CTime Intrinsic (subroutine)}.
Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine.
For information on other intrinsics with the same name:
-@xref{Fdate Intrinsic (function)}.
+@xref{FDate Intrinsic (function)}.
-@node Fdate Intrinsic (function)
-@subsubsection Fdate Intrinsic (function)
-@cindex Fdate intrinsic
-@cindex intrinsics, Fdate
+@node FDate Intrinsic (function)
+@subsubsection FDate Intrinsic (function)
+@cindex FDate intrinsic
+@cindex intrinsics, FDate
@noindent
@example
-Fdate()
+FDate()
@end example
@noindent
-Fdate: @code{CHARACTER*(*)} function.
+FDate: @code{CHARACTER*(*)} function.
@noindent
Intrinsic groups: @code{unix}.
@@ -4439,10 +4515,21 @@ Equivalent to:
CTIME(TIME8())
@end example
+@cindex Y10K compliance
+@cindex Year 10000 compliance
+@cindex wraparound, Y10K
+@cindex limits, Y10K
+Programs making use of this intrinsic
+might not be Year 10000 (Y10K) compliant.
+For example, the date might appear,
+to such programs, to wrap around
+(change from a larger value to a smaller one)
+as of the Year 10000.
+
@xref{CTime Intrinsic (function)}.
For information on other intrinsics with the same name:
-@xref{Fdate Intrinsic (subroutine)}.
+@xref{FDate Intrinsic (subroutine)}.
@node FGet Intrinsic (subroutine)
@subsubsection FGet Intrinsic (subroutine)
@@ -5457,7 +5544,7 @@ Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the
(optional) @var{Status} argument.
-On some systems (specifically SCO) it may be necessary to link the
+On some systems (specifically SCO) it might be necessary to link the
``socket'' library if you call this routine.
Typically this means adding @samp{-lg2c -lsocket -lm}
to the @code{g77} command line when linking the program.
@@ -5491,7 +5578,7 @@ Fills @var{Name} with the system's host name returned by
@code{gethostname(2)}, returning 0 on success or a non-zero error code
(@code{ENOSYS} if the system does not provide @code{gethostname(2)}).
-On some systems (specifically SCO) it may be necessary to link the
+On some systems (specifically SCO) it might be necessary to link the
``socket'' library if you call this routine.
Typically this means adding @samp{-lg2c -lsocket -lm}
to the @code{g77} command line when linking the program.
@@ -5811,6 +5898,17 @@ of day, month (in the range 1--12), and year in elements 1, 2, and 3,
respectively.
The year has four significant digits.
+@cindex Y10K compliance
+@cindex Year 10000 compliance
+@cindex wraparound, Y10K
+@cindex limits, Y10K
+Programs making use of this intrinsic
+might not be Year 10000 (Y10K) compliant.
+For example, the date might appear,
+to such programs, to wrap around
+(change from a larger value to a smaller one)
+as of the Year 10000.
+
For information on other intrinsics with the same name:
@xref{IDate Intrinsic (VXT)}.
@@ -5846,7 +5944,20 @@ The month (in the range 1--12) is returned in @var{M},
the day (in the range 1--7) in @var{D},
and the year in @var{Y} (in the range 0--99).
+@cindex Y2K compliance
+@cindex Year 2000 compliance
+@cindex wraparound, Y2K
+@cindex limits, Y2K
This intrinsic is not recommended, due to the year 2000 approaching.
+Therefore, programs making use of this intrinsic
+might not be Year 2000 (Y2K) compliant.
+For example, the date might appear,
+to such programs, to wrap around
+(change from a larger value to a smaller one)
+as of the Year 2000.
+
+@xref{IDate Intrinsic (UNIX)}, for information on obtaining more digits
+for the current date.
For information on other intrinsics with the same name:
@xref{IDate Intrinsic (UNIX)}.
@@ -6603,8 +6714,7 @@ All bits representing @var{I} are shifted @var{Shift} places.
indicates no shift and @samp{@var{Shift}.LT.0} indicates a right shift.
If the absolute value of the shift count is greater than
@samp{BIT_SIZE(@var{I})}, the result is undefined.
-Bits shifted out from the left end or the right end, as the case may be,
-are lost.
+Bits shifted out from the left end or the right end are lost.
Zeros are shifted in from the opposite end.
@xref{IShftC Intrinsic}, for the circular-shift equivalent.
@@ -7997,9 +8107,16 @@ Description:
Returns the number of clock ticks since the start of the process.
Supported on systems with @code{clock(3)} (q.v.).
+@cindex wraparound, timings
+@cindex limits, timings
This intrinsic is not fully portable, such as to systems
with 32-bit @code{INTEGER} types but supporting times
wider than 32 bits.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
+
@xref{MClock8 Intrinsic}, for information on a
similar intrinsic that might be portable to more
GNU Fortran implementations, though to fewer
@@ -8030,12 +8147,18 @@ Description:
Returns the number of clock ticks since the start of the process.
Supported on systems with @code{clock(3)} (q.v.).
+@cindex wraparound, timings
+@cindex limits, timings
@emph{Warning:} this intrinsic does not increase the range
of the timing values over that returned by @code{clock(3)}.
On a system with a 32-bit @code{clock(3)},
@code{MCLOCK8} will return a 32-bit value,
even though converted to an @samp{INTEGER(KIND=2)} value.
That means overflows of the 32-bit value can still occur.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
No Fortran implementations other than GNU Fortran are
known to support this intrinsic at the time of this
@@ -9141,6 +9264,14 @@ Description:
Returns the local time in seconds since midnight minus the value
@var{T}.
+@cindex wraparound, timings
+@cindex limits, timings
+This values returned by this intrinsic
+become numerically less than previous values
+(they wrap around) during a single run of the
+compiler program, under normal circumstances
+(such as running through the midnight hour).
+
@end ifset
@ifset familyF2U
@node Second Intrinsic (function)
@@ -9165,6 +9296,16 @@ Description:
Returns the process's runtime in seconds---the same value as the
UNIX function @code{etime} returns.
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
+
For information on other intrinsics with the same name:
@xref{Second Intrinsic (subroutine)}.
@@ -9190,6 +9331,16 @@ Description:
Returns the process's runtime in seconds in @var{Seconds}---the same value
as the UNIX function @code{etime} returns.
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
+
This routine is known from Cray Fortran. @xref{CPU_Time Intrinsic},
for a standard equivalent.
@@ -10086,6 +10237,16 @@ isn't in general.
in this implementation since it's just the maximum C @code{unsigned
int} value.
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
+
@end ifset
@ifset familyF77
@node Tan Intrinsic
@@ -10179,9 +10340,16 @@ Returns the current time encoded as an integer
This value is suitable for passing to @code{CTIME},
@code{GMTIME}, and @code{LTIME}.
+@cindex wraparound, timings
+@cindex limits, timings
This intrinsic is not fully portable, such as to systems
with 32-bit @code{INTEGER} types but supporting times
wider than 32 bits.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
+
@xref{Time8 Intrinsic}, for information on a
similar intrinsic that might be portable to more
GNU Fortran implementations, though to fewer
@@ -10214,7 +10382,18 @@ Description:
Returns in @var{Time} a character representation of the current time as
obtained from @code{ctime(3)}.
-@xref{Fdate Intrinsic (subroutine)}, for an equivalent routine.
+@cindex Y10K compliance
+@cindex Year 10000 compliance
+@cindex wraparound, Y10K
+@cindex limits, Y10K
+Programs making use of this intrinsic
+might not be Year 10000 (Y10K) compliant.
+For example, the date might appear,
+to such programs, to wrap around
+(change from a larger value to a smaller one)
+as of the Year 10000.
+
+@xref{FDate Intrinsic (subroutine)}, for an equivalent routine.
For information on other intrinsics with the same name:
@xref{Time Intrinsic (UNIX)}.
@@ -10245,12 +10424,18 @@ Returns the current time encoded as a long integer
This value is suitable for passing to @code{CTIME},
@code{GMTIME}, and @code{LTIME}.
+@cindex wraparound, timings
+@cindex limits, timings
@emph{Warning:} this intrinsic does not increase the range
of the timing values over that returned by @code{time(3)}.
On a system with a 32-bit @code{time(3)},
@code{TIME8} will return a 32-bit value,
even though converted to an @samp{INTEGER(KIND=2)} value.
That means overflows of the 32-bit value can still occur.
+Therefore, the values returned by this intrinsic
+might be, or become, negative,
+or numerically less than previous values,
+during a single run of the compiled program.
No Fortran implementations other than GNU Fortran are
known to support this intrinsic at the time of this
@@ -10310,14 +10495,14 @@ external procedure.
@noindent
@example
-CALL TtyNam(@var{Name}, @var{Unit})
+CALL TtyNam(@var{Unit}, @var{Name})
@end example
@noindent
-@var{Name}: @code{CHARACTER}; scalar; INTENT(OUT).
+@var{Unit}: @code{INTEGER}; scalar; INTENT(IN).
@noindent
-@var{Unit}: @code{INTEGER}; scalar; INTENT(IN).
+@var{Name}: @code{CHARACTER}; scalar; INTENT(OUT).
@noindent
Intrinsic groups: @code{unix}.
@@ -10326,7 +10511,7 @@ Intrinsic groups: @code{unix}.
Description:
Sets @var{Name} to the name of the terminal device open on logical unit
-@var{Unit} or a blank string if @var{Unit} is not connected to a
+@var{Unit} or to a blank string if @var{Unit} is not connected to a
terminal.
Some non-GNU implementations of Fortran provide this intrinsic as
diff --git a/contrib/gcc/f/intrin.c b/contrib/gcc/f/intrin.c
index 6e27d21..dbf375b 100644
--- a/contrib/gcc/f/intrin.c
+++ b/contrib/gcc/f/intrin.c
@@ -1,6 +1,6 @@
/* intrin.c -- Recognize references to intrinsics
Copyright (C) 1995-1998 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -32,22 +32,22 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
struct _ffeintrin_name_
{
- char *name_uc;
- char *name_lc;
- char *name_ic;
+ const char *name_uc;
+ const char *name_lc;
+ const char *name_ic;
ffeintrinGen generic;
ffeintrinSpec specific;
};
struct _ffeintrin_gen_
{
- char *name; /* Name as seen in program. */
+ const char *name; /* Name as seen in program. */
ffeintrinSpec specs[2];
};
struct _ffeintrin_spec_
{
- char *name; /* Uppercase name as seen in source code,
+ const char *name; /* Uppercase name as seen in source code,
lowercase if no source name, "none" if no
name at all (NONE case). */
bool is_actualarg; /* Ok to pass as actual arg if -pedantic. */
@@ -57,13 +57,14 @@ struct _ffeintrin_spec_
struct _ffeintrin_imp_
{
- char *name; /* Name of implementation. */
+ const char *name; /* Name of implementation. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
ffecomGfrt gfrt_direct; /* library routine, direct-callable form. */
ffecomGfrt gfrt_f2c; /* library routine, f2c-callable form. */
ffecomGfrt gfrt_gnu; /* library routine, gnu-callable form. */
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
- char *control;
+ const char *control;
+ char y2kbad;
};
static ffebad ffeintrin_check_ (ffeintrinImp imp, ffebldOp op,
@@ -84,11 +85,13 @@ static struct _ffeintrin_name_ ffeintrin_names_[]
#define DEFGEN(CODE,NAME,SPEC1,SPEC2)
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
};
static struct _ffeintrin_gen_ ffeintrin_gens_[]
@@ -99,11 +102,13 @@ static struct _ffeintrin_gen_ ffeintrin_gens_[]
{ NAME, { SPEC1, SPEC2, }, },
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
};
static struct _ffeintrin_imp_ ffeintrin_imps_[]
@@ -115,10 +120,15 @@ static struct _ffeintrin_imp_ ffeintrin_imps_[]
#if FFECOM_targetCURRENT == FFECOM_targetGCC
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
{ NAME, FFECOM_gfrt ## GFRTDIRECT, FFECOM_gfrt ## GFRTF2C, \
- FFECOM_gfrt ## GFRTGNU, CONTROL },
+ FFECOM_gfrt ## GFRTGNU, CONTROL, FALSE },
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \
+ { NAME, FFECOM_gfrt ## GFRTDIRECT, FFECOM_gfrt ## GFRTF2C, \
+ FFECOM_gfrt ## GFRTGNU, CONTROL, Y2KBAD },
#elif FFECOM_targetCURRENT == FFECOM_targetFFE
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
- { NAME, CONTROL },
+ { NAME, CONTROL, FALSE },
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \
+ { NAME, CONTROL, Y2KBAD },
#else
#error
#endif
@@ -127,6 +137,7 @@ static struct _ffeintrin_imp_ ffeintrin_imps_[]
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
};
static struct _ffeintrin_spec_ ffeintrin_specs_[]
@@ -137,10 +148,12 @@ static struct _ffeintrin_spec_ ffeintrin_specs_[]
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) \
{ NAME, CALLABLE, FAMILY, IMP, },
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
};
@@ -153,9 +166,9 @@ ffeintrin_check_ (ffeintrinImp imp, ffebldOp op,
ffelexToken t,
bool commit)
{
- char *c = ffeintrin_imps_[imp].control;
+ const char *c = ffeintrin_imps_[imp].control;
bool subr = (c[0] == '-');
- char *argc;
+ const char *argc;
ffebld arg;
ffeinfoBasictype bt;
ffeinfoKindtype kt;
@@ -1152,9 +1165,9 @@ ffeintrin_check_any_ (ffebld arglist)
static int
ffeintrin_cmp_name_ (const void *name, const void *intrinsic)
{
- char *uc = (char *) ((struct _ffeintrin_name_ *) intrinsic)->name_uc;
- char *lc = (char *) ((struct _ffeintrin_name_ *) intrinsic)->name_lc;
- char *ic = (char *) ((struct _ffeintrin_name_ *) intrinsic)->name_ic;
+ const char *uc = ((struct _ffeintrin_name_ *) intrinsic)->name_uc;
+ const char *lc = ((struct _ffeintrin_name_ *) intrinsic)->name_lc;
+ const char *ic = ((struct _ffeintrin_name_ *) intrinsic)->name_ic;
return ffesrc_strcmp_2c (ffe_case_intrin (), name, uc, lc, ic);
}
@@ -1374,6 +1387,14 @@ ffeintrin_fulfill_generic (ffebld *expr, ffeinfo *info, ffelexToken t)
ffebad_string (ffeintrin_gens_[gen].name);
ffebad_finish ();
}
+ if (ffeintrin_imps_[imp].y2kbad)
+ {
+ ffebad_start (FFEBAD_INTRINSIC_Y2KBAD);
+ ffebad_here (0, ffelex_token_where_line (t),
+ ffelex_token_where_column (t));
+ ffebad_string (ffeintrin_gens_[gen].name);
+ ffebad_finish ();
+ }
}
}
@@ -1408,7 +1429,7 @@ ffeintrin_fulfill_specific (ffebld *expr, ffeinfo *info,
ffeIntrinsicState state;
ffebad error;
bool any = FALSE;
- char *name;
+ const char *name;
op = ffebld_op (*expr);
assert ((op == FFEBLD_opFUNCREF) || (op == FFEBLD_opSUBRREF));
@@ -1489,6 +1510,14 @@ ffeintrin_fulfill_specific (ffebld *expr, ffeinfo *info,
ffebad_string (name);
ffebad_finish ();
}
+ if (ffeintrin_imps_[imp].y2kbad)
+ {
+ ffebad_start (FFEBAD_INTRINSIC_Y2KBAD);
+ ffebad_here (0, ffelex_token_where_line (t),
+ ffelex_token_where_column (t));
+ ffebad_string (name);
+ ffebad_finish ();
+ }
}
}
@@ -1522,9 +1551,9 @@ void
ffeintrin_init_0 ()
{
int i;
- char *p1;
- char *p2;
- char *p3;
+ const char *p1;
+ const char *p2;
+ const char *p3;
int colon;
if (!ffe_is_do_internal_checks ())
@@ -1558,8 +1587,9 @@ ffeintrin_init_0 ()
break;
if ((ISDIGIT (*p1) || (*p1 == '_')) && (*p1 == *p2) && (*p1 == *p3))
continue;
- if (! ISUPPER (*p1) || ! ISLOWER (*p2)
- || (*p1 != toupper (*p2)) || ((*p3 != *p1) && (*p3 != *p2)))
+ if (! ISUPPER ((unsigned char)*p1) || ! ISLOWER ((unsigned char)*p2)
+ || (*p1 != toupper ((unsigned char)*p2))
+ || ((*p3 != *p1) && (*p3 != *p2)))
break;
}
assert ((*p1 == *p2) && (*p1 == *p3) && (*p1 == '\0'));
@@ -1567,7 +1597,7 @@ ffeintrin_init_0 ()
for (i = 0; ((size_t) i) < ARRAY_SIZE (ffeintrin_imps_); ++i)
{
- char *c = ffeintrin_imps_[i].control;
+ const char *c = ffeintrin_imps_[i].control;
if (c[0] == '\0')
continue;
@@ -1745,7 +1775,7 @@ ffeintrin_is_actualarg (ffeintrinSpec spec)
/* Determine if name is intrinsic, return info.
- char *name; // C-string name of possible intrinsic.
+ const char *name; // C-string name of possible intrinsic.
ffelexToken t; // NULL if no diagnostic to be given.
bool explicit; // TRUE if INTRINSIC name.
ffeintrinGen gen; // (TRUE only) Generic id of intrinsic.
@@ -1757,7 +1787,7 @@ ffeintrin_is_actualarg (ffeintrinSpec spec)
// kind accordingly. */
bool
-ffeintrin_is_intrinsic (char *name, ffelexToken t, bool explicit,
+ffeintrin_is_intrinsic (const char *name, ffelexToken t, bool explicit,
ffeintrinGen *xgen, ffeintrinSpec *xspec,
ffeintrinImp *ximp)
{
@@ -1968,7 +1998,7 @@ ffeintrin_kindtype (ffeintrinSpec spec)
/* Return name of generic intrinsic. */
-char *
+const char *
ffeintrin_name_generic (ffeintrinGen gen)
{
assert (gen < FFEINTRIN_gen);
@@ -1977,7 +2007,7 @@ ffeintrin_name_generic (ffeintrinGen gen)
/* Return name of intrinsic implementation. */
-char *
+const char *
ffeintrin_name_implementation (ffeintrinImp imp)
{
assert (imp < FFEINTRIN_imp);
@@ -1986,7 +2016,7 @@ ffeintrin_name_implementation (ffeintrinImp imp)
/* Return external/internal name of specific intrinsic. */
-char *
+const char *
ffeintrin_name_specific (ffeintrinSpec spec)
{
assert (spec < FFEINTRIN_spec);
diff --git a/contrib/gcc/f/intrin.def b/contrib/gcc/f/intrin.def
index 0c00dcc..4864abb 100644
--- a/contrib/gcc/f/intrin.def
+++ b/contrib/gcc/f/intrin.def
@@ -133,7 +133,7 @@ DEFNAME ("DSQRT", "dsqrt", "DSqRt", genNONE, specDSQRT)
DEFNAME ("DTAN", "dtan", "DTan", genNONE, specDTAN)
DEFNAME ("DTAND", "dtand", "DTanD", genNONE, specDTAND) /* VXT */
DEFNAME ("DTANH", "dtanh", "DTanH", genNONE, specDTANH)
-DEFNAME ("DTIME", "dtime", "Dtime", genDTIME, specNONE) /* UNIX */
+DEFNAME ("DTIME", "dtime", "DTime", genDTIME, specNONE) /* UNIX */
DEFNAME ("EOSHIFT", "eoshift", "EOShift", genNONE, specEOSHIFT) /* F90 */
DEFNAME ("EPSILON", "epsilon", "Epsilon", genNONE, specEPSILON) /* F90 */
DEFNAME ("ERF", "erf", "ErF", genNONE, specERF) /* UNIX */
@@ -142,7 +142,7 @@ DEFNAME ("ETIME", "etime", "ETime", genETIME, specNONE) /* UNIX */
DEFNAME ("EXIT", "exit", "Exit", genNONE, specEXIT) /* UNIX */
DEFNAME ("EXP", "exp", "Exp", genNONE, specEXP)
DEFNAME ("EXPONENT", "exponent", "Exponent", genNONE, specEXPONENT) /* F90 */
-DEFNAME ("FDATE", "fdate", "Fdate", genFDATE, specNONE) /* UNIX */
+DEFNAME ("FDATE", "fdate", "FDate", genFDATE, specNONE) /* UNIX */
DEFNAME ("FGET", "fget", "FGet", genFGET, specNONE) /* UNIX */
DEFNAME ("FGETC", "fgetc", "FGetC", genFGETC, specNONE) /* UNIX */
DEFNAME ("FLOAT", "float", "Float", genNONE, specFLOAT)
@@ -3006,6 +3006,12 @@ DEFSPEC (NONE,
CONTROL -- A control string, described below.
+ The DEFIMPY macro specifies the above, plus:
+
+ Y2KBAD -- TRUE if the intrinsic is known to be non-Y2K-compliant,
+ FALSE if it is known to be Y2K-compliant. (In terms of
+ interface and libg2c implementation.)
+
*/
/* The control string has the following format:
@@ -3231,8 +3237,8 @@ DEFIMP (CHMOD_subr, "CHMOD_subr", CHMOD,,, "--:-:Name=A1,Mode=A1,Status=?I1w")
DEFIMP (COMPLEX, "COMPLEX", ,,, "C=:*:Real=S*,Imag=S*")
DEFIMP (CPU_TIME, "CPU_TIME", SECOND,,, "--:-:Seconds=R*w")
DEFIMP (CTIME_func, "CTIME_func", CTIME,,, "A1*:-:STime=I*")
-DEFIMP (CTIME_subr, "CTIME_subr", CTIME,,, "--:-:Result=A1w,STime=I*")
-DEFIMP (DATE, "DATE", DATE,,, "--:-:Date=A1w")
+DEFIMP (CTIME_subr, "CTIME_subr", CTIME,,, "--:-:STime=I*,Result=A1w")
+DEFIMPY (DATE, "DATE", DATE,,, "--:-:Date=A1w", TRUE)
DEFIMP (DATE_AND_TIME, "DATE_AND_TIME", DATE_AND_TIME,,, "--:-:Date=A1w,Time=?A1w,Zone=?A1w,Values=?I1(8)w")
DEFIMP (DBESJ0, "DBESJ0", L_BESJ0,,, "R2:-:X=R2")
DEFIMP (DBESJ1, "DBESJ1", L_BESJ1,,, "R2:-:X=R2")
@@ -3247,11 +3253,11 @@ DEFIMP (DFLOAT, "DFLOAT", ,,, "R2:-:A=I*")
DEFIMP (DIMAG, "DIMAG", ,DIMAG,, "R2:-:Z=C2")
DEFIMP (DREAL, "DREAL", ,,, "R2:-:A=N*")
DEFIMP (DTIME_func, "DTIME_func", DTIME,,, "R1:-:TArray=R1(2)w")
-DEFIMP (DTIME_subr, "DTIME_subr", DTIME,,, "--:-:Result=R1w,TArray=R1(2)w")
+DEFIMP (DTIME_subr, "DTIME_subr", DTIME,,, "--:-:TArray=R1(2)w,Result=R1w")
DEFIMP (ERF, "ERF", L_ERF,ERF,, "R=:0:X=R*")
DEFIMP (ERFC, "ERFC", L_ERFC,ERFC,, "R=:0:X=R*")
DEFIMP (ETIME_func, "ETIME_func", ETIME,,, "R1:-:TArray=R1(2)w")
-DEFIMP (ETIME_subr, "ETIME_subr", ETIME,,, "--:-:Result=R1w,TArray=R1(2)w")
+DEFIMP (ETIME_subr, "ETIME_subr", ETIME,,, "--:-:TArray=R1(2)w,Result=R1w")
DEFIMP (EXIT, "EXIT", EXIT,,, "--:-:Status=?I*")
DEFIMP (FDATE_func, "FDATE_func", FDATE,,, "A1*:-:")
DEFIMP (FDATE_subr, "FDATE_subr", FDATE,,, "--:-:Date=A1w")
@@ -3289,7 +3295,7 @@ DEFIMP (IBCLR, "IBCLR", ,,, "I=:0:I=I*,Pos=I*")
DEFIMP (IBITS, "IBITS", ,,, "I=:0:I=I*,Pos=I*,Len=I*")
DEFIMP (IBSET, "IBSET", ,,, "I=:0:I=I*,Pos=I*")
DEFIMP (IDATE_unix, "IDATE_unix", IDATE,,, "--:-:TArray=I1(3)w")
-DEFIMP (IDATE_vxt, "IDATE_vxt", VXTIDATE,,, "--:-:M=I1w,D=I1w,Y=I1w")
+DEFIMPY (IDATE_vxt, "IDATE_vxt", VXTIDATE,,, "--:-:M=I1w,D=I1w,Y=I1w", TRUE)
DEFIMP (IEOR, "IEOR", ,,, "I=:*:I=I*,J=I*")
DEFIMP (IOR, "IOR", ,,, "I=:*:I=I*,J=I*")
DEFIMP (IERRNO, "IERRNO", IERRNO,,, "I1:-:")
@@ -3342,7 +3348,7 @@ DEFIMP (TIME8, "TIME8", TIME,,, "I2:-:")
DEFIMP (TIME_unix, "TIME_unix", TIME,,, "I1:-:")
DEFIMP (TIME_vxt, "TIME_vxt", VXTTIME,,, "--:-:Time=A1[8]w")
DEFIMP (TTYNAM_func, "TTYNAM_func", TTYNAM,,, "A1*:-:Unit=I*")
-DEFIMP (TTYNAM_subr, "TTYNAM_subr", TTYNAM,,, "--:-:Name=A1w,Unit=I*")
+DEFIMP (TTYNAM_subr, "TTYNAM_subr", TTYNAM,,, "--:-:Unit=I*,Name=A1w")
DEFIMP (UMASK_func, "UMASK_func", UMASK,,, "I1:-:Mask=I*")
DEFIMP (UMASK_subr, "UMASK_subr", UMASK,,, "--:-:Mask=I*,Old=?I1w")
DEFIMP (UNLINK_func, "UNLINK_func", UNLINK,,, "I1:-:File=A1")
diff --git a/contrib/gcc/f/intrin.h b/contrib/gcc/f/intrin.h
index 0006c8a..5b8d725 100644
--- a/contrib/gcc/f/intrin.h
+++ b/contrib/gcc/f/intrin.h
@@ -1,6 +1,6 @@
/* intrin.h -- Public interface for intrin.c
Copyright (C) 1995-1997 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -51,11 +51,13 @@ typedef enum
#define DEFGEN(CODE,NAME,SPEC1,SPEC2) FFEINTRIN_gen ## CODE,
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
FFEINTRIN_gen
} ffeintrinGen;
@@ -65,11 +67,13 @@ typedef enum
#define DEFGEN(CODE,NAME,SPEC1,SPEC2)
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) FFEINTRIN_spec ## CODE,
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
FFEINTRIN_spec
} ffeintrinSpec;
@@ -80,11 +84,14 @@ typedef enum
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
FFEINTRIN_imp ## CODE,
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \
+ FFEINTRIN_imp ## CODE,
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
FFEINTRIN_imp
} ffeintrinImp;
@@ -108,14 +115,14 @@ void ffeintrin_init_0 (void);
#define ffeintrin_init_3()
#define ffeintrin_init_4()
bool ffeintrin_is_actualarg (ffeintrinSpec spec);
-bool ffeintrin_is_intrinsic (char *name, ffelexToken t, bool explicit,
+bool ffeintrin_is_intrinsic (const char *name, ffelexToken t, bool explicit,
ffeintrinGen *gen, ffeintrinSpec *spec,
ffeintrinImp *imp);
bool ffeintrin_is_standard (ffeintrinGen gen, ffeintrinSpec spec);
ffeinfoKindtype ffeintrin_kindtype (ffeintrinSpec spec);
-char *ffeintrin_name_generic (ffeintrinGen gen);
-char *ffeintrin_name_implementation (ffeintrinImp imp);
-char *ffeintrin_name_specific (ffeintrinSpec spec);
+const char *ffeintrin_name_generic (ffeintrinGen gen);
+const char *ffeintrin_name_implementation (ffeintrinImp imp);
+const char *ffeintrin_name_specific (ffeintrinSpec spec);
ffeIntrinsicState ffeintrin_state_family (ffeintrinFamily family);
#define ffeintrin_terminate_0()
#define ffeintrin_terminate_1()
diff --git a/contrib/gcc/f/lab.c b/contrib/gcc/f/lab.c
index e161097..a870a7f 100644
--- a/contrib/gcc/f/lab.c
+++ b/contrib/gcc/f/lab.c
@@ -1,6 +1,6 @@
/* lab.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/lab.h b/contrib/gcc/f/lab.h
index d559860..09f1291 100644
--- a/contrib/gcc/f/lab.h
+++ b/contrib/gcc/f/lab.h
@@ -1,6 +1,6 @@
/* lab.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/lang-options.h b/contrib/gcc/f/lang-options.h
index 4b7c6b8..f9bb90d 100644
--- a/contrib/gcc/f/lang-options.h
+++ b/contrib/gcc/f/lang-options.h
@@ -1,6 +1,6 @@
/* lang-options.h file for Fortran
Copyright (C) 1995-1998 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -28,131 +28,142 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
overflowing some old compiler's tables, etc. */
DEFINE_LANG_NAME ("Fortran")
-
- { "-fversion", "Print g77-specific compiler version info, run internal tests" },
- { "-fnull-version", "" },
+
+/* Use of FTNOPT makes tracking changes between FSF-g77 and egcs-g77
+ easier, since FSF-gcc doesn't support doc strings. */
+#define FTNOPT(opt,doc) { opt, doc },
+
+FTNOPT( "-fversion", "Print g77-specific compiler version info, run internal tests" )
+FTNOPT( "-fnull-version", "" )
/*"-fident",*/
/*"-fno-ident",*/
- { "-ff66", "Program is written in typical FORTRAN 66 dialect" },
- { "-fno-f66", "" },
- { "-ff77", "Program is written in typical Unix f77 dialect" },
- { "-fno-f77", "Program does not use Unix-f77 dialectal features" },
- { "-ff90", "Program is written in Fortran-90-ish dialect" },
- { "-fno-f90", "" },
- { "-fautomatic", "" },
- { "-fno-automatic", "Treat local vars and COMMON blocks as if they were named in SAVE statements" },
- { "-fdollar-ok", "Allow $ in symbol names" },
- { "-fno-dollar-ok", "" },
- { "-ff2c", "" },
- { "-fno-f2c", "f2c-compatible code need not be generated" },
- { "-ff2c-library", "" },
- { "-fno-f2c-library", "Unsupported; do not generate libf2c-calling code" },
- { "-ffree-form", "Program is written in Fortran-90-ish free form" },
- { "-fno-free-form", "" },
- { "-ffixed-form", "" },
- { "-fno-fixed-form", "" },
- { "-fpedantic", "Warn about use of (only a few for now) Fortran extensions" },
- { "-fno-pedantic", "" },
- { "-fvxt", "Program is written in VXT (Digital-like) FORTRAN" },
- { "-fno-vxt", "" },
- { "-fugly", "Obsolete; allow certain ugly features" },
- { "-fno-ugly", "" },
- { "-fugly-args", "" },
- { "-fno-ugly-args", "Hollerith and typeless constants not passed as arguments" },
- { "-fugly-assign", "Allow ordinary copying of ASSIGN'ed vars" },
- { "-fno-ugly-assign", "" },
- { "-fugly-assumed", "Dummy array dimensioned to (1) is assumed-size" },
- { "-fno-ugly-assumed", "" },
- { "-fugly-comma", "Trailing comma in procedure call denotes null argument" },
- { "-fno-ugly-comma", "" },
- { "-fugly-complex", "Allow REAL(Z) and AIMAG(Z) given DOUBLE COMPLEX Z" },
- { "-fno-ugly-complex", "" },
- { "-fugly-init", "" },
- { "-fno-ugly-init", "Initialization via DATA and PARAMETER is type-compatible" },
- { "-fugly-logint", "Allow INTEGER and LOGICAL interchangeability" },
- { "-fno-ugly-logint", "" },
- { "-fxyzzy", "Print internal debugging-related info" },
- { "-fno-xyzzy", "" },
- { "-finit-local-zero", "Initialize local vars and arrays to zero" },
- { "-fno-init-local-zero", "" },
- { "-fbackslash", "" },
- { "-fno-backslash", "Backslashes in character/hollerith constants not special (C-style)" },
- { "-femulate-complex", "" },
- { "-fno-emulate-complex", "Have compiler back end cope with COMPLEX arithmetic" },
- { "-funderscoring", "" },
- { "-fno-underscoring", "Disable the appending of underscores to externals" },
- { "-fsecond-underscore", "" },
- { "-fno-second-underscore", "Never append a second underscore to externals" },
- { "-fintrin-case-initcap", "Intrinsics spelled as e.g. SqRt" },
- { "-fintrin-case-upper", "Intrinsics in uppercase" },
- { "-fintrin-case-lower", "" },
- { "-fintrin-case-any", "Intrinsics letters in arbitrary cases" },
- { "-fmatch-case-initcap", "Language keywords spelled as e.g. IOStat" },
- { "-fmatch-case-upper", "Language keywords in uppercase" },
- { "-fmatch-case-lower", "" },
- { "-fmatch-case-any", "Language keyword letters in arbitrary cases" },
- { "-fsource-case-upper", "Internally convert most source to uppercase" },
- { "-fsource-case-lower", "" },
- { "-fsource-case-preserve", "Internally preserve source case" },
- { "-fsymbol-case-initcap", "Symbol names spelled in mixed case" },
- { "-fsymbol-case-upper", "Symbol names in uppercase" },
- { "-fsymbol-case-lower", "Symbol names in lowercase" },
- { "-fsymbol-case-any", "" },
- { "-fcase-strict-upper", "Program written in uppercase" },
- { "-fcase-strict-lower", "Program written in lowercase" },
- { "-fcase-initcap", "Program written in strict mixed-case" },
- { "-fcase-upper", "Compile as if program written in uppercase" },
- { "-fcase-lower", "Compile as if program written in lowercase" },
- { "-fcase-preserve", "Preserve all spelling (case) used in program" },
- { "-fbadu77-intrinsics-delete", "Delete libU77 intrinsics with bad interfaces" },
- { "-fbadu77-intrinsics-disable", "Disable libU77 intrinsics with bad interfaces" },
- { "-fbadu77-intrinsics-enable", "" },
- { "-fbadu77-intrinsics-hide", "Hide libU77 intrinsics with bad interfaces" },
- { "-ff2c-intrinsics-delete", "Delete non-FORTRAN-77 intrinsics f2c supports" },
- { "-ff2c-intrinsics-disable", "Disable non-FORTRAN-77 intrinsics f2c supports" },
- { "-ff2c-intrinsics-enable", "" },
- { "-ff2c-intrinsics-hide", "Hide non-FORTRAN-77 intrinsics f2c supports" },
- { "-ff90-intrinsics-delete", "Delete non-FORTRAN-77 intrinsics F90 supports" },
- { "-ff90-intrinsics-disable", "Disable non-FORTRAN-77 intrinsics F90 supports" },
- { "-ff90-intrinsics-enable", "" },
- { "-ff90-intrinsics-hide", "Hide non-FORTRAN-77 intrinsics F90 supports" },
- { "-fgnu-intrinsics-delete", "Delete non-FORTRAN-77 intrinsics g77 supports" },
- { "-fgnu-intrinsics-disable", "Disable non-FORTRAN 77 intrinsics F90 supports" },
- { "-fgnu-intrinsics-enable", "" },
- { "-fgnu-intrinsics-hide", "Hide non-FORTRAN 77 intrinsics F90 supports" },
- { "-fmil-intrinsics-delete", "Delete MIL-STD 1753 intrinsics" },
- { "-fmil-intrinsics-disable", "Disable MIL-STD 1753 intrinsics" },
- { "-fmil-intrinsics-enable", "" },
- { "-fmil-intrinsics-hide", "Hide MIL-STD 1753 intrinsics" },
- { "-funix-intrinsics-delete", "Delete libU77 intrinsics" },
- { "-funix-intrinsics-disable", "Disable libU77 intrinsics" },
- { "-funix-intrinsics-enable", "" },
- { "-funix-intrinsics-hide", "Hide libU77 intrinsics" },
- { "-fvxt-intrinsics-delete", "Delete non-FORTRAN-77 intrinsics VXT FORTRAN supports" },
- { "-fvxt-intrinsics-disable", "Disable non-FORTRAN-77 intrinsics VXT FORTRAN supports" },
- { "-fvxt-intrinsics-enable", "" },
- { "-fvxt-intrinsics-hide", "Hide non-FORTRAN-77 intrinsics VXT FORTRAN supports" },
- { "-fzeros", "Treat initial values of 0 like non-zero values" },
- { "-fno-zeros", "" },
- { "-fdebug-kludge", "Emit special debugging information for COMMON and EQUIVALENCE" },
- { "-fno-debug-kludge", "" },
- { "-fonetrip", "Take at least one trip through each iterative DO loop" },
- { "-fno-onetrip", "" },
- { "-fsilent", "" },
- { "-fno-silent", "Print names of program units as they are compiled" },
- { "-fglobals", "" },
- { "-fno-globals", "Disable fatal diagnostics about inter-procedural problems" },
- { "-ftypeless-boz", "Make prefix-radix non-decimal constants be typeless" },
- { "-fno-typeless-boz", "" },
- { "-Wglobals", "" },
- { "-Wno-globals", "Disable warnings about inter-procedural problems" },
+FTNOPT( "-ff66", "Program is written in typical FORTRAN 66 dialect" )
+FTNOPT( "-fno-f66", "" )
+FTNOPT( "-ff77", "Program is written in typical Unix f77 dialect" )
+FTNOPT( "-fno-f77", "Program does not use Unix-f77 dialectal features" )
+FTNOPT( "-ff90", "Program is written in Fortran-90-ish dialect" )
+FTNOPT( "-fno-f90", "" )
+FTNOPT( "-fautomatic", "" )
+FTNOPT( "-fno-automatic", "Treat local vars and COMMON blocks as if they were named in SAVE statements" )
+FTNOPT( "-fdollar-ok", "Allow $ in symbol names" )
+FTNOPT( "-fno-dollar-ok", "" )
+FTNOPT( "-ff2c", "" )
+FTNOPT( "-fno-f2c", "f2c-compatible code need not be generated" )
+FTNOPT( "-ff2c-library", "" )
+FTNOPT( "-fno-f2c-library", "Unsupported; do not generate libf2c-calling code" )
+FTNOPT( "-fflatten-arrays", "Unsupported; affects code-generation of arrays" )
+FTNOPT( "-fno-flatten-arrays", "" )
+FTNOPT( "-ffree-form", "Program is written in Fortran-90-ish free form" )
+FTNOPT( "-fno-free-form", "" )
+FTNOPT( "-ffixed-form", "" )
+FTNOPT( "-fno-fixed-form", "" )
+FTNOPT( "-fpedantic", "Warn about use of (only a few for now) Fortran extensions" )
+FTNOPT( "-fno-pedantic", "" )
+FTNOPT( "-fvxt", "Program is written in VXT (Digital-like) FORTRAN" )
+FTNOPT( "-fno-vxt", "" )
+FTNOPT( "-fno-ugly", "Disallow all ugly features" )
+FTNOPT( "-fugly-args", "" )
+FTNOPT( "-fno-ugly-args", "Hollerith and typeless constants not passed as arguments" )
+FTNOPT( "-fugly-assign", "Allow ordinary copying of ASSIGN'ed vars" )
+FTNOPT( "-fno-ugly-assign", "" )
+FTNOPT( "-fugly-assumed", "Dummy array dimensioned to (1) is assumed-size" )
+FTNOPT( "-fno-ugly-assumed", "" )
+FTNOPT( "-fugly-comma", "Trailing comma in procedure call denotes null argument" )
+FTNOPT( "-fno-ugly-comma", "" )
+FTNOPT( "-fugly-complex", "Allow REAL(Z) and AIMAG(Z) given DOUBLE COMPLEX Z" )
+FTNOPT( "-fno-ugly-complex", "" )
+FTNOPT( "-fugly-init", "" )
+FTNOPT( "-fno-ugly-init", "Initialization via DATA and PARAMETER is type-compatible" )
+FTNOPT( "-fugly-logint", "Allow INTEGER and LOGICAL interchangeability" )
+FTNOPT( "-fno-ugly-logint", "" )
+FTNOPT( "-fxyzzy", "Print internal debugging-related info" )
+FTNOPT( "-fno-xyzzy", "" )
+FTNOPT( "-finit-local-zero", "Initialize local vars and arrays to zero" )
+FTNOPT( "-fno-init-local-zero", "" )
+FTNOPT( "-fbackslash", "" )
+FTNOPT( "-fno-backslash", "Backslashes in character/hollerith constants not special (C-style)" )
+FTNOPT( "-femulate-complex", "Have front end emulate COMPLEX arithmetic to avoid bugs" )
+FTNOPT( "-fno-emulate-complex", "" )
+FTNOPT( "-funderscoring", "" )
+FTNOPT( "-fno-underscoring", "Disable the appending of underscores to externals" )
+FTNOPT( "-fsecond-underscore", "" )
+FTNOPT( "-fno-second-underscore", "Never append a second underscore to externals" )
+FTNOPT( "-fintrin-case-initcap", "Intrinsics spelled as e.g. SqRt" )
+FTNOPT( "-fintrin-case-upper", "Intrinsics in uppercase" )
+FTNOPT( "-fintrin-case-lower", "" )
+FTNOPT( "-fintrin-case-any", "Intrinsics letters in arbitrary cases" )
+FTNOPT( "-fmatch-case-initcap", "Language keywords spelled as e.g. IOStat" )
+FTNOPT( "-fmatch-case-upper", "Language keywords in uppercase" )
+FTNOPT( "-fmatch-case-lower", "" )
+FTNOPT( "-fmatch-case-any", "Language keyword letters in arbitrary cases" )
+FTNOPT( "-fsource-case-upper", "Internally convert most source to uppercase" )
+FTNOPT( "-fsource-case-lower", "" )
+FTNOPT( "-fsource-case-preserve", "Internally preserve source case" )
+FTNOPT( "-fsymbol-case-initcap", "Symbol names spelled in mixed case" )
+FTNOPT( "-fsymbol-case-upper", "Symbol names in uppercase" )
+FTNOPT( "-fsymbol-case-lower", "Symbol names in lowercase" )
+FTNOPT( "-fsymbol-case-any", "" )
+FTNOPT( "-fcase-strict-upper", "Program written in uppercase" )
+FTNOPT( "-fcase-strict-lower", "Program written in lowercase" )
+FTNOPT( "-fcase-initcap", "Program written in strict mixed-case" )
+FTNOPT( "-fcase-upper", "Compile as if program written in uppercase" )
+FTNOPT( "-fcase-lower", "Compile as if program written in lowercase" )
+FTNOPT( "-fcase-preserve", "Preserve all spelling (case) used in program" )
+FTNOPT( "-fbadu77-intrinsics-delete", "Delete libU77 intrinsics with bad interfaces" )
+FTNOPT( "-fbadu77-intrinsics-disable", "Disable libU77 intrinsics with bad interfaces" )
+FTNOPT( "-fbadu77-intrinsics-enable", "" )
+FTNOPT( "-fbadu77-intrinsics-hide", "Hide libU77 intrinsics with bad interfaces" )
+FTNOPT( "-ff2c-intrinsics-delete", "Delete non-FORTRAN-77 intrinsics f2c supports" )
+FTNOPT( "-ff2c-intrinsics-disable", "Disable non-FORTRAN-77 intrinsics f2c supports" )
+FTNOPT( "-ff2c-intrinsics-enable", "" )
+FTNOPT( "-ff2c-intrinsics-hide", "Hide non-FORTRAN-77 intrinsics f2c supports" )
+FTNOPT( "-ff90-intrinsics-delete", "Delete non-FORTRAN-77 intrinsics F90 supports" )
+FTNOPT( "-ff90-intrinsics-disable", "Disable non-FORTRAN-77 intrinsics F90 supports" )
+FTNOPT( "-ff90-intrinsics-enable", "" )
+FTNOPT( "-ff90-intrinsics-hide", "Hide non-FORTRAN-77 intrinsics F90 supports" )
+FTNOPT( "-fgnu-intrinsics-delete", "Delete non-FORTRAN-77 intrinsics g77 supports" )
+FTNOPT( "-fgnu-intrinsics-disable", "Disable non-FORTRAN 77 intrinsics F90 supports" )
+FTNOPT( "-fgnu-intrinsics-enable", "" )
+FTNOPT( "-fgnu-intrinsics-hide", "Hide non-FORTRAN 77 intrinsics F90 supports" )
+FTNOPT( "-fmil-intrinsics-delete", "Delete MIL-STD 1753 intrinsics" )
+FTNOPT( "-fmil-intrinsics-disable", "Disable MIL-STD 1753 intrinsics" )
+FTNOPT( "-fmil-intrinsics-enable", "" )
+FTNOPT( "-fmil-intrinsics-hide", "Hide MIL-STD 1753 intrinsics" )
+FTNOPT( "-funix-intrinsics-delete", "Delete libU77 intrinsics" )
+FTNOPT( "-funix-intrinsics-disable", "Disable libU77 intrinsics" )
+FTNOPT( "-funix-intrinsics-enable", "" )
+FTNOPT( "-funix-intrinsics-hide", "Hide libU77 intrinsics" )
+FTNOPT( "-fvxt-intrinsics-delete", "Delete non-FORTRAN-77 intrinsics VXT FORTRAN supports" )
+FTNOPT( "-fvxt-intrinsics-disable", "Disable non-FORTRAN-77 intrinsics VXT FORTRAN supports" )
+FTNOPT( "-fvxt-intrinsics-enable", "" )
+FTNOPT( "-fvxt-intrinsics-hide", "Hide non-FORTRAN-77 intrinsics VXT FORTRAN supports" )
+FTNOPT( "-fzeros", "Treat initial values of 0 like non-zero values" )
+FTNOPT( "-fno-zeros", "" )
+FTNOPT( "-fdebug-kludge", "Emit special debugging information for COMMON and EQUIVALENCE" )
+FTNOPT( "-fno-debug-kludge", "" )
+FTNOPT( "-fonetrip", "Take at least one trip through each iterative DO loop" )
+FTNOPT( "-fno-onetrip", "" )
+FTNOPT( "-fsilent", "" )
+FTNOPT( "-fno-silent", "Print names of program units as they are compiled" )
+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( "-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",*/
/*"-Wno-implicit",*/
- { "-Wsurprising", "Warn about constructs with surprising meanings" },
- { "-Wno-surprising", "" },
+FTNOPT( "-Wsurprising", "Warn about constructs with surprising meanings" )
+FTNOPT( "-Wno-surprising", "" )
/*"-Wall",*/
/* Prefix options. */
- { "-I", "Add a directory for INCLUDE searching" },
- { "-ffixed-line-length-", "Set the maximum line length" },
+FTNOPT( "-I", "Add a directory for INCLUDE searching" )
+FTNOPT( "-ffixed-line-length-", "Set the maximum line length" )
+
+#undef FTNOPT
#endif
diff --git a/contrib/gcc/f/lang-specs.h b/contrib/gcc/f/lang-specs.h
index bf8786f..b4492a6 100644
--- a/contrib/gcc/f/lang-specs.h
+++ b/contrib/gcc/f/lang-specs.h
@@ -1,6 +1,6 @@
/* lang-specs.h file for Fortran
- Copyright (C) 1995-1997 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Copyright (C) 1995-1997, 1999 Free Software Foundation, Inc.
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -26,6 +26,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
{".F", {"@f77-cpp-input"}},
{".fpp", {"@f77-cpp-input"}},
+ {".FPP", {"@f77-cpp-input"}},
{"@f77-cpp-input",
/* For f77 we want -traditional to avoid errors with, for
instance, mismatched '. Also, we avoid unpleasant surprises
@@ -34,20 +35,21 @@ 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\
+ {"cpp -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}\
- -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
+ %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\
%{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
%{!undef:%P} -D_LANGUAGE_FORTRAN %{trigraphs} \
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} -traditional\
+ %{ffast-math:-D__FAST_MATH__}\
%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
%i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
"%{!M:%{!MM:%{!E:f771 %{!pipe:%g.i} %(f771) \
- %{!Q:-quiet} -dumpbase %b.F %{d*} %{m*} %{a}\
+ %{!Q:-quiet} -dumpbase %b.F %{d*} %{m*} %{a*}\
%{g*} %{O*} %{W*} %{w} %{pedantic*} \
%{v:-version -fversion} %{pg:-p} %{p} %{f*} %{I*}\
- %{aux-info*}\
+ %{aux-info*} %{Qn:-fno-ident}\
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
%{!S:as %a %Y\
@@ -59,10 +61,10 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{!E:%{!pipe:-o %g.f}}%{E:%W{o*}} %i |\n",
"%{!E:f771 %{!pipe:%g.f} %(f771) \
- %{!Q:-quiet} -dumpbase %b.r %{d*} %{m*} %{a}\
+ %{!Q:-quiet} -dumpbase %b.r %{d*} %{m*} %{a*}\
%{g*} %{O*} %{W*} %{w} %{pedantic*} \
%{v:-version -fversion} %{pg:-p} %{p} %{f*} %{I*}\
- %{aux-info*}\
+ %{aux-info*} %{Qn:-fno-ident}\
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
%{!S:as %a %Y\
@@ -70,29 +72,31 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
%{!pipe:%g.s} %A\n }}"}},
{".f", {"@f77"}},
{".for", {"@f77"}},
+ {".FOR", {"@f77"}},
{"@f77",
{"%{!M:%{!MM:%{!E:f771 %i %(f771) \
- %{!Q:-quiet} -dumpbase %b.f %{d*} %{m*} %{a}\
+ %{!Q:-quiet} -dumpbase %b.f %{d*} %{m*} %{a*}\
%{g*} %{O*} %{W*} %{w} %{pedantic*}\
%{v:-version -fversion} %{pg:-p} %{p} %{f*} %{I*}\
- %{aux-info*}\
+ %{aux-info*} %{Qn:-fno-ident}\
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
%{!S:as %a %Y\
%{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 \
+ {"cpp -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} \
- -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 \
+ %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2} \
%{ansi:-trigraphs -$ -D__STRICT_ANSI__} \
%{!undef:%P} -D_LANGUAGE_FORTRAN %{trigraphs} \
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} -traditional \
+ %{ffast-math:-D__FAST_MATH__}\
%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z \
/dev/null /dev/null \n\
f771 -fnull-version %(f771) \
- %{!Q:-quiet} -dumpbase g77-version.f %{d*} %{m*} %{a} \
+ %{!Q:-quiet} -dumpbase g77-version.f %{d*} %{m*} %{a*} \
%{g*} %{O*} %{W*} %{w} %{pedantic*} \
-version -fversion %{f*} %{I*} -o %g.s /dev/null \n\
as %a %Y -o %g%O %g.s %A \n\
diff --git a/contrib/gcc/f/lex.c b/contrib/gcc/f/lex.c
index c62e5b2..3136d40 100644
--- a/contrib/gcc/f/lex.c
+++ b/contrib/gcc/f/lex.c
@@ -1,6 +1,6 @@
/* Implementation of Fortran lexer
- Copyright (C) 1995-1997 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Copyright (C) 1995-1998 Free Software Foundation, Inc.
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -1077,6 +1077,23 @@ ffelex_get_directive_line_ (char **text, FILE *finput)
Returns the next character unhandled, which is always newline or EOF. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
+
+#if defined HANDLE_PRAGMA
+/* Local versions of these macros, that can be passed as function pointers. */
+static int
+pragma_getc ()
+{
+ return getc (finput);
+}
+
+static void
+pragma_ungetc (arg)
+ int arg;
+{
+ ungetc (arg, finput);
+}
+#endif /* HANDLE_PRAGMA */
+
static int
ffelex_hash_ (FILE *finput)
{
@@ -1105,17 +1122,42 @@ ffelex_hash_ (FILE *finput)
&& ((c = getc (finput)) == ' ' || c == '\t' || c == '\n'
|| c == EOF))
{
- goto skipline;
#if 0 /* g77 doesn't handle pragmas, so ignores them FOR NOW. */
-#ifdef HANDLE_SYSV_PRAGMA
- return handle_sysv_pragma (finput, c);
-#else /* !HANDLE_SYSV_PRAGMA */
+ static char buffer [128];
+ char * buff = buffer;
+
+ /* Read the pragma name into a buffer. */
+ while (isspace (c = getc (finput)))
+ continue;
+
+ do
+ {
+ * buff ++ = c;
+ c = getc (finput);
+ }
+ while (c != EOF && ! isspace (c) && c != '\n'
+ && buff < buffer + 128);
+
+ pragma_ungetc (c);
+
+ * -- buff = 0;
#ifdef HANDLE_PRAGMA
- HANDLE_PRAGMA (finput);
+ if (HANDLE_PRAGMA (pragma_getc, pragma_ungetc, buffer))
+ goto skipline;
#endif /* HANDLE_PRAGMA */
- goto skipline;
-#endif /* !HANDLE_SYSV_PRAGMA */
+#ifdef HANDLE_GENERIC_PRAGMAS
+ if (handle_generic_pragma (buffer))
+ goto skipline;
+#endif /* !HANDLE_GENERIC_PRAGMAS */
+
+ /* Issue a warning message if we have been asked to do so.
+ Ignoring unknown pragmas in system header file unless
+ an explcit -Wunknown-pragmas has been given. */
+ if (warn_unknown_pragmas > 1
+ || (warn_unknown_pragmas && ! in_system_header))
+ warning ("ignoring pragma: %s", token_buffer);
#endif /* 0 */
+ goto skipline;
}
}
@@ -1201,7 +1243,7 @@ ffelex_hash_ (FILE *finput)
goto skipline;
}
- if (ffe_is_ident ())
+ if (! flag_no_ident)
{
#ifdef ASM_OUTPUT_IDENT
ASM_OUTPUT_IDENT (asm_out_file,
@@ -1709,10 +1751,10 @@ ffelex_token_new_ ()
return t;
}
-static char *
+static const char *
ffelex_type_string_ (ffelexType type)
{
- static char *types[] = {
+ static const char *types[] = {
"FFELEX_typeNONE",
"FFELEX_typeCOMMENT",
"FFELEX_typeEOS",
@@ -4305,7 +4347,7 @@ ffelexHandler
ffelex_splice_tokens (ffelexHandler first, ffelexToken master,
ffeTokenLength start)
{
- char *p;
+ unsigned char *p;
ffeTokenLength i;
ffelexToken t;
@@ -4448,7 +4490,7 @@ ffelex_token_name_from_names (ffelexToken t, ffeTokenLength start,
assert (len > 0);
assert ((start + len) <= t->length);
}
- assert (ffelex_is_firstnamechar (t->text[start]));
+ assert (ffelex_is_firstnamechar ((unsigned char)(t->text[start])));
nt = ffelex_token_new_ ();
nt->type = FFELEX_typeNAME;
@@ -4483,7 +4525,7 @@ ffelex_token_names_from_names (ffelexToken t, ffeTokenLength start,
assert (len > 0);
assert ((start + len) <= t->length);
}
- assert (ffelex_is_firstnamechar (t->text[start]));
+ assert (ffelex_is_firstnamechar ((unsigned char)(t->text[start])));
nt = ffelex_token_new_ ();
nt->type = FFELEX_typeNAMES;
@@ -4504,7 +4546,7 @@ ffelex_token_names_from_names (ffelexToken t, ffeTokenLength start,
/* Make a new CHARACTER token. */
ffelexToken
-ffelex_token_new_character (char *s, ffewhereLine l, ffewhereColumn c)
+ffelex_token_new_character (const char *s, ffewhereLine l, ffewhereColumn c)
{
ffelexToken t;
@@ -4539,11 +4581,11 @@ ffelex_token_new_eof ()
/* Make a new NAME token. */
ffelexToken
-ffelex_token_new_name (char *s, ffewhereLine l, ffewhereColumn c)
+ffelex_token_new_name (const char *s, ffewhereLine l, ffewhereColumn c)
{
ffelexToken t;
- assert (ffelex_is_firstnamechar (*s));
+ assert (ffelex_is_firstnamechar ((unsigned char)*s));
t = ffelex_token_new_ ();
t->type = FFELEX_typeNAME;
@@ -4560,11 +4602,11 @@ ffelex_token_new_name (char *s, ffewhereLine l, ffewhereColumn c)
/* Make a new NAMES token. */
ffelexToken
-ffelex_token_new_names (char *s, ffewhereLine l, ffewhereColumn c)
+ffelex_token_new_names (const char *s, ffewhereLine l, ffewhereColumn c)
{
ffelexToken t;
- assert (ffelex_is_firstnamechar (*s));
+ assert (ffelex_is_firstnamechar ((unsigned char)*s));
t = ffelex_token_new_ ();
t->type = FFELEX_typeNAMES;
@@ -4589,7 +4631,7 @@ ffelex_token_new_names (char *s, ffewhereLine l, ffewhereColumn c)
in the original string. */
ffelexToken
-ffelex_token_new_number (char *s, ffewhereLine l, ffewhereColumn c)
+ffelex_token_new_number (const char *s, ffewhereLine l, ffewhereColumn c)
{
ffelexToken t;
ffeTokenLength len;
diff --git a/contrib/gcc/f/lex.h b/contrib/gcc/f/lex.h
index c9a9dd5..c82a9c8 100644
--- a/contrib/gcc/f/lex.h
+++ b/contrib/gcc/f/lex.h
@@ -1,6 +1,6 @@
/* lex.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -148,14 +148,14 @@ ffelexToken ffelex_token_names_from_names (ffelexToken t,
ffeTokenLength start,
ffeTokenLength len);
ffelexToken ffelex_token_new (void);
-ffelexToken ffelex_token_new_character (char *s, ffewhereLine l,
+ffelexToken ffelex_token_new_character (const char *s, ffewhereLine l,
ffewhereColumn c);
ffelexToken ffelex_token_new_eof (void);
-ffelexToken ffelex_token_new_name (char *s, ffewhereLine l,
+ffelexToken ffelex_token_new_name (const char *s, ffewhereLine l,
ffewhereColumn c);
-ffelexToken ffelex_token_new_names (char *s, ffewhereLine l,
+ffelexToken ffelex_token_new_names (const char *s, ffewhereLine l,
ffewhereColumn c);
-ffelexToken ffelex_token_new_number (char *s, ffewhereLine l,
+ffelexToken ffelex_token_new_number (const char *s, ffewhereLine l,
ffewhereColumn c);
ffelexToken ffelex_token_new_simple_ (ffelexType type, ffewhereLine l,
ffewhereColumn c);
diff --git a/contrib/gcc/f/malloc.c b/contrib/gcc/f/malloc.c
index 4560211..b0d31af 100644
--- a/contrib/gcc/f/malloc.c
+++ b/contrib/gcc/f/malloc.c
@@ -1,6 +1,6 @@
/* malloc.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -33,10 +33,6 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "proj.h"
#include "malloc.h"
-/* Assume gcc/toplev.o is linked in. */
-void *xmalloc (unsigned size);
-void *xrealloc (void *ptr, int size);
-
/* Externals defined here. */
struct _malloc_root_ malloc_root_
@@ -52,6 +48,8 @@ struct _malloc_root_ malloc_root_
0,
#if MALLOC_DEBUG
0, 0, 0, 0, 0, 0, 0, { '/' }
+#else
+ { 0 }
#endif
},
};
@@ -72,7 +70,7 @@ struct _malloc_root_ malloc_root_
static void *malloc_reserve_ = NULL; /* For crashes. */
#if MALLOC_DEBUG
-static char *malloc_types_[] =
+static const char *malloc_types_[] =
{"KS", "KSR", "NF", "NFR", "US", "USR"};
#endif
@@ -236,7 +234,7 @@ malloc_pool_kill (mallocPool p)
Makes a new pool with the given name and default new-chunk allocation. */
mallocPool
-malloc_pool_new (char *name, mallocPool parent,
+malloc_pool_new (const char *name, mallocPool parent,
unsigned long chunks UNUSED)
{
mallocPool p;
@@ -386,7 +384,7 @@ malloc_new_ (mallocSize s)
add it to the list of mallocArea_s for the pool. */
void *
-malloc_new_inpool_ (mallocPool pool, mallocType_ type, char *name, mallocSize s)
+malloc_new_inpool_ (mallocPool pool, mallocType_ type, const char *name, mallocSize s)
{
void *ptr;
mallocArea_ a;
@@ -439,7 +437,7 @@ malloc_new_inpool_ (mallocPool pool, mallocType_ type, char *name, mallocSize s)
you pass it a 0). */
void *
-malloc_new_zinpool_ (mallocPool pool, mallocType_ type, char *name, mallocSize s,
+malloc_new_zinpool_ (mallocPool pool, mallocType_ type, const char *name, mallocSize s,
int z)
{
void *ptr;
diff --git a/contrib/gcc/f/malloc.h b/contrib/gcc/f/malloc.h
index ea43276..d9efdf2 100644
--- a/contrib/gcc/f/malloc.h
+++ b/contrib/gcc/f/malloc.h
@@ -1,6 +1,6 @@
/* malloc.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -109,14 +109,14 @@ void malloc_init (void);
void malloc_kill_inpool_ (mallocPool pool, mallocType_ type, void *ptr,
mallocSize size);
void *malloc_new_ (mallocSize size);
-void *malloc_new_inpool_ (mallocPool pool, mallocType_ type, char *name,
+void *malloc_new_inpool_ (mallocPool pool, mallocType_ type, const char *name,
mallocSize size);
-void *malloc_new_zinpool_ (mallocPool pool, mallocType_ type, char *name,
+void *malloc_new_zinpool_ (mallocPool pool, mallocType_ type, const char *name,
mallocSize size, int z);
void malloc_pool_display (mallocPool p);
char malloc_pool_find_ (mallocPool p, mallocPool parent);
void malloc_pool_kill (mallocPool p);
-mallocPool malloc_pool_new (char *name, mallocPool parent, unsigned long chunks);
+mallocPool malloc_pool_new (const char *name, mallocPool parent, unsigned long chunks);
mallocPool malloc_pool_use (mallocPool p);
void *malloc_resize_ (void *ptr, mallocSize new_size);
void *malloc_resize_inpool_ (mallocPool pool, mallocType_ type, void *ptr,
diff --git a/contrib/gcc/f/name.c b/contrib/gcc/f/name.c
index 560f642..360279b 100644
--- a/contrib/gcc/f/name.c
+++ b/contrib/gcc/f/name.c
@@ -1,6 +1,6 @@
/* name.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -167,7 +167,7 @@ ffename_lookup (ffenameSpace ns, ffelexToken t)
ffename_space_drive_global(ns,fn); */
void
-ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) ())
+ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) (ffeglobal))
{
ffename n;
@@ -188,7 +188,7 @@ ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) ())
ffename_space_drive_symbol(ns,fn); */
void
-ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) ())
+ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) (ffesymbol))
{
ffename n;
diff --git a/contrib/gcc/f/name.h b/contrib/gcc/f/name.h
index 8359ed6..6c3499f 100644
--- a/contrib/gcc/f/name.h
+++ b/contrib/gcc/f/name.h
@@ -1,6 +1,6 @@
/* name.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -75,8 +75,8 @@ struct _ffename_space_
ffename ffename_find (ffenameSpace ns, ffelexToken t);
void ffename_kill (ffenameSpace ns, ffename n);
ffename ffename_lookup (ffenameSpace ns, ffelexToken t);
-void ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) ());
-void ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) ());
+void ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) (ffeglobal));
+void ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) (ffesymbol));
void ffename_space_kill (ffenameSpace ns);
ffenameSpace ffename_space_new (mallocPool pool);
diff --git a/contrib/gcc/f/news.texi b/contrib/gcc/f/news.texi
index 3885137..a4b6d68 100644
--- a/contrib/gcc/f/news.texi
+++ b/contrib/gcc/f/news.texi
@@ -2,18 +2,64 @@
@c This is part of the G77 manual.
@c For copying conditions, see the file g77.texi.
-@c The text of this file appears in the file BUGS
+@c The text of this file appears in the file NEWS
@c in the G77 distribution, as well as in the G77 manual.
-@c 1999-03-11
+@c Keep this the same as the dates above, since it's used
+@c in the standalone derivations of this file (e.g. NEWS).
+@set copyrights-news 1995-1999
-@ifclear NEWSONLY
+@set last-update-news 1999-07-08
+
+@include root.texi
+
+@ifset DOC-NEWS
+@c The immediately following lines apply to the NEWS file
+@c which is derived from this file.
+@emph{Note:} This file is automatically generated from the files
+@file{news0.texi} and @file{news.texi}.
+@file{NEWS} is @emph{not} a source file,
+although it is normally included within source distributions.
+
+This file lists news about the @value{which-g77} version
+(and some other versions) of the GNU Fortran compiler.
+Copyright (C) @value{copyrights-news} Free Software Foundation, Inc.
+You may copy, distribute, and modify it freely as long as you preserve
+this copyright notice and permission notice.
+
+@node Top,,, (dir)
+@chapter News About GNU Fortran
+@end ifset
+
+@ifset DOC-G77
+@ifset USERVISONLY
+@node Changes
+@chapter User-visible Changes
+@cindex versions, recent
+@cindex recent versions
+@cindex changes, user-visible
+@cindex user-visible changes
+
+This chapter describes changes to @code{g77} that are visible
+to the programmers who actually write and maintain Fortran
+code they compile with @code{g77}.
+Information on changes to installation procedures,
+changes to the documentation, and bug fixes is
+not provided here, unless it is likely to affect how
+users use @code{g77}.
+@xref{News,,News About GNU Fortran}, for information on
+such changes to @code{g77}.
+@end ifset
+
+@ifclear USERVISONLY
@node News
@chapter News About GNU Fortran
-@end ifclear
@cindex versions, recent
@cindex recent versions
+@end ifclear
+@end ifset
+@ifclear USERVISONLY
Changes made to recent versions of GNU Fortran are listed
below, with the most recent version first.
@@ -45,6 +91,7 @@ Miscellany
This order is not strict---for example, some items
involve a combination of these elements.
+@end ifclear
Note that two variants of @code{g77} are tracked below.
The @code{egcs} variant is described vis-a-vis
@@ -58,35 +105,315 @@ though this can make getting a complete picture
of what a particular @code{egcs} version contains
somewhat more difficult.
+@ifset DOC-G77
+For information on bugs in the @value{which-g77} version of @code{g77},
+see @ref{Known Bugs,,Known Bugs In GNU Fortran}.
+@end ifset
+
+@ifset DOC-BUGS
+For information on bugs in the @value{which-g77} version of @code{g77},
+see @file{@value{path-g77}/BUGS}.
+@end ifset
+
+@ifset DEVELOPMENT
+@emph{Warning:} The information below is still under development,
+and might not accurately reflect the @code{g77} code base
+of which it is a part.
+Efforts are made to keep it somewhat up-to-date,
+but they are particularly concentrated
+on any version of this information
+that is distributed as part of a @emph{released} @code{g77}.
+
+In particular, while this information is intended to apply to
+the @value{which-g77} version of @code{g77},
+only an official @emph{release} of that version
+is expected to contain documentation that is
+most consistent with the @code{g77} product in that version.
+
+Nevertheless, information on @emph{previous} releases of @code{g77}, below,
+is likely to be more up-to-date and accurate
+than the equivalent information that accompanied
+those releases,
+assuming the last-updated date of the information below
+is later than the dates of those releases.
+
+That's due to attempts to keep this development version
+of news about previous @code{g77} versions up-to-date.
+@end ifset
+
+@ifclear USERVISONLY
An online, ``live'' version of this document
-(derived directly from the up-to-date mainline version
+(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 0.5.25, @code{GCC} 2.95 (@code{EGCS} 1.2) versus @code{EGCS} 1.1.2:
+@itemize @bullet
+@ifclear USERVISONLY
+@item
+@code{g77} no longer generates bad code for assignments,
+or other conversions,
+of @code{REAL} or @code{COMPLEX} constant expressions
+to type @code{INTEGER(KIND=2)}
+(often referred to as @code{INTEGER*8}).
+
+For example, @samp{INTEGER*8 J; J = 4E10} now works as documented.
+@end ifclear
+
+@ifclear USERVISONLY
+@item
+@code{g77} no longer truncates @code{INTEGER(KIND=2)}
+(usually @code{INTEGER*8})
+subscript expressions when evaluating array references
+on systems with pointers widers than @code{INTEGER(KIND=1)}
+(such as Alphas).
+@end ifclear
+
+@ifclear USERVISONLY
+@item
+@code{g77} no longer generates bad code
+for an assignment to a @code{COMPLEX} variable or array
+that partially overlaps one or more of the sources
+of the same assignment
+(a very rare construction).
+It now assigns through a temporary,
+in cases where such partial overlap is deemed possible.
+@end ifclear
+
+@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}},
+where @var{j} is other than default @code{INTEGER}
+(such as @code{INTEGER*2}).
+Instead, it issues a diagnostic.
+@end ifclear
+
+@ifclear USERVISONLY
+@item
+Fix @code{g77} so it properly handles @samp{DATA A/@var{rpt}*@var{val}/},
+where @var{rpt} is not default @code{INTEGER}, such as @code{INTEGER*2},
+instead of producing a spurious diagnostic.
+Also fix @samp{DATA (A(I),I=1,N)},
+where @samp{N} is not default @code{INTEGER}
+to work instead of crashing @code{g77}.
+@end ifclear
+
+@ifclear USERVISONLY
+@item
+The @samp{-ax} option is now obeyed when compiling Fortran programs.
+(It is passed to the @file{f771} driver.)
+@end ifclear
+
+@item
+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.
+
+@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}
+now are recognized by @code{g77}
+as if they ended in @samp{.for} and @samp{.fpp}, respectively.
+
+@item
+The order of arguments to the @emph{subroutine} forms of the
+@code{CTime}, @code{DTime}, @code{ETime}, and @code{TtyNam}
+intrinsics has been swapped.
+The argument serving as the returned value
+for the corresponding function forms
+now is the @emph{second} argument,
+making these consistent with the other subroutine forms
+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, @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).
+
+@ifset DOC-G77
+@xref{Year 2000 (Y2K) Problems}, for more information.
+@end ifset
+
+@ifclear USERVISONLY
+@item
+@code{g77} now warns about a reference to a function
+when the corresponding @emph{subsequent} function program unit
+disagrees with the reference concerning the type of the function.
+@end ifclear
+
+@item
+@samp{-fno-emulate-complex} is now the default option.
+This should result in improved performance
+of code that uses the @code{COMPLEX} data type.
+
+@cindex alignment
+@cindex double-precision performance
+@cindex -malign-double
+@item
+The @samp{-malign-double} option
+now reliably aligns @emph{all} double-precision variables and arrays
+on Intel x86 targets.
+
+@ifclear USERVISONLY
+@item
+Even without the @samp{-malign-double} option,
+@code{g77} reliably aligns local double-precision variables
+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,
+when performing operations such as the @code{SqRt} intrinsic.
+
+@ifclear USERVISONLY
+@item
+@code{g77} developers can temporarily use
+the @samp{-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.
+@end ifclear
-@heading In 0.5.24 and @code{egcs} 1.1.2 (versus 0.5.23 and 1.1.1):
+@ifclear USERVISONLY
+@item
+A substantial portion of the @code{g77} front end's code-generation component
+was rewritten.
+It now generates code using facilities more robustly supported
+by the @code{gcc} back end.
+One effect of this rewrite is that some codes no longer produce
+a spurious ``label @var{lab} used before containing binding contour''
+message.
+@end ifclear
+
+@item
+Support for the @samp{-fugly} option has been removed.
+
+@ifclear USERVISONLY
+@item
+Improve documentation and indexing,
+including information on Year 2000 (Y2K) compliance,
+and providing more information on internals of the front end.
+@end ifclear
+
+@ifclear USERVISONLY
+@item
+Upgrade to @code{libf2c} as of 1999-05-10.
+@end ifclear
+@end itemize
+
+@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
-Fix the @code{IDate} Intrinsic (VXT)
+Fix the @code{IDate} intrinsic (VXT) (in @code{libg2c})
so the returned year is in the documented, non-Y2K-compliant range
-of 0--99,
+of 0-99,
instead of being returned as 100 in the year 2000.
+@ifset DOC-G77
+@xref{IDate Intrinsic (VXT)},
+for more information.
+@end ifset
+
@item
-Fix the @samp{Date_and_Time} intrinsic (in @code{libg2c})
+Fix the @code{Date_and_Time} intrinsic (in @code{libg2c})
to return the milliseconds value properly
in @var{Values}(8).
@item
-Fix the @samp{LStat} intrinsic (in @code{libg2c})
+Fix the @code{LStat} intrinsic (in @code{libg2c})
to return device-ID information properly
in @var{SArray}(7).
@item
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
Fix @code{libg2c} so it performs an implicit @code{ENDFILE} operation
@@ -105,67 +432,31 @@ upon doing any I/O following a direct formatted write.
@item
Fix @code{g77} so it no longer crashes compiling references
-to the @samp{Rand} intrinsic on some systems.
+to the @code{Rand} intrinsic on some systems.
@item
Fix @code{g77} portion of installation process so it works
better on some systems
(those with shells requiring @samp{else true} clauses
-on @samp{if} constructs
+on @code{if} constructs
for the completion code to be set properly).
@end itemize
+@end ifclear
-@heading In @code{egcs} 1.1 (versus 0.5.24):
-@itemize @bullet
-@item
-Fix @code{g77} crash compiling code
-containing the construct @samp{CMPLX(0.)} or similar.
-
-@item
-Fix @code{g77} crash
-(or apparently infinite run-time)
-when compiling certain complicated expressions
-involving @code{COMPLEX} arithmetic
-(especially multiplication).
-
-@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 @samp{DNRM2} routine.
-
-The x87 coprocessor stack was being
-mismanaged in cases involving assigned @code{GOTO}
-and @code{ASSIGN}.
-
-@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
-Fix bugs in the @code{libU77} intrinsic @samp{HostNm}
-that wrote one byte beyond the end of its @samp{CHARACTER}
+Fix bugs in the @code{libU77} intrinsic @code{HostNm}
+that wrote one byte beyond the end of its @code{CHARACTER}
argument,
and in the @code{libU77} intrinsics
-@samp{GMTime} and @samp{LTime}
+@code{GMTime} and @code{LTime}
that overwrote their arguments.
+@end ifclear
+@ifclear USERVISONLY
@item
Assumed arrays with negative bounds
(such as @samp{REAL A(-1:*)})
@@ -176,7 +467,9 @@ different sizes than integers.
This bug is not known to have existed in any
recent version of @code{gcc}.
It was introduced in an early release of @code{egcs}.
+@end ifclear
+@ifclear USERVISONLY
@item
Valid combinations of @code{EXTERNAL},
passing that external as a dummy argument
@@ -185,14 +478,19 @@ and, in a subsequent program unit,
referencing that external as
an external function with a different type
no longer crash @code{g77}.
+@end ifclear
+@ifclear USERVISONLY
@item
@code{CASE DEFAULT} no longer crashes @code{g77}.
+@end ifclear
+@ifclear USERVISONLY
@item
The @samp{-Wunused} option no longer issues a spurious
warning about the ``master'' procedure generated by
@code{g77} for procedures containing @code{ENTRY} statements.
+@end ifclear
@item
Support @samp{FORMAT(I<@var{expr}>)} when @var{expr} is a
@@ -200,7 +498,7 @@ compile-time constant @code{INTEGER} expression.
@item
Fix @code{g77} @samp{-g} option so procedures that
-use @samp{ENTRY} can be stepped through, line by line,
+use @code{ENTRY} can be stepped through, line by line,
in @code{gdb}.
@item
@@ -225,6 +523,7 @@ that have their own (non-Fortran) @code{main()} routine
properly set up the @code{libf2c} environment, even
when @code{libf2c} (now @code{libg2c}) is a shared library.
+@ifclear USERVISONLY
@item
@code{g77} no longer installs the @file{f77} command
and @file{f77.1} man page
@@ -232,7 +531,9 @@ in the @file{/usr} or @file{/usr/local} heirarchy,
even if the @file{f77-install-ok} file exists
in the source or build directory.
See the installation documentation for more information.
+@end ifclear
+@ifclear USERVISONLY
@item
@code{g77} no longer installs the @file{libf2c.a} library
and @file{f2c.h} include file
@@ -240,7 +541,9 @@ in the @file{/usr} or @file{/usr/local} heirarchy,
even if the @file{f2c-install-ok} or @file{f2c-exists-ok} files exist
in the source or build directory.
See the installation documentation for more information.
+@end ifclear
+@ifclear USERVISONLY
@item
The @file{libf2c.a} library produced by @code{g77} has been
renamed to @file{libg2c.a}.
@@ -250,7 +553,9 @@ This allows system administrators and users to choose which
version of the @code{libf2c} library from @code{netlib} they
wish to use on a case-by-case basis.
See the installation documentation for more information.
+@end ifclear
+@ifclear USERVISONLY
@item
The @file{f2c.h} include (header) file produced by @code{g77}
has been renamed to @file{g2c.h}.
@@ -260,6 +565,7 @@ This allows system administrators and users to choose which
version of the include file from @code{netlib} they
wish to use on a case-by-case basis.
See the installation documentation for more information.
+@end ifclear
@item
The @code{g77} command now expects the run-time library
@@ -267,17 +573,21 @@ to be named @code{libg2c.a} instead of @code{libf2c.a},
to ensure that a version other than the one built and
installed as part of the same @code{g77} version is picked up.
+@ifclear USERVISONLY
@item
During the configuration and build process,
@code{g77} creates subdirectories it needs only as it
needs them.
Other cleaning up of the configuration and build process
has been performed as well.
+@end ifclear
+@ifclear USERVISONLY
@item
@code{install-info} now used to update the directory of
Info documentation to contain an entry for @code{g77}
(during installation).
+@end ifclear
@item
Some diagnostics have been changed from warnings to errors,
@@ -288,41 +598,76 @@ in the @code{OPEN}, @code{INQUIRE}, @code{READ}, and
@code{WRITE} statements,
and about truncations of various sorts of constants.
+@ifclear USERVISONLY
@item
Improve compilation of @code{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 @code{libf2c} for statements like @samp{PRINT '(I1', 42}.
+@end ifclear
+@ifclear USERVISONLY
@item
Improve documentation and indexing.
+@end ifclear
+@ifclear USERVISONLY
@item
The upgrade to @code{libf2c} as of 1998-06-18
should fix a variety of problems, including
-those involving some uses of the @samp{T} format
+those involving some uses of the @code{T} format
specifier, and perhaps some build (porting) problems
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
-for @samp{EQUIVALENCE} and @samp{COMMON}
+for @code{EQUIVALENCE} and @code{COMMON}
aggregates that, due to ``unnatural'' ordering of members
vis-a-vis their types, require initial padding.
+@end ifclear
+@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}.
+@end ifclear
+@ifclear USERVISONLY
@item
@code{g77} no longer crashes when compiling code
such as @samp{J = SIGNAL(1, 2)}.
+@end ifclear
@item
@code{g77} now treats @samp{%LOC(@var{expr})} and
@@ -337,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
@@ -353,31 +719,48 @@ in @code{libf2c} (@code{libg2c}).
This new information allows, for example,
@kbd{which __g77_length_a} to be used in @code{gdb}
to determine the type of the phantom length argument
-supplied with @samp{CHARACTER} variables.
+supplied with @code{CHARACTER} variables.
This information pertains to internally-generated
type, variable, and other information,
not to the longstanding deficiencies vis-a-vis
-@samp{COMMON} and @samp{EQUIVALENCE}.
+@code{COMMON} and @code{EQUIVALENCE}.
@item
-The F90 @samp{Date_and_Time} intrinsic now is
+The F90 @code{Date_and_Time} intrinsic now is
supported.
@item
-The F90 @samp{System_Clock} intrinsic allows
-the optional arguments (except for the @samp{Count}
+The F90 @code{System_Clock} intrinsic allows
+the optional arguments (except for the @code{Count}
argument) to be omitted.
+@ifclear USERVISONLY
@item
Upgrade to @code{libf2c} as of 1998-06-18.
+@end ifclear
+@ifclear USERVISONLY
@item
Improve documentation and indexing.
+@end ifclear
@end itemize
+@ifset DOC-NEWS
+@heading In previous versions:
+
+Information on previous versions is not provided
+in this @file{@value{path-g77}/NEWS} file,
+to keep it short.
+See @file{@value{path-g77}/news.texi},
+or any of its other derivations
+(Info, HTML, dvi forms)
+for such information.
+@end ifset
+
+@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
@@ -386,24 +769,12 @@ version 0.5.22 of @code{g77}, due to using the
it to fix a few bugs and improve performance in a
few cases.
-@ifset last-up-date
-@xref{Actual Bugs,,Actual Bugs We Haven't Fixed Yet},
-for information on the known bugs in this version,
-including the regressions.
-@end ifset
-
-@ifset NEWSONLY
-See @file{egcs/gcc/f/BUGS},
-for information on the known bugs in this version,
-including the regressions.
-@end ifset
-
Features that have been dropped from this version
of @code{g77} due to their being implemented
via @code{g77}-specific patches to the @code{gcc}
back end in previous releases include:
-@itemize --
+@itemize @minus
@item
Support for @code{__restrict__} keyword,
the options @samp{-fargument-alias}, @samp{-fargument-noalias},
@@ -437,33 +808,40 @@ applying to stack-allocated data
as well as statically-allocate data.
@end itemize
+@ifclear USERVISONLY
Note that the @file{gcc/f/gbe/} subdirectory has been removed
from this distribution as a result of @code{g77} no longer
including patches for the @code{gcc} back end.
+@end ifclear
+@ifclear USERVISONLY
@item
-Fix bugs in the @code{libU77} intrinsic @samp{HostNm}
-that wrote one byte beyond the end of its @samp{CHARACTER}
+Fix bugs in the @code{libU77} intrinsic @code{HostNm}
+that wrote one byte beyond the end of its @code{CHARACTER}
argument,
and in the @code{libU77} intrinsics
-@samp{GMTime} and @samp{LTime}
+@code{GMTime} and @code{LTime}
that overwrote their arguments.
+@end ifclear
@item
Support @code{gcc} version 2.8,
and remove support for prior versions of @code{gcc}.
@cindex -@w{}-driver option
-@cindex g77 options, -@w{}-driver
+@cindex @code{g77} options, -@w{}-driver
@cindex options, -@w{}-driver
@item
Remove support for the @samp{--driver} option,
as @code{g77} now does all the driving,
just like @code{gcc}.
+@ifclear USERVISONLY
@item
@code{CASE DEFAULT} no longer crashes @code{g77}.
+@end ifclear
+@ifclear USERVISONLY
@item
Valid combinations of @code{EXTERNAL},
passing that external as a dummy argument
@@ -472,7 +850,9 @@ and, in a subsequent program unit,
referencing that external as
an external function with a different type
no longer crash @code{g77}.
+@end ifclear
+@ifclear USERVISONLY
@item
@code{g77} no longer installs the @file{f77} command
and @file{f77.1} man page
@@ -480,7 +860,9 @@ in the @file{/usr} or @file{/usr/local} heirarchy,
even if the @file{f77-install-ok} file exists
in the source or build directory.
See the installation documentation for more information.
+@end ifclear
+@ifclear USERVISONLY
@item
@code{g77} no longer installs the @file{libf2c.a} library
and @file{f2c.h} include file
@@ -488,7 +870,9 @@ in the @file{/usr} or @file{/usr/local} heirarchy,
even if the @file{f2c-install-ok} or @file{f2c-exists-ok} files exist
in the source or build directory.
See the installation documentation for more information.
+@end ifclear
+@ifclear USERVISONLY
@item
The @file{libf2c.a} library produced by @code{g77} has been
renamed to @file{libg2c.a}.
@@ -498,7 +882,9 @@ This allows system administrators and users to choose which
version of the @code{libf2c} library from @code{netlib} they
wish to use on a case-by-case basis.
See the installation documentation for more information.
+@end ifclear
+@ifclear USERVISONLY
@item
The @file{f2c.h} include (header) file produced by @code{g77}
has been renamed to @file{g2c.h}.
@@ -508,6 +894,7 @@ This allows system administrators and users to choose which
version of the include file from @code{netlib} they
wish to use on a case-by-case basis.
See the installation documentation for more information.
+@end ifclear
@item
The @code{g77} command now expects the run-time library
@@ -515,10 +902,12 @@ to be named @code{libg2c.a} instead of @code{libf2c.a},
to ensure that a version other than the one built and
installed as part of the same @code{g77} version is picked up.
+@ifclear USERVISONLY
@item
The @samp{-Wunused} option no longer issues a spurious
warning about the ``master'' procedure generated by
@code{g77} for procedures containing @code{ENTRY} statements.
+@end ifclear
@item
@code{g77}'s version of @code{libf2c} separates out
@@ -532,6 +921,7 @@ that have their own (non-Fortran) @code{main()} routine
properly set up the @code{libf2c} environment, even
when @code{libf2c} (now @code{libg2c}) is a shared library.
+@ifclear USERVISONLY
@item
During the configuration and build process,
@code{g77} creates subdirectories it needs only as it
@@ -539,11 +929,14 @@ needs them, thus avoiding unnecessary creation of, for example,
@file{stage1/f/runtime} when doing a non-bootstrap build.
Other cleaning up of the configuration and build process
has been performed as well.
+@end ifclear
+@ifclear USERVISONLY
@item
@code{install-info} now used to update the directory of
Info documentation to contain an entry for @code{g77}
(during installation).
+@end ifclear
@item
Some diagnostics have been changed from warnings to errors,
@@ -554,27 +947,34 @@ in the @code{OPEN}, @code{INQUIRE}, @code{READ}, and
@code{WRITE} statements,
and about truncations of various sorts of constants.
+@ifclear USERVISONLY
@item
Improve documentation and indexing.
+@end ifclear
+@ifclear USERVISONLY
@item
Upgrade to @code{libf2c} as of 1998-04-20.
This should fix a variety of problems, including
-those involving some uses of the @samp{T} format
+those involving some uses of the @code{T} format
specifier, and perhaps some build (porting) problems
as well.
+@end ifclear
@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
Fix code generation for iterative @code{DO} loops that
have one or more references to the iteration variable,
or to aliases of it, in their control expressions.
For example, @samp{DO 10 J=2,J} now is compiled correctly.
+@end ifclear
+@ifclear USERVISONLY
@cindex DNRM2
@cindex stack, 387 coprocessor
@cindex Intel x86
@@ -583,54 +983,71 @@ For example, @samp{DO 10 J=2,J} now is compiled correctly.
Fix a code-generation bug that afflicted
Intel x86 targets when @samp{-O2} was specified
compiling, for example, an old version of
-the @samp{DNRM2} routine.
+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
Fix @code{DTime} intrinsic so as not to truncate
results to integer values (on some systems).
+@end ifclear
@item
Fix @code{Signal} intrinsic so it offers portable
support for 64-bit systems (such as Digital Alphas
running GNU/Linux).
+@ifclear USERVISONLY
@item
Fix run-time crash involving @code{NAMELIST} on 64-bit
machines such as Alphas.
+@end ifclear
+@ifclear USERVISONLY
@item
Fix @code{g77} version of @code{libf2c} so it no longer
produces a spurious @samp{I/O recursion} diagnostic at run time
when an I/O operation (such as @samp{READ *,I}) is interrupted
in a manner that causes the program to be terminated
-via the @samp{f_exit} routine (such as via @kbd{C-c}).
+via the @code{f_exit} routine (such as via @kbd{C-c}).
+@end ifclear
+@ifclear USERVISONLY
@item
Fix @code{g77} crash triggered by @code{CASE} statement with
an omitted lower or upper bound.
+@end ifclear
+@ifclear USERVISONLY
@item
Fix @code{g77} crash compiling references to @code{CPU_Time}
intrinsic.
+@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
@item
Fix @code{g77} crash on statements such as
@samp{PRINT *, (REAL(Z(I)),I=1,2)}, where
@samp{Z} is @code{DOUBLE COMPLEX}.
+@end ifclear
+@ifclear USERVISONLY
@item
Fix a @code{g++} crash.
+@end ifclear
@item
Support @samp{FORMAT(I<@var{expr}>)} when @var{expr} is a
@@ -638,12 +1055,14 @@ compile-time constant @code{INTEGER} expression.
@item
Fix @code{g77} @samp{-g} option so procedures that
-use @samp{ENTRY} can be stepped through, line by line,
+use @code{ENTRY} can be stepped through, line by line,
in @code{gdb}.
+@ifclear USERVISONLY
@item
Fix a profiling-related bug in @code{gcc} back end for
Intel x86 architecture.
+@end ifclear
@item
Allow any @code{REAL} argument to intrinsics
@@ -666,9 +1085,11 @@ C programs.
Support for @code{restrict} is now more like support
for @code{complex}.
+@ifclear USERVISONLY
@item
Fix @samp{-fpedantic} to not reject procedure invocations
such as @samp{I=J()} and @samp{CALL FOO()}.
+@end ifclear
@item
Fix @samp{-fugly-comma} to affect invocations of
@@ -680,6 +1101,7 @@ arguments to intrinsics, as in @samp{I=MAX(3,4,,)}.
Fix compiler so it accepts @samp{-fgnu-intrinsics-*} and
@samp{-fbadu77-intrinsics-*} options.
+@ifclear USERVISONLY
@item
Improve diagnostic messages from @code{libf2c}
so it is more likely that the printing of the
@@ -692,45 +1114,63 @@ format string specified via a @code{FORMAT} statement.
However, @code{f2c} would exhibit the problem
anyway for a statement like @samp{PRINT '(I)garbage', 1}
by printing @samp{(I)garbage} as the format string.)
+@end ifclear
+@ifclear USERVISONLY
@item
Improve compilation of @code{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 @code{libf2c} for statements like @samp{PRINT '(I1', 42}.
+@end ifclear
+@ifclear USERVISONLY
@item
Fix various crashes involving code with diagnosed errors.
+@end ifclear
+@ifclear USERVISONLY
@item
Fix cross-compilation bug when configuring @code{libf2c}.
+@end ifclear
+@ifclear USERVISONLY
@item
Improve diagnostics.
+@end ifclear
+@ifclear USERVISONLY
@item
Improve documentation and indexing.
+@end ifclear
+@ifclear USERVISONLY
@item
Upgrade to @code{libf2c} as of 1997-09-23.
This fixes a formatted-I/O bug that afflicted
64-bit systems with 32-bit integers
(such as Digital Alpha running GNU/Linux).
+@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
Fix @code{g77} crash triggered by @code{CASE} statement with
an omitted lower or upper bound.
+@end ifclear
+@ifclear USERVISONLY
@item
Fix @code{g77} crash on statements such as
@samp{PRINT *, (REAL(Z(I)),I=1,2)}, where
@samp{Z} is @code{DOUBLE COMPLEX}.
+@end ifclear
+@ifclear USERVISONLY
@cindex ELF support
@cindex support, ELF
@cindex -fPIC option
@@ -739,32 +1179,39 @@ Fix @code{g77} crash on statements such as
Fix @samp{-fPIC} (such as compiling for ELF targets)
on the Intel x86 architecture target
so invalid assembler code is no longer produced.
+@end ifclear
+@ifclear USERVISONLY
@item
Fix @samp{-fpedantic} to not reject procedure invocations
such as @samp{I=J()} and @samp{CALL FOO()}.
+@end ifclear
+@ifclear USERVISONLY
@item
Fix @samp{-fugly-comma} to affect invocations of
only external procedures.
Restore rejection of gratuitous trailing omitted
arguments to intrinsics, as in @samp{I=MAX(3,4,,)}.
+@end ifclear
@item
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
Fix run-time crash involving @code{NAMELIST} on 64-bit
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}
@@ -775,24 +1222,12 @@ due to using the
it to fix a few bugs and improve performance in a
few cases.
-@ifset last-up-date
-@xref{Actual Bugs,,Actual Bugs We Haven't Fixed Yet},
-for information on the known bugs in this version,
-including the regressions.
-@end ifset
-
-@ifset NEWSONLY
-See @file{egcs/gcc/f/BUGS},
-for information on the known bugs in this version,
-including the regressions.
-@end ifset
-
Features that have been dropped from this version
of @code{g77} due to their being implemented
via @code{g77}-specific patches to the @code{gcc}
back end in previous releases include:
-@itemize --
+@itemize @minus
@item
Support for the C-language @code{restrict} keyword.
@@ -806,26 +1241,48 @@ applying to stack-allocated data
as well as statically-allocate data.
@end itemize
+@ifclear USERVISONLY
Note that the @file{gcc/f/gbe/} subdirectory has been removed
from this distribution as a result of @code{g77}
being fully integrated with
the @code{egcs} variant of the @code{gcc} back end.
+@end ifclear
+@ifclear USERVISONLY
@item
Fix code generation for iterative @code{DO} loops that
have one or more references to the iteration variable,
or to aliases of it, in their control expressions.
For example, @samp{DO 10 J=2,J} now is compiled correctly.
+@end ifclear
+@ifclear USERVISONLY
@item
Fix @code{DTime} intrinsic so as not to truncate
results to integer values (on some systems).
+@end ifclear
+@ifclear USERVISONLY
+@item
+@c Toon Moene discovered these.
+Some Fortran code, miscompiled
+by @code{g77} built on @code{gcc} version 2.8.1
+on m68k-next-nextstep3 configurations
+when using the @samp{-O2} option,
+is now compiled correctly.
+It is believed that a C function known to miscompile
+on that configuration
+when using the @samp{-O2 -funroll-loops} options
+also is now compiled correctly.
+@end ifclear
+
+@ifclear USERVISONLY
@item
Remove support for non-@code{egcs} versions of @code{gcc}.
+@end ifclear
@cindex -@w{}-driver option
-@cindex g77 options, -@w{}-driver
+@cindex @code{g77} options, -@w{}-driver
@cindex options, -@w{}-driver
@item
Remove support for the @samp{--driver} option,
@@ -836,6 +1293,7 @@ just like @code{gcc}.
Allow any numeric argument to intrinsics
@code{Int2} and @code{Int8}.
+@ifclear USERVISONLY
@item
Improve diagnostic messages from @code{libf2c}
so it is more likely that the printing of the
@@ -848,17 +1306,21 @@ format string specified via a @code{FORMAT} statement.
However, @code{f2c} would exhibit the problem
anyway for a statement like @samp{PRINT '(I)garbage', 1}
by printing @samp{(I)garbage} as the format string.)
+@end ifclear
+@ifclear USERVISONLY
@item
Upgrade to @code{libf2c} as of 1997-09-23.
This fixes a formatted-I/O bug that afflicted
64-bit systems with 32-bit integers
(such as Digital Alpha running GNU/Linux).
+@end ifclear
@end itemize
@c 1997-09-09: 0.5.21 released.
@heading In 0.5.21:
@itemize @bullet
+@ifclear USERVISONLY
@item
Fix a code-generation bug introduced by 0.5.20
caused by loop unrolling (by specifying
@@ -866,7 +1328,9 @@ caused by loop unrolling (by specifying
This bug afflicted all code compiled by
version 2.7.2.2.f.2 of @code{gcc} (C, C++,
Fortran, and so on).
+@end ifclear
+@ifclear USERVISONLY
@item
Fix a code-generation bug manifested when
combining local @code{EQUIVALENCE} with a
@@ -875,7 +1339,9 @@ the first executable statement (or is
treated as an executable-context statement
as a result of using the @samp{-fpedantic}
option).
+@end ifclear
+@ifclear USERVISONLY
@item
Fix a compiler crash that occured when an
integer division by a constant zero is detected.
@@ -884,34 +1350,52 @@ the @code{gcc} back end issues a warning about such a case.
This bug afflicted all code compiled by
version 2.7.2.2.f.2 of @code{gcc} (C, C++,
Fortran, and so on).
+@end ifclear
+@ifset USERVISONLY
+@item
+When the @samp{-W} option is specified, @code{gcc}, @code{g77},
+and other GNU compilers that incorporate the @code{gcc}
+back end as modified by @code{g77}, issue
+a warning about integer division by constant zero.
+@end ifset
+@ifclear USERVISONLY
@item
Fix a compiler crash that occurred in some cases
of procedure inlining.
(Such cases became more frequent in 0.5.20.)
+@end ifclear
+@ifclear USERVISONLY
@item
Fix a compiler crash resulting from using @code{DATA}
or similar to initialize a @code{COMPLEX} variable or
array to zero.
+@end ifclear
+@ifclear USERVISONLY
@item
Fix compiler crashes involving use of @code{AND}, @code{OR},
or @code{XOR} intrinsics.
+@end ifclear
+@ifclear USERVISONLY
@item
Fix compiler bug triggered when using a @code{COMMON}
or @code{EQUIVALENCE} variable
as the target of an @code{ASSIGN}
or assigned-@code{GOTO} statement.
+@end ifclear
+@ifclear USERVISONLY
@item
Fix compiler crashes due to using the name of a some
-non-standard intrinsics (such as @samp{FTELL} or
-@samp{FPUTC}) as such and as the name of a procedure
+non-standard intrinsics (such as @code{FTell} or
+@code{FPutC}) as such and as the name of a procedure
or common block.
Such dual use of a name in a program is allowed by
the standard.
+@end ifclear
@c @code{g77}'s version of @code{libf2c} has been modified
@c so that the external names of library's procedures do not
@@ -924,30 +1408,34 @@ the standard.
@c
@c For example, the intrinsic @code{FPUTC} previously was
@c implemented by @code{g77} as a call to the @code{libf2c}
-@c routine @samp{fputc_}.
+@c routine @code{fputc_}.
@c This would conflict with a Fortran procedure named @code{FPUTC}
@c (using default compiler options), and this conflict
@c would cause a crash under certain circumstances.
@c
-@c Now, the intrinsic @code{FPUTC} calls @samp{G77_fputc_0},
-@c which does not conflict with the @samp{fputc_} external
+@c Now, the intrinsic @code{FPUTC} calls @code{G77_fputc_0},
+@c which does not conflict with the @code{fputc_} external
@c that implements a Fortran procedure named @code{FPUTC}.
@c
@c Programs that refer to @code{FPUTC} as an external procedure
@c without supplying their own implementation will link to
-@c the new @code{libf2c} routine @samp{fputc_}, which is
-@c simply a jacket routine that calls @samp{G77_fputc_0}.
+@c the new @code{libf2c} routine @code{fputc_}, which is
+@c simply a jacket routine that calls @code{G77_fputc_0}.
+@ifclear USERVISONLY
@item
Place automatic arrays on the stack, even if
@code{SAVE} or the @samp{-fno-automatic} option
is in effect.
This avoids a compiler crash in some cases.
+@end ifclear
+@ifclear USERVISONLY
@item
The @samp{-malign-double} option now reliably aligns
@code{DOUBLE PRECISION} optimally on Pentium and
Pentium Pro architectures (586 and 686 in @code{gcc}).
+@end ifclear
@item
New option @samp{-Wno-globals} disables warnings
@@ -977,41 +1465,53 @@ This option also disables inlining of global procedures,
to avoid compiler crashes resulting from coding errors
that these diagnostics normally would identify.
+@ifclear USERVISONLY
@item
Diagnose cases where a reference to a procedure
disagrees with the type of that procedure, or
where disagreements about the number or nature
of arguments exist.
This avoids a compiler crash.
+@end ifclear
+@ifclear USERVISONLY
@item
Fix parsing bug whereby @code{g77} rejected a
second initialization specification immediately
following the first's closing @samp{/} without
an intervening comma in a @code{DATA} statement,
and the second specification was an implied-DO list.
+@end ifclear
+@ifclear USERVISONLY
@item
Improve performance of the @code{gcc} back end so
certain complicated expressions involving @code{COMPLEX}
arithmetic (especially multiplication) don't appear to
take forever to compile.
+@end ifclear
+@ifclear USERVISONLY
@item
Fix a couple of profiling-related bugs in @code{gcc}
back end.
+@end ifclear
+@ifclear USERVISONLY
@item
Integrate GNU Ada's (GNAT's) changes to the back end,
which consist almost entirely of bug fixes.
These fixes are circa version 3.10p of GNAT.
+@end ifclear
+@ifclear USERVISONLY
@item
Include some other @code{gcc} fixes that seem useful in
@code{g77}'s version of @code{gcc}.
(See @file{gcc/ChangeLog} for details---compare it
to that file in the vanilla @code{gcc-2.7.2.3.tar.gz}
distribution.)
+@end ifclear
@item
Fix @code{libU77} routines that accept file and other names
@@ -1027,13 +1527,15 @@ that have embedded blanks, commas, and so on.
@item
Fix @code{SIGNAL} intrinsic so it accepts an
-optional third @samp{Status} argument.
+optional third @code{Status} argument.
+@ifclear USERVISONLY
@item
Fix @code{IDATE()} intrinsic subroutine (VXT form)
so it accepts arguments in the correct order.
Documentation fixed accordingly, and for
@code{GMTIME()} and @code{LTIME()} as well.
+@end ifclear
@item
Make many changes to @code{libU77} intrinsics to
@@ -1047,42 +1549,57 @@ return @code{INTEGER(KIND=2)} values,
and placing functions that are intended to perform
side effects in a new intrinsic group, @code{badu77}.
+@ifclear USERVISONLY
@item
Improve @code{libU77} so it is more portable.
+@end ifclear
@item
Add options @samp{-fbadu77-intrinsics-delete},
@samp{-fbadu77-intrinsics-hide}, and so on.
+@ifclear USERVISONLY
@item
Fix crashes involving diagnosed or invalid code.
+@end ifclear
+@ifclear USERVISONLY
@item
@code{g77} and @code{gcc} now do a somewhat better
job detecting and diagnosing arrays that are too
large to handle before these cause diagnostics
during the assembler or linker phase, a compiler
crash, or generation of incorrect code.
+@end ifclear
+@ifclear USERVISONLY
@item
Make some fixes to alias analysis code.
+@end ifclear
+@ifclear USERVISONLY
@item
Add support for @code{restrict} keyword in @code{gcc}
front end.
+@end ifclear
+@ifclear USERVISONLY
@item
Support @code{gcc} version 2.7.2.3
(modified by @code{g77} into version 2.7.2.3.f.1),
and remove
support for prior versions of @code{gcc}.
+@end ifclear
+@ifclear USERVISONLY
@item
Incorporate GNAT's patches to the @code{gcc} back
end into @code{g77}'s, so GNAT users do not need
to apply GNAT's patches to build both GNAT and @code{g77}
from the same source tree.
+@end ifclear
+@ifclear USERVISONLY
@item
Modify @code{make} rules and related code so that
generation of Info documentation doesn't require
@@ -1090,6 +1607,7 @@ compilation using @code{gcc}.
Now, any ANSI C compiler should be adequate to
produce the @code{g77} documentation (in particular,
the tables of intrinsics) from scratch.
+@end ifclear
@item
Add @code{INT2} and @code{INT8} intrinsics.
@@ -1104,46 +1622,64 @@ Add @code{ALARM} intrinsic.
@code{CTIME} intrinsic now accepts any @code{INTEGER}
argument, not just @code{INTEGER(KIND=2)}.
+@ifclear USERVISONLY
@item
Warn when explicit type declaration disagrees with
the type of an intrinsic invocation.
+@end ifclear
+@ifclear USERVISONLY
@item
Support @samp{*f771} entry in @code{gcc} @file{specs} file.
+@end ifclear
+@ifclear USERVISONLY
@item
-Fix typo in @code{make} rule @samp{g77-cross}, used only for
+Fix typo in @code{make} rule @code{g77-cross}, used only for
cross-compiling.
+@end ifclear
+@ifclear USERVISONLY
@item
Fix @code{libf2c} build procedure to re-archive library
if previous attempt to archive was interrupted.
+@end ifclear
+@ifclear USERVISONLY
@item
Change @code{gcc} to unroll loops only during the last
invocation (of as many as two invocations) of loop
optimization.
+@end ifclear
+@ifclear USERVISONLY
@item
Improve handling of @samp{-fno-f2c} so that code that
attempts to pass an intrinsic as an actual argument,
such as @samp{CALL FOO(ABS)}, is rejected due to the fact
that the run-time-library routine is, effectively,
compiled with @samp{-ff2c} in effect.
+@end ifclear
+@ifclear USERVISONLY
@item
Fix @code{g77} driver to recognize @samp{-fsyntax-only}
as an option that inhibits linking, just like @samp{-c} or
@samp{-S}, and to recognize and properly handle the
@samp{-nostdlib}, @samp{-M}, @samp{-MM}, @samp{-nodefaultlibs},
and @samp{-Xlinker} options.
+@end ifclear
+@ifclear USERVISONLY
@item
Upgrade to @code{libf2c} as of 1997-08-16.
+@end ifclear
+@ifclear USERVISONLY
@item
Modify @code{libf2c} to consistently and clearly diagnose
recursive I/O (at run time).
+@end ifclear
@item
@code{g77} driver now prints version information (such as produced
@@ -1154,26 +1690,36 @@ The @samp{.r} suffix now designates a Ratfor source file,
to be preprocessed via the @code{ratfor} command, available
separately.
+@ifclear USERVISONLY
@item
Fix some aspects of how @code{gcc} determines what kind of
system is being configured and what kinds are supported.
For example, GNU Linux/Alpha ELF systems now are directly
supported.
+@end ifclear
+@ifclear USERVISONLY
@item
Improve diagnostics.
+@end ifclear
+@ifclear USERVISONLY
@item
Improve documentation and indexing.
+@end ifclear
+@ifclear USERVISONLY
@item
Include all pertinent files for @code{libf2c} that come
from @code{netlib.bell-labs.com}; give any such files
that aren't quite accurate in @code{g77}'s version of
@code{libf2c} the suffix @samp{.netlib}.
+@end ifclear
+@ifclear USERVISONLY
@item
Reserve @code{INTEGER(KIND=0)} for future use.
+@end ifclear
@end itemize
@c 1997-02-28: 0.5.20 released.
@@ -1184,13 +1730,18 @@ The @samp{-fno-typeless-boz} option is now the default.
This option specifies that non-decimal-radix
constants using the prefixed-radix form (such as @samp{Z'1234'})
-are to be interpreted as @code{INTEGER} constants.
+are to be interpreted as @code{INTEGER(KIND=1)} constants.
Specify @samp{-ftypeless-boz} to cause such
constants to be interpreted as typeless.
(Version 0.5.19 introduced @samp{-fno-typeless-boz} and
its inverse.)
+@ifset DOC-G77
+@xref{Fortran Dialect Options,,Options Controlling Fortran Dialect},
+for information on the @samp{-ftypeless-boz} option.
+@end ifset
+
@item
Options @samp{-ff90-intrinsics-enable} and
@samp{-fvxt-intrinsics-enable} now are the
@@ -1206,15 +1757,19 @@ statements specifying that these names are not intended
to be names of intrinsics.
@item
-The @samp{ALWAYS_FLUSH} macro is no longer defined when
+The @code{ALWAYS_FLUSH} macro is no longer defined when
building @code{libf2c}, which should result in improved
I/O performance, especially over NFS.
@emph{Note:} If you have code that depends on the behavior
-of @code{libf2c} when built with @samp{ALWAYS_FLUSH} defined,
+of @code{libf2c} when built with @code{ALWAYS_FLUSH} defined,
you will have to modify @code{libf2c} accordingly before
building it from this and future versions of @code{g77}.
+@ifset DOC-G77
+@xref{Output Assumed To Flush}, for more information.
+@end ifset
+
@item
Dave Love's implementation of @code{libU77} has been
added to the version of @code{libf2c} distributed with
@@ -1226,6 +1781,11 @@ as intrinsics.
New option @samp{-fvxt} specifies that the
source file is written in VXT Fortran, instead of GNU Fortran.
+@ifset DOC-G77
+@xref{VXT Fortran}, for more information on the constructs
+recognized when the @samp{-fvxt} option is specified.
+@end ifset
+
@item
The @samp{-fvxt-not-f90} option has been deleted,
along with its inverse, @samp{-ff90-not-vxt}.
@@ -1235,6 +1795,10 @@ re-read the pertinent documentation to determine which
options, if any, are appropriate for compiling your
code with this version of @code{g77}.
+@ifset DOC-G77
+@xref{Other Dialects}, for more information.
+@end ifset
+
@item
The @samp{-fugly} option now issues a warning, as it
likely will be removed in a future version.
@@ -1250,23 +1814,35 @@ The @samp{-fugly-assumed} option, introduced in
version 0.5.19, has been changed to
better accommodate old and new code.
+@ifset DOC-G77
+@xref{Ugly Assumed-Size Arrays}, for more information.
+@end ifset
+
+@ifclear USERVISONLY
@item
Make a number of fixes to the @code{g77} front end and
the @code{gcc} back end to better support Alpha (AXP)
machines.
This includes providing at least one bug-fix to the
@code{gcc} back end for Alphas.
+@end ifclear
@item
Related to supporting Alpha (AXP) machines, the @code{LOC()}
intrinsic and @code{%LOC()} construct now return
-values of integer type that is the same width (holds
-the same number of bits) as the pointer type on the
-machine.
+values of @code{INTEGER(KIND=0)} type,
+as defined by the GNU Fortran language.
-On most machines, this won't make a difference, whereas
-on Alphas, the type these constructs return is
-@code{INTEGER*8} instead of the more common @code{INTEGER*4}.
+This type is wide enough
+(holds the same number of bits)
+as the character-pointer type on the machine.
+
+On most machines, this won't make a difference,
+whereas, on Alphas and other systems with 64-bit pointers,
+the @code{INTEGER(KIND=0)} type is equivalent to @code{INTEGER(KIND=2)}
+(often referred to as @code{INTEGER*8})
+instead of the more common @code{INTEGER(KIND=1)}
+(often referred to as @code{INTEGER*4}).
@item
Emulate @code{COMPLEX} arithmetic in the @code{g77} front
@@ -1275,19 +1851,24 @@ end, to avoid bugs in @code{complex} support in the
New option @samp{-fno-emulate-complex}
causes @code{g77} to revert the 0.5.19 behavior.
+@ifclear USERVISONLY
@item
Fix bug whereby @samp{REAL A(1)}, for example, caused
a compiler crash if @samp{-fugly-assumed} was in effect
and @var{A} was a local (automatic) array.
That case is no longer affected by the new
handling of @samp{-fugly-assumed}.
+@end ifclear
+@ifclear USERVISONLY
@item
Fix @code{g77} command driver so that @samp{g77 -o foo.f}
no longer deletes @file{foo.f} before issuing other
diagnostics, and so the @samp{-x} option is properly
handled.
+@end ifclear
+@ifclear USERVISONLY
@item
Enable inlining of subroutines and functions by the @code{gcc}
back end.
@@ -1295,6 +1876,7 @@ This works as it does for @code{gcc} itself---program units
may be inlined for invocations that follow them in the same
program unit, as long as the appropriate compile-time
options are specified.
+@end ifclear
@item
Dummy arguments are no longer assumed to potentially alias
@@ -1312,10 +1894,19 @@ New options @samp{-falias-check}, @samp{-fargument-alias},
and @samp{-fno-argument-noalias-global} control the
way @code{g77} handles potential aliasing.
+@ifset DOC-G77
+@xref{Aliasing Assumed To Work}, for detailed information on why the
+new defaults might result in some programs no longer working the way they
+did when compiled by previous versions of @code{g77}.
+@end ifset
+
+@ifclear USERVISONLY
@item
The @code{CONJG()} and @code{DCONJG()} intrinsics now
are compiled in-line.
+@end ifclear
+@ifclear USERVISONLY
@item
The bug-fix for 0.5.19.1 has been re-done.
The @code{g77} compiler has been changed back to
@@ -1340,6 +1931,7 @@ particular, if the linker complains about unresolved
references to names like @samp{g77__fvers__}---that
strongly suggests your installation has an obsolete
version of @code{libf2c}.)
+@end ifclear
@item
New option @samp{-fugly-assign} specifies that the
@@ -1349,17 +1941,26 @@ values assigned by both statements @samp{I = 3} and
(Normally, @code{g77} uses a separate memory location
to hold assigned statement labels.)
+@ifset DOC-G77
+@xref{Ugly Assigned Labels}, for more information.
+@end ifset
+
@item
@code{FORMAT} and @code{ENTRY} statements now are allowed to
precede @code{IMPLICIT NONE} statements.
+@ifclear USERVISONLY
@item
Produce diagnostic for unsupported @code{SELECT CASE} on
@code{CHARACTER} type, instead of crashing, at compile time.
+@end ifclear
+@ifclear USERVISONLY
@item
Fix crashes involving diagnosed or invalid code.
+@end ifclear
+@ifclear USERVISONLY
@item
Change approach to building @code{libf2c} archive
(@file{libf2c.a}) so that members are added to it
@@ -1368,27 +1969,36 @@ an already-built @code{g77} doesn't need to have write
access to the build tree (whereas the user doing the
build might not have access to install new software
on the system).
+@end ifclear
+@ifclear USERVISONLY
@item
Support @code{gcc} version 2.7.2.2
(modified by @code{g77} into version 2.7.2.2.f.2),
and remove
support for prior versions of @code{gcc}.
+@end ifclear
+@ifclear USERVISONLY
@item
Upgrade to @code{libf2c} as of 1997-02-08, and
fix up some of the build procedures.
+@end ifclear
+@ifclear USERVISONLY
@item
Improve general build procedures for @code{g77},
fixing minor bugs (such as deletion of any file
named @file{f771} in the parent directory of @code{gcc/}).
+@end ifclear
@item
-Enable full support of @code{INTEGER*8} available in
+Enable full support of @code{INTEGER(KIND=2)}
+(often referred to as @code{INTEGER*8})
+available in
@code{libf2c} and @file{f2c.h} so that @code{f2c} users
may make full use of its features via the @code{g77}
-version of @file{f2c.h} and the @code{INTEGER*8}
+version of @file{f2c.h} and the @code{INTEGER(KIND=2)}
support routines in the @code{g77} version of @code{libf2c}.
@item
@@ -1407,10 +2017,10 @@ These are @code{REALPART}, @code{IMAGPART},
@code{LONG}, and @code{SHORT}.
@item
-A new group of intrinsics, @samp{gnu}, has been added
+A new group of intrinsics, @code{gnu}, has been added
to contain the new @code{REALPART}, @code{IMAGPART},
and @code{COMPLEX} intrinsics.
-An old group, @samp{dcp}, has been removed.
+An old group, @code{dcp}, has been removed.
@item
Complain about industry-wide ambiguous references
@@ -1421,23 +2031,38 @@ complex type other than @code{COMPLEX}), unless
or new @samp{-fugly-complex} option, in conjunction with
@samp{-fnot-f90}, specifies @code{f2c} interpretation.
+@ifclear USERVISONLY
@item
Make improvements to diagnostics.
+@end ifclear
+@ifclear USERVISONLY
@item
Speed up compiler a bit.
+@end ifclear
+@ifclear USERVISONLY
@item
Improvements to documentation and indexing, including
a new chapter containing information on one, later
more, diagnostics that users are directed to pull
up automatically via a message in the diagnostic itself.
-(Hence the menu item @samp{M} for the node
-@samp{Diagnostics} in the top-level menu of
+(Hence the menu item @code{M} for the node
+@code{Diagnostics} in the top-level menu of
the Info documentation.)
+@end ifclear
@end itemize
+@ifclear DOC-OLDNEWS
+@heading In previous versions:
+
+Information on previous versions is archived
+in @file{@value{path-g77}/news.texi}
+following the test of the @code{DOC-OLDNEWS} macro.
+@end ifclear
+
+@ifset DOC-OLDNEWS
@c 1997-02-01: 0.5.19.1 released.
@heading In 0.5.19.1:
@itemize @bullet
@@ -1449,14 +2074,14 @@ These bugs occurred when assigning the result of an
operation to a complex variable (or array element)
that also served as an input to that operation.
-The operations affected by this bug were: @samp{CONJG()},
-@samp{DCONJG()}, @samp{CCOS()}, @samp{CDCOS()},
-@samp{CLOG()}, @samp{CDLOG()}, @samp{CSIN()}, @samp{CDSIN()},
-@samp{CSQRT()}, @samp{CDSQRT()}, complex division, and
+The operations affected by this bug were: @code{CONJG()},
+@code{DCONJG()}, @code{CCOS()}, @code{CDCOS()},
+@code{CLOG()}, @code{CDLOG()}, @code{CSIN()}, @code{CDSIN()},
+@code{CSQRT()}, @code{CDSQRT()}, complex division, and
raising a @code{DOUBLE COMPLEX} operand to an @code{INTEGER}
power.
(The related generic and @samp{Z}-prefixed intrinsics,
-such as @samp{ZSIN()}, also were affected.)
+such as @code{ZSIN()}, also were affected.)
For example, @samp{C = CSQRT(C)}, @samp{Z = Z/C}, and @samp{Z = Z**I}
(where @samp{C} is @code{COMPLEX} and @samp{Z} is
@@ -1468,7 +2093,7 @@ For example, @samp{C = CSQRT(C)}, @samp{Z = Z/C}, and @samp{Z = Z**I}
@itemize @bullet
@item
Fix @code{FORMAT} statement parsing so negative values for
-specifiers such as @samp{P} (e.g. @samp{FORMAT(-1PF8.1)})
+specifiers such as @code{P} (e.g. @samp{FORMAT(-1PF8.1)})
are correctly processed as negative.
@item
@@ -1552,7 +2177,7 @@ procedures in @code{libf2c}.
@item
Modify @code{fseek_()} in @code{libf2c} to be more portable
(though, in practice, there might be no systems where this
-matters) and to catch invalid @samp{whence} arguments.
+matters) and to catch invalid @code{whence} arguments.
@item
Some useless warnings from the @samp{-Wunused} option have
@@ -1564,7 +2189,7 @@ on AIX systems by linking with the @samp{-bbigtoc} option.
@item
Abort configuration if @code{gcc} has not been patched
-using the patch file provided in the @samp{gcc/f/gbe/}
+using the patch file provided in the @file{gcc/f/gbe/}
subdirectory.
@item
@@ -1776,7 +2401,7 @@ maintainer's new address is @email{dmg@@bell-labs.com}.
@itemize @bullet
@item
@strong{Fix serious bug} in @samp{g77 -v} command that can cause removal of a
-system's @file{/dev/null} special file if run by user @samp{root}.
+system's @file{/dev/null} special file if run by user @code{root}.
@strong{All users} of version 0.5.16 should ensure that
they have not removed @file{/dev/null} or replaced it with an ordinary
@@ -1815,7 +2440,7 @@ never happen).
@item
Make @code{libf2c} build procedures work on more systems again by
-eliminating unnecessary invocations of @samp{ld -r -x} and @samp{mv}.
+eliminating unnecessary invocations of @samp{ld -r -x} and @code{mv}.
@item
Fix omission of @samp{-funix-intrinsics-@dots{}} options in list of permitted
@@ -1894,7 +2519,7 @@ This is known to fix code invoking @code{ERF()}, @code{ERFC()},
@item
Update @code{libf2c} to include netlib patches through 1995-08-16, and
-@code{#define} @samp{WANT_LEAD_0} to 1 to make @code{g77}-compiled code more
+@code{#define} @code{WANT_LEAD_0} to 1 to make @code{g77}-compiled code more
consistent with other Fortran implementations by outputting
leading zeros in formatted and list-directed output.
@@ -1976,12 +2601,12 @@ and @code{SYSTEM}, append a final argument specifying an @code{INTEGER}
variable or array element (e.g. @samp{CALL SYSTEM('rm foo',ISTAT)}).
@item
-Add new intrinsic group named @samp{unix} to contain the new intrinsics,
+Add new intrinsic group named @code{unix} to contain the new intrinsics,
and by default enable this new group.
@item
-Move @code{LOC()} intrinsic out of the @samp{vxt} group to the new
-@samp{unix} group.
+Move @code{LOC()} intrinsic out of the @code{vxt} group to the new
+@code{unix} group.
@item
Improve @code{g77} so that @samp{g77 -v} by itself (or with
@@ -2038,8 +2663,7 @@ macros defined in @file{gcc/f/target.h} and used in places like
Add warning to be printed for each invocation of the compiler
if the target machine @code{INTEGER}, @code{REAL}, or @code{LOGICAL} size
is not 32 bits,
-since @code{g77} is known to not work well for such cases (to be
-fixed in Version 0.6---@pxref{Actual Bugs,,Actual Bugs We Haven't Fixed Yet}).
+since @code{g77} is known to not work well for such cases.
@item
Lots of new documentation (though work is still needed to put it into
@@ -2239,7 +2863,7 @@ Allow @code{RETURN} in main program unit.
Changes to Hollerith-constant support to obey Appendix C of the
standard:
-@itemize --
+@itemize @minus
@item
Now padded on the right with zeros, not spaces.
@@ -2267,7 +2891,7 @@ to widen to @code{INTEGER}), essentially.
@item
Changes and fixes to typeless-constant support:
-@itemize --
+@itemize @minus
@item
Now treated as a typeless double-length @code{INTEGER} value.
@@ -2328,3 +2952,6 @@ Generate better code for some kinds of array references.
Speed up lexing somewhat (this makes the compilation phase noticeably
faster).
@end itemize
+
+@end ifset
+@end ifclear
diff --git a/contrib/gcc/f/news0.texi b/contrib/gcc/f/news0.texi
index 8fb85f4..21176c3 100644
--- a/contrib/gcc/f/news0.texi
+++ b/contrib/gcc/f/news0.texi
@@ -1,14 +1,9 @@
-@setfilename NEW
-@set NEWSONLY
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename NEWS
+@c %**end of header
-@c The immediately following lines apply to the NEWS file
-@c which is generated using this file.
-This file lists recent changes to the GNU Fortran compiler.
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-You may copy, distribute, and modify it freely as long as you preserve
-this copyright notice and permission notice.
-
-@node Top,,, (dir)
-@chapter News About GNU Fortran
+@c This tells news.texi that it's generating just the NEWS file.
+@set DOC-NEWS
@include news.texi
@bye
diff --git a/contrib/gcc/f/output.j b/contrib/gcc/f/output.j
index f995fcb..8816b75 100644
--- a/contrib/gcc/f/output.j
+++ b/contrib/gcc/f/output.j
@@ -1,6 +1,6 @@
/* output.j -- Wrapper for GCC's output.h
Copyright (C) 1998 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -22,7 +22,6 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#ifndef MAKING_DEPENDENCIES
#ifndef _J_f_output
#define _J_f_output
-#include "gansidecl.h"
#include "output.h"
#endif
#endif
diff --git a/contrib/gcc/f/parse.c b/contrib/gcc/f/parse.c
index 6c92de9..1ffd6b3 100644
--- a/contrib/gcc/f/parse.c
+++ b/contrib/gcc/f/parse.c
@@ -1,6 +1,6 @@
/* GNU Fortran
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/proj.c b/contrib/gcc/f/proj.c
index 6af2df5..237ebe0 100644
--- a/contrib/gcc/f/proj.c
+++ b/contrib/gcc/f/proj.c
@@ -1,6 +1,6 @@
/* proj.c file for GNU Fortran
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/proj.h b/contrib/gcc/f/proj.h
index 93b12b3..47fc2f9 100644
--- a/contrib/gcc/f/proj.h
+++ b/contrib/gcc/f/proj.h
@@ -1,6 +1,6 @@
/* proj.h file for Gnu Fortran
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/root.texi b/contrib/gcc/f/root.texi
new file mode 100644
index 0000000..dce97c0
--- /dev/null
+++ b/contrib/gcc/f/root.texi
@@ -0,0 +1,40 @@
+@c DEVELOPMENT is set to indicate an in-development version,
+@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.
+@clear DEVELOPMENT
+@set version-g77 0.5.25
+@set version-egcs 1.2
+@set version-gcc 2.95
+
+@c GCC-G77 indicates this is the GCC (2.95 or later) version of g77.
+@set GCC-G77
+
+@c EGCS-G77 indicates this is the EGCS (1.0 or 1.1) version of g77.
+@clear EGCS-G77
+
+@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 which-g77 FSF-@value{version-g77}
+@set which-gcc GCC
+@end ifset
+
+@set email-burley craig@@jcb-sc.com
+@set www-burley http://world.std.com/%7Eburley
diff --git a/contrib/gcc/f/rtl.j b/contrib/gcc/f/rtl.j
index 99923f4..ab78e3a 100644
--- a/contrib/gcc/f/rtl.j
+++ b/contrib/gcc/f/rtl.j
@@ -1,6 +1,6 @@
/* rtl.j -- Wrapper for GCC's rtl.h
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/src.c b/contrib/gcc/f/src.c
index 3fd1755..7b23931 100644
--- a/contrib/gcc/f/src.c
+++ b/contrib/gcc/f/src.c
@@ -1,6 +1,6 @@
/* src.c -- Implementation File
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/src.h b/contrib/gcc/f/src.h
index 0216a7c..7ba03e0 100644
--- a/contrib/gcc/f/src.h
+++ b/contrib/gcc/f/src.h
@@ -1,6 +1,6 @@
/* src.h -- Public #include File
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/st.c b/contrib/gcc/f/st.c
index 2abd099..8f27f89 100644
--- a/contrib/gcc/f/st.c
+++ b/contrib/gcc/f/st.c
@@ -1,6 +1,6 @@
/* st.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/st.h b/contrib/gcc/f/st.h
index 5036b27..cfcc7be 100644
--- a/contrib/gcc/f/st.h
+++ b/contrib/gcc/f/st.h
@@ -1,6 +1,6 @@
/* st.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/sta.c b/contrib/gcc/f/sta.c
index 58156f5..52cb37b 100644
--- a/contrib/gcc/f/sta.c
+++ b/contrib/gcc/f/sta.c
@@ -1,6 +1,6 @@
/* sta.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995-1997 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -1701,7 +1701,7 @@ ffesta_ffebad_1p (ffebad errnum, ffelexToken names_token, ffeTokenLength index,
}
void
-ffesta_ffebad_1sp (ffebad errnum, char *s, ffelexToken names_token,
+ffesta_ffebad_1sp (ffebad errnum, const char *s, ffelexToken names_token,
ffeTokenLength index, ffelexToken next_token)
{
ffewhereLine line;
@@ -1735,7 +1735,7 @@ ffesta_ffebad_1sp (ffebad errnum, char *s, ffelexToken names_token,
}
void
-ffesta_ffebad_1st (ffebad errnum, char *s, ffelexToken t)
+ffesta_ffebad_1st (ffebad errnum, const char *s, ffelexToken t)
{
if (ffesta_ffebad_start (errnum))
{
@@ -1764,7 +1764,7 @@ ffesta_ffebad_1t (ffebad errnum, ffelexToken t)
}
void
-ffesta_ffebad_2st (ffebad errnum, char *s, ffelexToken t1, ffelexToken t2)
+ffesta_ffebad_2st (ffebad errnum, const char *s, ffelexToken t1, ffelexToken t2)
{
if (ffesta_ffebad_start (errnum))
{
diff --git a/contrib/gcc/f/sta.h b/contrib/gcc/f/sta.h
index 6bb9913..64e1607 100644
--- a/contrib/gcc/f/sta.h
+++ b/contrib/gcc/f/sta.h
@@ -1,6 +1,6 @@
/* sta.h -- Private #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -90,11 +90,11 @@ ffesymbol ffesta_sym_end_transition (ffesymbol s);
ffesymbol ffesta_sym_exec_transition (ffesymbol s);
void ffesta_ffebad_1p (ffebad msg, ffelexToken names_token,
ffeTokenLength index, ffelexToken next_token);
-void ffesta_ffebad_1sp (ffebad msg, char *s, ffelexToken names_token,
+void ffesta_ffebad_1sp (ffebad msg, const char *s, ffelexToken names_token,
ffeTokenLength index, ffelexToken next_token);
-void ffesta_ffebad_1st (ffebad msg, char *s, ffelexToken t);
+void ffesta_ffebad_1st (ffebad msg, const char *s, ffelexToken t);
void ffesta_ffebad_1t (ffebad msg, ffelexToken t);
-void ffesta_ffebad_2st (ffebad msg, char *s, ffelexToken t1, ffelexToken t2);
+void ffesta_ffebad_2st (ffebad msg, const char *s, ffelexToken t1, ffelexToken t2);
void ffesta_ffebad_2t (ffebad msg, ffelexToken t1, ffelexToken t2);
ffelexHandler ffesta_zero (ffelexToken t);
ffelexHandler ffesta_two (ffelexToken first, ffelexToken second);
diff --git a/contrib/gcc/f/stb.c b/contrib/gcc/f/stb.c
index dc4bda4..ef523c4 100644
--- a/contrib/gcc/f/stb.c
+++ b/contrib/gcc/f/stb.c
@@ -1,6 +1,6 @@
/* stb.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -404,7 +404,7 @@ union ffestb_local_u_
dimlist;
struct
{
- char *badname;
+ const char *badname;
ffestrFirst first_kw;
bool is_subr;
}
@@ -421,7 +421,7 @@ union ffestb_local_u_
ffesttTokenList toklist;/* For ambiguity resolution. */
ffesttImpList imps; /* List of IMPLICIT letters. */
ffelexHandler imp_handler; /* Call if paren list wasn't letters. */
- char *badname;
+ const char *badname;
ffestrOther kw; /* INTENT(IN/OUT/INOUT). */
ffestpType type;
bool parameter; /* If PARAMETER attribute seen (governs =expr
@@ -1859,7 +1859,7 @@ ffelexHandler
ffestb_do (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
ffelexHandler next;
ffelexToken nt;
ffestrSecond kw;
@@ -2033,7 +2033,7 @@ ffelexHandler
ffestb_dowhile (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ const char *p;
ffelexHandler next;
ffelexToken nt;
@@ -2507,7 +2507,7 @@ ffelexHandler
ffestb_else (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
switch (ffelex_token_type (ffesta_tokens[0]))
{
@@ -2600,7 +2600,7 @@ ffelexHandler
ffestb_elsexyz (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ const char *p;
switch (ffelex_token_type (ffesta_tokens[0]))
{
@@ -2787,7 +2787,7 @@ static ffelexHandler
ffestb_else3_ (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
ffelex_set_names (FALSE);
@@ -3013,7 +3013,7 @@ ffelexHandler
ffestb_endxyz (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
switch (ffelex_token_type (ffesta_tokens[0]))
{
@@ -3319,7 +3319,7 @@ ffelexHandler
ffestb_goto (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
ffelexHandler next;
ffelexToken nt;
@@ -4152,7 +4152,7 @@ ffestb_let (ffelexToken t)
ffelexHandler next;
bool vxtparam; /* TRUE if it might really be a VXT PARAMETER
stmt. */
- char *p;
+ unsigned const char *p;
switch (ffelex_token_type (ffesta_tokens[0]))
{
@@ -4292,7 +4292,7 @@ ffelexHandler
ffestb_type (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ const char *p;
switch (ffelex_token_type (ffesta_tokens[0]))
{
@@ -4376,7 +4376,7 @@ static ffelexHandler
ffestb_type1_ (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ const char *p;
ffelex_set_names (FALSE);
@@ -4537,7 +4537,7 @@ ffelexHandler
ffestb_varlist (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
ffelexToken nt;
ffelexHandler next;
@@ -5215,7 +5215,7 @@ ffestb_varlist6_ (ffelexToken t)
ffelexHandler
ffestb_R423B (ffelexToken t)
{
- char *p;
+ const char *p;
ffeTokenLength i;
switch (ffelex_token_type (ffesta_tokens[0]))
@@ -5284,7 +5284,7 @@ ffelexHandler
ffestb_R522 (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
ffelexToken nt;
ffelexHandler next;
@@ -5528,7 +5528,7 @@ ffestb_R5224_ (ffelexToken t)
ffelexHandler
ffestb_R528 (ffelexToken t)
{
- char *p;
+ unsigned const char *p;
ffeTokenLength i;
ffelexToken nt;
ffelexHandler next;
@@ -5707,7 +5707,12 @@ ffestb_R5282_ (ffelexToken ft, ffebld expr, ffelexToken t)
case FFELEX_typeASTERISK:
if (expr == NULL)
break;
- ffestb_local_.data.expr = expr;
+ ffestb_local_.data.expr = ffeexpr_convert (expr, ft, t,
+ FFEINFO_basictypeINTEGER,
+ FFEINFO_kindtypeINTEGER1,
+ 0,
+ FFETARGET_charactersizeNONE,
+ FFEEXPR_contextLET);
ffesta_tokens[1] = ffelex_token_use (ft);
return (ffelexHandler) ffeexpr_rhs
(ffesta_output_pool, FFEEXPR_contextDATA,
@@ -6005,7 +6010,7 @@ ffestb_R5373_ (ffelexToken t)
ffelexHandler
ffestb_R542 (ffelexToken t)
{
- char *p;
+ const char *p;
ffeTokenLength i;
switch (ffelex_token_type (ffesta_tokens[0]))
@@ -6419,7 +6424,7 @@ ffelexHandler
ffestb_R834 (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
switch (ffelex_token_type (ffesta_tokens[0]))
{
@@ -6534,7 +6539,7 @@ ffelexHandler
ffestb_R835 (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
switch (ffelex_token_type (ffesta_tokens[0]))
{
@@ -6648,7 +6653,7 @@ ffestb_R8351_ (ffelexToken t)
ffelexHandler
ffestb_R838 (ffelexToken t)
{
- char *p;
+ unsigned const char *p;
ffeTokenLength i;
ffelexHandler next;
ffelexToken et; /* First token in target. */
@@ -7073,7 +7078,7 @@ ffestb_R8407_ (ffelexToken t)
ffelexHandler
ffestb_R841 (ffelexToken t)
{
- char *p;
+ const char *p;
ffeTokenLength i;
switch (ffelex_token_type (ffesta_tokens[0]))
@@ -7141,7 +7146,7 @@ ffelexHandler
ffestb_R1102 (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
switch (ffelex_token_type (ffesta_tokens[0]))
{
@@ -7293,7 +7298,7 @@ ffelexHandler
ffestb_blockdata (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
switch (ffelex_token_type (ffesta_tokens[0]))
{
@@ -7436,7 +7441,7 @@ ffelexHandler
ffestb_R1212 (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
ffelexHandler next;
ffelexToken nt;
@@ -7675,7 +7680,7 @@ ffestb_R12271_ (ffelexToken ft, ffebld expr, ffelexToken t)
ffelexHandler
ffestb_R1228 (ffelexToken t)
{
- char *p;
+ const char *p;
ffeTokenLength i;
switch (ffelex_token_type (ffesta_tokens[0]))
@@ -7744,7 +7749,7 @@ bad_i: /* :::::::::::::::::::: */
ffelexHandler
ffestb_V009 (ffelexToken t)
{
- char *p;
+ const char *p;
ffeTokenLength i;
switch (ffelex_token_type (ffesta_tokens[0]))
@@ -8156,7 +8161,7 @@ ffelexHandler
ffestb_module (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ const char *p;
ffelexToken nt;
ffelexToken mt; /* Name in MODULE PROCEDUREname, i.e.
includes "PROCEDURE". */
@@ -8429,7 +8434,7 @@ ffelexHandler
ffestb_R809 (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ const char *p;
switch (ffelex_token_type (ffesta_tokens[0]))
{
@@ -8630,7 +8635,7 @@ ffelexHandler
ffestb_R810 (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
switch (ffelex_token_type (ffesta_tokens[0]))
{
@@ -9185,7 +9190,7 @@ ffestb_R10014_ (ffelexToken t)
{
ffesttFormatList f;
ffeTokenLength i;
- char *p;
+ const char *p;
ffestrFormat kw;
ffelex_set_expecting_hollerith (0, '\0',
@@ -9709,7 +9714,8 @@ ffestb_R10014_ (ffelexToken t)
i += ffelex_token_length (ffestb_local_.format.post.t);
if (*p == '\0')
return (ffelexHandler) ffestb_R10016_;
- if ((kw != FFESTR_formatP) || !ffelex_is_firstnamechar (*p))
+ if ((kw != FFESTR_formatP) ||
+ !ffelex_is_firstnamechar ((unsigned char)*p))
{
if (ffestb_local_.format.current != FFESTP_formattypeH)
ffesta_ffebad_1p (FFEBAD_FORMAT_TEXT_IN_NUMBER, t, i, NULL);
@@ -9813,7 +9819,7 @@ ffestb_R10015_ (ffelexToken t)
bool split_pea; /* New NAMES requires splitting kP from new
edit desc. */
ffestrFormat kw;
- char *p;
+ const char *p;
ffeTokenLength i;
switch (ffelex_token_type (t))
@@ -10190,7 +10196,7 @@ static ffelexHandler
ffestb_R10018_ (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ const char *p;
switch (ffelex_token_type (t))
{
@@ -10984,7 +10990,7 @@ ffelexHandler
ffestb_R1107 (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ const char *p;
switch (ffelex_token_type (ffesta_tokens[0]))
{
@@ -11430,7 +11436,7 @@ ffelexHandler
ffestb_R1202 (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ const char *p;
switch (ffelex_token_type (ffesta_tokens[0]))
{
@@ -11821,7 +11827,7 @@ ffestb_R12025_ (ffelexToken t)
static ffelexHandler
ffestb_R12026_ (ffelexToken t)
{
- char *p;
+ const char *p;
switch (ffelex_token_type (t))
{
@@ -11964,7 +11970,7 @@ ffelexHandler
ffestb_S3P4 (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ const char *p;
ffelexHandler next;
ffelexToken nt;
ffelexToken ut;
@@ -12096,7 +12102,7 @@ ffestb_S3P41_ (ffelexToken ft, ffebld expr, ffelexToken t)
ffelexHandler
ffestb_V012 (ffelexToken t)
{
- char *p;
+ const char *p;
ffeTokenLength i;
switch (ffelex_token_type (ffesta_tokens[0]))
@@ -12165,7 +12171,7 @@ ffelexHandler
ffestb_V014 (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
ffelexToken nt;
ffelexHandler next;
@@ -12399,7 +12405,7 @@ ffelexHandler
ffestb_V025 (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ const char *p;
ffelexToken nt;
ffelexHandler next;
@@ -12595,7 +12601,7 @@ ffestb_V0254_ (ffelexToken ft, ffebld expr, ffelexToken t)
static ffelexHandler
ffestb_V0255_ (ffelexToken t)
{
- char *p;
+ const char *p;
switch (ffelex_token_type (t))
{
@@ -17909,7 +17915,7 @@ ffelexHandler
ffestb_V020 (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ const char *p;
ffelexHandler next;
ffestpTypeIx ix;
@@ -18845,7 +18851,7 @@ ffelexHandler
ffestb_dimlist (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ const char *p;
ffelexToken nt;
ffelexHandler next;
@@ -19399,7 +19405,7 @@ ffelexHandler
ffestb_dummy (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
switch (ffelex_token_type (ffesta_tokens[0]))
{
@@ -19618,7 +19624,7 @@ ffelexHandler
ffestb_R524 (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
ffelexToken nt;
ffelexHandler next;
@@ -19847,7 +19853,7 @@ ffelexHandler
ffestb_R547 (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
ffelexToken nt;
ffelexHandler next;
@@ -20485,7 +20491,7 @@ ffelexHandler
ffestb_decl_chartype (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
ffestb_local_.decl.type = FFESTP_typeCHARACTER;
ffestb_local_.decl.recursive = NULL;
@@ -20672,7 +20678,7 @@ ffelexHandler
ffestb_decl_dbltype (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
ffestb_local_.decl.type = ffestb_args.decl.type;
ffestb_local_.decl.recursive = NULL;
@@ -20863,7 +20869,7 @@ ffelexHandler
ffestb_decl_gentype (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
ffestb_local_.decl.type = ffestb_args.decl.type;
ffestb_local_.decl.recursive = NULL;
@@ -21009,7 +21015,7 @@ ffelexHandler
ffestb_decl_recursive (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ const char *p;
ffelexToken nt;
ffelexToken ot;
ffelexHandler next;
@@ -22667,7 +22673,7 @@ ffestb_decl_entsp_2_ (ffelexToken t)
{
ffelexToken nt;
bool asterisk_ok;
- char *p;
+ unsigned const char *p;
ffeTokenLength i;
switch (ffelex_token_type (t))
@@ -23094,7 +23100,7 @@ ffestb_decl_entsp_8_ (ffelexToken t)
static ffelexHandler
ffestb_decl_func_ (ffelexToken t)
{
- char *p;
+ const char *p;
ffeTokenLength i;
ffelex_set_names (FALSE);
@@ -23572,7 +23578,7 @@ ffelexHandler
ffestb_V003 (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ const char *p;
ffelexToken nt;
ffelexHandler next;
@@ -23888,7 +23894,7 @@ bad: /* :::::::::::::::::::: */
ffelexHandler
ffestb_V016 (ffelexToken t)
{
- char *p;
+ const char *p;
ffeTokenLength i;
switch (ffelex_token_type (ffesta_tokens[0]))
@@ -24156,7 +24162,7 @@ ffestb_V0166_ (ffelexToken t)
ffelexHandler
ffestb_V027 (ffelexToken t)
{
- char *p;
+ unsigned const char *p;
ffeTokenLength i;
switch (ffelex_token_type (ffesta_tokens[0]))
@@ -24336,7 +24342,7 @@ ffelexHandler
ffestb_decl_R539 (ffelexToken t)
{
ffeTokenLength i;
- char *p;
+ unsigned const char *p;
ffelexToken nt;
ffestrSecond kw;
diff --git a/contrib/gcc/f/stb.h b/contrib/gcc/f/stb.h
index 7338bcf..6ee761d 100644
--- a/contrib/gcc/f/stb.h
+++ b/contrib/gcc/f/stb.h
@@ -1,6 +1,6 @@
/* stb.h -- Private #include File (module.h template V1.0)
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -50,7 +50,7 @@ struct _ffestb_args_
{
struct
{
- char *badname;
+ const char *badname;
ffeTokenLength len; /* Length of "ENTRY/FUNCTION/SUBROUTINE". */
bool is_subr; /* TRUE if SUBROUTINE or if ENTRY within
SUBROUTINE. */
@@ -58,7 +58,7 @@ struct _ffestb_args_
dummy;
struct
{
- char *badname;
+ const char *badname;
ffeTokenLength len; /* Length of
"BACKSPACE/ENDFILE/REWIND/UNLOCK". */
}
@@ -82,7 +82,7 @@ struct _ffestb_args_
#if FFESTR_F90
struct
{
- char *badname;
+ const char *badname;
ffeTokenLength len; /* Length of "ALLOCATE/DEALLOCATE". */
ffeexprContext ctx; /* Either ALLOCATE or DEALLOCATE. */
}
@@ -90,7 +90,7 @@ struct _ffestb_args_
#endif
struct
{
- char *badname;
+ const char *badname;
ffeTokenLength len; /* Length of
"EXTERNAL/INTENT/INTRINSIC/OPTIONAL/PUBLIC/
PRIVATE". */
@@ -99,7 +99,7 @@ struct _ffestb_args_
#if FFESTR_VXT
struct
{
- char *badname;
+ const char *badname;
ffeTokenLength len; /* Length of "ENCODE/DECODE". */
}
vxtcode;
@@ -107,14 +107,14 @@ struct _ffestb_args_
#if FFESTR_F90
struct
{
- char *badname;
+ const char *badname;
ffeTokenLength len; /* Length of "ALLOCATABLE/POINTER/TARGET". */
}
dimlist;
#endif
struct
{
- char *badname;
+ const char *badname;
ffeTokenLength len; /* Length of "DIMENSION/VIRTUAL". */
}
R524;
diff --git a/contrib/gcc/f/stc.c b/contrib/gcc/f/stc.c
index e720f9d..b89b747 100644
--- a/contrib/gcc/f/stc.c
+++ b/contrib/gcc/f/stc.c
@@ -1,6 +1,6 @@
/* stc.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995-1997 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -339,14 +339,14 @@ static void ffestc_shriek_where_ (bool ok);
#if FFESTR_F90
static void ffestc_shriek_wherethen_ (bool ok);
#endif
-static int ffestc_subr_binsrch_ (char **list, int size, ffestpFile *spec,
- char *whine);
+static int ffestc_subr_binsrch_ (const char **list, int size, ffestpFile *spec,
+ const char *whine);
static ffestvFormat ffestc_subr_format_ (ffestpFile *spec);
static bool ffestc_subr_is_branch_ (ffestpFile *spec);
static bool ffestc_subr_is_format_ (ffestpFile *spec);
-static bool ffestc_subr_is_present_ (char *name, ffestpFile *spec);
-static int ffestc_subr_speccmp_ (char *string, ffestpFile *spec,
- char **target, int *length);
+static bool ffestc_subr_is_present_ (const char *name, ffestpFile *spec);
+static int ffestc_subr_speccmp_ (const char *string, ffestpFile *spec,
+ const char **target, int *length);
static ffestvUnit ffestc_subr_unit_ (ffestpFile *spec);
static void ffestc_try_shriek_do_ (void);
@@ -5044,14 +5044,14 @@ ffestc_shriek_wherethen_ (bool ok)
using "etc" as the pick-one-of-these string. */
static int
-ffestc_subr_binsrch_ (char **list, int size, ffestpFile *spec, char *whine)
+ffestc_subr_binsrch_ (const char **list, int size, ffestpFile *spec, const char *whine)
{
int lowest_tested;
int highest_tested;
int halfway;
int offset;
int c;
- char *str;
+ const char *str;
int len;
if (size == 0)
@@ -5186,7 +5186,7 @@ ffestc_subr_is_format_ (ffestpFile *spec)
ffestc_subr_is_present_("SPECIFIER",&specifier); */
static bool
-ffestc_subr_is_present_ (char *name, ffestpFile *spec)
+ffestc_subr_is_present_ (const char *name, ffestpFile *spec)
{
if (spec->kw_or_val_present)
{
@@ -5219,7 +5219,7 @@ ffestc_subr_is_present_ (char *name, ffestpFile *spec)
0 if 2 is returned, the length of the constant string value otherwise. */
static int
-ffestc_subr_speccmp_ (char *string, ffestpFile *spec, char **target,
+ffestc_subr_speccmp_ (const char *string, ffestpFile *spec, const char **target,
int *length)
{
ffebldConstant c;
@@ -10000,6 +10000,10 @@ ffestc_R838 (ffelexToken label_token, ffebld target,
return;
ffestc_labeldef_branch_begin_ ();
+ /* Mark target symbol as target of an ASSIGN. */
+ if (ffebld_op (target) == FFEBLD_opSYMTER)
+ ffesymbol_set_assigned (ffebld_symter (target), TRUE);
+
if (ffestc_labelref_is_assignable_ (label_token, &label))
ffestd_R838 (label, target);
@@ -10198,7 +10202,7 @@ ffestc_R904 ()
{
int i;
int expect_file;
- char *status_strs[]
+ const char *status_strs[]
=
{
"New",
@@ -10207,7 +10211,7 @@ ffestc_R904 ()
"Scratch",
"Unknown"
};
- char *access_strs[]
+ const char *access_strs[]
=
{
"Append",
@@ -10215,20 +10219,20 @@ ffestc_R904 ()
"Keyed",
"Sequential"
};
- char *blank_strs[]
+ const char *blank_strs[]
=
{
"Null",
"Zero"
};
- char *carriagecontrol_strs[]
+ const char *carriagecontrol_strs[]
=
{
"Fortran",
"List",
"None"
};
- char *dispose_strs[]
+ const char *dispose_strs[]
=
{
"Delete",
@@ -10239,41 +10243,41 @@ ffestc_R904 ()
"Submit",
"Submit/Delete"
};
- char *form_strs[]
+ const char *form_strs[]
=
{
"Formatted",
"Unformatted"
};
- char *organization_strs[]
+ const char *organization_strs[]
=
{
"Indexed",
"Relative",
"Sequential"
};
- char *position_strs[]
+ const char *position_strs[]
=
{
"Append",
"AsIs",
"Rewind"
};
- char *action_strs[]
+ const char *action_strs[]
=
{
"Read",
"ReadWrite",
"Write"
};
- char *delim_strs[]
+ const char *delim_strs[]
=
{
"Apostrophe",
"None",
"Quote"
};
- char *recordtype_strs[]
+ const char *recordtype_strs[]
=
{
"Fixed",
@@ -10283,7 +10287,7 @@ ffestc_R904 ()
"Stream_LF",
"Variable"
};
- char *pad_strs[]
+ const char *pad_strs[]
=
{
"No",
@@ -10453,7 +10457,7 @@ ffestc_R904 ()
void
ffestc_R907 ()
{
- char *status_strs[]
+ const char *status_strs[]
=
{
"Delete",
diff --git a/contrib/gcc/f/stc.h b/contrib/gcc/f/stc.h
index c26fca1..12b4783 100644
--- a/contrib/gcc/f/stc.h
+++ b/contrib/gcc/f/stc.h
@@ -1,6 +1,6 @@
/* stc.h -- Private #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/std.c b/contrib/gcc/f/std.c
index 540da6c..72037c1 100644
--- a/contrib/gcc/f/std.c
+++ b/contrib/gcc/f/std.c
@@ -1,6 +1,6 @@
/* std.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -192,17 +192,29 @@ struct _ffestd_stmt_
struct
{
mallocPool pool;
+ ffestw block;
ffebld expr;
}
R803;
struct
{
mallocPool pool;
+ ffestw block;
ffebld expr;
}
R804;
struct
{
+ ffestw block;
+ }
+ R805;
+ struct
+ {
+ ffestw block;
+ }
+ R806;
+ struct
+ {
mallocPool pool;
ffebld expr;
}
@@ -526,25 +538,25 @@ static void ffestd_subr_f90_ (void);
static void ffestd_subr_labels_ (bool unexpected);
static void ffestd_R1001dump_ (ffests s, ffesttFormatList list);
static void ffestd_R1001dump_1005_1_ (ffests s, ffesttFormatList f,
- char *string);
+ const char *string);
static void ffestd_R1001dump_1005_2_ (ffests s, ffesttFormatList f,
- char *string);
+ const char *string);
static void ffestd_R1001dump_1005_3_ (ffests s, ffesttFormatList f,
- char *string);
+ const char *string);
static void ffestd_R1001dump_1005_4_ (ffests s, ffesttFormatList f,
- char *string);
+ const char *string);
static void ffestd_R1001dump_1005_5_ (ffests s, ffesttFormatList f,
- char *string);
+ const char *string);
static void ffestd_R1001dump_1010_1_ (ffests s, ffesttFormatList f,
- char *string);
+ const char *string);
static void ffestd_R1001dump_1010_2_ (ffests s, ffesttFormatList f,
- char *string);
+ const char *string);
static void ffestd_R1001dump_1010_3_ (ffests s, ffesttFormatList f,
- char *string);
+ const char *string);
static void ffestd_R1001dump_1010_4_ (ffests s, ffesttFormatList f,
- char *string);
+ const char *string);
static void ffestd_R1001dump_1010_5_ (ffests s, ffesttFormatList f,
- char *string);
+ const char *string);
static void ffestd_R1001error_ (ffesttFormatList f);
static void ffestd_R1001rtexpr_ (ffests s, ffesttFormatList f, ffebld expr);
@@ -750,27 +762,28 @@ ffestd_stmt_pass_ ()
case FFESTD_stmtidR803_:
ffestd_subr_line_restore_ (stmt);
if (okay)
- ffeste_R803 (stmt->u.R803.expr);
+ ffeste_R803 (stmt->u.R803.block, stmt->u.R803.expr);
malloc_pool_kill (stmt->u.R803.pool);
break;
case FFESTD_stmtidR804_:
ffestd_subr_line_restore_ (stmt);
if (okay)
- ffeste_R804 (stmt->u.R804.expr);
+ ffeste_R804 (stmt->u.R803.block, stmt->u.R804.expr);
malloc_pool_kill (stmt->u.R804.pool);
break;
case FFESTD_stmtidR805_:
ffestd_subr_line_restore_ (stmt);
if (okay)
- ffeste_R805 ();
+ ffeste_R805 (stmt->u.R803.block);
break;
case FFESTD_stmtidR806_:
ffestd_subr_line_restore_ (stmt);
if (okay)
- ffeste_R806 ();
+ ffeste_R806 (stmt->u.R806.block);
+ ffestw_kill (stmt->u.R806.block);
break;
case FFESTD_stmtidR807_:
@@ -1597,7 +1610,19 @@ ffestd_labeldef_format (ffelab label)
ffestdStmt_ stmt;
stmt = ffestd_stmt_new_ (FFESTD_stmtidFORMATLABEL_);
+#if 0
+ /* Don't bother with this. See FORMAT statement. */
+ /* Prepend FORMAT label instead of appending it, so all the
+ FORMAT label/statement pairs end up at the top of the list.
+ This helps ensure all decls for a block (in the GBE) are
+ known before any executable statements are generated. */
+ stmt->previous = (ffestdStmt_) &ffestd_stmt_list_.first;
+ stmt->next = ffestd_stmt_list_.first;
+ stmt->next->previous = stmt;
+ stmt->previous->next = stmt;
+#else
ffestd_stmt_append_ (stmt);
+#endif
stmt->u.formatlabel.label = label;
}
#endif
@@ -2989,13 +3014,7 @@ ffestd_R744 ()
#endif
}
-/* ffestd_R745 -- Implicit END WHERE statement
-
- ffestd_R745(TRUE);
-
- Implement the end of the current WHERE "block". ok==TRUE iff statement
- following WHERE (substatement) is valid; else, statement is invalid
- or stack forcibly popped due to ffestd_eof_(). */
+/* ffestd_R745 -- Implicit END WHERE statement. */
void
ffestd_R745 (bool ok)
@@ -3011,11 +3030,8 @@ ffestd_R745 (bool ok)
}
#endif
-/* ffestd_R803 -- Block IF (IF-THEN) statement
-
- ffestd_R803(construct_name,expr,expr_token);
- Make sure statement is valid here; implement. */
+/* Block IF (IF-THEN) statement. */
void
ffestd_R803 (ffelexToken construct_name UNUSED, ffebld expr)
@@ -3033,6 +3049,7 @@ ffestd_R803 (ffelexToken construct_name UNUSED, ffebld expr)
ffestd_stmt_append_ (stmt);
ffestd_subr_line_save_ (stmt);
stmt->u.R803.pool = ffesta_output_pool;
+ stmt->u.R803.block = ffestw_use (ffestw_stack_top ());
stmt->u.R803.expr = expr;
ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
}
@@ -3042,13 +3059,7 @@ ffestd_R803 (ffelexToken construct_name UNUSED, ffebld expr)
assert (ffestd_block_level_ > 0);
}
-/* ffestd_R804 -- ELSE IF statement
-
- ffestd_R804(expr,expr_token,name_token);
-
- Make sure ffestd_kind_ identifies an IF block. If not
- NULL, make sure name_token gives the correct name. Implement the else
- of the IF block. */
+/* ELSE IF statement. */
void
ffestd_R804 (ffebld expr, ffelexToken name UNUSED)
@@ -3066,19 +3077,14 @@ ffestd_R804 (ffebld expr, ffelexToken name UNUSED)
ffestd_stmt_append_ (stmt);
ffestd_subr_line_save_ (stmt);
stmt->u.R804.pool = ffesta_output_pool;
+ stmt->u.R804.block = ffestw_use (ffestw_stack_top ());
stmt->u.R804.expr = expr;
ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
}
#endif
}
-/* ffestd_R805 -- ELSE statement
-
- ffestd_R805(name_token);
-
- Make sure ffestd_kind_ identifies an IF block. If not
- NULL, make sure name_token gives the correct name. Implement the ELSE
- of the IF block. */
+/* ELSE statement. */
void
ffestd_R805 (ffelexToken name UNUSED)
@@ -3095,13 +3101,12 @@ ffestd_R805 (ffelexToken name UNUSED)
stmt = ffestd_stmt_new_ (FFESTD_stmtidR805_);
ffestd_stmt_append_ (stmt);
ffestd_subr_line_save_ (stmt);
+ stmt->u.R805.block = ffestw_use (ffestw_stack_top ());
}
#endif
}
-/* ffestd_R806 -- End an IF-THEN
-
- ffestd_R806(TRUE); */
+/* END IF statement. */
void
ffestd_R806 (bool ok UNUSED)
@@ -3116,6 +3121,7 @@ ffestd_R806 (bool ok UNUSED)
stmt = ffestd_stmt_new_ (FFESTD_stmtidR806_);
ffestd_stmt_append_ (stmt);
ffestd_subr_line_save_ (stmt);
+ stmt->u.R806.block = ffestw_use (ffestw_stack_top ());
}
#endif
@@ -4273,7 +4279,24 @@ ffestd_R1001 (ffesttFormatList f)
ffestdStmt_ stmt;
stmt = ffestd_stmt_new_ (FFESTD_stmtidR1001_);
+#if 0
+ /* Don't bother with this. After all, things like cilists also are
+ declared midway through code-generation. Perhaps the only problems
+ the gcc back end has with midway declarations are with stack vars,
+ maybe only with vars that can be put in registers. Unless/until the
+ need is established, handle FORMAT just like cilists and others; at
+ that point, they'd likely *all* have to be fixed, which would be
+ very painful anyway. */
+ /* Insert FORMAT statement just after the first item on the
+ statement list, which must be a FORMAT label, which see. */
+ assert (ffestd_stmt_list_.first->id == FFESTD_stmtidFORMATLABEL_);
+ stmt->previous = ffestd_stmt_list_.first;
+ stmt->next = ffestd_stmt_list_.first->next;
+ stmt->next->previous = stmt;
+ stmt->previous->next = stmt;
+#else
ffestd_stmt_append_ (stmt);
+#endif
stmt->u.R1001.str = str;
}
#endif
@@ -4487,7 +4510,7 @@ ffestd_R1001dump_ (ffests s, ffesttFormatList list)
The format is dumped with form [r]X[w]. */
static void
-ffestd_R1001dump_1005_1_ (ffests s, ffesttFormatList f, char *string)
+ffestd_R1001dump_1005_1_ (ffests s, ffesttFormatList f, const char *string)
{
assert (!f->u.R1005.R1007_or_R1008.present);
assert (!f->u.R1005.R1009.present);
@@ -4519,7 +4542,7 @@ ffestd_R1001dump_1005_1_ (ffests s, ffesttFormatList f, char *string)
The format is dumped with form [r]Xw. */
static void
-ffestd_R1001dump_1005_2_ (ffests s, ffesttFormatList f, char *string)
+ffestd_R1001dump_1005_2_ (ffests s, ffesttFormatList f, const char *string)
{
assert (!f->u.R1005.R1007_or_R1008.present);
assert (!f->u.R1005.R1009.present);
@@ -4549,7 +4572,7 @@ ffestd_R1001dump_1005_2_ (ffests s, ffesttFormatList f, char *string)
The format is dumped with form [r]Xw[.m]. */
static void
-ffestd_R1001dump_1005_3_ (ffests s, ffesttFormatList f, char *string)
+ffestd_R1001dump_1005_3_ (ffests s, ffesttFormatList f, const char *string)
{
assert (!f->u.R1005.R1009.present);
assert (f->u.R1005.R1006.present);
@@ -4588,7 +4611,7 @@ ffestd_R1001dump_1005_3_ (ffests s, ffesttFormatList f, char *string)
The format is dumped with form [r]Xw.d. */
static void
-ffestd_R1001dump_1005_4_ (ffests s, ffesttFormatList f, char *string)
+ffestd_R1001dump_1005_4_ (ffests s, ffesttFormatList f, const char *string)
{
assert (!f->u.R1005.R1009.present);
assert (f->u.R1005.R1007_or_R1008.present);
@@ -4624,7 +4647,7 @@ ffestd_R1001dump_1005_4_ (ffests s, ffesttFormatList f, char *string)
The format is dumped with form [r]Xw.d[Ee]. */
static void
-ffestd_R1001dump_1005_5_ (ffests s, ffesttFormatList f, char *string)
+ffestd_R1001dump_1005_5_ (ffests s, ffesttFormatList f, const char *string)
{
assert (f->u.R1005.R1007_or_R1008.present);
assert (f->u.R1005.R1006.present);
@@ -4668,7 +4691,7 @@ ffestd_R1001dump_1005_5_ (ffests s, ffesttFormatList f, char *string)
The format is dumped with form X. */
static void
-ffestd_R1001dump_1010_1_ (ffests s, ffesttFormatList f, char *string)
+ffestd_R1001dump_1010_1_ (ffests s, ffesttFormatList f, const char *string)
{
assert (!f->u.R1010.val.present);
@@ -4683,7 +4706,7 @@ ffestd_R1001dump_1010_1_ (ffests s, ffesttFormatList f, char *string)
The format is dumped with form [r]X. */
static void
-ffestd_R1001dump_1010_2_ (ffests s, ffesttFormatList f, char *string)
+ffestd_R1001dump_1010_2_ (ffests s, ffesttFormatList f, const char *string)
{
if (f->u.R1010.val.present)
{
@@ -4704,7 +4727,7 @@ ffestd_R1001dump_1010_2_ (ffests s, ffesttFormatList f, char *string)
The format is dumped with form nX. */
static void
-ffestd_R1001dump_1010_3_ (ffests s, ffesttFormatList f, char *string)
+ffestd_R1001dump_1010_3_ (ffests s, ffesttFormatList f, const char *string)
{
assert (f->u.R1010.val.present);
@@ -4724,7 +4747,7 @@ ffestd_R1001dump_1010_3_ (ffests s, ffesttFormatList f, char *string)
The format is dumped with form kX. Note that k is signed. */
static void
-ffestd_R1001dump_1010_4_ (ffests s, ffesttFormatList f, char *string)
+ffestd_R1001dump_1010_4_ (ffests s, ffesttFormatList f, const char *string)
{
assert (f->u.R1010.val.present);
@@ -4744,7 +4767,7 @@ ffestd_R1001dump_1010_4_ (ffests s, ffesttFormatList f, char *string)
The format is dumped with form Xn. */
static void
-ffestd_R1001dump_1010_5_ (ffests s, ffesttFormatList f, char *string)
+ffestd_R1001dump_1010_5_ (ffests s, ffesttFormatList f, const char *string)
{
assert (f->u.R1010.val.present);
diff --git a/contrib/gcc/f/std.h b/contrib/gcc/f/std.h
index 810f427..bfad671 100644
--- a/contrib/gcc/f/std.h
+++ b/contrib/gcc/f/std.h
@@ -1,6 +1,6 @@
/* std.h -- Private #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/ste.c b/contrib/gcc/f/ste.c
index 4a2476d..dbe48dd 100644
--- a/contrib/gcc/f/ste.c
+++ b/contrib/gcc/f/ste.c
@@ -1,6 +1,6 @@
/* ste.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -28,21 +28,6 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
Modifications:
*/
-/* As of 0.5.4, any statement that calls on ffecom to transform an
- expression might need to be wrapped in ffecom_push_calltemps ()
- and ffecom_pop_calltemps () as are some other cases. That is
- the case when the transformation might involve generation of
- a temporary that must be auto-popped, the specific case being
- when a COMPLEX operation requiring a call to libf2c being
- generated, whereby a temp is needed to hold the result since
- libf2c doesn't return COMPLEX results directly. Cases where it
- is known that ffecom_expr () won't need to do this, such as
- the CALL statement (where it's the transformation of the
- call expr itself that does the wrapping), don't need to bother
- with this wrapping. Forgetting to do the wrapping currently
- means a crash at an assertion when the wrapping would be helpful
- to keep temporaries from being wasted -- see ffecom_push_tempvar. */
-
/* Include files. */
#include "proj.h"
@@ -113,9 +98,11 @@ static void ffeste_begin_iterdo_ (ffestw block, tree *tvar, tree *tincr,
ffebld start, ffelexToken start_token,
ffebld end, ffelexToken end_token,
ffebld incr, ffelexToken incr_token,
- char *msg);
-static void ffeste_end_iterdo_ (tree tvar, tree tincr, tree itersvar);
+ const char *msg);
+static void ffeste_end_iterdo_ (ffestw block, tree tvar, tree tincr,
+ tree itersvar);
static void ffeste_io_call_ (tree call, bool do_check);
+static void ffeste_io_impdo_ (ffebld impdo, ffelexToken impdo_token);
static tree ffeste_io_dofio_ (ffebld expr);
static tree ffeste_io_dolio_ (ffebld expr);
static tree ffeste_io_douio_ (ffebld expr);
@@ -131,7 +118,23 @@ static tree ffeste_io_cllist_ (bool have_err, ffebld unit_expr,
static tree ffeste_io_icilist_ (bool have_err, ffebld unit_expr,
bool have_end, ffestvFormat format,
ffestpFile *format_spec);
-static void ffeste_io_impdo_ (ffebld impdo, ffelexToken impdo_token);
+static tree ffeste_io_inlist_ (bool have_err,
+ ffestpFile *unit_spec,
+ ffestpFile *file_spec,
+ ffestpFile *exist_spec,
+ ffestpFile *open_spec,
+ ffestpFile *number_spec,
+ ffestpFile *named_spec,
+ ffestpFile *name_spec,
+ ffestpFile *access_spec,
+ ffestpFile *sequential_spec,
+ ffestpFile *direct_spec,
+ ffestpFile *form_spec,
+ ffestpFile *formatted_spec,
+ ffestpFile *unformatted_spec,
+ ffestpFile *recl_spec,
+ ffestpFile *nextrec_spec,
+ ffestpFile *blank_spec);
static tree ffeste_io_olist_ (bool have_err, ffebld unit_expr,
ffestpFile *file_spec,
ffestpFile *stat_spec,
@@ -141,7 +144,7 @@ static tree ffeste_io_olist_ (bool have_err, ffebld unit_expr,
ffestpFile *blank_spec);
static void ffeste_subr_beru_ (ffestpBeruStmt *info, ffecomGfrt rt);
#elif FFECOM_targetCURRENT == FFECOM_targetFFE
-static void ffeste_subr_file_ (char *kw, ffestpFile *spec);
+static void ffeste_subr_file_ (const char *kw, ffestpFile *spec);
#else
#error
#endif
@@ -177,118 +180,325 @@ static void ffeste_subr_file_ (char *kw, ffestpFile *spec);
|| ffeste_statelet_ == FFESTE_stateletITEM_); \
ffeste_statelet_ = FFESTE_stateletSIMPLE_
-#define ffeste_f2c_charnolenspec_(Spec,Exp,Init) \
+#define ffeste_f2c_init_charnolen_(Exp,Init,Spec) \
do \
{ \
- if (Spec->kw_or_val_present) \
- Exp = ffecom_arg_ptr_to_expr(Spec->u.expr,&ignore); \
+ if ((Spec)->kw_or_val_present) \
+ Exp = ffecom_arg_ptr_to_const_expr ((Spec)->u.expr, &ignore); \
else \
Exp = null_pointer_node; \
- if (TREE_CONSTANT(Exp)) \
- { \
+ if (Exp) \
Init = Exp; \
- Exp = NULL_TREE; \
- } \
else \
{ \
- Init = null_pointer_node; \
- constantp = FALSE; \
+ Init = null_pointer_node; \
+ constantp = FALSE; \
} \
} while(0)
-#define ffeste_f2c_charspec_(Spec,Exp,Init,Lenexp,Leninit) \
+#define ffeste_f2c_init_char_(Exp,Init,Lenexp,Leninit,Spec) \
do \
{ \
- if (Spec->kw_or_val_present) \
- Exp = ffecom_arg_ptr_to_expr(Spec->u.expr,&Lenexp); \
+ if ((Spec)->kw_or_val_present) \
+ Exp = ffecom_arg_ptr_to_const_expr ((Spec)->u.expr, &Lenexp); \
else \
{ \
- Exp = null_pointer_node; \
- Lenexp = ffecom_f2c_ftnlen_zero_node; \
+ Exp = null_pointer_node; \
+ Lenexp = ffecom_f2c_ftnlen_zero_node; \
} \
- if (TREE_CONSTANT(Exp)) \
- { \
+ if (Exp) \
Init = Exp; \
- Exp = NULL_TREE; \
+ else \
+ { \
+ Init = null_pointer_node; \
+ constantp = FALSE; \
} \
+ if (Lenexp) \
+ Leninit = Lenexp; \
else \
{ \
- Init = null_pointer_node; \
- constantp = FALSE; \
+ Leninit = ffecom_f2c_ftnlen_zero_node; \
+ constantp = FALSE; \
} \
- if ((Lenexp != NULL_TREE) && TREE_CONSTANT(Lenexp)) \
+ } while(0)
+
+#define ffeste_f2c_init_flag_(Flag,Init) \
+ do \
+ { \
+ Init = convert (ffecom_f2c_flag_type_node, \
+ (Flag) ? integer_one_node : integer_zero_node); \
+ } while(0)
+
+#define ffeste_f2c_init_format_(Exp,Init,Spec) \
+ do \
+ { \
+ Exp = ffecom_arg_ptr_to_const_expr ((Spec)->u.expr, NULL); \
+ if (Exp) \
+ Init = Exp; \
+ else \
{ \
- Leninit = Lenexp; \
- Lenexp = NULL_TREE; \
+ Init = null_pointer_node; \
+ constantp = FALSE; \
} \
+ } while(0)
+
+#define ffeste_f2c_init_int_(Exp,Init,Spec) \
+ do \
+ { \
+ if ((Spec)->kw_or_val_present) \
+ Exp = ffecom_const_expr ((Spec)->u.expr); \
+ else \
+ Exp = ffecom_integer_zero_node; \
+ if (Exp) \
+ Init = Exp; \
else \
{ \
- Leninit = ffecom_f2c_ftnlen_zero_node; \
- constantp = FALSE; \
+ Init = ffecom_integer_zero_node; \
+ constantp = FALSE; \
} \
} while(0)
-#define ffeste_f2c_exp_(Field,Exp) \
+#define ffeste_f2c_init_ptrtoint_(Exp,Init,Spec) \
do \
{ \
- if (Exp != NULL_TREE) \
+ if ((Spec)->kw_or_val_present) \
+ Exp = ffecom_ptr_to_const_expr ((Spec)->u.expr); \
+ else \
+ Exp = null_pointer_node; \
+ if (Exp) \
+ Init = Exp; \
+ else \
{ \
- Exp = ffecom_modify(void_type_node,ffecom_2(COMPONENT_REF, \
- TREE_TYPE(Field),t,Field),Exp); \
- expand_expr_stmt(Exp); \
+ Init = null_pointer_node; \
+ constantp = FALSE; \
} \
} while(0)
-#define ffeste_f2c_init_(Init) \
+#define ffeste_f2c_init_next_(Init) \
do \
{ \
- TREE_CHAIN(initn) = build_tree_list((field = TREE_CHAIN(field)),Init); \
- initn = TREE_CHAIN(initn); \
+ TREE_CHAIN (initn) = build_tree_list ((field = TREE_CHAIN (field)), \
+ (Init)); \
+ initn = TREE_CHAIN(initn); \
} while(0)
-#define ffeste_f2c_flagspec_(Flag,Init) \
- do { Init = convert (ffecom_f2c_flag_type_node, \
- Flag ? integer_one_node : integer_zero_node); } \
- while(0)
+#define ffeste_f2c_prepare_charnolen_(Spec,Exp) \
+ do \
+ { \
+ if (! (Exp)) \
+ ffecom_prepare_arg_ptr_to_expr ((Spec)->u.expr); \
+ } while(0)
-#define ffeste_f2c_intspec_(Spec,Exp,Init) \
+#define ffeste_f2c_prepare_char_(Spec,Exp) \
do \
{ \
- if (Spec->kw_or_val_present) \
- Exp = ffecom_expr(Spec->u.expr); \
- else \
- Exp = ffecom_integer_zero_node; \
- if (TREE_CONSTANT(Exp)) \
+ if (! (Exp)) \
+ ffecom_prepare_arg_ptr_to_expr ((Spec)->u.expr); \
+ } while(0)
+
+#define ffeste_f2c_prepare_format_(Spec,Exp) \
+ do \
+ { \
+ if (! (Exp)) \
+ ffecom_prepare_arg_ptr_to_expr ((Spec)->u.expr); \
+ } while(0)
+
+#define ffeste_f2c_prepare_int_(Spec,Exp) \
+ do \
+ { \
+ if (! (Exp)) \
+ ffecom_prepare_expr ((Spec)->u.expr); \
+ } while(0)
+
+#define ffeste_f2c_prepare_ptrtoint_(Spec,Exp) \
+ do \
+ { \
+ if (! (Exp)) \
+ ffecom_prepare_ptr_to_expr ((Spec)->u.expr); \
+ } while(0)
+
+#define ffeste_f2c_compile_(Field,Exp) \
+ do \
+ { \
+ tree exz; \
+ if ((Exp)) \
{ \
- Init = Exp; \
- Exp = NULL_TREE; \
+ exz = ffecom_modify (void_type_node, \
+ ffecom_2 (COMPONENT_REF, TREE_TYPE (Field), \
+ t, (Field)), \
+ (Exp)); \
+ expand_expr_stmt (exz); \
} \
- else \
+ } while(0)
+
+#define ffeste_f2c_compile_charnolen_(Field,Spec,Exp) \
+ do \
+ { \
+ tree exq; \
+ if (! (Exp)) \
{ \
- Init = ffecom_integer_zero_node; \
- constantp = FALSE; \
+ exq = ffecom_arg_ptr_to_expr ((Spec)->u.expr, &ignore); \
+ ffeste_f2c_compile_ ((Field), exq); \
} \
} while(0)
-#define ffeste_f2c_ptrtointspec_(Spec,Exp,Init) \
+#define ffeste_f2c_compile_char_(Field,Lenfield,Spec,Exp,Lenexp) \
do \
{ \
- if (Spec->kw_or_val_present) \
- Exp = ffecom_ptr_to_expr(Spec->u.expr); \
- else \
- Exp = null_pointer_node; \
- if (TREE_CONSTANT(Exp)) \
+ tree exq = (Exp); \
+ tree lenexq = (Lenexp); \
+ int need_exq = (! exq); \
+ int need_lenexq = (! lenexq); \
+ if (need_exq || need_lenexq) \
{ \
- Init = Exp; \
- Exp = NULL_TREE; \
+ exq = ffecom_arg_ptr_to_expr ((Spec)->u.expr, &lenexq); \
+ if (need_exq) \
+ ffeste_f2c_compile_ ((Field), exq); \
+ if (need_lenexq) \
+ ffeste_f2c_compile_ ((Lenfield), lenexq); \
} \
- else \
+ } while(0)
+
+#define ffeste_f2c_compile_format_(Field,Spec,Exp) \
+ do \
+ { \
+ tree exq; \
+ if (! (Exp)) \
{ \
- Init = null_pointer_node; \
- constantp = FALSE; \
+ exq = ffecom_arg_ptr_to_expr ((Spec)->u.expr, NULL); \
+ ffeste_f2c_compile_ ((Field), exq); \
+ } \
+ } while(0)
+
+#define ffeste_f2c_compile_int_(Field,Spec,Exp) \
+ do \
+ { \
+ tree exq; \
+ if (! (Exp)) \
+ { \
+ exq = ffecom_expr ((Spec)->u.expr); \
+ ffeste_f2c_compile_ ((Field), exq); \
+ } \
+ } while(0)
+
+#define ffeste_f2c_compile_ptrtoint_(Field,Spec,Exp) \
+ do \
+ { \
+ tree exq; \
+ if (! (Exp)) \
+ { \
+ exq = ffecom_ptr_to_expr ((Spec)->u.expr); \
+ ffeste_f2c_compile_ ((Field), exq); \
} \
} while(0)
+/* Start a Fortran block. */
+
+#ifdef ENABLE_CHECKING
+
+typedef struct gbe_block
+{
+ struct gbe_block *outer;
+ ffestw block;
+ int lineno;
+ char *input_filename;
+ bool is_stmt;
+} *gbe_block;
+
+gbe_block ffeste_top_block_ = NULL;
+
+static void
+ffeste_start_block_ (ffestw block)
+{
+ gbe_block b = xmalloc (sizeof (*b));
+
+ b->outer = ffeste_top_block_;
+ b->block = block;
+ b->lineno = lineno;
+ b->input_filename = input_filename;
+ b->is_stmt = FALSE;
+
+ ffeste_top_block_ = b;
+
+ ffecom_start_compstmt ();
+}
+
+/* End a Fortran block. */
+
+static void
+ffeste_end_block_ (ffestw block)
+{
+ gbe_block b = ffeste_top_block_;
+
+ assert (b);
+ assert (! b->is_stmt);
+ assert (b->block == block);
+ assert (! b->is_stmt);
+
+ ffeste_top_block_ = b->outer;
+
+ free (b);
+
+ clear_momentary ();
+
+ ffecom_end_compstmt ();
+}
+
+/* Start a Fortran statement.
+
+ Starts a back-end block, so temporaries can be managed, clean-ups
+ properly handled, etc. Nesting of statements *is* allowed -- the
+ handling of I/O items, even implied-DO I/O lists, within a READ,
+ PRINT, or WRITE statement is one example. */
+
+static void
+ffeste_start_stmt_(void)
+{
+ gbe_block b = xmalloc (sizeof (*b));
+
+ b->outer = ffeste_top_block_;
+ b->block = NULL;
+ b->lineno = lineno;
+ b->input_filename = input_filename;
+ b->is_stmt = TRUE;
+
+ ffeste_top_block_ = b;
+
+ ffecom_start_compstmt ();
+}
+
+/* End a Fortran statement. */
+
+static void
+ffeste_end_stmt_(void)
+{
+ gbe_block b = ffeste_top_block_;
+
+ assert (b);
+ assert (b->is_stmt);
+
+ ffeste_top_block_ = b->outer;
+
+ free (b);
+
+ clear_momentary ();
+
+ ffecom_end_compstmt ();
+}
+
+#else /* ! defined (ENABLE_CHECKING) */
+
+#define ffeste_start_block_(b) ffecom_start_compstmt ()
+#define ffeste_end_block_(b) \
+ do \
+ { \
+ clear_momentary (); \
+ ffecom_end_compstmt (); \
+ } while(0)
+#define ffeste_start_stmt_() ffeste_start_block_(NULL)
+#define ffeste_end_stmt_() ffeste_end_block_(NULL)
+
+#endif /* ! defined (ENABLE_CHECKING) */
/* Begin an iterative DO loop. Pass the block to start if applicable.
@@ -302,7 +512,7 @@ ffeste_begin_iterdo_ (ffestw block, tree *xtvar, tree *xtincr,
ffebld start, ffelexToken start_token,
ffebld end, ffelexToken end_token,
ffebld incr, ffelexToken incr_token,
- char *msg)
+ const char *msg)
{
tree tvar;
tree expr;
@@ -311,12 +521,43 @@ ffeste_begin_iterdo_ (ffestw block, tree *xtvar, tree *xtincr,
tree tincr;
tree tincr_saved;
tree niters;
+ struct nesting *expanded_loop;
+
+ /* Want to have tvar, tincr, and niters for the whole loop body. */
+
+ if (block)
+ ffeste_start_block_ (block);
+ else
+ ffeste_start_stmt_ ();
+
+ niters = ffecom_make_tempvar (block ? "do" : "impdo",
+ ffecom_integer_type_node,
+ FFETARGET_charactersizeNONE, -1);
- push_momentary (); /* Want to save these throughout the loop. */
+ ffecom_prepare_expr (incr);
+ ffecom_prepare_expr_rw (NULL_TREE, var);
- tvar = ffecom_expr_rw (var);
+ ffecom_prepare_end ();
+
+ tvar = ffecom_expr_rw (NULL_TREE, var);
tincr = ffecom_expr (incr);
+ if (TREE_CODE (tvar) == ERROR_MARK
+ || TREE_CODE (tincr) == ERROR_MARK)
+ {
+ if (block)
+ {
+ ffeste_end_block_ (block);
+ ffestw_set_do_tvar (block, error_mark_node);
+ }
+ else
+ {
+ ffeste_end_stmt_ ();
+ *xtvar = error_mark_node;
+ }
+ return;
+ }
+
/* Check whether incr is known to be zero, complain and fix. */
if (integer_zerop (tincr) || real_zerop (tincr))
@@ -331,16 +572,43 @@ ffeste_begin_iterdo_ (ffestw block, tree *xtvar, tree *xtincr,
tincr_saved = ffecom_save_tree (tincr);
- push_momentary (); /* Want to discard the rest after the loop. */
+ preserve_momentary ();
+
+ /* Want to have tstart, tend for just this statement. */
+
+ ffeste_start_stmt_ ();
+
+ ffecom_prepare_expr (start);
+ ffecom_prepare_expr (end);
+
+ ffecom_prepare_end ();
tstart = ffecom_expr (start);
tend = ffecom_expr (end);
- { /* For warnings only, nothing else
- happens here. */
+ if (TREE_CODE (tstart) == ERROR_MARK
+ || TREE_CODE (tend) == ERROR_MARK)
+ {
+ ffeste_end_stmt_ ();
+
+ if (block)
+ {
+ ffeste_end_block_ (block);
+ ffestw_set_do_tvar (block, error_mark_node);
+ }
+ else
+ {
+ ffeste_end_stmt_ ();
+ *xtvar = error_mark_node;
+ }
+ return;
+ }
+
+ /* For warnings only, nothing else happens here. */
+ {
tree try;
- if (!ffe_is_onetrip ())
+ if (! ffe_is_onetrip ())
{
try = ffecom_2 (MINUS_EXPR, TREE_TYPE (tvar),
tend,
@@ -402,7 +670,7 @@ ffeste_begin_iterdo_ (ffestw block, tree *xtvar, tree *xtincr,
tend,
tstart);
- if (!ffe_is_onetrip ())
+ if (! ffe_is_onetrip ())
{
expr = ffecom_2 (PLUS_EXPR, TREE_TYPE (expr),
expr,
@@ -434,21 +702,22 @@ ffeste_begin_iterdo_ (ffestw block, tree *xtvar, tree *xtincr,
expr = convert (ffecom_integer_type_node, expr);
#endif
- niters = ffecom_push_tempvar (TREE_TYPE (expr),
- FFETARGET_charactersizeNONE, -1, FALSE);
+ assert (TYPE_MAIN_VARIANT (TREE_TYPE (niters))
+ == TYPE_MAIN_VARIANT (TREE_TYPE (expr)));
+
expr = ffecom_modify (void_type_node, niters, expr);
expand_expr_stmt (expr);
expr = ffecom_modify (void_type_node, tvar, tstart);
expand_expr_stmt (expr);
- if (block == NULL)
- expand_start_loop_continue_elsewhere (0);
- else
- ffestw_set_do_hook (block,
- expand_start_loop_continue_elsewhere (1));
+ ffeste_end_stmt_ ();
+
+ expanded_loop = expand_start_loop_continue_elsewhere (!! block);
+ if (block)
+ ffestw_set_do_hook (block, expanded_loop);
- if (!ffe_is_onetrip ())
+ if (! ffe_is_onetrip ())
{
expr = ffecom_truth_value
(ffecom_2 (GE_EXPR, integer_type_node,
@@ -463,21 +732,18 @@ ffeste_begin_iterdo_ (ffestw block, tree *xtvar, tree *xtincr,
expand_exit_loop_if_false (0, expr);
}
- clear_momentary (); /* Discard the above now that we're done with
- DO stmt. */
-
- if (block == NULL)
- {
- *xtvar = tvar;
- *xtincr = tincr_saved;
- *xitersvar = niters;
- }
- else
+ if (block)
{
ffestw_set_do_tvar (block, tvar);
ffestw_set_do_incr_saved (block, tincr_saved);
ffestw_set_do_count_var (block, niters);
}
+ else
+ {
+ *xtvar = tvar;
+ *xtincr = tincr_saved;
+ *xitersvar = niters;
+ }
}
#endif
@@ -487,13 +753,18 @@ ffeste_begin_iterdo_ (ffestw block, tree *xtvar, tree *xtincr,
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static void
-ffeste_end_iterdo_ (tree tvar, tree tincr, tree itersvar)
+ffeste_end_iterdo_ (ffestw block, tree tvar, tree tincr, tree itersvar)
{
tree expr;
tree niters = itersvar;
+ if (tvar == error_mark_node)
+ return;
+
expand_loop_continue_here ();
+ ffeste_start_stmt_ ();
+
if (ffe_is_onetrip ())
{
expr = ffecom_truth_value
@@ -514,27 +785,21 @@ ffeste_end_iterdo_ (tree tvar, tree tincr, tree itersvar)
tvar,
tincr));
expand_expr_stmt (expr);
- expand_end_loop ();
- ffecom_pop_tempvar (itersvar); /* Free #iters var. */
+ /* Lose the stuff we just built. */
+ ffeste_end_stmt_ ();
- clear_momentary ();
- pop_momentary (); /* Lose the stuff we just built. */
+ expand_end_loop ();
- clear_momentary ();
- pop_momentary (); /* Lose the tvar and incr_saved trees. */
+ /* Lose the tvar and incr_saved trees. */
+ if (block)
+ ffeste_end_block_ (block);
+ else
+ ffeste_end_stmt_ ();
}
-
#endif
-/* ffeste_io_call_ -- Generate call to run-time I/O routine
-
- tree callexpr = build(CALL_EXPR,...);
- ffeste_io_call_(callexpr,TRUE);
- Sets TREE_SIDE_EFFECTS(callexpr) = 1. If ffeste_io_iostat_ is not
- NULL_TREE, replaces callexpr with "iostat = callexpr;". Expands the
- result. If ffeste_io_abort_ is not NULL_TREE and the second argument
- is TRUE, generates "if (iostat != 0) goto ffeste_io_abort_;". */
+/* Generate call to run-time I/O routine. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static void
@@ -544,15 +809,13 @@ ffeste_io_call_ (tree call, bool do_check)
TREE_SIDE_EFFECTS (call) = 1;
if (ffeste_io_iostat_ != NULL_TREE)
- {
- call = ffecom_modify (do_check ? NULL_TREE : void_type_node,
- ffeste_io_iostat_, call);
- }
+ call = ffecom_modify (do_check ? NULL_TREE : void_type_node,
+ ffeste_io_iostat_, call);
expand_expr_stmt (call);
- if (!do_check
- || (ffeste_io_abort_ == NULL_TREE)
- || (TREE_CODE (ffeste_io_abort_) == ERROR_MARK))
+ if (! do_check
+ || ffeste_io_abort_ == NULL_TREE
+ || TREE_CODE (ffeste_io_abort_) == ERROR_MARK)
return;
/* Generate optional test. */
@@ -561,13 +824,96 @@ ffeste_io_call_ (tree call, bool do_check)
expand_goto (ffeste_io_abort_);
expand_end_cond ();
}
+#endif
+
+/* Handle implied-DO in I/O list.
+
+ Expands code to start up the DO loop. Then for each item in the
+ DO loop, handles appropriately (possibly including recursively calling
+ itself). Then expands code to end the DO loop. */
+
+#if FFECOM_targetCURRENT == FFECOM_targetGCC
+static void
+ffeste_io_impdo_ (ffebld impdo, ffelexToken impdo_token)
+{
+ ffebld var = ffebld_head (ffebld_right (impdo));
+ ffebld start = ffebld_head (ffebld_trail (ffebld_right (impdo)));
+ ffebld end = ffebld_head (ffebld_trail (ffebld_trail
+ (ffebld_right (impdo))));
+ ffebld incr = ffebld_head (ffebld_trail (ffebld_trail
+ (ffebld_trail (ffebld_right (impdo)))));
+ ffebld list;
+ ffebld item;
+ tree tvar;
+ tree tincr;
+ tree titervar;
+
+ if (incr == NULL)
+ {
+ incr = ffebld_new_conter (ffebld_constant_new_integerdefault_val (1));
+ ffebld_set_info (incr, ffeinfo_new
+ (FFEINFO_basictypeINTEGER,
+ FFEINFO_kindtypeINTEGERDEFAULT,
+ 0,
+ FFEINFO_kindENTITY,
+ FFEINFO_whereCONSTANT,
+ FFETARGET_charactersizeNONE));
+ }
+
+ /* Start the DO loop. */
+
+ start = ffeexpr_convert_expr (start, impdo_token, var, impdo_token,
+ FFEEXPR_contextLET);
+ end = ffeexpr_convert_expr (end, impdo_token, var, impdo_token,
+ FFEEXPR_contextLET);
+ incr = ffeexpr_convert_expr (incr, impdo_token, var, impdo_token,
+ FFEEXPR_contextLET);
+
+ ffeste_begin_iterdo_ (NULL, &tvar, &tincr, &titervar, var,
+ start, impdo_token,
+ end, impdo_token,
+ incr, impdo_token,
+ "Implied DO loop");
+
+ /* Handle the list of items. */
+
+ for (list = ffebld_left (impdo); list != NULL; list = ffebld_trail (list))
+ {
+ item = ffebld_head (list);
+ if (item == NULL)
+ continue;
+
+ /* Strip parens off items such as in "READ *,(A)". This is really a bug
+ in the user's code, but I've been told lots of code does this. */
+ while (ffebld_op (item) == FFEBLD_opPAREN)
+ item = ffebld_left (item);
+
+ if (ffebld_op (item) == FFEBLD_opANY)
+ continue;
+
+ if (ffebld_op (item) == FFEBLD_opIMPDO)
+ ffeste_io_impdo_ (item, impdo_token);
+ else
+ {
+ ffeste_start_stmt_ ();
+
+ ffecom_prepare_arg_ptr_to_expr (item);
+
+ ffecom_prepare_end ();
+
+ ffeste_io_call_ ((*ffeste_io_driver_) (item), TRUE);
+
+ ffeste_end_stmt_ ();
+ }
+ }
+
+ /* Generate end of implied-do construct. */
+ ffeste_end_iterdo_ (NULL, tvar, tincr, titervar);
+}
#endif
-/* ffeste_io_dofio_ -- Generate call to do_fio for formatted I/O item
- ffebld expr;
- tree call;
- call = ffeste_io_dofio_(expr);
+/* I/O driver for formatted I/O item (do_fio)
Returns a tree for a CALL_EXPR to the do_fio function, which handles
a formatted I/O list item, along with the appropriate arguments for
@@ -603,16 +949,11 @@ ffeste_io_dofio_ (ffebld expr)
else
is_complex = FALSE;
- ffecom_push_calltemps ();
-
variable = ffecom_arg_ptr_to_expr (expr, &size);
if ((variable == error_mark_node)
|| (size == error_mark_node))
- {
- ffecom_pop_calltemps ();
- return error_mark_node;
- }
+ return error_mark_node;
if (size == NULL_TREE) /* Already filled in for CHARACTER type. */
{ /* "(ftnlen) sizeof(type)" */
@@ -629,14 +970,15 @@ ffeste_io_dofio_ (ffebld expr)
size = convert (ffecom_f2c_ftnlen_type_node, size);
}
- if ((ffeinfo_rank (ffebld_info (expr)) == 0)
- || (TREE_CODE (TREE_TYPE (TREE_TYPE (variable))) != ARRAY_TYPE))
- num_elements = is_complex ? ffecom_f2c_ftnlen_two_node
- : ffecom_f2c_ftnlen_one_node;
+ if (ffeinfo_rank (ffebld_info (expr)) == 0
+ || TREE_CODE (TREE_TYPE (TREE_TYPE (variable))) != ARRAY_TYPE)
+ num_elements
+ = is_complex ? ffecom_f2c_ftnlen_two_node : ffecom_f2c_ftnlen_one_node;
else
{
num_elements = size_binop (CEIL_DIV_EXPR,
- TYPE_SIZE (TREE_TYPE (TREE_TYPE (variable))), size);
+ TYPE_SIZE (TREE_TYPE (TREE_TYPE (variable))),
+ size);
num_elements = size_binop (CEIL_DIV_EXPR,
num_elements,
size_int (TYPE_PRECISION
@@ -655,17 +997,11 @@ ffeste_io_dofio_ (ffebld expr)
TREE_CHAIN (arglist) = build_tree_list (NULL_TREE, variable);
TREE_CHAIN (TREE_CHAIN (arglist)) = build_tree_list (NULL_TREE, size);
- ffecom_pop_calltemps ();
-
- return ffecom_call_gfrt (FFECOM_gfrtDOFIO, arglist);
+ return ffecom_call_gfrt (FFECOM_gfrtDOFIO, arglist, NULL_TREE);
}
#endif
-/* ffeste_io_dolio_ -- Generate call to do_lio for list-directed I/O item
-
- ffebld expr;
- tree call;
- call = ffeste_io_dolio_(expr);
+/* I/O driver for list-directed I/O item (do_lio)
Returns a tree for a CALL_EXPR to the do_lio function, which handles
a list-directed I/O list item, along with the appropriate arguments for
@@ -694,8 +1030,6 @@ ffeste_io_dolio_ (ffebld expr)
|| (kt == FFEINFO_kindtypeANY))
return error_mark_node;
- ffecom_push_calltemps ();
-
tc = ffecom_f2c_typecode (bt, kt);
assert (tc != -1);
type_id = build_int_2 (tc, 0);
@@ -710,10 +1044,7 @@ ffeste_io_dolio_ (ffebld expr)
if ((type_id == error_mark_node)
|| (variable == error_mark_node)
|| (size == error_mark_node))
- {
- ffecom_pop_calltemps ();
- return error_mark_node;
- }
+ return error_mark_node;
if (size == NULL_TREE) /* Already filled in for CHARACTER type. */
{ /* "(ftnlen) sizeof(type)" */
@@ -730,13 +1061,14 @@ ffeste_io_dolio_ (ffebld expr)
size = convert (ffecom_f2c_ftnlen_type_node, size);
}
- if ((ffeinfo_rank (ffebld_info (expr)) == 0)
- || (TREE_CODE (TREE_TYPE (TREE_TYPE (variable))) != ARRAY_TYPE))
+ if (ffeinfo_rank (ffebld_info (expr)) == 0
+ || TREE_CODE (TREE_TYPE (TREE_TYPE (variable))) != ARRAY_TYPE)
num_elements = ffecom_integer_one_node;
else
{
num_elements = size_binop (CEIL_DIV_EXPR,
- TYPE_SIZE (TREE_TYPE (TREE_TYPE (variable))), size);
+ TYPE_SIZE (TREE_TYPE (TREE_TYPE (variable))),
+ size);
num_elements = size_binop (CEIL_DIV_EXPR,
num_elements,
size_int (TYPE_PRECISION
@@ -757,17 +1089,11 @@ ffeste_io_dolio_ (ffebld expr)
TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (arglist)))
= build_tree_list (NULL_TREE, size);
- ffecom_pop_calltemps ();
-
- return ffecom_call_gfrt (FFECOM_gfrtDOLIO, arglist);
+ return ffecom_call_gfrt (FFECOM_gfrtDOLIO, arglist, NULL_TREE);
}
#endif
-/* ffeste_io_douio_ -- Generate call to do_uio for unformatted I/O item
-
- ffebld expr;
- tree call;
- call = ffeste_io_douio_(expr);
+/* I/O driver for unformatted I/O item (do_uio)
Returns a tree for a CALL_EXPR to the do_uio function, which handles
an unformatted I/O list item, along with the appropriate arguments for
@@ -803,16 +1129,11 @@ ffeste_io_douio_ (ffebld expr)
else
is_complex = FALSE;
- ffecom_push_calltemps ();
-
variable = ffecom_arg_ptr_to_expr (expr, &size);
if ((variable == error_mark_node)
|| (size == error_mark_node))
- {
- ffecom_pop_calltemps ();
- return error_mark_node;
- }
+ return error_mark_node;
if (size == NULL_TREE) /* Already filled in for CHARACTER type. */
{ /* "(ftnlen) sizeof(type)" */
@@ -829,14 +1150,15 @@ ffeste_io_douio_ (ffebld expr)
size = convert (ffecom_f2c_ftnlen_type_node, size);
}
- if ((ffeinfo_rank (ffebld_info (expr)) == 0)
- || (TREE_CODE (TREE_TYPE (TREE_TYPE (variable))) != ARRAY_TYPE))
- num_elements = is_complex ? ffecom_f2c_ftnlen_two_node
- : ffecom_f2c_ftnlen_one_node;
+ if (ffeinfo_rank (ffebld_info (expr)) == 0
+ || TREE_CODE (TREE_TYPE (TREE_TYPE (variable))) != ARRAY_TYPE)
+ num_elements
+ = is_complex ? ffecom_f2c_ftnlen_two_node : ffecom_f2c_ftnlen_one_node;
else
{
num_elements = size_binop (CEIL_DIV_EXPR,
- TYPE_SIZE (TREE_TYPE (TREE_TYPE (variable))), size);
+ TYPE_SIZE (TREE_TYPE (TREE_TYPE (variable))),
+ size);
num_elements = size_binop (CEIL_DIV_EXPR, num_elements,
size_int (TYPE_PRECISION
(char_type_node)));
@@ -854,21 +1176,24 @@ ffeste_io_douio_ (ffebld expr)
TREE_CHAIN (arglist) = build_tree_list (NULL_TREE, variable);
TREE_CHAIN (TREE_CHAIN (arglist)) = build_tree_list (NULL_TREE, size);
- ffecom_pop_calltemps ();
-
- return ffecom_call_gfrt (FFECOM_gfrtDOUIO, arglist);
+ return ffecom_call_gfrt (FFECOM_gfrtDOUIO, arglist, NULL_TREE);
}
#endif
-/* ffeste_io_ialist_ -- Make arglist with ptr to B/E/R control list
-
- tree arglist;
- arglist = ffeste_io_ialist_(...);
+/* Make arglist with ptr to BACKSPACE/ENDFILE/REWIND control list.
Returns a tree suitable as an argument list containing a pointer to
a BACKSPACE/ENDFILE/REWIND control list. First, generates that control
list, if necessary, along with any static and run-time initializations
- that are needed as specified by the arguments to this function. */
+ that are needed as specified by the arguments to this function.
+
+ Must ensure that all expressions are prepared before being evaluated,
+ for any whose evaluation might result in the generation of temporaries.
+
+ Note that this means this function causes a transition, within the
+ current block being code-generated via the back end, from the
+ declaration of variables (temporaries) to the expanding of expressions,
+ statements, etc. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree
@@ -912,23 +1237,23 @@ ffeste_io_ialist_ (bool have_err,
f2c_alist_struct = ref;
}
- ffeste_f2c_flagspec_ (have_err, errinit);
+ /* Try to do as much compile-time initialization of the structure
+ as possible, to save run time. */
+
+ ffeste_f2c_init_flag_ (have_err, errinit);
switch (unit)
{
case FFESTV_unitNONE:
case FFESTV_unitASTERISK:
unitinit = build_int_2 (unit_dflt, 0);
- unitexp = NULL_TREE;
+ unitexp = unitinit;
break;
case FFESTV_unitINTEXPR:
- unitexp = ffecom_expr (unit_expr);
- if (TREE_CONSTANT (unitexp))
- {
- unitinit = unitexp;
- unitexp = NULL_TREE;
- }
+ unitexp = ffecom_const_expr (unit_expr);
+ if (unitexp)
+ unitinit = unitexp;
else
{
unitinit = ffecom_integer_zero_node;
@@ -938,14 +1263,14 @@ ffeste_io_ialist_ (bool have_err,
default:
assert ("bad unit spec" == NULL);
- unitexp = NULL_TREE;
unitinit = ffecom_integer_zero_node;
+ unitexp = unitinit;
break;
}
inits = build_tree_list ((field = TYPE_FIELDS (f2c_alist_struct)), errinit);
initn = inits;
- ffeste_f2c_init_ (unitinit);
+ ffeste_f2c_init_next_ (unitinit);
inits = build (CONSTRUCTOR, f2c_alist_struct, NULL_TREE, inits);
TREE_CONSTANT (inits) = constantp ? 1 : 0;
@@ -963,7 +1288,20 @@ ffeste_io_ialist_ (bool have_err,
resume_momentary (yes);
- ffeste_f2c_exp_ (unitfield, unitexp);
+ /* Prepare run-time expressions. */
+
+ if (! unitexp)
+ ffecom_prepare_expr (unit_expr);
+
+ ffecom_prepare_end ();
+
+ /* Now evaluate run-time expressions as needed. */
+
+ if (! unitexp)
+ {
+ unitexp = ffecom_expr (unit_expr);
+ ffeste_f2c_compile_ (unitfield, unitexp);
+ }
ttype = build_pointer_type (TREE_TYPE (t));
t = ffecom_1 (ADDR_EXPR, ttype, t);
@@ -974,15 +1312,20 @@ ffeste_io_ialist_ (bool have_err,
}
#endif
-/* ffeste_io_cilist_ -- Make arglist with ptr to external I/O control list
-
- tree arglist;
- arglist = ffeste_io_cilist_(...);
+/* Make arglist with ptr to external-I/O control list.
Returns a tree suitable as an argument list containing a pointer to
- an external-file I/O control list. First, generates that control
+ an external-I/O control list. First, generates that control
list, if necessary, along with any static and run-time initializations
- that are needed as specified by the arguments to this function. */
+ that are needed as specified by the arguments to this function.
+
+ Must ensure that all expressions are prepared before being evaluated,
+ for any whose evaluation might result in the generation of temporaries.
+
+ Note that this means this function causes a transition, within the
+ current block being code-generated via the back end, from the
+ declaration of variables (temporaries) to the expanding of expressions,
+ statements, etc. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree
@@ -1037,23 +1380,23 @@ ffeste_io_cilist_ (bool have_err,
f2c_cilist_struct = ref;
}
- ffeste_f2c_flagspec_ (have_err, errinit);
+ /* Try to do as much compile-time initialization of the structure
+ as possible, to save run time. */
+
+ ffeste_f2c_init_flag_ (have_err, errinit);
switch (unit)
{
case FFESTV_unitNONE:
case FFESTV_unitASTERISK:
unitinit = build_int_2 (unit_dflt, 0);
- unitexp = NULL_TREE;
+ unitexp = unitinit;
break;
case FFESTV_unitINTEXPR:
- unitexp = ffecom_expr (unit_expr);
- if (TREE_CONSTANT (unitexp))
- {
- unitinit = unitexp;
- unitexp = NULL_TREE;
- }
+ unitexp = ffecom_const_expr (unit_expr);
+ if (unitexp)
+ unitinit = unitexp;
else
{
unitinit = ffecom_integer_zero_node;
@@ -1063,8 +1406,8 @@ ffeste_io_cilist_ (bool have_err,
default:
assert ("bad unit spec" == NULL);
- unitexp = NULL_TREE;
unitinit = ffecom_integer_zero_node;
+ unitexp = unitinit;
break;
}
@@ -1072,11 +1415,11 @@ ffeste_io_cilist_ (bool have_err,
{
case FFESTV_formatNONE:
formatinit = null_pointer_node;
- formatexp = NULL_TREE;
+ formatexp = formatinit;
break;
case FFESTV_formatLABEL:
- formatexp = NULL_TREE;
+ formatexp = error_mark_node;
formatinit = ffecom_lookup_label (format_spec->u.label);
if ((formatinit == NULL_TREE)
|| (TREE_CODE (formatinit) == ERROR_MARK))
@@ -1088,12 +1431,9 @@ ffeste_io_cilist_ (bool have_err,
break;
case FFESTV_formatCHAREXPR:
- formatexp = ffecom_arg_ptr_to_expr (format_spec->u.expr, NULL);
- if (TREE_CONSTANT (formatexp))
- {
- formatinit = formatexp;
- formatexp = NULL_TREE;
- }
+ formatexp = ffecom_arg_ptr_to_const_expr (format_spec->u.expr, NULL);
+ if (formatexp)
+ formatinit = formatexp;
else
{
formatinit = null_pointer_node;
@@ -1103,7 +1443,7 @@ ffeste_io_cilist_ (bool have_err,
case FFESTV_formatASTERISK:
formatinit = null_pointer_node;
- formatexp = NULL_TREE;
+ formatexp = formatinit;
break;
case FFESTV_formatINTEXPR:
@@ -1117,27 +1457,24 @@ ffeste_io_cilist_ (bool have_err,
case FFESTV_formatNAMELIST:
formatinit = ffecom_expr (format_spec->u.expr);
- formatexp = NULL_TREE;
+ formatexp = formatinit;
break;
default:
assert ("bad format spec" == NULL);
- formatexp = NULL_TREE;
formatinit = integer_zero_node;
+ formatexp = formatinit;
break;
}
- ffeste_f2c_flagspec_ (have_end, endinit);
+ ffeste_f2c_init_flag_ (have_end, endinit);
if (rec)
- recexp = ffecom_expr (rec_expr);
+ recexp = ffecom_const_expr (rec_expr);
else
recexp = ffecom_integer_zero_node;
- if (TREE_CONSTANT (recexp))
- {
- recinit = recexp;
- recexp = NULL_TREE;
- }
+ if (recexp)
+ recinit = recexp;
else
{
recinit = ffecom_integer_zero_node;
@@ -1146,10 +1483,10 @@ ffeste_io_cilist_ (bool have_err,
inits = build_tree_list ((field = TYPE_FIELDS (f2c_cilist_struct)), errinit);
initn = inits;
- ffeste_f2c_init_ (unitinit);
- ffeste_f2c_init_ (endinit);
- ffeste_f2c_init_ (formatinit);
- ffeste_f2c_init_ (recinit);
+ ffeste_f2c_init_next_ (unitinit);
+ ffeste_f2c_init_next_ (endinit);
+ ffeste_f2c_init_next_ (formatinit);
+ ffeste_f2c_init_next_ (recinit);
inits = build (CONSTRUCTOR, f2c_cilist_struct, NULL_TREE, inits);
TREE_CONSTANT (inits) = constantp ? 1 : 0;
@@ -1167,9 +1504,40 @@ ffeste_io_cilist_ (bool have_err,
resume_momentary (yes);
- ffeste_f2c_exp_ (unitfield, unitexp);
- ffeste_f2c_exp_ (formatfield, formatexp);
- ffeste_f2c_exp_ (recfield, recexp);
+ /* Prepare run-time expressions. */
+
+ if (! unitexp)
+ ffecom_prepare_expr (unit_expr);
+
+ if (! formatexp)
+ ffecom_prepare_arg_ptr_to_expr (format_spec->u.expr);
+
+ if (! recexp)
+ ffecom_prepare_expr (rec_expr);
+
+ ffecom_prepare_end ();
+
+ /* Now evaluate run-time expressions as needed. */
+
+ if (! unitexp)
+ {
+ unitexp = ffecom_expr (unit_expr);
+ ffeste_f2c_compile_ (unitfield, unitexp);
+ }
+
+ if (! formatexp)
+ {
+ formatexp = ffecom_arg_ptr_to_expr (format_spec->u.expr, NULL);
+ ffeste_f2c_compile_ (formatfield, formatexp);
+ }
+ else if (format == FFESTV_formatINTEXPR)
+ ffeste_f2c_compile_ (formatfield, formatexp);
+
+ if (! recexp)
+ {
+ recexp = ffecom_expr (rec_expr);
+ ffeste_f2c_compile_ (recfield, recexp);
+ }
ttype = build_pointer_type (TREE_TYPE (t));
t = ffecom_1 (ADDR_EXPR, ttype, t);
@@ -1180,15 +1548,20 @@ ffeste_io_cilist_ (bool have_err,
}
#endif
-/* ffeste_io_cllist_ -- Make arglist with ptr to CLOSE control list
-
- tree arglist;
- arglist = ffeste_io_cllist_(...);
+/* Make arglist with ptr to CLOSE control list.
Returns a tree suitable as an argument list containing a pointer to
a CLOSE-statement control list. First, generates that control
list, if necessary, along with any static and run-time initializations
- that are needed as specified by the arguments to this function. */
+ that are needed as specified by the arguments to this function.
+
+ Must ensure that all expressions are prepared before being evaluated,
+ for any whose evaluation might result in the generation of temporaries.
+
+ Note that this means this function causes a transition, within the
+ current block being code-generated via the back end, from the
+ declaration of variables (temporaries) to the expanding of expressions,
+ statements, etc. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree
@@ -1234,26 +1607,26 @@ ffeste_io_cllist_ (bool have_err,
f2c_close_struct = ref;
}
- ffeste_f2c_flagspec_ (have_err, errinit);
+ /* Try to do as much compile-time initialization of the structure
+ as possible, to save run time. */
- unitexp = ffecom_expr (unit_expr);
- if (TREE_CONSTANT (unitexp))
- {
- unitinit = unitexp;
- unitexp = NULL_TREE;
- }
+ ffeste_f2c_init_flag_ (have_err, errinit);
+
+ unitexp = ffecom_const_expr (unit_expr);
+ if (unitexp)
+ unitinit = unitexp;
else
{
unitinit = ffecom_integer_zero_node;
constantp = FALSE;
}
- ffeste_f2c_charnolenspec_ (stat_spec, statexp, statinit);
+ ffeste_f2c_init_charnolen_ (statexp, statinit, stat_spec);
inits = build_tree_list ((field = TYPE_FIELDS (f2c_close_struct)), errinit);
initn = inits;
- ffeste_f2c_init_ (unitinit);
- ffeste_f2c_init_ (statinit);
+ ffeste_f2c_init_next_ (unitinit);
+ ffeste_f2c_init_next_ (statinit);
inits = build (CONSTRUCTOR, f2c_close_struct, NULL_TREE, inits);
TREE_CONSTANT (inits) = constantp ? 1 : 0;
@@ -1271,8 +1644,25 @@ ffeste_io_cllist_ (bool have_err,
resume_momentary (yes);
- ffeste_f2c_exp_ (unitfield, unitexp);
- ffeste_f2c_exp_ (statfield, statexp);
+ /* Prepare run-time expressions. */
+
+ if (! unitexp)
+ ffecom_prepare_expr (unit_expr);
+
+ if (! statexp)
+ ffecom_prepare_arg_ptr_to_expr (stat_spec->u.expr);
+
+ ffecom_prepare_end ();
+
+ /* Now evaluate run-time expressions as needed. */
+
+ if (! unitexp)
+ {
+ unitexp = ffecom_expr (unit_expr);
+ ffeste_f2c_compile_ (unitfield, unitexp);
+ }
+
+ ffeste_f2c_compile_charnolen_ (statfield, stat_spec, statexp);
ttype = build_pointer_type (TREE_TYPE (t));
t = ffecom_1 (ADDR_EXPR, ttype, t);
@@ -1283,15 +1673,20 @@ ffeste_io_cllist_ (bool have_err,
}
#endif
-/* ffeste_io_icilist_ -- Make arglist with ptr to internal I/O control list
-
- tree arglist;
- arglist = ffeste_io_icilist_(...);
+/* Make arglist with ptr to internal-I/O control list.
Returns a tree suitable as an argument list containing a pointer to
- an internal-file I/O control list. First, generates that control
+ an internal-I/O control list. First, generates that control
list, if necessary, along with any static and run-time initializations
- that are needed as specified by the arguments to this function. */
+ that are needed as specified by the arguments to this function.
+
+ Must ensure that all expressions are prepared before being evaluated,
+ for any whose evaluation might result in the generation of temporaries.
+
+ Note that this means this function causes a transition, within the
+ current block being code-generated via the back end, from the
+ declaration of variables (temporaries) to the expanding of expressions,
+ statements, etc. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree
@@ -1345,48 +1740,54 @@ ffeste_io_icilist_ (bool have_err,
f2c_icilist_struct = ref;
}
- ffeste_f2c_flagspec_ (have_err, errinit);
+ /* Try to do as much compile-time initialization of the structure
+ as possible, to save run time. */
- unitexp = ffecom_arg_ptr_to_expr (unit_expr, &unitlenexp);
- if ((ffeinfo_rank (ffebld_info (unit_expr)) == 0)
- || (TREE_CODE (TREE_TYPE (TREE_TYPE (unitexp))) != ARRAY_TYPE))
- unitnumexp = ffecom_integer_one_node;
- else
- {
- unitnumexp = size_binop (CEIL_DIV_EXPR,
- TYPE_SIZE (TREE_TYPE (TREE_TYPE (unitexp))), unitlenexp);
- unitnumexp = size_binop (CEIL_DIV_EXPR,
- unitnumexp, size_int (TYPE_PRECISION
- (char_type_node)));
- }
- if (TREE_CONSTANT (unitexp))
- {
- unitinit = unitexp;
- unitexp = NULL_TREE;
- }
+ ffeste_f2c_init_flag_ (have_err, errinit);
+
+ unitexp = ffecom_arg_ptr_to_const_expr (unit_expr, &unitlenexp);
+ if (unitexp)
+ unitinit = unitexp;
else
{
unitinit = null_pointer_node;
constantp = FALSE;
}
- if ((unitlenexp != NULL_TREE) && TREE_CONSTANT (unitlenexp))
- {
- unitleninit = unitlenexp;
- unitlenexp = NULL_TREE;
- }
+ if (unitlenexp)
+ unitleninit = unitlenexp;
else
{
unitleninit = ffecom_integer_zero_node;
constantp = FALSE;
}
- if (TREE_CONSTANT (unitnumexp))
+
+ /* Now see if we can fully initialize the number of elements, or
+ if we have to compute that at run time. */
+ if (ffeinfo_rank (ffebld_info (unit_expr)) == 0
+ || (unitexp
+ && TREE_CODE (TREE_TYPE (TREE_TYPE (unitexp))) != ARRAY_TYPE))
{
- unitnuminit = unitnumexp;
- unitnumexp = NULL_TREE;
+ /* Not an array, so just one element. */
+ unitnuminit = ffecom_integer_one_node;
+ unitnumexp = unitnuminit;
+ }
+ else if (unitexp && unitlenexp)
+ {
+ /* An array, but all the info is constant, so compute now. */
+ unitnuminit = size_binop (CEIL_DIV_EXPR,
+ TYPE_SIZE (TREE_TYPE (TREE_TYPE (unitexp))),
+ unitlenexp);
+ unitnuminit = size_binop (CEIL_DIV_EXPR,
+ unitnuminit,
+ size_int (TYPE_PRECISION
+ (char_type_node)));
+ unitnumexp = unitnuminit;
}
else
{
+ /* Put off computing until run time. */
unitnuminit = ffecom_integer_zero_node;
+ unitnumexp = NULL_TREE;
constantp = FALSE;
}
@@ -1394,11 +1795,11 @@ ffeste_io_icilist_ (bool have_err,
{
case FFESTV_formatNONE:
formatinit = null_pointer_node;
- formatexp = NULL_TREE;
+ formatexp = formatinit;
break;
case FFESTV_formatLABEL:
- formatexp = NULL_TREE;
+ formatexp = error_mark_node;
formatinit = ffecom_lookup_label (format_spec->u.label);
if ((formatinit == NULL_TREE)
|| (TREE_CODE (formatinit) == ERROR_MARK))
@@ -1410,22 +1811,12 @@ ffeste_io_icilist_ (bool have_err,
break;
case FFESTV_formatCHAREXPR:
- formatexp = ffecom_arg_ptr_to_expr (format_spec->u.expr, NULL);
- if (TREE_CONSTANT (formatexp))
- {
- formatinit = formatexp;
- formatexp = NULL_TREE;
- }
- else
- {
- formatinit = null_pointer_node;
- constantp = FALSE;
- }
+ ffeste_f2c_init_format_ (formatexp, formatinit, format_spec);
break;
case FFESTV_formatASTERISK:
formatinit = null_pointer_node;
- formatexp = NULL_TREE;
+ formatexp = formatinit;
break;
case FFESTV_formatINTEXPR:
@@ -1439,21 +1830,21 @@ ffeste_io_icilist_ (bool have_err,
default:
assert ("bad format spec" == NULL);
- formatexp = NULL_TREE;
formatinit = ffecom_integer_zero_node;
+ formatexp = formatinit;
break;
}
- ffeste_f2c_flagspec_ (have_end, endinit);
+ ffeste_f2c_init_flag_ (have_end, endinit);
inits = build_tree_list ((field = TYPE_FIELDS (f2c_icilist_struct)),
errinit);
initn = inits;
- ffeste_f2c_init_ (unitinit);
- ffeste_f2c_init_ (endinit);
- ffeste_f2c_init_ (formatinit);
- ffeste_f2c_init_ (unitleninit);
- ffeste_f2c_init_ (unitnuminit);
+ ffeste_f2c_init_next_ (unitinit);
+ ffeste_f2c_init_next_ (endinit);
+ ffeste_f2c_init_next_ (formatinit);
+ ffeste_f2c_init_next_ (unitleninit);
+ ffeste_f2c_init_next_ (unitnuminit);
inits = build (CONSTRUCTOR, f2c_icilist_struct, NULL_TREE, inits);
TREE_CONSTANT (inits) = constantp ? 1 : 0;
@@ -1471,106 +1862,71 @@ ffeste_io_icilist_ (bool have_err,
resume_momentary (yes);
- ffeste_f2c_exp_ (unitfield, unitexp);
- ffeste_f2c_exp_ (formatfield, formatexp);
- ffeste_f2c_exp_ (unitlenfield, unitlenexp);
- ffeste_f2c_exp_ (unitnumfield, unitnumexp);
-
- ttype = build_pointer_type (TREE_TYPE (t));
- t = ffecom_1 (ADDR_EXPR, ttype, t);
+ /* Prepare run-time expressions. */
- t = build_tree_list (NULL_TREE, t);
+ if (! unitexp)
+ ffecom_prepare_arg_ptr_to_expr (unit_expr);
- return t;
-}
+ ffeste_f2c_prepare_format_ (format_spec, formatexp);
-#endif
-/* ffeste_io_impdo_ -- Handle implied-DO in I/O list
-
- ffebld expr;
- ffeste_io_impdo_(expr);
+ ffecom_prepare_end ();
- Expands code to start up the DO loop. Then for each item in the
- DO loop, handles appropriately (possibly including recursively calling
- itself). Then expands code to end the DO loop. */
-
-#if FFECOM_targetCURRENT == FFECOM_targetGCC
-static void
-ffeste_io_impdo_ (ffebld impdo, ffelexToken impdo_token)
-{
- ffebld var = ffebld_head (ffebld_right (impdo));
- ffebld start = ffebld_head (ffebld_trail (ffebld_right (impdo)));
- ffebld end = ffebld_head (ffebld_trail (ffebld_trail
- (ffebld_right (impdo))));
- ffebld incr = ffebld_head (ffebld_trail (ffebld_trail
- (ffebld_trail (ffebld_right (impdo)))));
- ffebld list; /* Used for list of items in left part of
- impdo. */
- ffebld item; /* I/O item from head of given list. */
- tree tvar;
- tree tincr;
- tree titervar;
+ /* Now evaluate run-time expressions as needed. */
- if (incr == NULL)
+ if (! unitexp || ! unitlenexp)
{
- incr = ffebld_new_conter (ffebld_constant_new_integerdefault_val (1));
- ffebld_set_info (incr, ffeinfo_new
- (FFEINFO_basictypeINTEGER,
- FFEINFO_kindtypeINTEGERDEFAULT,
- 0,
- FFEINFO_kindENTITY,
- FFEINFO_whereCONSTANT,
- FFETARGET_charactersizeNONE));
+ int need_unitexp = (! unitexp);
+ int need_unitlenexp = (! unitlenexp);
+
+ unitexp = ffecom_arg_ptr_to_expr (unit_expr, &unitlenexp);
+ if (need_unitexp)
+ ffeste_f2c_compile_ (unitfield, unitexp);
+ if (need_unitlenexp)
+ ffeste_f2c_compile_ (unitlenfield, unitlenexp);
}
- /* Start the DO loop. */
-
- start = ffeexpr_convert_expr (start, impdo_token, var, impdo_token,
- FFEEXPR_contextLET);
- end = ffeexpr_convert_expr (end, impdo_token, var, impdo_token,
- FFEEXPR_contextLET);
- incr = ffeexpr_convert_expr (incr, impdo_token, var, impdo_token,
- FFEEXPR_contextLET);
-
- ffeste_begin_iterdo_ (NULL, &tvar, &tincr, &titervar, var,
- start, impdo_token,
- end, impdo_token,
- incr, impdo_token,
- "Implied DO loop");
-
- /* Handle the list of items. */
-
- for (list = ffebld_left (impdo); list != NULL; list = ffebld_trail (list))
+ if (! unitnumexp
+ && unitexp != error_mark_node
+ && unitlenexp != error_mark_node)
{
- item = ffebld_head (list);
- if (item == NULL)
- continue;
- while (ffebld_op (item) == FFEBLD_opPAREN)
- item = ffebld_left (item);
- if (ffebld_op (item) == FFEBLD_opANY)
- continue;
- if (ffebld_op (item) == FFEBLD_opIMPDO)
- ffeste_io_impdo_ (item, impdo_token);
- else
- ffeste_io_call_ ((*ffeste_io_driver_) (item), TRUE);
- clear_momentary ();
+ unitnumexp = size_binop (CEIL_DIV_EXPR,
+ TYPE_SIZE (TREE_TYPE (TREE_TYPE (unitexp))),
+ unitlenexp);
+ unitnumexp = size_binop (CEIL_DIV_EXPR,
+ unitnumexp,
+ size_int (TYPE_PRECISION
+ (char_type_node)));
+ ffeste_f2c_compile_ (unitnumfield, unitnumexp);
}
- /* Generate end of implied-do construct. */
+ if (format == FFESTV_formatINTEXPR)
+ ffeste_f2c_compile_ (formatfield, formatexp);
+ else
+ ffeste_f2c_compile_format_ (formatfield, format_spec, formatexp);
- ffeste_end_iterdo_ (tvar, tincr, titervar);
-}
+ ttype = build_pointer_type (TREE_TYPE (t));
+ t = ffecom_1 (ADDR_EXPR, ttype, t);
+ t = build_tree_list (NULL_TREE, t);
+
+ return t;
+}
#endif
-/* ffeste_io_inlist_ -- Make arglist with ptr to INQUIRE control list
- tree arglist;
- arglist = ffeste_io_inlist_(...);
+/* Make arglist with ptr to INQUIRE control list
Returns a tree suitable as an argument list containing a pointer to
an INQUIRE-statement control list. First, generates that control
list, if necessary, along with any static and run-time initializations
- that are needed as specified by the arguments to this function. */
+ that are needed as specified by the arguments to this function.
+
+ Must ensure that all expressions are prepared before being evaluated,
+ for any whose evaluation might result in the generation of temporaries.
+
+ Note that this means this function causes a transition, within the
+ current block being code-generated via the back end, from the
+ declaration of variables (temporaries) to the expanding of expressions,
+ statements, etc. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree
@@ -1691,58 +2047,64 @@ ffeste_io_inlist_ (bool have_err,
f2c_inquire_struct = ref;
}
- ffeste_f2c_flagspec_ (have_err, errinit);
- ffeste_f2c_intspec_ (unit_spec, unitexp, unitinit);
- ffeste_f2c_charspec_ (file_spec, fileexp, fileinit, filelenexp, fileleninit);
- ffeste_f2c_ptrtointspec_ (exist_spec, existexp, existinit);
- ffeste_f2c_ptrtointspec_ (open_spec, openexp, openinit);
- ffeste_f2c_ptrtointspec_ (number_spec, numberexp, numberinit);
- ffeste_f2c_ptrtointspec_ (named_spec, namedexp, namedinit);
- ffeste_f2c_charspec_ (name_spec, nameexp, nameinit, namelenexp, nameleninit);
- ffeste_f2c_charspec_ (access_spec, accessexp, accessinit, accesslenexp,
- accessleninit);
- ffeste_f2c_charspec_ (sequential_spec, sequentialexp, sequentialinit,
- sequentiallenexp, sequentialleninit);
- ffeste_f2c_charspec_ (direct_spec, directexp, directinit, directlenexp,
- directleninit);
- ffeste_f2c_charspec_ (form_spec, formexp, forminit, formlenexp, formleninit);
- ffeste_f2c_charspec_ (formatted_spec, formattedexp, formattedinit,
- formattedlenexp, formattedleninit);
- ffeste_f2c_charspec_ (unformatted_spec, unformattedexp, unformattedinit,
- unformattedlenexp, unformattedleninit);
- ffeste_f2c_ptrtointspec_ (recl_spec, reclexp, reclinit);
- ffeste_f2c_ptrtointspec_ (nextrec_spec, nextrecexp, nextrecinit);
- ffeste_f2c_charspec_ (blank_spec, blankexp, blankinit, blanklenexp,
- blankleninit);
+ /* Try to do as much compile-time initialization of the structure
+ as possible, to save run time. */
+
+ ffeste_f2c_init_flag_ (have_err, errinit);
+ ffeste_f2c_init_int_ (unitexp, unitinit, unit_spec);
+ ffeste_f2c_init_char_ (fileexp, fileinit, filelenexp, fileleninit,
+ file_spec);
+ ffeste_f2c_init_ptrtoint_ (existexp, existinit, exist_spec);
+ ffeste_f2c_init_ptrtoint_ (openexp, openinit, open_spec);
+ ffeste_f2c_init_ptrtoint_ (numberexp, numberinit, number_spec);
+ ffeste_f2c_init_ptrtoint_ (namedexp, namedinit, named_spec);
+ ffeste_f2c_init_char_ (nameexp, nameinit, namelenexp, nameleninit,
+ name_spec);
+ ffeste_f2c_init_char_ (accessexp, accessinit, accesslenexp,
+ accessleninit, access_spec);
+ ffeste_f2c_init_char_ (sequentialexp, sequentialinit, sequentiallenexp,
+ sequentialleninit, sequential_spec);
+ ffeste_f2c_init_char_ (directexp, directinit, directlenexp,
+ directleninit, direct_spec);
+ ffeste_f2c_init_char_ (formexp, forminit, formlenexp, formleninit,
+ form_spec);
+ ffeste_f2c_init_char_ (formattedexp, formattedinit,
+ formattedlenexp, formattedleninit, formatted_spec);
+ ffeste_f2c_init_char_ (unformattedexp, unformattedinit, unformattedlenexp,
+ unformattedleninit, unformatted_spec);
+ ffeste_f2c_init_ptrtoint_ (reclexp, reclinit, recl_spec);
+ ffeste_f2c_init_ptrtoint_ (nextrecexp, nextrecinit, nextrec_spec);
+ ffeste_f2c_init_char_ (blankexp, blankinit, blanklenexp,
+ blankleninit, blank_spec);
inits = build_tree_list ((field = TYPE_FIELDS (f2c_inquire_struct)),
errinit);
initn = inits;
- ffeste_f2c_init_ (unitinit);
- ffeste_f2c_init_ (fileinit);
- ffeste_f2c_init_ (fileleninit);
- ffeste_f2c_init_ (existinit);
- ffeste_f2c_init_ (openinit);
- ffeste_f2c_init_ (numberinit);
- ffeste_f2c_init_ (namedinit);
- ffeste_f2c_init_ (nameinit);
- ffeste_f2c_init_ (nameleninit);
- ffeste_f2c_init_ (accessinit);
- ffeste_f2c_init_ (accessleninit);
- ffeste_f2c_init_ (sequentialinit);
- ffeste_f2c_init_ (sequentialleninit);
- ffeste_f2c_init_ (directinit);
- ffeste_f2c_init_ (directleninit);
- ffeste_f2c_init_ (forminit);
- ffeste_f2c_init_ (formleninit);
- ffeste_f2c_init_ (formattedinit);
- ffeste_f2c_init_ (formattedleninit);
- ffeste_f2c_init_ (unformattedinit);
- ffeste_f2c_init_ (unformattedleninit);
- ffeste_f2c_init_ (reclinit);
- ffeste_f2c_init_ (nextrecinit);
- ffeste_f2c_init_ (blankinit);
- ffeste_f2c_init_ (blankleninit);
+ ffeste_f2c_init_next_ (unitinit);
+ ffeste_f2c_init_next_ (fileinit);
+ ffeste_f2c_init_next_ (fileleninit);
+ ffeste_f2c_init_next_ (existinit);
+ ffeste_f2c_init_next_ (openinit);
+ ffeste_f2c_init_next_ (numberinit);
+ ffeste_f2c_init_next_ (namedinit);
+ ffeste_f2c_init_next_ (nameinit);
+ ffeste_f2c_init_next_ (nameleninit);
+ ffeste_f2c_init_next_ (accessinit);
+ ffeste_f2c_init_next_ (accessleninit);
+ ffeste_f2c_init_next_ (sequentialinit);
+ ffeste_f2c_init_next_ (sequentialleninit);
+ ffeste_f2c_init_next_ (directinit);
+ ffeste_f2c_init_next_ (directleninit);
+ ffeste_f2c_init_next_ (forminit);
+ ffeste_f2c_init_next_ (formleninit);
+ ffeste_f2c_init_next_ (formattedinit);
+ ffeste_f2c_init_next_ (formattedleninit);
+ ffeste_f2c_init_next_ (unformattedinit);
+ ffeste_f2c_init_next_ (unformattedleninit);
+ ffeste_f2c_init_next_ (reclinit);
+ ffeste_f2c_init_next_ (nextrecinit);
+ ffeste_f2c_init_next_ (blankinit);
+ ffeste_f2c_init_next_ (blankleninit);
inits = build (CONSTRUCTOR, f2c_inquire_struct, NULL_TREE, inits);
TREE_CONSTANT (inits) = constantp ? 1 : 0;
@@ -1760,31 +2122,56 @@ ffeste_io_inlist_ (bool have_err,
resume_momentary (yes);
- ffeste_f2c_exp_ (unitfield, unitexp);
- ffeste_f2c_exp_ (filefield, fileexp);
- ffeste_f2c_exp_ (filelenfield, filelenexp);
- ffeste_f2c_exp_ (existfield, existexp);
- ffeste_f2c_exp_ (openfield, openexp);
- ffeste_f2c_exp_ (numberfield, numberexp);
- ffeste_f2c_exp_ (namedfield, namedexp);
- ffeste_f2c_exp_ (namefield, nameexp);
- ffeste_f2c_exp_ (namelenfield, namelenexp);
- ffeste_f2c_exp_ (accessfield, accessexp);
- ffeste_f2c_exp_ (accesslenfield, accesslenexp);
- ffeste_f2c_exp_ (sequentialfield, sequentialexp);
- ffeste_f2c_exp_ (sequentiallenfield, sequentiallenexp);
- ffeste_f2c_exp_ (directfield, directexp);
- ffeste_f2c_exp_ (directlenfield, directlenexp);
- ffeste_f2c_exp_ (formfield, formexp);
- ffeste_f2c_exp_ (formlenfield, formlenexp);
- ffeste_f2c_exp_ (formattedfield, formattedexp);
- ffeste_f2c_exp_ (formattedlenfield, formattedlenexp);
- ffeste_f2c_exp_ (unformattedfield, unformattedexp);
- ffeste_f2c_exp_ (unformattedlenfield, unformattedlenexp);
- ffeste_f2c_exp_ (reclfield, reclexp);
- ffeste_f2c_exp_ (nextrecfield, nextrecexp);
- ffeste_f2c_exp_ (blankfield, blankexp);
- ffeste_f2c_exp_ (blanklenfield, blanklenexp);
+ /* Prepare run-time expressions. */
+
+ ffeste_f2c_prepare_int_ (unit_spec, unitexp);
+ ffeste_f2c_prepare_char_ (file_spec, fileexp);
+ ffeste_f2c_prepare_ptrtoint_ (exist_spec, existexp);
+ ffeste_f2c_prepare_ptrtoint_ (open_spec, openexp);
+ ffeste_f2c_prepare_ptrtoint_ (number_spec, numberexp);
+ ffeste_f2c_prepare_ptrtoint_ (named_spec, namedexp);
+ ffeste_f2c_prepare_char_ (name_spec, nameexp);
+ ffeste_f2c_prepare_char_ (access_spec, accessexp);
+ ffeste_f2c_prepare_char_ (sequential_spec, sequentialexp);
+ ffeste_f2c_prepare_char_ (direct_spec, directexp);
+ ffeste_f2c_prepare_char_ (form_spec, formexp);
+ ffeste_f2c_prepare_char_ (formatted_spec, formattedexp);
+ ffeste_f2c_prepare_char_ (unformatted_spec, unformattedexp);
+ ffeste_f2c_prepare_ptrtoint_ (recl_spec, reclexp);
+ ffeste_f2c_prepare_ptrtoint_ (nextrec_spec, nextrecexp);
+ ffeste_f2c_prepare_char_ (blank_spec, blankexp);
+
+ ffecom_prepare_end ();
+
+ /* Now evaluate run-time expressions as needed. */
+
+ ffeste_f2c_compile_int_ (unitfield, unit_spec, unitexp);
+ ffeste_f2c_compile_char_ (filefield, filelenfield, file_spec,
+ fileexp, filelenexp);
+ ffeste_f2c_compile_ptrtoint_ (existfield, exist_spec, existexp);
+ ffeste_f2c_compile_ptrtoint_ (openfield, open_spec, openexp);
+ ffeste_f2c_compile_ptrtoint_ (numberfield, number_spec, numberexp);
+ ffeste_f2c_compile_ptrtoint_ (namedfield, named_spec, namedexp);
+ ffeste_f2c_compile_char_ (namefield, namelenfield, name_spec, nameexp,
+ namelenexp);
+ ffeste_f2c_compile_char_ (accessfield, accesslenfield, access_spec,
+ accessexp, accesslenexp);
+ ffeste_f2c_compile_char_ (sequentialfield, sequentiallenfield,
+ sequential_spec, sequentialexp,
+ sequentiallenexp);
+ ffeste_f2c_compile_char_ (directfield, directlenfield, direct_spec,
+ directexp, directlenexp);
+ ffeste_f2c_compile_char_ (formfield, formlenfield, form_spec, formexp,
+ formlenexp);
+ ffeste_f2c_compile_char_ (formattedfield, formattedlenfield, formatted_spec,
+ formattedexp, formattedlenexp);
+ ffeste_f2c_compile_char_ (unformattedfield, unformattedlenfield,
+ unformatted_spec, unformattedexp,
+ unformattedlenexp);
+ ffeste_f2c_compile_ptrtoint_ (reclfield, recl_spec, reclexp);
+ ffeste_f2c_compile_ptrtoint_ (nextrecfield, nextrec_spec, nextrecexp);
+ ffeste_f2c_compile_char_ (blankfield, blanklenfield, blank_spec, blankexp,
+ blanklenexp);
ttype = build_pointer_type (TREE_TYPE (t));
t = ffecom_1 (ADDR_EXPR, ttype, t);
@@ -1795,15 +2182,20 @@ ffeste_io_inlist_ (bool have_err,
}
#endif
-/* ffeste_io_olist_ -- Make arglist with ptr to OPEN control list
-
- tree arglist;
- arglist = ffeste_io_olist_(...);
+/* Make arglist with ptr to OPEN control list
Returns a tree suitable as an argument list containing a pointer to
an OPEN-statement control list. First, generates that control
list, if necessary, along with any static and run-time initializations
- that are needed as specified by the arguments to this function. */
+ that are needed as specified by the arguments to this function.
+
+ Must ensure that all expressions are prepared before being evaluated,
+ for any whose evaluation might result in the generation of temporaries.
+
+ Note that this means this function causes a transition, within the
+ current block being code-generated via the back end, from the
+ declaration of variables (temporaries) to the expanding of expressions,
+ statements, etc. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree
@@ -1870,37 +2262,38 @@ ffeste_io_olist_ (bool have_err,
f2c_open_struct = ref;
}
- ffeste_f2c_flagspec_ (have_err, errinit);
+ /* Try to do as much compile-time initialization of the structure
+ as possible, to save run time. */
- unitexp = ffecom_expr (unit_expr);
- if (TREE_CONSTANT (unitexp))
- {
- unitinit = unitexp;
- unitexp = NULL_TREE;
- }
+ ffeste_f2c_init_flag_ (have_err, errinit);
+
+ unitexp = ffecom_const_expr (unit_expr);
+ if (unitexp)
+ unitinit = unitexp;
else
{
unitinit = ffecom_integer_zero_node;
constantp = FALSE;
}
- ffeste_f2c_charspec_ (file_spec, fileexp, fileinit, filelenexp, fileleninit);
- ffeste_f2c_charnolenspec_ (stat_spec, statexp, statinit);
- ffeste_f2c_charnolenspec_ (access_spec, accessexp, accessinit);
- ffeste_f2c_charnolenspec_ (form_spec, formexp, forminit);
- ffeste_f2c_intspec_ (recl_spec, reclexp, reclinit);
- ffeste_f2c_charnolenspec_ (blank_spec, blankexp, blankinit);
+ ffeste_f2c_init_char_ (fileexp, fileinit, filelenexp, fileleninit,
+ file_spec);
+ ffeste_f2c_init_charnolen_ (statexp, statinit, stat_spec);
+ ffeste_f2c_init_charnolen_ (accessexp, accessinit, access_spec);
+ ffeste_f2c_init_charnolen_ (formexp, forminit, form_spec);
+ ffeste_f2c_init_int_ (reclexp, reclinit, recl_spec);
+ ffeste_f2c_init_charnolen_ (blankexp, blankinit, blank_spec);
inits = build_tree_list ((field = TYPE_FIELDS (f2c_open_struct)), errinit);
initn = inits;
- ffeste_f2c_init_ (unitinit);
- ffeste_f2c_init_ (fileinit);
- ffeste_f2c_init_ (fileleninit);
- ffeste_f2c_init_ (statinit);
- ffeste_f2c_init_ (accessinit);
- ffeste_f2c_init_ (forminit);
- ffeste_f2c_init_ (reclinit);
- ffeste_f2c_init_ (blankinit);
+ ffeste_f2c_init_next_ (unitinit);
+ ffeste_f2c_init_next_ (fileinit);
+ ffeste_f2c_init_next_ (fileleninit);
+ ffeste_f2c_init_next_ (statinit);
+ ffeste_f2c_init_next_ (accessinit);
+ ffeste_f2c_init_next_ (forminit);
+ ffeste_f2c_init_next_ (reclinit);
+ ffeste_f2c_init_next_ (blankinit);
inits = build (CONSTRUCTOR, f2c_open_struct, NULL_TREE, inits);
TREE_CONSTANT (inits) = constantp ? 1 : 0;
@@ -1918,14 +2311,35 @@ ffeste_io_olist_ (bool have_err,
resume_momentary (yes);
- ffeste_f2c_exp_ (unitfield, unitexp);
- ffeste_f2c_exp_ (filefield, fileexp);
- ffeste_f2c_exp_ (filelenfield, filelenexp);
- ffeste_f2c_exp_ (statfield, statexp);
- ffeste_f2c_exp_ (accessfield, accessexp);
- ffeste_f2c_exp_ (formfield, formexp);
- ffeste_f2c_exp_ (reclfield, reclexp);
- ffeste_f2c_exp_ (blankfield, blankexp);
+ /* Prepare run-time expressions. */
+
+ if (! unitexp)
+ ffecom_prepare_expr (unit_expr);
+
+ ffeste_f2c_prepare_char_ (file_spec, fileexp);
+ ffeste_f2c_prepare_charnolen_ (stat_spec, statexp);
+ ffeste_f2c_prepare_charnolen_ (access_spec, accessexp);
+ ffeste_f2c_prepare_charnolen_ (form_spec, formexp);
+ ffeste_f2c_prepare_int_ (recl_spec, reclexp);
+ ffeste_f2c_prepare_charnolen_ (blank_spec, blankexp);
+
+ ffecom_prepare_end ();
+
+ /* Now evaluate run-time expressions as needed. */
+
+ if (! unitexp)
+ {
+ unitexp = ffecom_expr (unit_expr);
+ ffeste_f2c_compile_ (unitfield, unitexp);
+ }
+
+ ffeste_f2c_compile_char_ (filefield, filelenfield, file_spec, fileexp,
+ filelenexp);
+ ffeste_f2c_compile_charnolen_ (statfield, stat_spec, statexp);
+ ffeste_f2c_compile_charnolen_ (accessfield, access_spec, accessexp);
+ ffeste_f2c_compile_charnolen_ (formfield, form_spec, formexp);
+ ffeste_f2c_compile_int_ (reclfield, recl_spec, reclexp);
+ ffeste_f2c_compile_charnolen_ (blankfield, blank_spec, blankexp);
ttype = build_pointer_type (TREE_TYPE (t));
t = ffecom_1 (ADDR_EXPR, ttype, t);
@@ -1936,13 +2350,11 @@ ffeste_io_olist_ (bool have_err,
}
#endif
-/* ffeste_subr_file_ -- Display file-statement specifier
-
- ffeste_subr_file_(&specifier); */
+/* Display file-statement specifier. */
#if FFECOM_targetCURRENT == FFECOM_targetFFE
static void
-ffeste_subr_file_ (char *kw, ffestpFile *spec)
+ffeste_subr_file_ (const char *kw, ffestpFile *spec)
{
if (!spec->kw_or_val_present)
return;
@@ -1963,9 +2375,7 @@ ffeste_subr_file_ (char *kw, ffestpFile *spec)
}
#endif
-/* ffeste_subr_beru_ -- Generate code for BACKSPACE/ENDFILE/REWIND
-
- ffeste_subr_beru_(FFECOM_gfrtFBACK); */
+/* Generate code for BACKSPACE/ENDFILE/REWIND. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static void
@@ -1975,15 +2385,15 @@ ffeste_subr_beru_ (ffestpBeruStmt *info, ffecomGfrt rt)
bool iostat;
bool errl;
-#define specified(something) (info->beru_spec[something].kw_or_val_present)
-
ffeste_emit_line_note_ ();
- /* Do the real work. */
+#define specified(something) (info->beru_spec[something].kw_or_val_present)
iostat = specified (FFESTP_beruixIOSTAT);
errl = specified (FFESTP_beruixERR);
+#undef specified
+
/* ~~For now, we assume the unit number is specified and is not ASTERISK,
because the FFE doesn't support BACKSPACE(*) and rejects a BACKSPACE
without any unit specifier. f2c, however, supports the former
@@ -1992,15 +2402,14 @@ ffeste_subr_beru_ (ffestpBeruStmt *info, ffecomGfrt rt)
ffestvUnit indicator of FFESTV_unitINTEXPR or _unitASTERISK to
ffeste_R919 and company, and they will want to pass that same value to
this function, and that argument will replace the constant _unitINTEXPR_
- in the call below. Right now, the default unit number, 6, is ignored. */
+ in the call below. Right now, the default unit number, 6, is ignored. */
- ffecom_push_calltemps ();
-
- alist = ffeste_io_ialist_ (errl || iostat, FFESTV_unitINTEXPR,
- info->beru_spec[FFESTP_beruixUNIT].u.expr, 6);
+ ffeste_start_stmt_ ();
if (errl)
- { /* ERR= */
+ {
+ /* Have ERR= specification. */
+
ffeste_io_err_
= ffeste_io_abort_
= ffecom_lookup_label
@@ -2008,7 +2417,9 @@ ffeste_subr_beru_ (ffestpBeruStmt *info, ffecomGfrt rt)
ffeste_io_abort_is_temp_ = FALSE;
}
else
- { /* no ERR= */
+ {
+ /* No ERR= specification. */
+
ffeste_io_err_ = NULL_TREE;
if ((ffeste_io_abort_is_temp_ = iostat))
@@ -2018,29 +2429,40 @@ ffeste_subr_beru_ (ffestpBeruStmt *info, ffecomGfrt rt)
}
if (iostat)
- { /* IOSTAT= */
+ {
+ /* Have IOSTAT= specification. */
+
ffeste_io_iostat_is_temp_ = FALSE;
ffeste_io_iostat_ = ffecom_expr
(info->beru_spec[FFESTP_beruixIOSTAT].u.expr);
}
else if (ffeste_io_abort_ != NULL_TREE)
- { /* no IOSTAT= but ERR= */
+ {
+ /* Have no IOSTAT= but have ERR=. */
+
ffeste_io_iostat_is_temp_ = TRUE;
ffeste_io_iostat_
- = ffecom_push_tempvar (ffecom_integer_type_node,
- FFETARGET_charactersizeNONE, -1, FALSE);
+ = ffecom_make_tempvar ("beru", ffecom_integer_type_node,
+ FFETARGET_charactersizeNONE, -1);
}
else
- { /* no IOSTAT=, or ERR= */
+ {
+ /* No IOSTAT= or ERR= specification. */
+
ffeste_io_iostat_is_temp_ = FALSE;
ffeste_io_iostat_ = NULL_TREE;
}
+ /* Now prescan, then convert, all the arguments. */
+
+ alist = ffeste_io_ialist_ (errl || iostat, FFESTV_unitINTEXPR,
+ info->beru_spec[FFESTP_beruixUNIT].u.expr, 6);
+
/* Don't generate "if (iostat != 0) goto label;" if label is temp abort
label, since we're gonna fall through to there anyway. */
- ffeste_io_call_ (ffecom_call_gfrt (rt, alist),
- !ffeste_io_abort_is_temp_);
+ ffeste_io_call_ (ffecom_call_gfrt (rt, alist, NULL_TREE),
+ ! ffeste_io_abort_is_temp_);
/* If we've got a temp label, generate its code here. */
@@ -2053,28 +2475,16 @@ ffeste_subr_beru_ (ffestpBeruStmt *info, ffecomGfrt rt)
assert (ffeste_io_err_ == NULL_TREE);
}
- /* If we've got a temp iostat, pop the temp. */
-
- if (ffeste_io_iostat_is_temp_)
- ffecom_pop_tempvar (ffeste_io_iostat_);
-
- ffecom_pop_calltemps ();
-
-#undef specified
-
- clear_momentary ();
+ ffeste_end_stmt_ ();
}
-
#endif
-/* ffeste_do -- End of statement following DO-term-stmt etc
- ffeste_do(TRUE);
+/* END DO statement
Also invoked by _labeldef_branch_finish_ (or, in cases
of errors, other _labeldef_ functions) when the label definition is
for a DO-target (LOOPEND) label, once per matching/outstanding DO
- block on the stack. These cases invoke this function with ok==TRUE, so
- only forced stack popping (via ffeste_eof_()) invokes it with ok==FALSE. */
+ block on the stack. */
void
ffeste_do (ffestw block)
@@ -2083,28 +2493,26 @@ ffeste_do (ffestw block)
fputs ("+ END_DO\n", dmpout);
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
ffeste_emit_line_note_ ();
+
if (ffestw_do_tvar (block) == 0)
- expand_end_loop (); /* DO WHILE and just DO. */
+ {
+ expand_end_loop (); /* DO WHILE and just DO. */
+
+ ffeste_end_block_ (block);
+ }
else
- ffeste_end_iterdo_ (ffestw_do_tvar (block),
+ ffeste_end_iterdo_ (block,
+ ffestw_do_tvar (block),
ffestw_do_incr_saved (block),
ffestw_do_count_var (block));
-
- clear_momentary ();
#else
#error
#endif
}
-/* ffeste_end_R807 -- End of statement following logical IF
+/* End of statement following logical IF.
- ffeste_end_R807(TRUE);
-
- Applies ONLY to logical IF, not to IF-THEN. For example, does not
- ffelex_token_kill the construct name for an IF-THEN block (the name
- field is invalid for logical IF). ok==TRUE iff statement following
- logical IF (substatement) is valid; else, statement is invalid or
- stack forcibly popped due to ffeste_eof_(). */
+ Applies to *only* logical IF, not to IF-THEN. */
void
ffeste_end_R807 ()
@@ -2113,16 +2521,16 @@ ffeste_end_R807 ()
fputs ("+ END_IF\n", dmpout); /* Also see ffeste_R806. */
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
ffeste_emit_line_note_ ();
+
expand_end_cond ();
- clear_momentary ();
+
+ ffeste_end_block_ (NULL);
#else
#error
#endif
}
-/* ffeste_labeldef_branch -- Generate "code" for branch label def
-
- ffeste_labeldef_branch(label); */
+/* Generate "code" for branch label definition. */
void
ffeste_labeldef_branch (ffelab label)
@@ -2137,11 +2545,15 @@ ffeste_labeldef_branch (ffelab label)
assert (glabel != NULL_TREE);
if (TREE_CODE (glabel) == ERROR_MARK)
return;
+
assert (DECL_INITIAL (glabel) == NULL_TREE);
+
DECL_INITIAL (glabel) = error_mark_node;
DECL_SOURCE_FILE (glabel) = ffelab_definition_filename (label);
DECL_SOURCE_LINE (glabel) = ffelab_definition_filelinenum (label);
+
emit_nop ();
+
expand_label (glabel);
}
#else
@@ -2149,9 +2561,7 @@ ffeste_labeldef_branch (ffelab label)
#endif
}
-/* ffeste_labeldef_format -- Generate "code" for FORMAT label def
-
- ffeste_labeldef_format(label); */
+/* Generate "code" for FORMAT label definition. */
void
ffeste_labeldef_format (ffelab label)
@@ -2165,9 +2575,7 @@ ffeste_labeldef_format (ffelab label)
#endif
}
-/* ffeste_R737A -- Assignment statement outside of WHERE
-
- ffeste_R737A(dest_expr,source_expr); */
+/* Assignment statement (outside of WHERE). */
void
ffeste_R737A (ffebld dest, ffebld source)
@@ -2182,25 +2590,21 @@ ffeste_R737A (ffebld dest, ffebld source)
fputc ('\n', dmpout);
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
ffeste_emit_line_note_ ();
- ffecom_push_calltemps ();
+
+ ffeste_start_stmt_ ();
ffecom_expand_let_stmt (dest, source);
- ffecom_pop_calltemps ();
- clear_momentary ();
+ ffeste_end_stmt_ ();
#else
#error
#endif
}
-/* ffeste_R803 -- Block IF (IF-THEN) statement
-
- ffeste_R803(construct_name,expr,expr_token);
-
- Make sure statement is valid here; implement. */
+/* Block IF (IF-THEN) statement. */
void
-ffeste_R803 (ffebld expr)
+ffeste_R803 (ffestw block, ffebld expr)
{
ffeste_check_simple_ ();
@@ -2209,28 +2613,53 @@ ffeste_R803 (ffebld expr)
ffebld_dump (expr);
fputs (")\n", dmpout);
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
- ffeste_emit_line_note_ ();
- ffecom_push_calltemps ();
+ {
+ tree temp;
- expand_start_cond (ffecom_truth_value (ffecom_expr (expr)), 0);
+ ffeste_emit_line_note_ ();
- ffecom_pop_calltemps ();
- clear_momentary ();
+ ffeste_start_block_ (block);
+
+ temp = ffecom_make_tempvar ("ifthen", integer_type_node,
+ FFETARGET_charactersizeNONE, -1);
+
+ ffeste_start_stmt_ ();
+
+ ffecom_prepare_expr (expr);
+
+ if (ffecom_prepare_end ())
+ {
+ tree result;
+
+ result = ffecom_modify (void_type_node,
+ temp,
+ ffecom_truth_value (ffecom_expr (expr)));
+
+ expand_expr_stmt (result);
+
+ ffeste_end_stmt_ ();
+ }
+ else
+ {
+ ffeste_end_stmt_ ();
+
+ temp = ffecom_truth_value (ffecom_expr (expr));
+ }
+
+ expand_start_cond (temp, 0);
+
+ /* No fake `else' constructs introduced (yet). */
+ ffestw_set_ifthen_fake_else (block, 0);
+ }
#else
#error
#endif
}
-/* ffeste_R804 -- ELSE IF statement
-
- ffeste_R804(expr,expr_token,name_token);
-
- Make sure ffeste_kind_ identifies an IF block. If not
- NULL, make sure name_token gives the correct name. Implement the else
- of the IF block. */
+/* ELSE IF statement. */
void
-ffeste_R804 (ffebld expr)
+ffeste_R804 (ffestw block, ffebld expr)
{
ffeste_check_simple_ ();
@@ -2239,28 +2668,65 @@ ffeste_R804 (ffebld expr)
ffebld_dump (expr);
fputs (")\n", dmpout);
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
- ffeste_emit_line_note_ ();
- ffecom_push_calltemps ();
+ {
+ tree temp;
+
+ ffeste_emit_line_note_ ();
- expand_start_elseif (ffecom_truth_value (ffecom_expr (expr)));
+ /* Since ELSEIF(expr) might require preparations for expr,
+ implement as ELSE; prepare-expr; IF (expr) THEN ...; ENDIF. */
- ffecom_pop_calltemps ();
- clear_momentary ();
+ expand_start_else ();
+
+ ffeste_start_block_ (block);
+
+ temp = ffecom_make_tempvar ("elseif", integer_type_node,
+ FFETARGET_charactersizeNONE, -1);
+
+ ffeste_start_stmt_ ();
+
+ ffecom_prepare_expr (expr);
+
+ if (ffecom_prepare_end ())
+ {
+ tree result;
+
+ result = ffecom_modify (void_type_node,
+ temp,
+ ffecom_truth_value (ffecom_expr (expr)));
+
+ expand_expr_stmt (result);
+
+ ffeste_end_stmt_ ();
+ }
+ else
+ {
+ /* In this case, we could probably have used expand_start_elseif
+ instead, saving the need for a fake `else' construct. But,
+ until it's clear that'd improve performance, it's easier this
+ way, since we have to expand_start_else before we get to this
+ test, given the current design. */
+
+ ffeste_end_stmt_ ();
+
+ temp = ffecom_truth_value (ffecom_expr (expr));
+ }
+
+ expand_start_cond (temp, 0);
+
+ /* Increment number of fake `else' constructs introduced. */
+ ffestw_set_ifthen_fake_else (block,
+ ffestw_ifthen_fake_else (block) + 1);
+ }
#else
#error
#endif
}
-/* ffeste_R805 -- ELSE statement
-
- ffeste_R805(name_token);
-
- Make sure ffeste_kind_ identifies an IF block. If not
- NULL, make sure name_token gives the correct name. Implement the ELSE
- of the IF block. */
+/* ELSE statement. */
void
-ffeste_R805 ()
+ffeste_R805 (ffestw block UNUSED)
{
ffeste_check_simple_ ();
@@ -2268,36 +2734,39 @@ ffeste_R805 ()
fputs ("+ ELSE\n", dmpout);
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
ffeste_emit_line_note_ ();
+
expand_start_else ();
- clear_momentary ();
#else
#error
#endif
}
-/* ffeste_R806 -- End an IF-THEN
-
- ffeste_R806(TRUE); */
+/* END IF statement. */
void
-ffeste_R806 ()
+ffeste_R806 (ffestw block)
{
#if FFECOM_targetCURRENT == FFECOM_targetFFE
fputs ("+ END_IF_then\n", dmpout); /* Also see ffeste_shriek_if_. */
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
- ffeste_emit_line_note_ ();
- expand_end_cond ();
- clear_momentary ();
+ {
+ int i = ffestw_ifthen_fake_else (block) + 1;
+
+ ffeste_emit_line_note_ ();
+
+ for (; i; --i)
+ {
+ expand_end_cond ();
+
+ ffeste_end_block_ (block);
+ }
+ }
#else
#error
#endif
}
-/* ffeste_R807 -- Logical IF statement
-
- ffeste_R807(expr,expr_token);
-
- Make sure statement is valid here; implement. */
+/* Logical IF statement. */
void
ffeste_R807 (ffebld expr)
@@ -2309,23 +2778,47 @@ ffeste_R807 (ffebld expr)
ffebld_dump (expr);
fputs (")\n", dmpout);
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
- ffeste_emit_line_note_ ();
- ffecom_push_calltemps ();
+ {
+ tree temp;
- expand_start_cond (ffecom_truth_value (ffecom_expr (expr)), 0);
+ ffeste_emit_line_note_ ();
- ffecom_pop_calltemps ();
- clear_momentary ();
+ ffeste_start_block_ (NULL);
+
+ temp = ffecom_make_tempvar ("if", integer_type_node,
+ FFETARGET_charactersizeNONE, -1);
+
+ ffeste_start_stmt_ ();
+
+ ffecom_prepare_expr (expr);
+
+ if (ffecom_prepare_end ())
+ {
+ tree result;
+
+ result = ffecom_modify (void_type_node,
+ temp,
+ ffecom_truth_value (ffecom_expr (expr)));
+
+ expand_expr_stmt (result);
+
+ ffeste_end_stmt_ ();
+ }
+ else
+ {
+ ffeste_end_stmt_ ();
+
+ temp = ffecom_truth_value (ffecom_expr (expr));
+ }
+
+ expand_start_cond (temp, 0);
+ }
#else
#error
#endif
}
-/* ffeste_R809 -- SELECT CASE statement
-
- ffeste_R809(construct_name,expr,expr_token);
-
- Make sure statement is valid here; implement. */
+/* SELECT CASE statement. */
void
ffeste_R809 (ffestw block, ffebld expr)
@@ -2337,52 +2830,63 @@ ffeste_R809 (ffestw block, ffebld expr)
ffebld_dump (expr);
fputs (")\n", dmpout);
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
- ffecom_push_calltemps ();
+ ffeste_emit_line_note_ ();
- {
- tree texpr;
+ ffeste_start_block_ (block);
- ffeste_emit_line_note_ ();
+ if ((expr == NULL)
+ || (ffeinfo_basictype (ffebld_info (expr))
+ == FFEINFO_basictypeANY))
+ ffestw_set_select_texpr (block, error_mark_node);
+ else if (ffeinfo_basictype (ffebld_info (expr))
+ == FFEINFO_basictypeCHARACTER)
+ {
+ /* ~~~Someday handle CHARACTER*1, CHARACTER*N */
- if ((expr == NULL)
- || (ffeinfo_basictype (ffebld_info (expr))
- == FFEINFO_basictypeANY))
- {
- ffestw_set_select_texpr (block, error_mark_node);
- clear_momentary ();
- }
- else
- {
- texpr = ffecom_expr (expr);
- if (ffeinfo_basictype (ffebld_info (expr))
- != FFEINFO_basictypeCHARACTER)
- {
- expand_start_case (1, texpr, TREE_TYPE (texpr),
- "SELECT CASE statement");
- ffestw_set_select_texpr (block, texpr);
- ffestw_set_select_break (block, FALSE);
- push_momentary ();
- }
- else
- {
- ffebad_start_msg ("SELECT CASE on CHARACTER type (at %0) not supported -- sorry",
- FFEBAD_severityFATAL);
- ffebad_here (0, ffestw_line (block), ffestw_col (block));
- ffebad_finish ();
- ffestw_set_select_texpr (block, error_mark_node);
- }
- }
- }
+ ffebad_start_msg ("SELECT CASE on CHARACTER type (at %0) not supported -- sorry",
+ FFEBAD_severityFATAL);
+ ffebad_here (0, ffestw_line (block), ffestw_col (block));
+ ffebad_finish ();
+ ffestw_set_select_texpr (block, error_mark_node);
+ }
+ else
+ {
+ tree result;
+ tree texpr;
+
+ result = ffecom_make_tempvar ("select", ffecom_type_expr (expr),
+ ffeinfo_size (ffebld_info (expr)),
+ -1);
+
+ ffeste_start_stmt_ ();
+
+ ffecom_prepare_expr (expr);
- ffecom_pop_calltemps ();
+ ffecom_prepare_end ();
+
+ texpr = ffecom_expr (expr);
+
+ assert (TYPE_MAIN_VARIANT (TREE_TYPE (texpr))
+ == TYPE_MAIN_VARIANT (TREE_TYPE (result)));
+
+ texpr = ffecom_modify (void_type_node,
+ result,
+ texpr);
+ expand_expr_stmt (texpr);
+
+ ffeste_end_stmt_ ();
+
+ expand_start_case (1, result, TREE_TYPE (result),
+ "SELECT CASE statement");
+ ffestw_set_select_texpr (block, texpr);
+ ffestw_set_select_break (block, FALSE);
+ }
#else
#error
#endif
}
-/* ffeste_R810 -- CASE statement
-
- ffeste_R810(case_value_range_list,name);
+/* CASE statement.
If casenum is 0, it's CASE DEFAULT. Else it's the case ranges at
the start of the first_stmt list in the select object at the top of
@@ -2440,17 +2944,18 @@ ffeste_R810 (ffestw block, unsigned long casenum)
{
tree texprlow;
tree texprhigh;
- tree tlabel = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE);
+ tree tlabel;
int pushok;
tree duplicate;
ffeste_emit_line_note_ ();
- if (TREE_CODE (ffestw_select_texpr (block)) == ERROR_MARK)
- {
- clear_momentary ();
- return;
- }
+ if (ffestw_select_texpr (block) == error_mark_node)
+ return;
+
+ /* ~~~Someday handle CHARACTER*1, CHARACTER*N */
+
+ tlabel = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE);
if (ffestw_select_break (block))
expand_exit_something ();
@@ -2490,15 +2995,13 @@ ffeste_R810 (ffestw block, unsigned long casenum)
while ((c != (ffestwCase) &s->first_rel) && (casenum == c->casenum));
clear_momentary ();
- } /* ~~~handle character, character*1 */
+ }
#else
#error
#endif
}
-/* ffeste_R811 -- End a SELECT
-
- ffeste_R811(TRUE); */
+/* END SELECT statement. */
void
ffeste_R811 (ffestw block)
@@ -2508,15 +3011,12 @@ ffeste_R811 (ffestw block)
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
ffeste_emit_line_note_ ();
- if (TREE_CODE (ffestw_select_texpr (block)) == ERROR_MARK)
- {
- clear_momentary ();
- return;
- }
+ /* ~~~Someday handle CHARACTER*1, CHARACTER*N */
+
+ if (TREE_CODE (ffestw_select_texpr (block)) != ERROR_MARK)
+ expand_end_case (ffestw_select_texpr (block));
- expand_end_case (ffestw_select_texpr (block));
- pop_momentary ();
- clear_momentary (); /* ~~~handle character and character*1 */
+ ffeste_end_block_ (block);
#else
#error
#endif
@@ -2559,9 +3059,6 @@ ffeste_R819A (ffestw block, ffelab label UNUSED, ffebld var,
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
{
ffeste_emit_line_note_ ();
- ffecom_push_calltemps ();
-
- /* Start the DO loop. */
ffeste_begin_iterdo_ (block, NULL, NULL, NULL,
var,
@@ -2569,19 +3066,13 @@ ffeste_R819A (ffestw block, ffelab label UNUSED, ffebld var,
end, end_token,
incr, incr_token,
"Iterative DO loop");
-
- ffecom_pop_calltemps ();
}
#else
#error
#endif
}
-/* ffeste_R819B -- DO WHILE statement
-
- ffeste_R819B(construct_name,label_token,expr,expr_token);
-
- Make sure statement is valid here; implement. */
+/* DO WHILE statement. */
void
ffeste_R819B (ffestw block, ffelab label UNUSED, ffebld expr)
@@ -2597,32 +3088,54 @@ ffeste_R819B (ffestw block, ffelab label UNUSED, ffebld expr)
fputs (")\n", dmpout);
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
{
+ tree result;
+
ffeste_emit_line_note_ ();
- ffecom_push_calltemps ();
- ffestw_set_do_hook (block, expand_start_loop (1));
- ffestw_set_do_tvar (block, 0); /* Means DO WHILE vs. iter DO. */
- if (expr != NULL)
- expand_exit_loop_if_false (0, ffecom_truth_value (ffecom_expr (expr)));
+ ffeste_start_block_ (block);
- ffecom_pop_calltemps ();
- clear_momentary ();
+ if (expr)
+ {
+ struct nesting *loop;
+ tree mod;
+
+ result = ffecom_make_tempvar ("dowhile", integer_type_node,
+ FFETARGET_charactersizeNONE, -1);
+ loop = expand_start_loop (1);
+
+ ffeste_start_stmt_ ();
+
+ ffecom_prepare_expr (expr);
+
+ ffecom_prepare_end ();
+
+ mod = ffecom_modify (void_type_node,
+ result,
+ ffecom_truth_value (ffecom_expr (expr)));
+ expand_expr_stmt (mod);
+
+ ffeste_end_stmt_ ();
+
+ ffestw_set_do_hook (block, loop);
+ expand_exit_loop_if_false (0, result);
+ }
+ else
+ ffestw_set_do_hook (block, expand_start_loop (1));
+
+ ffestw_set_do_tvar (block, NULL_TREE);
}
#else
#error
#endif
}
-/* ffeste_R825 -- END DO statement
+/* END DO statement.
- ffeste_R825(name_token);
-
- Make sure ffeste_kind_ identifies a DO block. If not
- NULL, make sure name_token gives the correct name. Do whatever
- is specific to seeing END DO with a DO-target label definition on it,
- where the END DO is really treated as a CONTINUE (i.e. generate th
- same code you would for CONTINUE). ffeste_do handles the actual
- generation of end-loop code. */
+ This is the MIL-STD 1753 END DO. It's syntactic sugar, similar to
+ CONTINUE (except that it has to have a label that is the target of
+ one or more iterative DO statement), not the Fortran-90 structured
+ END DO, which is handled elsewhere, as is the actual mechanism of
+ ending an iterative DO statement, even one that ends at a label. */
void
ffeste_R825 ()
@@ -2633,17 +3146,14 @@ ffeste_R825 ()
fputs ("+ END_DO_sugar\n", dmpout);
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
ffeste_emit_line_note_ ();
+
emit_nop ();
#else
#error
#endif
}
-/* ffeste_R834 -- CYCLE statement
-
- ffeste_R834(name_token);
-
- Handle a CYCLE within a loop. */
+/* CYCLE statement. */
void
ffeste_R834 (ffestw block)
@@ -2654,18 +3164,14 @@ ffeste_R834 (ffestw block)
fprintf (dmpout, "+ CYCLE block #%lu\n", ffestw_blocknum (block));
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
ffeste_emit_line_note_ ();
+
expand_continue_loop (ffestw_do_hook (block));
- clear_momentary ();
#else
#error
#endif
}
-/* ffeste_R835 -- EXIT statement
-
- ffeste_R835(name_token);
-
- Handle a EXIT within a loop. */
+/* EXIT statement. */
void
ffeste_R835 (ffestw block)
@@ -2676,19 +3182,14 @@ ffeste_R835 (ffestw block)
fprintf (dmpout, "+ EXIT block #%lu\n", ffestw_blocknum (block));
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
ffeste_emit_line_note_ ();
+
expand_exit_loop (ffestw_do_hook (block));
- clear_momentary ();
#else
#error
#endif
}
-/* ffeste_R836 -- GOTO statement
-
- ffeste_R836(label);
-
- Make sure label_token identifies a valid label for a GOTO. Update
- that label's info to indicate it is the target of a GOTO. */
+/* GOTO statement. */
void
ffeste_R836 (ffelab label)
@@ -2702,13 +3203,13 @@ ffeste_R836 (ffelab label)
tree glabel;
ffeste_emit_line_note_ ();
+
glabel = ffecom_lookup_label (label);
if ((glabel != NULL_TREE)
&& (TREE_CODE (glabel) != ERROR_MARK))
{
- TREE_USED (glabel) = 1;
expand_goto (glabel);
- clear_momentary ();
+ TREE_USED (glabel) = 1;
}
}
#else
@@ -2716,12 +3217,7 @@ ffeste_R836 (ffelab label)
#endif
}
-/* ffeste_R837 -- Computed GOTO statement
-
- ffeste_R837(labels,count,expr);
-
- Make sure label_list identifies valid labels for a GOTO. Update
- each label's info to indicate it is the target of a GOTO. */
+/* Computed GOTO statement. */
void
ffeste_R837 (ffelab *labels, int count, ffebld expr)
@@ -2750,12 +3246,17 @@ ffeste_R837 (ffelab *labels, int count, ffebld expr)
tree duplicate;
ffeste_emit_line_note_ ();
- ffecom_push_calltemps ();
+
+ ffeste_start_stmt_ ();
+
+ ffecom_prepare_expr (expr);
+
+ ffecom_prepare_end ();
texpr = ffecom_expr (expr);
+
expand_start_case (0, texpr, TREE_TYPE (texpr), "computed GOTO statement");
- push_momentary (); /* In case of lots of labels, keep clearing
- them out. */
+
for (i = 0; i < count; ++i)
{
value = build_int_2 (i + 1, 0);
@@ -2763,33 +3264,25 @@ ffeste_R837 (ffelab *labels, int count, ffebld expr)
pushok = pushcase (value, convert, tlabel, &duplicate);
assert (pushok == 0);
+
tlabel = ffecom_lookup_label (labels[i]);
if ((tlabel == NULL_TREE)
|| (TREE_CODE (tlabel) == ERROR_MARK))
continue;
- TREE_USED (tlabel) = 1;
+
expand_goto (tlabel);
- clear_momentary ();
+ TREE_USED (tlabel) = 1;
}
- pop_momentary ();
expand_end_case (texpr);
- ffecom_pop_calltemps ();
- clear_momentary ();
+ ffeste_end_stmt_ ();
}
#else
#error
#endif
}
-/* ffeste_R838 -- ASSIGN statement
-
- ffeste_R838(label_token,target_variable,target_token);
-
- Make sure label_token identifies a valid label for an assignment. Update
- that label's info to indicate it is the source of an assignment. Update
- target_variable's info to indicate it is the target the assignment of that
- label. */
+/* ASSIGN statement. */
void
ffeste_R838 (ffelab label, ffebld target)
@@ -2807,7 +3300,9 @@ ffeste_R838 (ffelab label, ffebld target)
tree target_tree;
ffeste_emit_line_note_ ();
- ffecom_push_calltemps ();
+
+ /* No need to call ffeste_start_stmt_(), as the sorts of expressions
+ seen here should never require use of temporaries. */
label_tree = ffecom_lookup_label (label);
if ((label_tree != NULL_TREE)
@@ -2817,31 +3312,28 @@ ffeste_R838 (ffelab label, ffebld target)
build_pointer_type (void_type_node),
label_tree);
TREE_CONSTANT (label_tree) = 1;
+
target_tree = ffecom_expr_assign_w (target);
if (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (target_tree)))
< GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (label_tree))))
error ("ASSIGN to variable that is too small");
+
label_tree = convert (TREE_TYPE (target_tree), label_tree);
+
expr_tree = ffecom_modify (void_type_node,
target_tree,
label_tree);
expand_expr_stmt (expr_tree);
+
clear_momentary ();
}
-
- ffecom_pop_calltemps ();
}
#else
#error
#endif
}
-/* ffeste_R839 -- Assigned GOTO statement
-
- ffeste_R839(target,target_token,label_list);
-
- Make sure label_list identifies valid labels for a GOTO. Update
- each label's info to indicate it is the target of a GOTO. */
+/* Assigned GOTO statement. */
void
ffeste_R839 (ffebld target)
@@ -2857,15 +3349,17 @@ ffeste_R839 (ffebld target)
tree t;
ffeste_emit_line_note_ ();
- ffecom_push_calltemps ();
+
+ /* No need to call ffeste_start_stmt_(), as the sorts of expressions
+ seen here should never require use of temporaries. */
t = ffecom_expr_assign (target);
if (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (t)))
< GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (null_pointer_node))))
error ("ASSIGNed GOTO target variable is too small");
+
expand_computed_goto (convert (TREE_TYPE (null_pointer_node), t));
- ffecom_pop_calltemps ();
clear_momentary ();
}
#else
@@ -2873,11 +3367,7 @@ ffeste_R839 (ffebld target)
#endif
}
-/* ffeste_R840 -- Arithmetic IF statement
-
- ffeste_R840(expr,expr_token,neg,zero,pos);
-
- Make sure the labels are valid; implement. */
+/* Arithmetic IF statement. */
void
ffeste_R840 (ffebld expr, ffelab neg, ffelab zero, ffelab pos)
@@ -2896,6 +3386,8 @@ ffeste_R840 (ffebld expr, ffelab neg, ffelab zero, ffelab pos)
tree gpos = ffecom_lookup_label (pos);
tree texpr;
+ ffeste_emit_line_note_ ();
+
if ((gneg == NULL_TREE) || (gzero == NULL_TREE) || (gpos == NULL_TREE))
return;
if ((TREE_CODE (gneg) == ERROR_MARK)
@@ -2903,15 +3395,19 @@ ffeste_R840 (ffebld expr, ffelab neg, ffelab zero, ffelab pos)
|| (TREE_CODE (gpos) == ERROR_MARK))
return;
- ffecom_push_calltemps ();
+ ffeste_start_stmt_ ();
+
+ ffecom_prepare_expr (expr);
+
+ ffecom_prepare_end ();
if (neg == zero)
{
if (neg == pos)
expand_goto (gzero);
else
- { /* IF (expr.LE.0) THEN GOTO neg/zero ELSE
- GOTO pos. */
+ {
+ /* IF (expr.LE.0) THEN GOTO neg/zero ELSE GOTO pos. */
texpr = ffecom_expr (expr);
texpr = ffecom_2 (LE_EXPR, integer_type_node,
texpr,
@@ -2925,8 +3421,8 @@ ffeste_R840 (ffebld expr, ffelab neg, ffelab zero, ffelab pos)
}
}
else if (neg == pos)
- { /* IF (expr.NE.0) THEN GOTO neg/pos ELSE GOTO
- zero. */
+ {
+ /* IF (expr.NE.0) THEN GOTO neg/pos ELSE GOTO zero. */
texpr = ffecom_expr (expr);
texpr = ffecom_2 (NE_EXPR, integer_type_node,
texpr,
@@ -2939,8 +3435,8 @@ ffeste_R840 (ffebld expr, ffelab neg, ffelab zero, ffelab pos)
expand_end_cond ();
}
else if (zero == pos)
- { /* IF (expr.GE.0) THEN GOTO zero/pos ELSE
- GOTO neg. */
+ {
+ /* IF (expr.GE.0) THEN GOTO zero/pos ELSE GOTO neg. */
texpr = ffecom_expr (expr);
texpr = ffecom_2 (GE_EXPR, integer_type_node,
texpr,
@@ -2953,10 +3449,11 @@ ffeste_R840 (ffebld expr, ffelab neg, ffelab zero, ffelab pos)
expand_end_cond ();
}
else
- { /* Use a SAVE_EXPR in combo with:
- IF (expr.LT.0) THEN GOTO neg
- ELSEIF (expr.GT.0) THEN GOTO pos
- ELSE GOTO zero. */
+ {
+ /* Use a SAVE_EXPR in combo with:
+ IF (expr.LT.0) THEN GOTO neg
+ ELSEIF (expr.GT.0) THEN GOTO pos
+ ELSE GOTO zero. */
tree expr_saved = ffecom_save_tree (ffecom_expr (expr));
texpr = ffecom_2 (LT_EXPR, integer_type_node,
@@ -2975,19 +3472,15 @@ ffeste_R840 (ffebld expr, ffelab neg, ffelab zero, ffelab pos)
expand_goto (gzero);
expand_end_cond ();
}
- ffeste_emit_line_note_ ();
- ffecom_pop_calltemps ();
- clear_momentary ();
+ ffeste_end_stmt_ ();
}
#else
#error
#endif
}
-/* ffeste_R841 -- CONTINUE statement
-
- ffeste_R841(); */
+/* CONTINUE statement. */
void
ffeste_R841 ()
@@ -2998,15 +3491,14 @@ ffeste_R841 ()
fputs ("+ CONTINUE\n", dmpout);
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
ffeste_emit_line_note_ ();
+
emit_nop ();
#else
#error
#endif
}
-/* ffeste_R842 -- STOP statement
-
- ffeste_R842(expr); */
+/* STOP statement. */
void
ffeste_R842 (ffebld expr)
@@ -3030,6 +3522,7 @@ ffeste_R842 (ffebld expr)
ffelexToken msg;
ffeste_emit_line_note_ ();
+
if ((expr == NULL)
|| (ffeinfo_basictype (ffebld_info (expr))
== FFEINFO_basictypeANY))
@@ -3073,12 +3566,16 @@ ffeste_R842 (ffebld expr)
== FFEINFO_kindtypeCHARACTERDEFAULT);
}
- ffecom_push_calltemps ();
+ /* No need to call ffeste_start_stmt_(), as the sorts of expressions
+ seen here should never require use of temporaries. */
+
callit = ffecom_call_gfrt (FFECOM_gfrtSTOP,
- ffecom_list_ptr_to_expr (ffebld_new_item (expr, NULL)));
- ffecom_pop_calltemps ();
+ ffecom_list_ptr_to_expr (ffebld_new_item (expr, NULL)),
+ NULL_TREE);
TREE_SIDE_EFFECTS (callit) = 1;
+
expand_expr_stmt (callit);
+
clear_momentary ();
}
#else
@@ -3086,12 +3583,7 @@ ffeste_R842 (ffebld expr)
#endif
}
-/* ffeste_R843 -- PAUSE statement
-
- ffeste_R843(expr,expr_token);
-
- Make sure statement is valid here; implement. expr and expr_token are
- both NULL if there was no expression. */
+/* PAUSE statement. */
void
ffeste_R843 (ffebld expr)
@@ -3115,6 +3607,7 @@ ffeste_R843 (ffebld expr)
ffelexToken msg;
ffeste_emit_line_note_ ();
+
if ((expr == NULL)
|| (ffeinfo_basictype (ffebld_info (expr))
== FFEINFO_basictypeANY))
@@ -3158,12 +3651,16 @@ ffeste_R843 (ffebld expr)
== FFEINFO_kindtypeCHARACTERDEFAULT);
}
- ffecom_push_calltemps ();
+ /* No need to call ffeste_start_stmt_(), as the sorts of expressions
+ seen here should never require use of temporaries. */
+
callit = ffecom_call_gfrt (FFECOM_gfrtPAUSE,
- ffecom_list_ptr_to_expr (ffebld_new_item (expr, NULL)));
- ffecom_pop_calltemps ();
+ ffecom_list_ptr_to_expr (ffebld_new_item (expr, NULL)),
+ NULL_TREE);
TREE_SIDE_EFFECTS (callit) = 1;
+
expand_expr_stmt (callit);
+
clear_momentary ();
}
#if 0 /* Old approach for phantom g77 run-time
@@ -3172,28 +3669,25 @@ ffeste_R843 (ffebld expr)
tree callit;
ffeste_emit_line_note_ ();
+
if (expr == NULL)
- callit = ffecom_call_gfrt (FFECOM_gfrtPAUSENIL, NULL_TREE);
+ callit = ffecom_call_gfrt (FFECOM_gfrtPAUSENIL, NULL_TREE, NULL_TREE);
else if (ffeinfo_basictype (ffebld_info (expr))
== FFEINFO_basictypeINTEGER)
- {
- ffecom_push_calltemps ();
- callit = ffecom_call_gfrt (FFECOM_gfrtPAUSEINT,
- ffecom_list_ptr_to_expr (ffebld_new_item (expr, NULL)));
- ffecom_pop_calltemps ();
- }
+ callit = ffecom_call_gfrt (FFECOM_gfrtPAUSEINT,
+ ffecom_list_ptr_to_expr (ffebld_new_item (expr, NULL)),
+ NULL_TREE);
+ else if (ffeinfo_basictype (ffebld_info (expr))
+ == FFEINFO_basictypeCHARACTER)
+ callit = ffecom_call_gfrt (FFECOM_gfrtPAUSECHAR,
+ ffecom_list_ptr_to_expr (ffebld_new_item (expr, NULL)),
+ NULL_TREE);
else
- {
- if (ffeinfo_basictype (ffebld_info (expr))
- != FFEINFO_basictypeCHARACTER)
- break;
- ffecom_push_calltemps ();
- callit = ffecom_call_gfrt (FFECOM_gfrtPAUSECHAR,
- ffecom_list_ptr_to_expr (ffebld_new_item (expr, NULL)));
- ffecom_pop_calltemps ();
- }
+ abort ();
TREE_SIDE_EFFECTS (callit) = 1;
+
expand_expr_stmt (callit);
+
clear_momentary ();
}
#endif
@@ -3202,11 +3696,7 @@ ffeste_R843 (ffebld expr)
#endif
}
-/* ffeste_R904 -- OPEN statement
-
- ffeste_R904();
-
- Make sure an OPEN is valid in the current context, and implement it. */
+/* OPEN statement. */
void
ffeste_R904 (ffestpOpenStmt *info)
@@ -3251,23 +3741,16 @@ ffeste_R904 (ffestpOpenStmt *info)
bool iostat;
bool errl;
-#define specified(something) (info->open_spec[something].kw_or_val_present)
-
ffeste_emit_line_note_ ();
+#define specified(something) (info->open_spec[something].kw_or_val_present)
+
iostat = specified (FFESTP_openixIOSTAT);
errl = specified (FFESTP_openixERR);
- ffecom_push_calltemps ();
+#undef specified
- args = ffeste_io_olist_ (errl || iostat,
- info->open_spec[FFESTP_openixUNIT].u.expr,
- &info->open_spec[FFESTP_openixFILE],
- &info->open_spec[FFESTP_openixSTATUS],
- &info->open_spec[FFESTP_openixACCESS],
- &info->open_spec[FFESTP_openixFORM],
- &info->open_spec[FFESTP_openixRECL],
- &info->open_spec[FFESTP_openixBLANK]);
+ ffeste_start_stmt_ ();
if (errl)
{
@@ -3288,31 +3771,48 @@ ffeste_R904 (ffestpOpenStmt *info)
}
if (iostat)
- { /* IOSTAT= */
+ {
+ /* Have IOSTAT= specification. */
+
ffeste_io_iostat_is_temp_ = FALSE;
ffeste_io_iostat_ = ffecom_expr
(info->open_spec[FFESTP_openixIOSTAT].u.expr);
}
else if (ffeste_io_abort_ != NULL_TREE)
- { /* no IOSTAT= but ERR= */
+ {
+ /* Have no IOSTAT= but have ERR=. */
+
ffeste_io_iostat_is_temp_ = TRUE;
ffeste_io_iostat_
- = ffecom_push_tempvar (ffecom_integer_type_node,
- FFETARGET_charactersizeNONE, -1, FALSE);
+ = ffecom_make_tempvar ("open", ffecom_integer_type_node,
+ FFETARGET_charactersizeNONE, -1);
}
else
- { /* no IOSTAT=, or ERR= */
+ {
+ /* No IOSTAT= or ERR= specification. */
+
ffeste_io_iostat_is_temp_ = FALSE;
ffeste_io_iostat_ = NULL_TREE;
}
+ /* Now prescan, then convert, all the arguments. */
+
+ args = ffeste_io_olist_ (errl || iostat,
+ info->open_spec[FFESTP_openixUNIT].u.expr,
+ &info->open_spec[FFESTP_openixFILE],
+ &info->open_spec[FFESTP_openixSTATUS],
+ &info->open_spec[FFESTP_openixACCESS],
+ &info->open_spec[FFESTP_openixFORM],
+ &info->open_spec[FFESTP_openixRECL],
+ &info->open_spec[FFESTP_openixBLANK]);
+
/* Don't generate "if (iostat != 0) goto label;" if label is temp abort
label, since we're gonna fall through to there anyway. */
- ffeste_io_call_ (ffecom_call_gfrt (FFECOM_gfrtFOPEN, args),
- !ffeste_io_abort_is_temp_);
+ ffeste_io_call_ (ffecom_call_gfrt (FFECOM_gfrtFOPEN, args, NULL_TREE),
+ ! ffeste_io_abort_is_temp_);
- /* If we've got a temp label, generate its code here. */
+ /* If we've got a temp label, generate its code here. */
if (ffeste_io_abort_is_temp_)
{
@@ -3323,27 +3823,14 @@ ffeste_R904 (ffestpOpenStmt *info)
assert (ffeste_io_err_ == NULL_TREE);
}
- /* If we've got a temp iostat, pop the temp. */
-
- if (ffeste_io_iostat_is_temp_)
- ffecom_pop_tempvar (ffeste_io_iostat_);
-
- ffecom_pop_calltemps ();
-
-#undef specified
+ ffeste_end_stmt_ ();
}
-
- clear_momentary ();
#else
#error
#endif
}
-/* ffeste_R907 -- CLOSE statement
-
- ffeste_R907();
-
- Make sure a CLOSE is valid in the current context, and implement it. */
+/* CLOSE statement. */
void
ffeste_R907 (ffestpCloseStmt *info)
@@ -3363,18 +3850,16 @@ ffeste_R907 (ffestpCloseStmt *info)
bool iostat;
bool errl;
-#define specified(something) (info->close_spec[something].kw_or_val_present)
-
ffeste_emit_line_note_ ();
+#define specified(something) (info->close_spec[something].kw_or_val_present)
+
iostat = specified (FFESTP_closeixIOSTAT);
errl = specified (FFESTP_closeixERR);
- ffecom_push_calltemps ();
+#undef specified
- args = ffeste_io_cllist_ (errl || iostat,
- info->close_spec[FFESTP_closeixUNIT].u.expr,
- &info->close_spec[FFESTP_closeixSTATUS]);
+ ffeste_start_stmt_ ();
if (errl)
{
@@ -3395,29 +3880,41 @@ ffeste_R907 (ffestpCloseStmt *info)
}
if (iostat)
- { /* IOSTAT= */
+ {
+ /* Have IOSTAT= specification. */
+
ffeste_io_iostat_is_temp_ = FALSE;
ffeste_io_iostat_ = ffecom_expr
(info->close_spec[FFESTP_closeixIOSTAT].u.expr);
}
else if (ffeste_io_abort_ != NULL_TREE)
- { /* no IOSTAT= but ERR= */
+ {
+ /* Have no IOSTAT= but have ERR=. */
+
ffeste_io_iostat_is_temp_ = TRUE;
ffeste_io_iostat_
- = ffecom_push_tempvar (ffecom_integer_type_node,
- FFETARGET_charactersizeNONE, -1, FALSE);
+ = ffecom_make_tempvar ("close", ffecom_integer_type_node,
+ FFETARGET_charactersizeNONE, -1);
}
else
- { /* no IOSTAT=, or ERR= */
+ {
+ /* No IOSTAT= or ERR= specification. */
+
ffeste_io_iostat_is_temp_ = FALSE;
ffeste_io_iostat_ = NULL_TREE;
}
+ /* Now prescan, then convert, all the arguments. */
+
+ args = ffeste_io_cllist_ (errl || iostat,
+ info->close_spec[FFESTP_closeixUNIT].u.expr,
+ &info->close_spec[FFESTP_closeixSTATUS]);
+
/* Don't generate "if (iostat != 0) goto label;" if label is temp abort
label, since we're gonna fall through to there anyway. */
- ffeste_io_call_ (ffecom_call_gfrt (FFECOM_gfrtFCLOS, args),
- !ffeste_io_abort_is_temp_);
+ ffeste_io_call_ (ffecom_call_gfrt (FFECOM_gfrtFCLOS, args, NULL_TREE),
+ ! ffeste_io_abort_is_temp_);
/* If we've got a temp label, generate its code here. */
@@ -3430,28 +3927,14 @@ ffeste_R907 (ffestpCloseStmt *info)
assert (ffeste_io_err_ == NULL_TREE);
}
- /* If we've got a temp iostat, pop the temp. */
-
- if (ffeste_io_iostat_is_temp_)
- ffecom_pop_tempvar (ffeste_io_iostat_);
-
- ffecom_pop_calltemps ();
-
-#undef specified
+ ffeste_end_stmt_ ();
}
-
- clear_momentary ();
#else
#error
#endif
}
-/* ffeste_R909_start -- READ(...) statement list begin
-
- ffeste_R909_start(FALSE);
-
- Verify that READ is valid here, and begin accepting items in the
- list. */
+/* READ(...) statement -- start. */
void
ffeste_R909_start (ffestpReadStmt *info, bool only_format UNUSED,
@@ -3527,12 +4010,8 @@ ffeste_R909_start (ffestpReadStmt *info, bool only_format UNUSED,
fputs (") ", dmpout);
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
-#define specified(something) (info->read_spec[something].kw_or_val_present)
-
ffeste_emit_line_note_ ();
- /* Do the real work. */
-
{
ffecomGfrt start;
ffecomGfrt end;
@@ -3542,10 +4021,9 @@ ffeste_R909_start (ffestpReadStmt *info, bool only_format UNUSED,
bool endl;
/* First determine the start, per-item, and end run-time functions to
- call. The per-item function is picked by choosing an ffeste functio
+ call. The per-item function is picked by choosing an ffeste function
to call to handle a given item; it knows how to generate a call to the
- appropriate run-time function, and is called an "io driver". It
- handles the implied-DO construct, for example. */
+ appropriate run-time function, and is called an "I/O driver". */
switch (format)
{
@@ -3598,45 +4076,34 @@ ffeste_R909_start (ffestpReadStmt *info, bool only_format UNUSED,
}
ffeste_io_endgfrt_ = end;
+#define specified(something) (info->read_spec[something].kw_or_val_present)
+
iostat = specified (FFESTP_readixIOSTAT);
errl = specified (FFESTP_readixERR);
endl = specified (FFESTP_readixEND);
- ffecom_push_calltemps ();
+#undef specified
- if (unit == FFESTV_unitCHAREXPR)
- {
- cilist = ffeste_io_icilist_ (errl || iostat,
- info->read_spec[FFESTP_readixUNIT].u.expr,
- endl || iostat, format,
- &info->read_spec[FFESTP_readixFORMAT]);
- }
- else
- {
- cilist = ffeste_io_cilist_ (errl || iostat, unit,
- info->read_spec[FFESTP_readixUNIT].u.expr,
- 5, endl || iostat, format,
- &info->read_spec[FFESTP_readixFORMAT],
- rec,
- info->read_spec[FFESTP_readixREC].u.expr);
- }
+ ffeste_start_stmt_ ();
if (errl)
- { /* ERR= */
+ {
+ /* Have ERR= specification. */
+
ffeste_io_err_
- = ffecom_lookup_label
- (info->read_spec[FFESTP_readixERR].u.label);
+ = ffecom_lookup_label (info->read_spec[FFESTP_readixERR].u.label);
if (endl)
- { /* ERR= END= */
+ {
+ /* Have both ERR= and END=. Need a temp label to handle both. */
ffeste_io_end_
- = ffecom_lookup_label
- (info->read_spec[FFESTP_readixEND].u.label);
+ = ffecom_lookup_label (info->read_spec[FFESTP_readixEND].u.label);
ffeste_io_abort_is_temp_ = TRUE;
ffeste_io_abort_ = ffecom_temp_label ();
}
else
- { /* ERR= but no END= */
+ {
+ /* Have ERR= but no END=. */
ffeste_io_end_ = NULL_TREE;
if ((ffeste_io_abort_is_temp_ = iostat))
ffeste_io_abort_ = ffecom_temp_label ();
@@ -3645,20 +4112,24 @@ ffeste_R909_start (ffestpReadStmt *info, bool only_format UNUSED,
}
}
else
- { /* no ERR= */
+ {
+ /* No ERR= specification. */
+
ffeste_io_err_ = NULL_TREE;
if (endl)
- { /* END= but no ERR= */
+ {
+ /* Have END= but no ERR=. */
ffeste_io_end_
- = ffecom_lookup_label
- (info->read_spec[FFESTP_readixEND].u.label);
+ = ffecom_lookup_label (info->read_spec[FFESTP_readixEND].u.label);
if ((ffeste_io_abort_is_temp_ = iostat))
ffeste_io_abort_ = ffecom_temp_label ();
else
ffeste_io_abort_ = ffeste_io_end_;
}
else
- { /* no ERR= or END= */
+ {
+ /* Have no ERR= or END=. */
+
ffeste_io_end_ = NULL_TREE;
if ((ffeste_io_abort_is_temp_ = iostat))
ffeste_io_abort_ = ffecom_temp_label ();
@@ -3668,46 +4139,59 @@ ffeste_R909_start (ffestpReadStmt *info, bool only_format UNUSED,
}
if (iostat)
- { /* IOSTAT= */
+ {
+ /* Have IOSTAT= specification. */
+
ffeste_io_iostat_is_temp_ = FALSE;
- ffeste_io_iostat_ = ffecom_expr
- (info->read_spec[FFESTP_readixIOSTAT].u.expr);
+ ffeste_io_iostat_
+ = ffecom_expr (info->read_spec[FFESTP_readixIOSTAT].u.expr);
}
else if (ffeste_io_abort_ != NULL_TREE)
- { /* no IOSTAT= but ERR= or END= or both */
+ {
+ /* Have no IOSTAT= but have ERR= and/or END=. */
+
ffeste_io_iostat_is_temp_ = TRUE;
ffeste_io_iostat_
- = ffecom_push_tempvar (ffecom_integer_type_node,
- FFETARGET_charactersizeNONE, -1, FALSE);
+ = ffecom_make_tempvar ("read", ffecom_integer_type_node,
+ FFETARGET_charactersizeNONE, -1);
}
else
- { /* no IOSTAT=, ERR=, or END= */
+ {
+ /* No IOSTAT=, ERR=, or END= specification. */
+
ffeste_io_iostat_is_temp_ = FALSE;
ffeste_io_iostat_ = NULL_TREE;
}
+ /* Now prescan, then convert, all the arguments. */
+
+ if (unit == FFESTV_unitCHAREXPR)
+ cilist = ffeste_io_icilist_ (errl || iostat,
+ info->read_spec[FFESTP_readixUNIT].u.expr,
+ endl || iostat, format,
+ &info->read_spec[FFESTP_readixFORMAT]);
+ else
+ cilist = ffeste_io_cilist_ (errl || iostat, unit,
+ info->read_spec[FFESTP_readixUNIT].u.expr,
+ 5, endl || iostat, format,
+ &info->read_spec[FFESTP_readixFORMAT],
+ rec,
+ info->read_spec[FFESTP_readixREC].u.expr);
+
/* If there is no end function, then there are no item functions (i.e.
it's a NAMELIST), and vice versa by the way. In this situation, don't
generate the "if (iostat != 0) goto label;" if the label is temp abort
label, since we're gonna fall through to there anyway. */
- ffeste_io_call_ (ffecom_call_gfrt (start, cilist),
- !ffeste_io_abort_is_temp_ || (end != FFECOM_gfrt));
+ ffeste_io_call_ (ffecom_call_gfrt (start, cilist, NULL_TREE),
+ (! ffeste_io_abort_is_temp_) || (end != FFECOM_gfrt));
}
-
-#undef specified
-
- push_momentary ();
#else
#error
#endif
}
-/* ffeste_R909_item -- READ statement i/o item
-
- ffeste_R909_item(expr,expr_token);
-
- Implement output-list expression. */
+/* READ statement -- I/O item. */
void
ffeste_R909_item (ffebld expr, ffelexToken expr_token)
@@ -3720,27 +4204,35 @@ ffeste_R909_item (ffebld expr, ffelexToken expr_token)
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
if (expr == NULL)
return;
+
+ /* Strip parens off items such as in "READ *,(A)". This is really a bug
+ in the user's code, but I've been told lots of code does this. */
while (ffebld_op (expr) == FFEBLD_opPAREN)
- expr = ffebld_left (expr); /* "READ *,(A)" -- really a bug in the user's
- code, but I've been told lots of code does
- this (blech)! */
+ expr = ffebld_left (expr);
+
if (ffebld_op (expr) == FFEBLD_opANY)
return;
+
if (ffebld_op (expr) == FFEBLD_opIMPDO)
ffeste_io_impdo_ (expr, expr_token);
else
- ffeste_io_call_ ((*ffeste_io_driver_) (expr), TRUE);
- clear_momentary ();
+ {
+ ffeste_start_stmt_ ();
+
+ ffecom_prepare_arg_ptr_to_expr (expr);
+
+ ffecom_prepare_end ();
+
+ ffeste_io_call_ ((*ffeste_io_driver_) (expr), TRUE);
+
+ ffeste_end_stmt_ ();
+ }
#else
#error
#endif
}
-/* ffeste_R909_finish -- READ statement list complete
-
- ffeste_R909_finish();
-
- Just wrap up any local activities. */
+/* READ statement -- end. */
void
ffeste_R909_finish ()
@@ -3754,73 +4246,56 @@ ffeste_R909_finish ()
/* Don't generate "if (iostat != 0) goto label;" if label is temp abort
label, since we're gonna fall through to there anyway. */
- {
- if (ffeste_io_endgfrt_ != FFECOM_gfrt)
- ffeste_io_call_ (ffecom_call_gfrt (ffeste_io_endgfrt_, NULL_TREE),
- !ffeste_io_abort_is_temp_);
-
- clear_momentary ();
- pop_momentary ();
-
- /* If we've got a temp label, generate its code here and have it fan out
- to the END= or ERR= label as appropriate. */
+ if (ffeste_io_endgfrt_ != FFECOM_gfrt)
+ ffeste_io_call_ (ffecom_call_gfrt (ffeste_io_endgfrt_, NULL_TREE,
+ NULL_TREE),
+ ! ffeste_io_abort_is_temp_);
- if (ffeste_io_abort_is_temp_)
- {
- DECL_INITIAL (ffeste_io_abort_) = error_mark_node;
- emit_nop ();
- expand_label (ffeste_io_abort_);
+ /* If we've got a temp label, generate its code here and have it fan out
+ to the END= or ERR= label as appropriate. */
- /* if (iostat<0) goto end_label; */
-
- if ((ffeste_io_end_ != NULL_TREE)
- && (TREE_CODE (ffeste_io_end_) != ERROR_MARK))
- {
- expand_start_cond (ffecom_truth_value
- (ffecom_2 (LT_EXPR, integer_type_node,
- ffeste_io_iostat_,
- ffecom_integer_zero_node)),
- 0);
- expand_goto (ffeste_io_end_);
- expand_end_cond ();
- }
-
- /* if (iostat>0) goto err_label; */
-
- if ((ffeste_io_err_ != NULL_TREE)
- && (TREE_CODE (ffeste_io_err_) != ERROR_MARK))
- {
- expand_start_cond (ffecom_truth_value
- (ffecom_2 (GT_EXPR, integer_type_node,
- ffeste_io_iostat_,
- ffecom_integer_zero_node)),
- 0);
- expand_goto (ffeste_io_err_);
- expand_end_cond ();
- }
+ if (ffeste_io_abort_is_temp_)
+ {
+ DECL_INITIAL (ffeste_io_abort_) = error_mark_node;
+ emit_nop ();
+ expand_label (ffeste_io_abort_);
- }
+ /* "if (iostat<0) goto end_label;". */
- /* If we've got a temp iostat, pop the temp. */
+ if ((ffeste_io_end_ != NULL_TREE)
+ && (TREE_CODE (ffeste_io_end_) != ERROR_MARK))
+ {
+ expand_start_cond (ffecom_truth_value
+ (ffecom_2 (LT_EXPR, integer_type_node,
+ ffeste_io_iostat_,
+ ffecom_integer_zero_node)),
+ 0);
+ expand_goto (ffeste_io_end_);
+ expand_end_cond ();
+ }
- if (ffeste_io_iostat_is_temp_)
- ffecom_pop_tempvar (ffeste_io_iostat_);
+ /* "if (iostat>0) goto err_label;". */
- ffecom_pop_calltemps ();
+ if ((ffeste_io_err_ != NULL_TREE)
+ && (TREE_CODE (ffeste_io_err_) != ERROR_MARK))
+ {
+ expand_start_cond (ffecom_truth_value
+ (ffecom_2 (GT_EXPR, integer_type_node,
+ ffeste_io_iostat_,
+ ffecom_integer_zero_node)),
+ 0);
+ expand_goto (ffeste_io_err_);
+ expand_end_cond ();
+ }
+ }
- clear_momentary ();
- }
+ ffeste_end_stmt_ ();
#else
#error
#endif
}
-/* ffeste_R910_start -- WRITE(...) statement list begin
-
- ffeste_R910_start();
-
- Verify that WRITE is valid here, and begin accepting items in the
- list. */
+/* WRITE statement -- start. */
void
ffeste_R910_start (ffestpWriteStmt *info, ffestvUnit unit,
@@ -3874,12 +4349,8 @@ ffeste_R910_start (ffestpWriteStmt *info, ffestvUnit unit,
fputs (") ", dmpout);
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
-#define specified(something) (info->write_spec[something].kw_or_val_present)
-
ffeste_emit_line_note_ ();
- /* Do the real work. */
-
{
ffecomGfrt start;
ffecomGfrt end;
@@ -3888,10 +4359,9 @@ ffeste_R910_start (ffestpWriteStmt *info, ffestvUnit unit,
bool errl;
/* First determine the start, per-item, and end run-time functions to
- call. The per-item function is picked by choosing an ffeste functio
+ call. The per-item function is picked by choosing an ffeste function
to call to handle a given item; it knows how to generate a call to the
- appropriate run-time function, and is called an "io driver". It
- handles the implied-DO construct, for example. */
+ appropriate run-time function, and is called an "I/O driver". */
switch (format)
{
@@ -3936,32 +4406,21 @@ ffeste_R910_start (ffestpWriteStmt *info, ffestvUnit unit,
}
ffeste_io_endgfrt_ = end;
+#define specified(something) (info->write_spec[something].kw_or_val_present)
+
iostat = specified (FFESTP_writeixIOSTAT);
errl = specified (FFESTP_writeixERR);
- ffecom_push_calltemps ();
+#undef specified
- if (unit == FFESTV_unitCHAREXPR)
- {
- cilist = ffeste_io_icilist_ (errl || iostat,
- info->write_spec[FFESTP_writeixUNIT].u.expr,
- FALSE, format,
- &info->write_spec[FFESTP_writeixFORMAT]);
- }
- else
- {
- cilist = ffeste_io_cilist_ (errl || iostat, unit,
- info->write_spec[FFESTP_writeixUNIT].u.expr,
- 6, FALSE, format,
- &info->write_spec[FFESTP_writeixFORMAT],
- rec,
- info->write_spec[FFESTP_writeixREC].u.expr);
- }
+ ffeste_start_stmt_ ();
ffeste_io_end_ = NULL_TREE;
if (errl)
- { /* ERR= */
+ {
+ /* Have ERR= specification. */
+
ffeste_io_err_
= ffeste_io_abort_
= ffecom_lookup_label
@@ -3969,7 +4428,9 @@ ffeste_R910_start (ffestpWriteStmt *info, ffestvUnit unit,
ffeste_io_abort_is_temp_ = FALSE;
}
else
- { /* no ERR= */
+ {
+ /* No ERR= specification. */
+
ffeste_io_err_ = NULL_TREE;
if ((ffeste_io_abort_is_temp_ = iostat))
@@ -3979,46 +4440,59 @@ ffeste_R910_start (ffestpWriteStmt *info, ffestvUnit unit,
}
if (iostat)
- { /* IOSTAT= */
+ {
+ /* Have IOSTAT= specification. */
+
ffeste_io_iostat_is_temp_ = FALSE;
ffeste_io_iostat_ = ffecom_expr
(info->write_spec[FFESTP_writeixIOSTAT].u.expr);
}
else if (ffeste_io_abort_ != NULL_TREE)
- { /* no IOSTAT= but ERR= */
+ {
+ /* Have no IOSTAT= but have ERR=. */
+
ffeste_io_iostat_is_temp_ = TRUE;
ffeste_io_iostat_
- = ffecom_push_tempvar (ffecom_integer_type_node,
- FFETARGET_charactersizeNONE, -1, FALSE);
+ = ffecom_make_tempvar ("write", ffecom_integer_type_node,
+ FFETARGET_charactersizeNONE, -1);
}
else
- { /* no IOSTAT=, or ERR= */
+ {
+ /* No IOSTAT= or ERR= specification. */
+
ffeste_io_iostat_is_temp_ = FALSE;
ffeste_io_iostat_ = NULL_TREE;
}
+ /* Now prescan, then convert, all the arguments. */
+
+ if (unit == FFESTV_unitCHAREXPR)
+ cilist = ffeste_io_icilist_ (errl || iostat,
+ info->write_spec[FFESTP_writeixUNIT].u.expr,
+ FALSE, format,
+ &info->write_spec[FFESTP_writeixFORMAT]);
+ else
+ cilist = ffeste_io_cilist_ (errl || iostat, unit,
+ info->write_spec[FFESTP_writeixUNIT].u.expr,
+ 6, FALSE, format,
+ &info->write_spec[FFESTP_writeixFORMAT],
+ rec,
+ info->write_spec[FFESTP_writeixREC].u.expr);
+
/* If there is no end function, then there are no item functions (i.e.
it's a NAMELIST), and vice versa by the way. In this situation, don't
generate the "if (iostat != 0) goto label;" if the label is temp abort
label, since we're gonna fall through to there anyway. */
- ffeste_io_call_ (ffecom_call_gfrt (start, cilist),
- !ffeste_io_abort_is_temp_ || (end != FFECOM_gfrt));
+ ffeste_io_call_ (ffecom_call_gfrt (start, cilist, NULL_TREE),
+ (! ffeste_io_abort_is_temp_) || (end != FFECOM_gfrt));
}
-
-#undef specified
-
- push_momentary ();
#else
#error
#endif
}
-/* ffeste_R910_item -- WRITE statement i/o item
-
- ffeste_R910_item(expr,expr_token);
-
- Implement output-list expression. */
+/* WRITE statement -- I/O item. */
void
ffeste_R910_item (ffebld expr, ffelexToken expr_token)
@@ -4031,23 +4505,30 @@ ffeste_R910_item (ffebld expr, ffelexToken expr_token)
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
if (expr == NULL)
return;
+
if (ffebld_op (expr) == FFEBLD_opANY)
return;
+
if (ffebld_op (expr) == FFEBLD_opIMPDO)
ffeste_io_impdo_ (expr, expr_token);
else
- ffeste_io_call_ ((*ffeste_io_driver_) (expr), TRUE);
- clear_momentary ();
+ {
+ ffeste_start_stmt_ ();
+
+ ffecom_prepare_arg_ptr_to_expr (expr);
+
+ ffecom_prepare_end ();
+
+ ffeste_io_call_ ((*ffeste_io_driver_) (expr), TRUE);
+
+ ffeste_end_stmt_ ();
+ }
#else
#error
#endif
}
-/* ffeste_R910_finish -- WRITE statement list complete
-
- ffeste_R910_finish();
-
- Just wrap up any local activities. */
+/* WRITE statement -- end. */
void
ffeste_R910_finish ()
@@ -4061,45 +4542,29 @@ ffeste_R910_finish ()
/* Don't generate "if (iostat != 0) goto label;" if label is temp abort
label, since we're gonna fall through to there anyway. */
- {
- if (ffeste_io_endgfrt_ != FFECOM_gfrt)
- ffeste_io_call_ (ffecom_call_gfrt (ffeste_io_endgfrt_, NULL_TREE),
- !ffeste_io_abort_is_temp_);
-
- clear_momentary ();
- pop_momentary ();
-
- /* If we've got a temp label, generate its code here. */
-
- if (ffeste_io_abort_is_temp_)
- {
- DECL_INITIAL (ffeste_io_abort_) = error_mark_node;
- emit_nop ();
- expand_label (ffeste_io_abort_);
-
- assert (ffeste_io_err_ == NULL_TREE);
- }
+ if (ffeste_io_endgfrt_ != FFECOM_gfrt)
+ ffeste_io_call_ (ffecom_call_gfrt (ffeste_io_endgfrt_, NULL_TREE,
+ NULL_TREE),
+ ! ffeste_io_abort_is_temp_);
- /* If we've got a temp iostat, pop the temp. */
+ /* If we've got a temp label, generate its code here. */
- if (ffeste_io_iostat_is_temp_)
- ffecom_pop_tempvar (ffeste_io_iostat_);
+ if (ffeste_io_abort_is_temp_)
+ {
+ DECL_INITIAL (ffeste_io_abort_) = error_mark_node;
+ emit_nop ();
+ expand_label (ffeste_io_abort_);
- ffecom_pop_calltemps ();
+ assert (ffeste_io_err_ == NULL_TREE);
+ }
- clear_momentary ();
- }
+ ffeste_end_stmt_ ();
#else
#error
#endif
}
-/* ffeste_R911_start -- PRINT statement list begin
-
- ffeste_R911_start();
-
- Verify that PRINT is valid here, and begin accepting items in the
- list. */
+/* PRINT statement -- start. */
void
ffeste_R911_start (ffestpPrintStmt *info, ffestvFormat format)
@@ -4132,18 +4597,15 @@ ffeste_R911_start (ffestpPrintStmt *info, ffestvFormat format)
ffeste_emit_line_note_ ();
- /* Do the real work. */
-
{
ffecomGfrt start;
ffecomGfrt end;
tree cilist;
/* First determine the start, per-item, and end run-time functions to
- call. The per-item function is picked by choosing an ffeste functio
+ call. The per-item function is picked by choosing an ffeste function
to call to handle a given item; it knows how to generate a call to the
- appropriate run-time function, and is called an "io driver". It
- handles the implied-DO construct, for example. */
+ appropriate run-time function, and is called an "I/O driver". */
switch (format)
{
@@ -4172,10 +4634,7 @@ ffeste_R911_start (ffestpPrintStmt *info, ffestvFormat format)
}
ffeste_io_endgfrt_ = end;
- ffecom_push_calltemps ();
-
- cilist = ffeste_io_cilist_ (FALSE, FFESTV_unitNONE, NULL, 6, FALSE, format,
- &info->print_spec[FFESTP_printixFORMAT], FALSE, NULL);
+ ffeste_start_stmt_ ();
ffeste_io_end_ = NULL_TREE;
ffeste_io_err_ = NULL_TREE;
@@ -4184,26 +4643,25 @@ ffeste_R911_start (ffestpPrintStmt *info, ffestvFormat format)
ffeste_io_iostat_is_temp_ = FALSE;
ffeste_io_iostat_ = NULL_TREE;
+ /* Now prescan, then convert, all the arguments. */
+
+ cilist = ffeste_io_cilist_ (FALSE, FFESTV_unitNONE, NULL, 6, FALSE, format,
+ &info->print_spec[FFESTP_printixFORMAT], FALSE, NULL);
+
/* If there is no end function, then there are no item functions (i.e.
it's a NAMELIST), and vice versa by the way. In this situation, don't
generate the "if (iostat != 0) goto label;" if the label is temp abort
label, since we're gonna fall through to there anyway. */
- ffeste_io_call_ (ffecom_call_gfrt (start, cilist),
- !ffeste_io_abort_is_temp_ || (end != FFECOM_gfrt));
+ ffeste_io_call_ (ffecom_call_gfrt (start, cilist, NULL_TREE),
+ (! ffeste_io_abort_is_temp_) || (end != FFECOM_gfrt));
}
-
- push_momentary ();
#else
#error
#endif
}
-/* ffeste_R911_item -- PRINT statement i/o item
-
- ffeste_R911_item(expr,expr_token);
-
- Implement output-list expression. */
+/* PRINT statement -- I/O item. */
void
ffeste_R911_item (ffebld expr, ffelexToken expr_token)
@@ -4216,23 +4674,30 @@ ffeste_R911_item (ffebld expr, ffelexToken expr_token)
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
if (expr == NULL)
return;
+
if (ffebld_op (expr) == FFEBLD_opANY)
return;
+
if (ffebld_op (expr) == FFEBLD_opIMPDO)
ffeste_io_impdo_ (expr, expr_token);
else
- ffeste_io_call_ ((*ffeste_io_driver_) (expr), FALSE);
- clear_momentary ();
+ {
+ ffeste_start_stmt_ ();
+
+ ffecom_prepare_arg_ptr_to_expr (expr);
+
+ ffecom_prepare_end ();
+
+ ffeste_io_call_ ((*ffeste_io_driver_) (expr), TRUE);
+
+ ffeste_end_stmt_ ();
+ }
#else
#error
#endif
}
-/* ffeste_R911_finish -- PRINT statement list complete
-
- ffeste_R911_finish();
-
- Just wrap up any local activities. */
+/* PRINT statement -- end. */
void
ffeste_R911_finish ()
@@ -4242,27 +4707,19 @@ ffeste_R911_finish ()
#if FFECOM_targetCURRENT == FFECOM_targetFFE
fputc ('\n', dmpout);
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
- {
- if (ffeste_io_endgfrt_ != FFECOM_gfrt)
- ffeste_io_call_ (ffecom_call_gfrt (ffeste_io_endgfrt_, NULL_TREE),
- FALSE);
- ffecom_pop_calltemps ();
+ if (ffeste_io_endgfrt_ != FFECOM_gfrt)
+ ffeste_io_call_ (ffecom_call_gfrt (ffeste_io_endgfrt_, NULL_TREE,
+ NULL_TREE),
+ FALSE);
- clear_momentary ();
- pop_momentary ();
- clear_momentary ();
- }
+ ffeste_end_stmt_ ();
#else
#error
#endif
}
-/* ffeste_R919 -- BACKSPACE statement
-
- ffeste_R919();
-
- Make sure a BACKSPACE is valid in the current context, and implement it. */
+/* BACKSPACE statement. */
void
ffeste_R919 (ffestpBeruStmt *info)
@@ -4282,11 +4739,7 @@ ffeste_R919 (ffestpBeruStmt *info)
#endif
}
-/* ffeste_R920 -- ENDFILE statement
-
- ffeste_R920();
-
- Make sure a ENDFILE is valid in the current context, and implement it. */
+/* ENDFILE statement. */
void
ffeste_R920 (ffestpBeruStmt *info)
@@ -4306,11 +4759,7 @@ ffeste_R920 (ffestpBeruStmt *info)
#endif
}
-/* ffeste_R921 -- REWIND statement
-
- ffeste_R921();
-
- Make sure a REWIND is valid in the current context, and implement it. */
+/* REWIND statement. */
void
ffeste_R921 (ffestpBeruStmt *info)
@@ -4330,11 +4779,7 @@ ffeste_R921 (ffestpBeruStmt *info)
#endif
}
-/* ffeste_R923A -- INQUIRE statement (non-IOLENGTH version)
-
- ffeste_R923A(bool by_file);
-
- Make sure an INQUIRE is valid in the current context, and implement it. */
+/* INQUIRE statement (non-IOLENGTH version). */
void
ffeste_R923A (ffestpInquireStmt *info, bool by_file UNUSED)
@@ -4387,32 +4832,16 @@ ffeste_R923A (ffestpInquireStmt *info, bool by_file UNUSED)
bool iostat;
bool errl;
-#define specified(something) (info->inquire_spec[something].kw_or_val_present)
-
ffeste_emit_line_note_ ();
+#define specified(something) (info->inquire_spec[something].kw_or_val_present)
+
iostat = specified (FFESTP_inquireixIOSTAT);
errl = specified (FFESTP_inquireixERR);
- ffecom_push_calltemps ();
-
- args = ffeste_io_inlist_ (errl || iostat,
- &info->inquire_spec[FFESTP_inquireixUNIT],
- &info->inquire_spec[FFESTP_inquireixFILE],
- &info->inquire_spec[FFESTP_inquireixEXIST],
- &info->inquire_spec[FFESTP_inquireixOPENED],
- &info->inquire_spec[FFESTP_inquireixNUMBER],
- &info->inquire_spec[FFESTP_inquireixNAMED],
- &info->inquire_spec[FFESTP_inquireixNAME],
- &info->inquire_spec[FFESTP_inquireixACCESS],
- &info->inquire_spec[FFESTP_inquireixSEQUENTIAL],
- &info->inquire_spec[FFESTP_inquireixDIRECT],
- &info->inquire_spec[FFESTP_inquireixFORM],
- &info->inquire_spec[FFESTP_inquireixFORMATTED],
- &info->inquire_spec[FFESTP_inquireixUNFORMATTED],
- &info->inquire_spec[FFESTP_inquireixRECL],
- &info->inquire_spec[FFESTP_inquireixNEXTREC],
- &info->inquire_spec[FFESTP_inquireixBLANK]);
+#undef specified
+
+ ffeste_start_stmt_ ();
if (errl)
{
@@ -4433,31 +4862,58 @@ ffeste_R923A (ffestpInquireStmt *info, bool by_file UNUSED)
}
if (iostat)
- { /* IOSTAT= */
+ {
+ /* Have IOSTAT= specification. */
+
ffeste_io_iostat_is_temp_ = FALSE;
ffeste_io_iostat_ = ffecom_expr
(info->inquire_spec[FFESTP_inquireixIOSTAT].u.expr);
}
else if (ffeste_io_abort_ != NULL_TREE)
- { /* no IOSTAT= but ERR= */
+ {
+ /* Have no IOSTAT= but have ERR=. */
+
ffeste_io_iostat_is_temp_ = TRUE;
ffeste_io_iostat_
- = ffecom_push_tempvar (ffecom_integer_type_node,
- FFETARGET_charactersizeNONE, -1, FALSE);
+ = ffecom_make_tempvar ("inquire", ffecom_integer_type_node,
+ FFETARGET_charactersizeNONE, -1);
}
else
- { /* no IOSTAT=, or ERR= */
+ {
+ /* No IOSTAT= or ERR= specification. */
+
ffeste_io_iostat_is_temp_ = FALSE;
ffeste_io_iostat_ = NULL_TREE;
}
+ /* Now prescan, then convert, all the arguments. */
+
+ args
+ = ffeste_io_inlist_ (errl || iostat,
+ &info->inquire_spec[FFESTP_inquireixUNIT],
+ &info->inquire_spec[FFESTP_inquireixFILE],
+ &info->inquire_spec[FFESTP_inquireixEXIST],
+ &info->inquire_spec[FFESTP_inquireixOPENED],
+ &info->inquire_spec[FFESTP_inquireixNUMBER],
+ &info->inquire_spec[FFESTP_inquireixNAMED],
+ &info->inquire_spec[FFESTP_inquireixNAME],
+ &info->inquire_spec[FFESTP_inquireixACCESS],
+ &info->inquire_spec[FFESTP_inquireixSEQUENTIAL],
+ &info->inquire_spec[FFESTP_inquireixDIRECT],
+ &info->inquire_spec[FFESTP_inquireixFORM],
+ &info->inquire_spec[FFESTP_inquireixFORMATTED],
+ &info->inquire_spec[FFESTP_inquireixUNFORMATTED],
+ &info->inquire_spec[FFESTP_inquireixRECL],
+ &info->inquire_spec[FFESTP_inquireixNEXTREC],
+ &info->inquire_spec[FFESTP_inquireixBLANK]);
+
/* Don't generate "if (iostat != 0) goto label;" if label is temp abort
label, since we're gonna fall through to there anyway. */
- ffeste_io_call_ (ffecom_call_gfrt (FFECOM_gfrtFINQU, args),
- !ffeste_io_abort_is_temp_);
+ ffeste_io_call_ (ffecom_call_gfrt (FFECOM_gfrtFINQU, args, NULL_TREE),
+ ! ffeste_io_abort_is_temp_);
- /* If we've got a temp label, generate its code here. */
+ /* If we've got a temp label, generate its code here. */
if (ffeste_io_abort_is_temp_)
{
@@ -4468,28 +4924,14 @@ ffeste_R923A (ffestpInquireStmt *info, bool by_file UNUSED)
assert (ffeste_io_err_ == NULL_TREE);
}
- /* If we've got a temp iostat, pop the temp. */
-
- if (ffeste_io_iostat_is_temp_)
- ffecom_pop_tempvar (ffeste_io_iostat_);
-
- ffecom_pop_calltemps ();
-
-#undef specified
+ ffeste_end_stmt_ ();
}
-
- clear_momentary ();
#else
#error
#endif
}
-/* ffeste_R923B_start -- INQUIRE(IOLENGTH=expr) statement list begin
-
- ffeste_R923B_start();
-
- Verify that INQUIRE is valid here, and begin accepting items in the
- list. */
+/* INQUIRE(IOLENGTH=expr) statement -- start. */
void
ffeste_R923B_start (ffestpInquireStmt *info UNUSED)
@@ -4502,18 +4944,14 @@ ffeste_R923B_start (ffestpInquireStmt *info UNUSED)
fputs (") ", dmpout);
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
assert ("INQUIRE(IOLENGTH=<var>) not implemented yet! ~~~" == NULL);
+
ffeste_emit_line_note_ ();
- clear_momentary ();
#else
#error
#endif
}
-/* ffeste_R923B_item -- INQUIRE statement i/o item
-
- ffeste_R923B_item(expr,expr_token);
-
- Implement output-list expression. */
+/* INQUIRE(IOLENGTH=expr) statement -- I/O item. */
void
ffeste_R923B_item (ffebld expr UNUSED)
@@ -4524,17 +4962,12 @@ ffeste_R923B_item (ffebld expr UNUSED)
ffebld_dump (expr);
fputc (',', dmpout);
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
- clear_momentary ();
#else
#error
#endif
}
-/* ffeste_R923B_finish -- INQUIRE statement list complete
-
- ffeste_R923B_finish();
-
- Just wrap up any local activities. */
+/* INQUIRE(IOLENGTH=expr) statement -- end. */
void
ffeste_R923B_finish ()
@@ -4544,7 +4977,6 @@ ffeste_R923B_finish ()
#if FFECOM_targetCURRENT == FFECOM_targetFFE
fputc ('\n', dmpout);
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
- clear_momentary ();
#else
#error
#endif
@@ -4616,9 +5048,7 @@ ffeste_R1001 (ffests s)
#endif
}
-/* ffeste_R1103 -- End a PROGRAM
-
- ffeste_R1103(); */
+/* END PROGRAM. */
void
ffeste_R1103 ()
@@ -4631,9 +5061,7 @@ ffeste_R1103 ()
#endif
}
-/* ffeste_R1112 -- End a BLOCK DATA
-
- ffeste_R1112(TRUE); */
+/* END BLOCK DATA. */
void
ffeste_R1112 ()
@@ -4646,11 +5074,7 @@ ffeste_R1112 ()
#endif
}
-/* ffeste_R1212 -- CALL statement
-
- ffeste_R1212(expr,expr_token);
-
- Make sure statement is valid here; implement. */
+/* CALL statement. */
void
ffeste_R1212 (ffebld expr)
@@ -4715,6 +5139,27 @@ ffeste_R1212 (ffebld expr)
else
ffebld_set_trail (prevargs, NULL);
+ ffeste_start_stmt_ ();
+
+ /* No temporaries are actually needed at this level, but we go
+ through the motions anyway, just to be sure in case they do
+ get made. Temporaries needed for arguments should be in the
+ scopes of inner blocks, and if clean-up actions are supported,
+ such as CALL-ing an intrinsic that writes to an argument of one
+ type when a variable of a different type is provided (requiring
+ assignment to the variable from a temporary after the library
+ routine returns), the clean-up must be done by the expression
+ evaluator, generally, to handle alternate returns (which we hope
+ won't ever be supported by intrinsics, but might be a similar
+ issue, such as CALL-ing an F90-style subroutine with an INTERFACE
+ block). That implies the expression evaluator will have to
+ recognize the need for its own temporary anyway, meaning it'll
+ construct a block within the one constructed here. */
+
+ ffecom_prepare_expr (expr);
+
+ ffecom_prepare_end ();
+
if (labels == NULL)
expand_expr_stmt (ffecom_expr (expr));
else
@@ -4725,43 +5170,41 @@ ffeste_R1212 (ffebld expr)
int caseno;
int pushok;
tree duplicate;
+ ffebld label;
texpr = ffecom_expr (expr);
expand_start_case (0, texpr, TREE_TYPE (texpr), "CALL statement");
- push_momentary (); /* In case of many labels, keep 'em cleared
- out. */
- for (caseno = 1;
- labels != NULL;
- ++caseno, labels = ffebld_trail (labels))
+
+ for (caseno = 1, label = labels;
+ label != NULL;
+ ++caseno, label = ffebld_trail (label))
{
value = build_int_2 (caseno, 0);
tlabel = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE);
pushok = pushcase (value, convert, tlabel, &duplicate);
assert (pushok == 0);
+
tlabel
- = ffecom_lookup_label (ffebld_labter (ffebld_head (labels)));
+ = ffecom_lookup_label (ffebld_labter (ffebld_head (label)));
if ((tlabel == NULL_TREE)
|| (TREE_CODE (tlabel) == ERROR_MARK))
continue;
TREE_USED (tlabel) = 1;
expand_goto (tlabel);
- clear_momentary ();
}
- pop_momentary ();
expand_end_case (texpr);
}
- clear_momentary ();
+
+ ffeste_end_stmt_ ();
}
#else
#error
#endif
}
-/* ffeste_R1221 -- End a FUNCTION
-
- ffeste_R1221(TRUE); */
+/* END FUNCTION. */
void
ffeste_R1221 ()
@@ -4774,9 +5217,7 @@ ffeste_R1221 ()
#endif
}
-/* ffeste_R1225 -- End a SUBROUTINE
-
- ffeste_R1225(TRUE); */
+/* END SUBROUTINE. */
void
ffeste_R1225 ()
@@ -4789,12 +5230,7 @@ ffeste_R1225 ()
#endif
}
-/* ffeste_R1226 -- ENTRY statement
-
- ffeste_R1226(entryname,arglist,ending_token);
-
- Make sure we're in a SUBROUTINE or FUNCTION, register arguments for the
- entry point name, and so on. */
+/* ENTRY statement. */
void
ffeste_R1226 (ffesymbol entry)
@@ -4842,23 +5278,19 @@ ffeste_R1226 (ffesymbol entry)
ffeste_emit_line_note_ ();
+ if (label == error_mark_node)
+ return;
+
DECL_INITIAL (label) = error_mark_node;
emit_nop ();
expand_label (label);
-
- clear_momentary ();
}
#else
#error
#endif
}
-/* ffeste_R1227 -- RETURN statement
-
- ffeste_R1227(expr);
-
- Make sure statement is valid here; implement. expr and expr_token are
- both NULL if there was no expression. */
+/* RETURN statement. */
void
ffeste_R1227 (ffestw block UNUSED, ffebld expr)
@@ -4881,7 +5313,12 @@ ffeste_R1227 (ffestw block UNUSED, ffebld expr)
tree rtn;
ffeste_emit_line_note_ ();
- ffecom_push_calltemps ();
+
+ ffeste_start_stmt_ ();
+
+ ffecom_prepare_return_expr (expr);
+
+ ffecom_prepare_end ();
rtn = ffecom_return_expr (expr);
@@ -4902,20 +5339,14 @@ ffeste_R1227 (ffestw block UNUSED, ffebld expr)
expand_null_return ();
}
- ffecom_pop_calltemps ();
- clear_momentary ();
+ ffeste_end_stmt_ ();
}
#else
#error
#endif
}
-/* ffeste_V018_start -- REWRITE(...) statement list begin
-
- ffeste_V018_start();
-
- Verify that REWRITE is valid here, and begin accepting items in the
- list. */
+/* REWRITE statement -- start. */
#if FFESTR_VXT
void
@@ -4950,11 +5381,7 @@ ffeste_V018_start (ffestpRewriteStmt *info, ffestvFormat format)
#endif
}
-/* ffeste_V018_item -- REWRITE statement i/o item
-
- ffeste_V018_item(expr,expr_token);
-
- Implement output-list expression. */
+/* REWRITE statement -- I/O item. */
void
ffeste_V018_item (ffebld expr)
@@ -4970,11 +5397,7 @@ ffeste_V018_item (ffebld expr)
#endif
}
-/* ffeste_V018_finish -- REWRITE statement list complete
-
- ffeste_V018_finish();
-
- Just wrap up any local activities. */
+/* REWRITE statement -- end. */
void
ffeste_V018_finish ()
@@ -4989,12 +5412,7 @@ ffeste_V018_finish ()
#endif
}
-/* ffeste_V019_start -- ACCEPT statement list begin
-
- ffeste_V019_start();
-
- Verify that ACCEPT is valid here, and begin accepting items in the
- list. */
+/* ACCEPT statement -- start. */
void
ffeste_V019_start (ffestpAcceptStmt *info, ffestvFormat format)
@@ -5029,11 +5447,7 @@ ffeste_V019_start (ffestpAcceptStmt *info, ffestvFormat format)
#endif
}
-/* ffeste_V019_item -- ACCEPT statement i/o item
-
- ffeste_V019_item(expr,expr_token);
-
- Implement output-list expression. */
+/* ACCEPT statement -- I/O item. */
void
ffeste_V019_item (ffebld expr)
@@ -5049,11 +5463,7 @@ ffeste_V019_item (ffebld expr)
#endif
}
-/* ffeste_V019_finish -- ACCEPT statement list complete
-
- ffeste_V019_finish();
-
- Just wrap up any local activities. */
+/* ACCEPT statement -- end. */
void
ffeste_V019_finish ()
@@ -5069,12 +5479,7 @@ ffeste_V019_finish ()
}
#endif
-/* ffeste_V020_start -- TYPE statement list begin
-
- ffeste_V020_start();
-
- Verify that TYPE is valid here, and begin accepting items in the
- list. */
+/* TYPE statement -- start. */
void
ffeste_V020_start (ffestpTypeStmt *info UNUSED,
@@ -5110,11 +5515,7 @@ ffeste_V020_start (ffestpTypeStmt *info UNUSED,
#endif
}
-/* ffeste_V020_item -- TYPE statement i/o item
-
- ffeste_V020_item(expr,expr_token);
-
- Implement output-list expression. */
+/* TYPE statement -- I/O item. */
void
ffeste_V020_item (ffebld expr UNUSED)
@@ -5130,11 +5531,7 @@ ffeste_V020_item (ffebld expr UNUSED)
#endif
}
-/* ffeste_V020_finish -- TYPE statement list complete
-
- ffeste_V020_finish();
-
- Just wrap up any local activities. */
+/* TYPE statement -- end. */
void
ffeste_V020_finish ()
@@ -5149,11 +5546,7 @@ ffeste_V020_finish ()
#endif
}
-/* ffeste_V021 -- DELETE statement
-
- ffeste_V021();
-
- Make sure a DELETE is valid in the current context, and implement it. */
+/* DELETE statement. */
#if FFESTR_VXT
void
@@ -5174,11 +5567,7 @@ ffeste_V021 (ffestpDeleteStmt *info)
#endif
}
-/* ffeste_V022 -- UNLOCK statement
-
- ffeste_V022();
-
- Make sure a UNLOCK is valid in the current context, and implement it. */
+/* UNLOCK statement. */
void
ffeste_V022 (ffestpBeruStmt *info)
@@ -5197,12 +5586,7 @@ ffeste_V022 (ffestpBeruStmt *info)
#endif
}
-/* ffeste_V023_start -- ENCODE(...) statement list begin
-
- ffeste_V023_start();
-
- Verify that ENCODE is valid here, and begin accepting items in the
- list. */
+/* ENCODE statement -- start. */
void
ffeste_V023_start (ffestpVxtcodeStmt *info)
@@ -5223,11 +5607,7 @@ ffeste_V023_start (ffestpVxtcodeStmt *info)
#endif
}
-/* ffeste_V023_item -- ENCODE statement i/o item
-
- ffeste_V023_item(expr,expr_token);
-
- Implement output-list expression. */
+/* ENCODE statement -- I/O item. */
void
ffeste_V023_item (ffebld expr)
@@ -5243,11 +5623,7 @@ ffeste_V023_item (ffebld expr)
#endif
}
-/* ffeste_V023_finish -- ENCODE statement list complete
-
- ffeste_V023_finish();
-
- Just wrap up any local activities. */
+/* ENCODE statement -- end. */
void
ffeste_V023_finish ()
@@ -5262,12 +5638,7 @@ ffeste_V023_finish ()
#endif
}
-/* ffeste_V024_start -- DECODE(...) statement list begin
-
- ffeste_V024_start();
-
- Verify that DECODE is valid here, and begin accepting items in the
- list. */
+/* DECODE statement -- start. */
void
ffeste_V024_start (ffestpVxtcodeStmt *info)
@@ -5288,11 +5659,7 @@ ffeste_V024_start (ffestpVxtcodeStmt *info)
#endif
}
-/* ffeste_V024_item -- DECODE statement i/o item
-
- ffeste_V024_item(expr,expr_token);
-
- Implement output-list expression. */
+/* DECODE statement -- I/O item. */
void
ffeste_V024_item (ffebld expr)
@@ -5308,11 +5675,7 @@ ffeste_V024_item (ffebld expr)
#endif
}
-/* ffeste_V024_finish -- DECODE statement list complete
-
- ffeste_V024_finish();
-
- Just wrap up any local activities. */
+/* DECODE statement -- end. */
void
ffeste_V024_finish ()
@@ -5327,12 +5690,7 @@ ffeste_V024_finish ()
#endif
}
-/* ffeste_V025_start -- DEFINEFILE statement list begin
-
- ffeste_V025_start();
-
- Verify that DEFINEFILE is valid here, and begin accepting items in the
- list. */
+/* DEFINEFILE statement -- start. */
void
ffeste_V025_start ()
@@ -5347,11 +5705,7 @@ ffeste_V025_start ()
#endif
}
-/* ffeste_V025_item -- DEFINE FILE statement item
-
- ffeste_V025_item(u,ut,m,mt,n,nt,asv,asvt);
-
- Implement item. */
+/* DEFINE FILE statement -- item. */
void
ffeste_V025_item (ffebld u, ffebld m, ffebld n, ffebld asv)
@@ -5373,11 +5727,7 @@ ffeste_V025_item (ffebld u, ffebld m, ffebld n, ffebld asv)
#endif
}
-/* ffeste_V025_finish -- DEFINE FILE statement list complete
-
- ffeste_V025_finish();
-
- Just wrap up any local activities. */
+/* DEFINE FILE statement -- end. */
void
ffeste_V025_finish ()
@@ -5392,11 +5742,7 @@ ffeste_V025_finish ()
#endif
}
-/* ffeste_V026 -- FIND statement
-
- ffeste_V026();
-
- Make sure a FIND is valid in the current context, and implement it. */
+/* FIND statement. */
void
ffeste_V026 (ffestpFindStmt *info)
@@ -5417,3 +5763,11 @@ ffeste_V026 (ffestpFindStmt *info)
}
#endif
+
+#ifdef ENABLE_CHECKING
+void
+ffeste_terminate_2 (void)
+{
+ assert (! ffeste_top_block_);
+}
+#endif
diff --git a/contrib/gcc/f/ste.h b/contrib/gcc/f/ste.h
index 0ee0d0f..78e9881 100644
--- a/contrib/gcc/f/ste.h
+++ b/contrib/gcc/f/ste.h
@@ -1,6 +1,6 @@
/* ste.h -- Private #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -62,10 +62,10 @@ void ffeste_end_R807 (void);
void ffeste_labeldef_branch (ffelab label);
void ffeste_labeldef_format (ffelab label);
void ffeste_R737A (ffebld dest, ffebld source);
-void ffeste_R803 (ffebld expr);
-void ffeste_R804 (ffebld expr);
-void ffeste_R805 (void);
-void ffeste_R806 (void);
+void ffeste_R803 (ffestw block, ffebld expr);
+void ffeste_R804 (ffestw block, ffebld expr);
+void ffeste_R805 (ffestw block);
+void ffeste_R806 (ffestw block);
void ffeste_R807 (ffebld expr);
void ffeste_R809 (ffestw block, ffebld expr);
void ffeste_R810 (ffestw block, unsigned long casenum);
@@ -159,7 +159,11 @@ void ffeste_V026 (ffestpFindStmt *info);
#endif /* FFECOM_targetCURRENT == FFECOM_targetFFE */
#define ffeste_terminate_0()
#define ffeste_terminate_1()
+#ifdef ENABLE_CHECKING
+void ffeste_terminate_2 (void);
+#else
#define ffeste_terminate_2()
+#endif
#define ffeste_terminate_3()
#define ffeste_terminate_4()
diff --git a/contrib/gcc/f/storag.c b/contrib/gcc/f/storag.c
index 76f5cd3..f8af500 100644
--- a/contrib/gcc/f/storag.c
+++ b/contrib/gcc/f/storag.c
@@ -1,6 +1,6 @@
/* storag.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/storag.h b/contrib/gcc/f/storag.h
index 5addab5..bc5c9e6 100644
--- a/contrib/gcc/f/storag.h
+++ b/contrib/gcc/f/storag.h
@@ -1,6 +1,6 @@
/* storag.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/stp.c b/contrib/gcc/f/stp.c
index 6c95c74..7b8763d 100644
--- a/contrib/gcc/f/stp.c
+++ b/contrib/gcc/f/stp.c
@@ -1,6 +1,6 @@
/* stp.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/stp.h b/contrib/gcc/f/stp.h
index edfccc6..d995cf0 100644
--- a/contrib/gcc/f/stp.h
+++ b/contrib/gcc/f/stp.h
@@ -1,6 +1,6 @@
/* stp.h -- Private #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/str-1t.fin b/contrib/gcc/f/str-1t.fin
index 674c92d..b74f583 100644
--- a/contrib/gcc/f/str-1t.fin
+++ b/contrib/gcc/f/str-1t.fin
@@ -1,6 +1,6 @@
{
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/str-2t.fin b/contrib/gcc/f/str-2t.fin
index ea86819..d0ba9fc 100644
--- a/contrib/gcc/f/str-2t.fin
+++ b/contrib/gcc/f/str-2t.fin
@@ -1,6 +1,6 @@
{
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/str-fo.fin b/contrib/gcc/f/str-fo.fin
index 243941f..ea39b6c 100644
--- a/contrib/gcc/f/str-fo.fin
+++ b/contrib/gcc/f/str-fo.fin
@@ -1,6 +1,6 @@
{
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/str-io.fin b/contrib/gcc/f/str-io.fin
index 4124da6..efd4008 100644
--- a/contrib/gcc/f/str-io.fin
+++ b/contrib/gcc/f/str-io.fin
@@ -1,6 +1,6 @@
{
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/str-nq.fin b/contrib/gcc/f/str-nq.fin
index cce8745..3cdae08 100644
--- a/contrib/gcc/f/str-nq.fin
+++ b/contrib/gcc/f/str-nq.fin
@@ -1,6 +1,6 @@
{
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/str-op.fin b/contrib/gcc/f/str-op.fin
index 62396f2..b7a5112 100644
--- a/contrib/gcc/f/str-op.fin
+++ b/contrib/gcc/f/str-op.fin
@@ -1,6 +1,6 @@
{
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/str-ot.fin b/contrib/gcc/f/str-ot.fin
index a4ad768..c96b59c 100644
--- a/contrib/gcc/f/str-ot.fin
+++ b/contrib/gcc/f/str-ot.fin
@@ -1,6 +1,6 @@
{
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/str.c b/contrib/gcc/f/str.c
index 8622789..f03c893 100644
--- a/contrib/gcc/f/str.c
+++ b/contrib/gcc/f/str.c
@@ -1,6 +1,6 @@
/* str.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/str.h b/contrib/gcc/f/str.h
index 17b58ea..1ed1228 100644
--- a/contrib/gcc/f/str.h
+++ b/contrib/gcc/f/str.h
@@ -1,6 +1,6 @@
/* str.h -- Private #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/sts.c b/contrib/gcc/f/sts.c
index 1229ad5..143f550 100644
--- a/contrib/gcc/f/sts.c
+++ b/contrib/gcc/f/sts.c
@@ -1,6 +1,6 @@
/* sts.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -104,7 +104,7 @@ ffests_new (ffests s, mallocPool pool, ffestsLength size)
Like printf, but into a string. */
void
-ffests_printf_1D (ffests s, char *ctl, long arg1)
+ffests_printf_1D (ffests s, const char *ctl, long arg1)
{
char quickbuf[40];
char *buff;
@@ -133,7 +133,7 @@ ffests_printf_1D (ffests s, char *ctl, long arg1)
Like printf, but into a string. */
void
-ffests_printf_1U (ffests s, char *ctl, unsigned long arg1)
+ffests_printf_1U (ffests s, const char *ctl, unsigned long arg1)
{
char quickbuf[40];
char *buff;
@@ -162,7 +162,7 @@ ffests_printf_1U (ffests s, char *ctl, unsigned long arg1)
Like printf, but into a string. */
void
-ffests_printf_1s (ffests s, char *ctl, char *arg1)
+ffests_printf_1s (ffests s, const char *ctl, const char *arg1)
{
char quickbuf[40];
char *buff;
@@ -190,7 +190,7 @@ ffests_printf_1s (ffests s, char *ctl, char *arg1)
Like printf, but into a string. */
void
-ffests_printf_2Us (ffests s, char *ctl, unsigned long arg1, char *arg2)
+ffests_printf_2Us (ffests s, const char *ctl, unsigned long arg1, const char *arg2)
{
char quickbuf[60];
char *buff;
@@ -228,7 +228,7 @@ ffests_putc (ffests s, char c)
ffests_puts(s,"append me"); */
void
-ffests_puts (ffests s, char *string)
+ffests_puts (ffests s, const char *string)
{
ffests_puttext (s, string, strlen (string));
}
@@ -242,7 +242,7 @@ ffests_puts (ffests s, char *string)
and may be 0. */
void
-ffests_puttext (ffests s, char *text, ffestsLength length)
+ffests_puttext (ffests s, const char *text, ffestsLength length)
{
ffestsLength newlen;
ffestsLength newmax;
diff --git a/contrib/gcc/f/sts.h b/contrib/gcc/f/sts.h
index d2c2b6e..1432d41 100644
--- a/contrib/gcc/f/sts.h
+++ b/contrib/gcc/f/sts.h
@@ -1,6 +1,6 @@
/* sts.h -- Private #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -60,14 +60,14 @@ struct _ffests_
void ffests_kill (ffests s);
void ffests_new (ffests s, mallocPool pool, ffestsLength size);
-void ffests_printf_1D (ffests s, char *ctl, long arg1);
-void ffests_printf_1U (ffests s, char *ctl, unsigned long arg1);
-void ffests_printf_1s (ffests s, char *ctl, char *arg1);
-void ffests_printf_2Us (ffests s, char *ctl, unsigned long arg1,
- char *arg2);
+void ffests_printf_1D (ffests s, const char *ctl, long arg1);
+void ffests_printf_1U (ffests s, const char *ctl, unsigned long arg1);
+void ffests_printf_1s (ffests s, const char *ctl, const char *arg1);
+void ffests_printf_2Us (ffests s, const char *ctl, unsigned long arg1,
+ const char *arg2);
void ffests_putc (ffests s, char c);
-void ffests_puts (ffests s, char *string);
-void ffests_puttext (ffests s, char *text, ffestsLength length);
+void ffests_puts (ffests s, const char *string);
+void ffests_puttext (ffests s, const char *text, ffestsLength length);
/* Define macros. */
diff --git a/contrib/gcc/f/stt.c b/contrib/gcc/f/stt.c
index d2db379..4b008e2 100644
--- a/contrib/gcc/f/stt.c
+++ b/contrib/gcc/f/stt.c
@@ -1,6 +1,6 @@
/* stt.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995, 1997 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -598,7 +598,7 @@ ffestt_exprlist_create ()
at a time. */
void
-ffestt_exprlist_drive (ffesttExprList list, void (*fn) ())
+ffestt_exprlist_drive (ffesttExprList list, void (*fn) (ffebld, ffelexToken))
{
ffesttExprList next;
@@ -837,7 +837,7 @@ ffestt_implist_create ()
The token pairs in the list are passed to the function one pair at a time. */
void
-ffestt_implist_drive (ffesttImpList list, void (*fn) ())
+ffestt_implist_drive (ffesttImpList list, void (*fn) (ffelexToken, ffelexToken))
{
ffesttImpList next;
@@ -951,7 +951,7 @@ ffestt_tokenlist_create ()
The tokens in the list are passed to the given function. */
void
-ffestt_tokenlist_drive (ffesttTokenList tl, void (*fn) ())
+ffestt_tokenlist_drive (ffesttTokenList tl, void (*fn) (ffelexToken))
{
ffesttTokenItem ti;
diff --git a/contrib/gcc/f/stt.h b/contrib/gcc/f/stt.h
index 38ffa41..341daa7 100644
--- a/contrib/gcc/f/stt.h
+++ b/contrib/gcc/f/stt.h
@@ -1,6 +1,6 @@
/* stt.h -- Private #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -181,7 +181,7 @@ void ffestt_dimlist_kill (ffesttDimList list);
ffestpDimtype ffestt_dimlist_type (ffesttDimList dims, bool is_ugly_assumed);
void ffestt_exprlist_append (ffesttExprList list, ffebld expr, ffelexToken t);
ffesttExprList ffestt_exprlist_create (void);
-void ffestt_exprlist_drive (ffesttExprList list, void (*fn) ());
+void ffestt_exprlist_drive (ffesttExprList list, void (*fn) (ffebld, ffelexToken));
#if FFECOM_targetCURRENT == FFECOM_targetFFE
void ffestt_exprlist_dump (ffesttExprList list);
#endif
@@ -196,14 +196,14 @@ void ffestt_formatlist_kill (ffesttFormatList list);
void ffestt_implist_append (ffesttImpList list, ffelexToken first,
ffelexToken last);
ffesttImpList ffestt_implist_create (void);
-void ffestt_implist_drive (ffesttImpList list, void (*fn) ());
+void ffestt_implist_drive (ffesttImpList list, void (*fn) (ffelexToken, ffelexToken));
#if FFECOM_targetCURRENT == FFECOM_targetFFE
void ffestt_implist_dump (ffesttImpList list);
#endif
void ffestt_implist_kill (ffesttImpList list);
void ffestt_tokenlist_append (ffesttTokenList list, ffelexToken t);
ffesttTokenList ffestt_tokenlist_create (void);
-void ffestt_tokenlist_drive (ffesttTokenList list, void (*fn) ());
+void ffestt_tokenlist_drive (ffesttTokenList list, void (*fn) (ffelexToken));
#if FFECOM_targetCURRENT == FFECOM_targetFFE
void ffestt_tokenlist_dump (ffesttTokenList list);
#endif
diff --git a/contrib/gcc/f/stu.c b/contrib/gcc/f/stu.c
index 7dcbdcb..cc1d95c 100644
--- a/contrib/gcc/f/stu.c
+++ b/contrib/gcc/f/stu.c
@@ -1,6 +1,6 @@
/* stu.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995-1997 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -60,7 +60,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
static void ffestu_list_exec_transition_ (ffebld list);
static bool ffestu_symter_end_transition_ (ffebld expr);
static bool ffestu_symter_exec_transition_ (ffebld expr);
-static bool ffestu_dummies_transition_ (ffesymbol (*symfunc) (),
+static bool ffestu_dummies_transition_ (ffesymbol (*symfunc) (ffesymbol),
ffebld list);
/* Internal macros. */
@@ -122,7 +122,7 @@ ffestu_sym_end_transition (ffesymbol s)
ffeinfoBasictype bt;
ffeinfoKindtype kt;
bool array;
- char *name = NULL;
+ const char *name = NULL;
ffestu_dummies_transition_ (ffecom_sym_end_transition,
ffesymbol_dummyargs (s));
@@ -1114,7 +1114,7 @@ tail: /* :::::::::::::::::::: */
Make sure we don't get called recursively ourselves! */
static bool
-ffestu_dummies_transition_ (ffesymbol (*symfunc) (), ffebld list)
+ffestu_dummies_transition_ (ffesymbol (*symfunc) (ffesymbol), ffebld list)
{
static bool in_progress = FALSE;
ffebld item;
diff --git a/contrib/gcc/f/stu.h b/contrib/gcc/f/stu.h
index 61d7b40..b9d9d52 100644
--- a/contrib/gcc/f/stu.h
+++ b/contrib/gcc/f/stu.h
@@ -1,6 +1,6 @@
/* stu.h -- Private #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/stv.c b/contrib/gcc/f/stv.c
index c652356..cd31ac4 100644
--- a/contrib/gcc/f/stv.c
+++ b/contrib/gcc/f/stv.c
@@ -1,6 +1,6 @@
/* stv.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/stv.h b/contrib/gcc/f/stv.h
index 9ecdd80..22b177e 100644
--- a/contrib/gcc/f/stv.h
+++ b/contrib/gcc/f/stv.h
@@ -1,6 +1,6 @@
/* stv.h -- Private #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/stw.c b/contrib/gcc/f/stw.c
index 90a19a5..058b1eb 100644
--- a/contrib/gcc/f/stw.c
+++ b/contrib/gcc/f/stw.c
@@ -1,6 +1,6 @@
/* stw.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -74,7 +74,7 @@ ffestw ffestw_stack_top_ = NULL;
ffestw_display_state(); */
void
-ffestw_display_state ()
+ffestw_display_state (void)
{
assert (ffestw_stack_top_ != NULL);
@@ -320,7 +320,7 @@ ffestw_kill (ffestw b)
b = ffestw_new(); */
ffestw
-ffestw_new ()
+ffestw_new (void)
{
ffestw b;
@@ -335,7 +335,7 @@ ffestw_new ()
ffestw_pop(); */
ffestw
-ffestw_pop ()
+ffestw_pop (void)
{
ffestw b;
ffestw oldb = ffestw_stack_top_;
diff --git a/contrib/gcc/f/stw.h b/contrib/gcc/f/stw.h
index 8caefbd..58818a6 100644
--- a/contrib/gcc/f/stw.h
+++ b/contrib/gcc/f/stw.h
@@ -1,6 +1,6 @@
/* stw.h -- Private #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -81,6 +81,7 @@ struct _ffestw_
tree select_texpr_; /* tree for end case. */
bool select_break_; /* TRUE when CASE should start with gen
"break;". */
+ int ifthen_fake_else_; /* Number of fake `else' introductions. */
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC*/
};
@@ -118,11 +119,11 @@ extern ffestw ffestw_stack_top_;
/* Declare functions with prototypes. */
-void ffestw_display_state ();
+void ffestw_display_state (void);
void ffestw_kill (ffestw block);
void ffestw_init_0 (void);
-ffestw ffestw_new ();
-ffestw ffestw_pop ();
+ffestw ffestw_new (void);
+ffestw ffestw_pop (void);
ffestw ffestw_push (ffestw block);
ffestw ffestw_update (ffestw block);
ffestw ffestw_use (ffestw block);
@@ -137,6 +138,7 @@ ffestw ffestw_use (ffestw block);
#define ffestw_do_iter_var(b) ((b)->do_iter_var_)
#define ffestw_do_iter_var_t(b) ((b)->do_iter_var_t_)
#define ffestw_do_tvar(b) ((b)->do_tvar_)
+#define ffestw_ifthen_fake_else(b) ((b)->ifthen_fake_else_)
#define ffestw_init_1()
#define ffestw_init_2()
#define ffestw_init_3()
@@ -156,6 +158,7 @@ ffestw ffestw_use (ffestw block);
#define ffestw_set_do_iter_var(b,v) ((b)->do_iter_var_ = (v))
#define ffestw_set_do_iter_var_t(b,t) ((b)->do_iter_var_t_ = (t))
#define ffestw_set_do_tvar(b,d) ((b)->do_tvar_ = (d))
+#define ffestw_set_ifthen_fake_else(b,e) ((b)->ifthen_fake_else_ = (e))
#define ffestw_set_label(b,l) ((b)->label_ = (l))
#define ffestw_set_line(b,l) ((b)->line_ = (l))
#define ffestw_set_name(b,n) ((b)->name_ = (n))
diff --git a/contrib/gcc/f/symbol.c b/contrib/gcc/f/symbol.c
index 8aa7230..c4bd14d 100644
--- a/contrib/gcc/f/symbol.c
+++ b/contrib/gcc/f/symbol.c
@@ -1,6 +1,6 @@
/* Implementation of Fortran symbol manager
Copyright (C) 1995-1997 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -117,7 +117,7 @@ static ffesymbolRetract_ *ffesymbol_retract_list_;
/* List of state names. */
-static char *ffesymbol_state_name_[] =
+static const char *ffesymbol_state_name_[] =
{
"?",
"@",
@@ -127,7 +127,7 @@ static char *ffesymbol_state_name_[] =
/* List of attribute names. */
-static char *ffesymbol_attr_name_[] =
+static const char *ffesymbol_attr_name_[] =
{
#define DEFATTR(ATTR,ATTRS,NAME) NAME,
#include "symbol.def"
@@ -255,6 +255,7 @@ ffesymbol_new_ (ffename n)
s->reported = FALSE;
s->explicit_where = FALSE;
s->namelisted = FALSE;
+ s->assigned = FALSE;
ffename_set_symbol (n, s);
@@ -316,7 +317,7 @@ ffesymbol_whine_state_ (ffebad bad, ffelexToken t, char c)
/* Returns a string representing the attributes set. */
-char *
+const char *
ffesymbol_attrs_string (ffesymbolAttrs attrs)
{
static char string[FFESYMBOL_attr * 12 + 20];
@@ -773,7 +774,7 @@ ffesymbol_declare_subrunit (ffelexToken t)
ffesymbol_drive (fn); */
void
-ffesymbol_drive (ffesymbol (*fn) ())
+ffesymbol_drive (ffesymbol (*fn) (ffesymbol))
{
assert (ffesymbol_sfunc_ == NULL); /* Might be ok, but not for current
uses. */
@@ -787,7 +788,7 @@ ffesymbol_drive (ffesymbol (*fn) ())
ffesymbol_drive_sfnames (fn); */
void
-ffesymbol_drive_sfnames (ffesymbol (*fn) ())
+ffesymbol_drive_sfnames (ffesymbol (*fn) (ffesymbol))
{
ffename_space_drive_symbol (ffesymbol_sfunc_, fn);
}
@@ -1348,7 +1349,7 @@ ffesymbol_signal_change (ffesymbol s)
/* Returns the string based on the state. */
-char *
+const char *
ffesymbol_state_string (ffesymbolState state)
{
if (state >= ARRAY_SIZE (ffesymbol_state_name_))
diff --git a/contrib/gcc/f/symbol.def b/contrib/gcc/f/symbol.def
index 343f80e..9cddcb6 100644
--- a/contrib/gcc/f/symbol.def
+++ b/contrib/gcc/f/symbol.def
@@ -1,6 +1,6 @@
/* Definitions and documentations for attributes used in GNU F77 compiler
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/symbol.h b/contrib/gcc/f/symbol.h
index b534ae6..0c7262c 100644
--- a/contrib/gcc/f/symbol.h
+++ b/contrib/gcc/f/symbol.h
@@ -1,6 +1,6 @@
/* Interface definitions for Fortran symbol manager
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -151,14 +151,16 @@ struct _ffesymbol_
away. */
bool explicit_where; /* TRUE if INTRINSIC/EXTERNAL explicit. */
bool namelisted; /* TRUE if in NAMELIST (needs static alloc). */
+ bool assigned; /* TRUE if ever ASSIGNed to. */
};
#define ffesymbol_accretes(s) ((s)->accretes)
#define ffesymbol_accretion(s) ((s)->accretion)
#define ffesymbol_arraysize(s) ((s)->array_size)
+#define ffesymbol_assigned(s) ((s)->assigned)
#define ffesymbol_attr(s,a) ((s)->attrs & ((ffesymbolAttrs) 1 << (a)))
#define ffesymbol_attrs(s) ((s)->attrs)
-char *ffesymbol_attrs_string (ffesymbolAttrs attrs);
+const char *ffesymbol_attrs_string (ffesymbolAttrs attrs);
#define ffesymbol_basictype(s) ffeinfo_basictype((s)->info)
void ffesymbol_check (ffesymbol s, ffelexToken t, bool maybe_intrin);
#define ffesymbol_common(s) ((s)->common)
@@ -177,8 +179,8 @@ ffesymbol ffesymbol_declare_sfdummy (ffelexToken t);
ffesymbol ffesymbol_declare_subrunit (ffelexToken t);
#define ffesymbol_dims(s) ((s)->dims)
#define ffesymbol_dim_syms(s) ((s)->dim_syms)
-void ffesymbol_drive (ffesymbol (*fn) ());
-void ffesymbol_drive_sfnames (ffesymbol (*fn) ());
+void ffesymbol_drive (ffesymbol (*fn) (ffesymbol));
+void ffesymbol_drive_sfnames (ffesymbol (*fn) (ffesymbol));
#define ffesymbol_dummyargs(s) ((s)->dummy_args)
#if FFECOM_targetCURRENT == FFECOM_targetFFE
void ffesymbol_dump (ffesymbol s);
@@ -231,6 +233,7 @@ bool ffesymbol_retractable (void);
#define ffesymbol_set_accretes(s,a) ((s)->accretes = (a))
#define ffesymbol_set_accretion(s,a) ((s)->accretion = (a))
#define ffesymbol_set_arraysize(s,a) ((s)->array_size = (a))
+#define ffesymbol_set_assigned(s,a) ((s)->assigned = (a))
#define ffesymbol_set_attr(s,a) ((s)->attrs |= ((ffesymbolAttrs) 1 << (a)))
#define ffesymbol_set_attrs(s,a) ((s)->attrs = (a))
#define ffesymbol_set_common(s,c) ((s)->common = (c))
@@ -269,7 +272,7 @@ void ffesymbol_signal_change (ffesymbol s);
#define ffesymbol_specific(s) ((s)->specific)
#define ffesymbol_state(s) ((s)->state)
#define ffesymbol_state_is_specable(s) ((s) <= FFESYMBOL_stateSEEN)
-char *ffesymbol_state_string (ffesymbolState state);
+const char *ffesymbol_state_string (ffesymbolState state);
#define ffesymbol_storage(s) ((s)->storage)
void ffesymbol_terminate_0 (void);
void ffesymbol_terminate_1 (void);
diff --git a/contrib/gcc/f/system.j b/contrib/gcc/f/system.j
index 6a37324..38547c8 100644
--- a/contrib/gcc/f/system.j
+++ b/contrib/gcc/f/system.j
@@ -1,6 +1,6 @@
/* system.j -- Wrapper for GCC's system.h
Copyright (C) 1998 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/target.c b/contrib/gcc/f/target.c
index 5de05ff..5712bdd 100644
--- a/contrib/gcc/f/target.c
+++ b/contrib/gcc/f/target.c
@@ -1,6 +1,6 @@
/* target.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995-1998 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -469,7 +469,7 @@ ffetarget_iszero_hollerith (ffetargetHollerith constant)
data type info and the number of elements an array (1 for a scalar). */
void
-ffetarget_layout (char *error_text UNUSED, ffetargetAlign *alignment,
+ffetarget_layout (const char *error_text UNUSED, ffetargetAlign *alignment,
ffetargetAlign *modulo, ffetargetOffset *size,
ffeinfoBasictype bt, ffeinfoKindtype kt,
ffetargetCharacterSize charsize,
diff --git a/contrib/gcc/f/target.h b/contrib/gcc/f/target.h
index ef59f90d..467f102 100644
--- a/contrib/gcc/f/target.h
+++ b/contrib/gcc/f/target.h
@@ -1,6 +1,6 @@
/* target.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -732,7 +732,7 @@ void ffetarget_integer_bad_magical_precedence_binary (ffelexToken integer,
bool ffetarget_iszero_character1 (ffetargetCharacter1 constant);
#endif
bool ffetarget_iszero_hollerith (ffetargetHollerith constant);
-void ffetarget_layout (char *error_text, ffetargetAlign *alignment,
+void ffetarget_layout (const char *error_text, ffetargetAlign *alignment,
ffetargetAlign *modulo, ffetargetOffset *size,
ffeinfoBasictype bt, ffeinfoKindtype kt,
ffetargetCharacterSize charsize,
@@ -989,7 +989,11 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
#define ffetarget_convert_complex1_integer1 ffetarget_convert_complex1_integer
#define ffetarget_convert_complex1_integer2 ffetarget_convert_complex1_integer
#define ffetarget_convert_complex1_integer3 ffetarget_convert_complex1_integer
+#ifdef REAL_ARITHMETIC
+#define ffetarget_convert_complex1_integer4(res,l) FFEBAD_NOCANDO
+#else
#define ffetarget_convert_complex1_integer4 ffetarget_convert_complex1_integer
+#endif
#ifdef REAL_ARITHMETIC
#define ffetarget_convert_complex1_real1(res,l) \
((res)->real = (l), \
@@ -1041,7 +1045,11 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
#define ffetarget_convert_complex2_integer1 ffetarget_convert_complex2_integer
#define ffetarget_convert_complex2_integer2 ffetarget_convert_complex2_integer
#define ffetarget_convert_complex2_integer3 ffetarget_convert_complex2_integer
+#ifdef REAL_ARITHMETIC
+#define ffetarget_convert_complex2_integer4(res,l) FFEBAD_NOCANDO
+#else
#define ffetarget_convert_complex2_integer4 ffetarget_convert_complex2_integer
+#endif
#ifdef REAL_ARITHMETIC
#define ffetarget_convert_complex2_real1(res,l) \
({ REAL_VALUE_TYPE lr; \
@@ -1111,10 +1119,15 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
ffetarget_convert_integer1_typeless(res,l)
#define ffetarget_convert_integer4_character1(res,l) \
ffetarget_convert_integer1_character1(res,l)
+#ifdef REAL_ARITHMETIC
+#define ffetarget_convert_integer4_complex1(res,l) FFEBAD_NOCANDO
+#define ffetarget_convert_integer4_complex2(res,l) FFEBAD_NOCANDO
+#else
#define ffetarget_convert_integer4_complex1(res,l) \
ffetarget_convert_integer1_complex1(res,l)
#define ffetarget_convert_integer4_complex2(res,l) \
ffetarget_convert_integer1_complex2(res,l)
+#endif
#define ffetarget_convert_integer4_hollerith(res,l) \
ffetarget_convert_integer1_hollerith(res,l)
#define ffetarget_convert_integer4_integer1(res,l) (*(res) = (l), FFEBAD)
@@ -1128,10 +1141,15 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
ffetarget_convert_integer1_logical1(res,l)
#define ffetarget_convert_integer4_logical4(res,l) \
ffetarget_convert_integer1_logical1(res,l)
+#ifdef REAL_ARITHMETIC
+#define ffetarget_convert_integer4_real1(res,l) FFEBAD_NOCANDO
+#define ffetarget_convert_integer4_real2(res,l) FFEBAD_NOCANDO
+#else
#define ffetarget_convert_integer4_real1(res,l) \
ffetarget_convert_integer1_real1(res,l)
#define ffetarget_convert_integer4_real2(res,l) \
ffetarget_convert_integer1_real2(res,l)
+#endif
#define ffetarget_convert_integer4_typeless(res,l) \
ffetarget_convert_integer1_typeless(res,l)
#define ffetarget_convert_logical1_character1(res,l) \
@@ -1238,8 +1256,12 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
ffetarget_convert_real1_integer1(res,l)
#define ffetarget_convert_real1_integer3(res,l) \
ffetarget_convert_real1_integer1(res,l)
+#ifdef REAL_ARITHMETIC
+#define ffetarget_convert_real1_integer4(res,l) FFEBAD_NOCANDO
+#else
#define ffetarget_convert_real1_integer4(res,l) \
ffetarget_convert_real1_integer1(res,l)
+#endif
#define ffetarget_convert_real1_typeless(res,l) \
ffetarget_convert_any_typeless_ ((char *) (res), sizeof(*(res)), l)
#define ffetarget_convert_real1_complex1(res,l) (*(res) = (l).real, FFEBAD)
@@ -1272,8 +1294,12 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
ffetarget_convert_real2_integer1(res,l)
#define ffetarget_convert_real2_integer3(res,l) \
ffetarget_convert_real2_integer1(res,l)
+#ifdef REAL_ARITHMETIC
+#define ffetarget_convert_real2_integer4(res,l) FFEBAD_NOCANDO
+#else
#define ffetarget_convert_real2_integer4(res,l) \
ffetarget_convert_real2_integer1(res,l)
+#endif
#define ffetarget_convert_real2_typeless(res,l) \
ffetarget_convert_any_typeless_ ((char *) (res), sizeof(*(res)), l)
#define ffetarget_convert_real2_complex1(res,l) \
diff --git a/contrib/gcc/f/tconfig.j b/contrib/gcc/f/tconfig.j
index 4135291..9c4c3ec 100644
--- a/contrib/gcc/f/tconfig.j
+++ b/contrib/gcc/f/tconfig.j
@@ -1,6 +1,6 @@
/* tconfig.j -- Wrapper for GCC's tconfig.h
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/tm.j b/contrib/gcc/f/tm.j
index 443fd53..e0d7594 100644
--- a/contrib/gcc/f/tm.j
+++ b/contrib/gcc/f/tm.j
@@ -1,6 +1,6 @@
/* tm.j -- Wrapper for GCC's tm.h
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/top.c b/contrib/gcc/f/top.c
index 17e4139..07ddd83 100644
--- a/contrib/gcc/f/top.c
+++ b/contrib/gcc/f/top.c
@@ -1,6 +1,6 @@
/* top.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995-1997 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -65,7 +65,7 @@ bool ffe_is_do_internal_checks_ = FALSE;
bool ffe_is_90_ = FFETARGET_defaultIS_90;
bool ffe_is_automatic_ = FFETARGET_defaultIS_AUTOMATIC;
bool ffe_is_backslash_ = FFETARGET_defaultIS_BACKSLASH;
-bool ffe_is_emulate_complex_ = TRUE;
+bool ffe_is_emulate_complex_ = FALSE;
bool ffe_is_underscoring_ = FFETARGET_defaultEXTERNAL_UNDERSCORED
|| FFETARGET_defaultUNDERSCORED_EXTERNAL_UNDERSCORED;
bool ffe_is_second_underscore_ = FFETARGET_defaultUNDERSCORED_EXTERNAL_UNDERSCORED;
@@ -74,15 +74,16 @@ bool ffe_is_dollar_ok_ = FFETARGET_defaultIS_DOLLAR_OK;
bool ffe_is_f2c_ = FFETARGET_defaultIS_F2C;
bool ffe_is_f2c_library_ = FFETARGET_defaultIS_F2C_LIBRARY;
bool ffe_is_ffedebug_ = FALSE;
+bool ffe_is_flatten_arrays_ = FALSE;
bool ffe_is_free_form_ = FFETARGET_defaultIS_FREE_FORM;
bool ffe_is_globals_ = TRUE;
-bool ffe_is_ident_ = TRUE;
bool ffe_is_init_local_zero_ = FFETARGET_defaultIS_INIT_LOCAL_ZERO;
bool ffe_is_mainprog_; /* TRUE if current prog unit known to be
main. */
bool ffe_is_null_version_ = FALSE;
bool ffe_is_onetrip_ = FALSE;
bool ffe_is_silent_ = TRUE;
+bool ffe_is_subscript_check_ = FALSE;
bool ffe_is_typeless_boz_ = FALSE;
bool ffe_is_pedantic_ = FFETARGET_defaultIS_PEDANTIC;
bool ffe_is_saveall_; /* TRUE if mainprog or SAVE (no args) seen. */
@@ -162,7 +163,7 @@ ffe_is_digit_string_ (char *s)
int
ffe_decode_option (argc, argv)
- int argc;
+ int argc ATTRIBUTE_UNUSED;
char **argv;
{
char *opt = argv[0];
@@ -177,10 +178,6 @@ ffe_decode_option (argc, argv)
}
else if (strcmp (&opt[2], "null-version") == 0)
ffe_set_is_null_version (TRUE);
- else if (strcmp (&opt[2], "ident") == 0)
- ffe_set_is_ident (TRUE);
- else if (strcmp (&opt[2], "no-ident") == 0)
- ffe_set_is_ident (FALSE);
else if (strcmp (&opt[2], "f66") == 0)
{
ffe_set_is_onetrip (TRUE);
@@ -220,6 +217,10 @@ ffe_decode_option (argc, argv)
ffe_set_is_f2c_library (TRUE);
else if (strcmp (&opt[2], "no-f2c-library") == 0)
ffe_set_is_f2c_library (FALSE);
+ else if (strcmp (&opt[2], "flatten-arrays") == 0)
+ ffe_set_is_flatten_arrays (TRUE);
+ else if (strcmp (&opt[2], "no-flatten-arrays") == 0)
+ ffe_set_is_flatten_arrays (FALSE);
else if (strcmp (&opt[2], "free-form") == 0)
ffe_set_is_free_form (TRUE);
else if (strcmp (&opt[2], "no-free-form") == 0)
@@ -240,18 +241,6 @@ ffe_decode_option (argc, argv)
warning ("%s no longer supported -- try -fvxt", opt);
else if (strcmp (&opt[2], "f90-not-vxt") == 0)
warning ("%s no longer supported -- try -fno-vxt -ff90", opt);
- else if (strcmp (&opt[2], "ugly") == 0)
- {
- warning ("%s is overloaded with meanings and likely to be removed;", opt);
- warning ("use only the specific -fugly-* options you need");
- ffe_set_is_ugly_args (TRUE);
- ffe_set_is_ugly_assign (TRUE);
- ffe_set_is_ugly_assumed (TRUE);
- ffe_set_is_ugly_comma (TRUE);
- ffe_set_is_ugly_complex (TRUE);
- ffe_set_is_ugly_init (TRUE);
- ffe_set_is_ugly_logint (TRUE);
- }
else if (strcmp (&opt[2], "no-ugly") == 0)
{
ffe_set_is_ugly_args (FALSE);
@@ -334,6 +323,14 @@ 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], "bounds-check") == 0)
+ ffe_set_is_subscript_check (TRUE);
+ else if (strcmp (&opt[2], "no-bounds-check") == 0)
+ ffe_set_is_subscript_check (FALSE);
+ else if (strcmp (&opt[2], "fortran-bounds-check") == 0)
+ ffe_set_is_subscript_check (TRUE);
+ 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);
else if (strcmp (&opt[2], "no-typeless-boz") == 0)
diff --git a/contrib/gcc/f/top.h b/contrib/gcc/f/top.h
index bae6787..c5deea8 100644
--- a/contrib/gcc/f/top.h
+++ b/contrib/gcc/f/top.h
@@ -1,6 +1,6 @@
/* top.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995-1997 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -90,14 +90,15 @@ extern bool ffe_is_dollar_ok_;
extern bool ffe_is_f2c_;
extern bool ffe_is_f2c_library_;
extern bool ffe_is_ffedebug_;
+extern bool ffe_is_flatten_arrays_;
extern bool ffe_is_free_form_;
extern bool ffe_is_globals_;
-extern bool ffe_is_ident_;
extern bool ffe_is_init_local_zero_;
extern bool ffe_is_mainprog_;
extern bool ffe_is_null_version_;
extern bool ffe_is_onetrip_;
extern bool ffe_is_silent_;
+extern bool ffe_is_subscript_check_;
extern bool ffe_is_typeless_boz_;
extern bool ffe_is_pedantic_;
extern bool ffe_is_saveall_;
@@ -178,9 +179,9 @@ void ffe_terminate_4 (void);
#define ffe_is_f2c() ffe_is_f2c_
#define ffe_is_f2c_library() ffe_is_f2c_library_
#define ffe_is_ffedebug() ffe_is_ffedebug_
+#define ffe_is_flatten_arrays() ffe_is_flatten_arrays_
#define ffe_is_free_form() ffe_is_free_form_
#define ffe_is_globals() ffe_is_globals_
-#define ffe_is_ident() ffe_is_ident_
#define ffe_is_init_local_zero() ffe_is_init_local_zero_
#define ffe_is_mainprog() ffe_is_mainprog_
#define ffe_is_null_version() ffe_is_null_version_
@@ -190,6 +191,7 @@ void ffe_terminate_4 (void);
#define ffe_is_saveall() ffe_is_saveall_
#define ffe_is_second_underscore() ffe_is_second_underscore_
#define ffe_is_silent() ffe_is_silent_
+#define ffe_is_subscript_check() ffe_is_subscript_check_
#define ffe_is_typeless_boz() ffe_is_typeless_boz_
#define ffe_is_ugly_args() ffe_is_ugly_args_
#define ffe_is_ugly_assign() ffe_is_ugly_assign_
@@ -230,9 +232,9 @@ void ffe_terminate_4 (void);
#define ffe_set_is_f2c(f) (ffe_is_f2c_ = (f))
#define ffe_set_is_f2c_library(f) (ffe_is_f2c_library_ = (f))
#define ffe_set_is_ffedebug(f) (ffe_is_ffedebug_ = (f))
+#define ffe_set_is_flatten_arrays(f) (ffe_is_flatten_arrays_ = (f))
#define ffe_set_is_free_form(f) (ffe_is_free_form_ = (f))
#define ffe_set_is_globals(f) (ffe_is_globals_ = (f))
-#define ffe_set_is_ident(f) (ffe_is_ident_ = (f))
#define ffe_set_is_init_local_zero(f) (ffe_is_init_local_zero_ = (f))
#define ffe_set_is_mainprog(f) (ffe_is_mainprog_ = (f))
#define ffe_set_is_null_version(f) (ffe_is_null_version_ = (f))
@@ -241,6 +243,7 @@ void ffe_terminate_4 (void);
#define ffe_set_is_saveall(f) (ffe_is_saveall_ = (f))
#define ffe_set_is_second_underscore(f) (ffe_is_second_underscore_ = (f))
#define ffe_set_is_silent(f) (ffe_is_silent_ = (f))
+#define ffe_set_is_subscript_check(f) (ffe_is_subscript_check_ = (f))
#define ffe_set_is_typeless_boz(f) (ffe_is_typeless_boz_ = (f))
#define ffe_set_is_ugly_args(f) (ffe_is_ugly_args_ = (f))
#define ffe_set_is_ugly_assign(f) (ffe_is_ugly_assign_ = (f))
diff --git a/contrib/gcc/f/toplev.j b/contrib/gcc/f/toplev.j
index 9ee892b..4b8b797 100644
--- a/contrib/gcc/f/toplev.j
+++ b/contrib/gcc/f/toplev.j
@@ -1,6 +1,6 @@
/* toplev.j -- Wrapper for GCC's toplev.h
Copyright (C) 1998 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/tree.j b/contrib/gcc/f/tree.j
index 009af12..b0bf98a 100644
--- a/contrib/gcc/f/tree.j
+++ b/contrib/gcc/f/tree.j
@@ -1,6 +1,6 @@
/* tree.j -- Wrapper for GCC's tree.h
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/type.c b/contrib/gcc/f/type.c
index 76f0e87..7625cbb 100644
--- a/contrib/gcc/f/type.c
+++ b/contrib/gcc/f/type.c
@@ -1,6 +1,6 @@
/* Implementation of Fortran type abstraction
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/type.h b/contrib/gcc/f/type.h
index 94d6404..aaae51e 100644
--- a/contrib/gcc/f/type.h
+++ b/contrib/gcc/f/type.h
@@ -1,6 +1,6 @@
/* Interface definitions for Fortran type abstraction
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
diff --git a/contrib/gcc/f/version.c b/contrib/gcc/f/version.c
index 3d5baf7..97605df 100644
--- a/contrib/gcc/f/version.c
+++ b/contrib/gcc/f/version.c
@@ -1 +1 @@
-char *ffe_version_string = "0.5.24-19981002";
+const char *ffe_version_string = "0.5.25 19990816 (release)";
diff --git a/contrib/gcc/f/version.h b/contrib/gcc/f/version.h
index cd578a8..62f941d 100644
--- a/contrib/gcc/f/version.h
+++ b/contrib/gcc/f/version.h
@@ -1,6 +1,6 @@
#ifndef _H_f_version
#define _H_f_version
-extern char *ffe_version_string;
+extern const char *ffe_version_string;
#endif
diff --git a/contrib/gcc/f/where.c b/contrib/gcc/f/where.c
index 89e0f85..2792899 100644
--- a/contrib/gcc/f/where.c
+++ b/contrib/gcc/f/where.c
@@ -1,6 +1,6 @@
/* where.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -38,7 +38,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
struct _ffewhere_line_ ffewhere_unknown_line_
=
-{NULL, NULL, 0, 0, 0};
+{NULL, NULL, 0, 0, 0, {0}};
/* Simple definitions and enumerations. */
diff --git a/contrib/gcc/f/where.h b/contrib/gcc/f/where.h
index 2091f36..32b3d4b 100644
--- a/contrib/gcc/f/where.h
+++ b/contrib/gcc/f/where.h
@@ -1,6 +1,6 @@
/* where.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
OpenPOWER on IntegriCloud