diff -rcp2N g77-0.5.16/COPYING.g77 g77-0.5.17/COPYING.g77 *** g77-0.5.16/COPYING.g77 Wed Feb 15 19:20:54 1995 --- g77-0.5.17/COPYING.g77 Thu Nov 16 07:17:17 1995 *************** *** 3,7 **** Copyright (C) 1989, 1991 Free Software Foundation, Inc. ! 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. --- 3,7 ---- Copyright (C) 1989, 1991 Free Software Foundation, Inc. ! 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. *************** the "copyright" line and a pointer to wh *** 306,310 **** You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. --- 306,310 ---- You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Also add information on how to contact you by electronic and paper mail. diff -rcp2N g77-0.5.16/README.g77 g77-0.5.17/README.g77 *** g77-0.5.16/README.g77 Thu Aug 10 02:47:58 1995 --- g77-0.5.17/README.g77 Sat Nov 18 19:46:01 1995 *************** *** 1,5 **** ! 950810 ! This directory contains the version 0.5.16 release of the GNU Fortran compiler. The GNU Fortran compiler is free software. See the file COPYING.g77 for copying permission. --- 1,5 ---- ! 951118 ! This directory contains the version 0.5.17 release of the GNU Fortran compiler. The GNU Fortran compiler is free software. See the file COPYING.g77 for copying permission. *************** contains all of the Fortran files. *** 16,20 **** * To build GNU Fortran, you must have a recent gcc distribution, ! such as version 2.6.3 or 2.7.0. Do not attempt to use any version of gcc prior to 2.6.2 or at or beyond 2.8.0 (or 3.0, etc.), because this version of g77 is designed to work only with gcc versions 2.6.x --- 16,20 ---- * To build GNU Fortran, you must have a recent gcc distribution, ! such as version 2.6.3 or 2.7.1. Do not attempt to use any version of gcc prior to 2.6.2 or at or beyond 2.8.0 (or 3.0, etc.), because this version of g77 is designed to work only with gcc versions 2.6.x *************** If you have just unpacked the g77 distri *** 31,48 **** you must merge the contents of the g77 distribution with the appropriate gcc distribution on your system before proceeding. Using sample ! versions of 2.6.3 for gcc and 0.5.16 for g77, the process of unpacking and merging both distributions would be done as follows (where # is the shell prompt): ! # tar xf gcc-2.6.3.tar # Creates ./gcc-2.6.3/ ! # tar xf g77-0.5.16.tar # Creates ./g77-0.5.16/ ! * # mv g77-0.5.16/* gcc-2.6.3/ # Merges gcc and g77 into ./gcc-2.6.3/ ! # rmdir g77-0.5.16 # Remove empty ./g77-0.5.16/ Another approach is to do the following: ! # tar xf gcc-2.6.3.tar # Creates ./gcc-2.6.3/ ! # ln -s gcc-2.6.3 g77-0.5.16 # Make g77-0.5.16 a link to gcc-2.6.3 ! # tar xf g77-0.5.16.tar # Unpacks g77 into gcc-2.6.3 The latter approach leaves the symbolic link, which might help others --- 31,48 ---- you must merge the contents of the g77 distribution with the appropriate gcc distribution on your system before proceeding. Using sample ! versions of 2.7.1 for gcc and 0.5.17 for g77, the process of unpacking and merging both distributions would be done as follows (where # is the shell prompt): ! # tar xf gcc-2.7.1.tar # Creates ./gcc-2.7.1/ ! # tar xf g77-0.5.17.tar # Creates ./g77-0.5.17/ ! * # mv g77-0.5.17/* gcc-2.7.1/ # Merges gcc and g77 into ./gcc-2.7.1/ ! # rmdir g77-0.5.17 # Remove empty ./g77-0.5.17/ Another approach is to do the following: ! # tar xf gcc-2.7.1.tar # Creates ./gcc-2.7.1/ ! # ln -s gcc-2.7.1 g77-0.5.17 # Make g77-0.5.17 a link to gcc-2.7.1 ! # tar xf g77-0.5.17.tar # Unpacks g77 into gcc-2.7.1 The latter approach leaves the symbolic link, which might help others *************** problem occurs using one of the above me *** 56,60 **** The resulting directory layout is as follows, where gcc/ might be, ! for example, gcc-0.5.16/: gcc/ Non-Fortran files in gcc (not part of g77*.tar) --- 56,60 ---- The resulting directory layout is as follows, where gcc/ might be, ! for example, gcc-0.5.17/: gcc/ Non-Fortran files in gcc (not part of g77*.tar) diff -rcp2N g77-0.5.16/f/BUGS g77-0.5.17/f/BUGS *** g77-0.5.16/f/BUGS Wed Aug 30 16:01:47 1995 --- g77-0.5.17/f/BUGS Thu Nov 16 07:02:12 1995 *************** notice and permission notice. Contribut *** 5,9 **** (burley@gnu.ai.mit.edu). ! 1995-08-30 1. g77 statically assumes INTEGER constants range from -2**31 to 2**31-1, --- 5,9 ---- (burley@gnu.ai.mit.edu). ! 1995-11-16 1. g77 statically assumes INTEGER constants range from -2**31 to 2**31-1, *************** notice and permission notice. Contribut *** 61,66 **** 7. g77 currently requires application of a patch file to the gcc compiler ! tree (at least up through gcc version 2.7). The necessary patches ! should be folded in to the mainline gcc distribution. 8. Need option to suppress information messages (notes) in bad.c. -w does --- 61,70 ---- 7. g77 currently requires application of a patch file to the gcc compiler ! tree (at least up through gcc version 2.7.0). The necessary patches ! should be folded in to the mainline gcc distribution. (Some combinations ! of versions of g77 and gcc might actually _require_ no patches, but the ! patch files will be provided anyway as long as there are more changes ! expected in subsequent releases, and these patch files might contain ! unnecessary, but possibly helpful, patches.) 8. Need option to suppress information messages (notes) in bad.c. -w does *************** notice and permission notice. Contribut *** 88,131 **** problem is not yet adequately investigated. As of 0.5.16, g77 issues a warning diagnostic whenever it is run after being built to ! generate code for such a system. 14. There are some known problems when using gdb on code compiled by g77. Inadequate investigation as of the release of 0.5.16 results in not ! knowing which productds are the culprit, but gdb-4.14 definitely crashes when, for example, an attempt is made to print the contents of a COMPLEX*16 dummy array, on at least some Linux machines, plus some others. ! 15. g77 sometimes gives the wrong info for messages like "In file ! included from...:". In fact, so does gcc, though due to linguistic ! differences, the problem is more likely to show up when using g77. ! ! This is a bug in the gcc back end, actually. The patch to fix this ! follows (apply via "patch -p1 -d gcc-2.7.0 -V t < gcc/f/BUGS", for ! example): ! ! Tue Aug 22 10:08:08 1995 Craig Burley (burley@gnu.ai.mit.edu) ! ! * toplev.c (report_error_function): Don't attempt to use input ! file stack to identify nesting of #include's if the file ! name (pointer) of the location being diagnosed is not the ! same as input_filename, since in that case the contents ! of the file stack are irrelevant -- they apply to only the ! current file. ! ! *** gcc-2.7.0/toplev.c Thu Jun 15 08:09:51 1995 ! --- g77-new/toplev.c Tue Aug 22 09:56:54 1995 ! *************** report_error_function (file) ! *** 1049,1053 **** ! ! if (input_file_stack && input_file_stack->next != 0 ! ! && input_file_stack_tick != last_error_tick) ! { ! fprintf (stderr, "In file included"); ! --- 1049,1054 ---- ! ! if (input_file_stack && input_file_stack->next != 0 ! ! && input_file_stack_tick != last_error_tick ! ! && file == input_filename) ! { ! fprintf (stderr, "In file included"); --- 92,119 ---- problem is not yet adequately investigated. As of 0.5.16, g77 issues a warning diagnostic whenever it is run after being built to ! generate code for a system with canonical types not 32 bits wide. 14. There are some known problems when using gdb on code compiled by g77. Inadequate investigation as of the release of 0.5.16 results in not ! knowing which products are the culprit, but gdb-4.14 definitely crashes when, for example, an attempt is made to print the contents of a COMPLEX*16 dummy array, on at least some Linux machines, plus some others. ! 15. 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. But ! there might well be some problems with the portions of __complex__ ! support in the back end that g77 uses to implement COMPLEX and ! DOUBLE COMPLEX. More investigation is needed, but bug reports ! are definitely welcome, since that can help speed investigation of ! problem areas. ! ! 16. There seem to be some problems with passing constants, and perhaps ! general expressions (other than simple variables/arrays), to procedures ! when compiling on some systems (such as i386) with "-fPIC", as in ! when compiling for ELF targets. The symptom is that the assembler ! complains about invalid opcodes. More investigation is needed, but ! the problem is almost certainly in the gcc back end. diff -rcp2N g77-0.5.16/f/ChangeLog g77-0.5.17/f/ChangeLog *** g77-0.5.16/f/ChangeLog Wed Aug 30 15:58:59 1995 --- g77-0.5.17/f/ChangeLog Sat Nov 18 19:44:16 1995 *************** *** 1,2 **** --- 1,150 ---- + 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, which 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) diff -rcp2N g77-0.5.16/f/DOC g77-0.5.17/f/DOC *** g77-0.5.16/f/DOC Wed Aug 30 14:27:15 1995 --- g77-0.5.17/f/DOC Sat Nov 18 20:07:09 1995 *************** notice and permission notice. Contribut *** 5,9 **** (burley@gnu.ai.mit.edu). ! 1995-08-30 Please read all of this information before using (especially before --- 5,9 ---- (burley@gnu.ai.mit.edu). ! 1995-11-18 Please read all of this information before using (especially before *************** produces much more output than `gcc -v'. *** 103,107 **** The `libf2c' library is distributed with GNU Fortran for the convenience of its users, but is not part of GNU Fortran. It contains the procedures ! needed by Fortran programs while they are running. Things like trigonmetric functions and doing I/O are compiled by the `f771' compiler (invoked by `g77' when compiling Fortran code) into calls to procedures in `libf2c', --- 103,107 ---- The `libf2c' library is distributed with GNU Fortran for the convenience of its users, but is not part of GNU Fortran. It contains the procedures ! needed by Fortran programs while they are running. Things like trigonometric functions and doing I/O are compiled by the `f771' compiler (invoked by `g77' when compiling Fortran code) into calls to procedures in `libf2c', *************** g77 was tested by a small number of peop *** 179,189 **** wide variety of machines. ! Currently, all of these configurations were self-hosted, i.e. it ! is not likely that g77 can itself be cross-compiled or that it can ! be configured as a cross-compiler. There is only one known bug ! (a design bug to be fixed in 0.6) that prevents configuration of ! g77 as a cross-compiler, though there are assumptions made during ! configuration that probably make doing non-self-hosting builds ! a hassle, requiring manual intervention. *USING THE g77 COMMAND* --- 179,200 ---- wide variety of machines. ! Some improvements have been made in g77 in version 0.5.17 that ! make it easier for g77 to be configured as a cross-compiler. ! There is still one known bug (a design bug to be fixed in 0.6) ! that prevents configuration of g77 as a cross-compiler under some ! circumstances, though there are assumptions made during configuration ! that probably make doing non-self-hosting builds a hassle, requiring ! manual intervention. ! ! Generally, g77 can be ported to any configuration to which gcc and ! f2c+libf2c can be ported, aside from some of the known problems ! in g77 that are scheduled to be fixed for version 0.6. ! ! But, if you are unable to port gcc and f2c (or at least the libF77 ! and liI77 libraries) to a particular configuration, don't bother ! asking the g77 maintainer about a g77 port -- the feasability of ! that project depends largely on a gcc port first being done, so ! talk to the gcc maintainers about that (e.g. look in the gcc/SERVICE ! file for information on people who might be willing to do such a port). *USING THE g77 COMMAND* *************** indicates defaults, where appropriate. *** 320,323 **** --- 331,348 ---- `n', respectively. + Note that making -fbackslash the default is a concession to the community + of UNIX `f77' users. This feature is an unfortunate carry-over from + the C language, as it contradicts the spirit (though not the letter) + of the ANSI FORTRAN 77 standard. At the time the feature was added to + f77, it was probably difficult to come up with a better way to provide + the ability to specify arbitrary characters wherever they might be + needed without doing a lot more work on the compiler, however. + + Also note that g77's implementation of the feature seems to be more + general than that offered by some Fortran compilers such as f2c. + g77's implementation basically parallels gcc's, while other compilers + might not support '\003' as a single character, for example, resulting + in differing interpretations of constants such as 'A\003B'. + -funderscoring * -fno-underscoring *************** indicates defaults, where appropriate. *** 482,485 **** --- 507,541 ---- same thing as -ffixed-line-length-none. + -Wsurprising + Warn about "suspicious" constructs. These constructs typically mean + something different to a standard-conforming Fortran compiler, such + as g77, than the programmer who uses them expects, and these differences + can result in subtle, compiler-dependent (even machine-dependent) + behavioral differences. The constructs warned about include: + + - Expressions having two arithmetic operators in a row, such as + "X*-Y". Such a construct is nonstandard, and can produce + unexpected results in more complicated situations such as + "X**-Y*Z". g77, and many other compilers, interpret this + example differently than programmers, and a few other compilers, + in that they interpret it as "X**(-(Y*Z))" instead of "(X**(-Y))*Z". + The difference is notable in examples like "2**-2*1.", which g77 + and other compilers evaluate to ".25", but a programmer might + expect to evaluate to "0.", due to the way the precedence affects + the type promotion. (The -fpedantic option also warns about + expressions having two arithmetic operators in a row.) + + - Expressions with a unary minus followed by an operand and then + a binary operator other than plus or minus. For example, "-2**2" + produces a warning, because the precedence is "-(2**2)", yielding + "-4", not "(-2)**2" (yielding "4") as a programmer might expect. + + - DO loops with REAL or DOUBLE PRECISION DO variables (including + implied-DO loops in I/O and DATA statements), since the implementation + required by the standard, combined with the vagaries of floating-point + arithmetic on most machines, will likely result in terminating + conditions not meeting the programmer's expectations (with regard + to the terminal value for the loop). + *SUMMARY OF COMPILATION OPTIONS USEFUL TO FORTRAN USERS* *************** a given program, but rather should make *** 589,592 **** --- 645,661 ---- *USER-VISIBLE CHANGES DURING 0.5.x* + In 0.5.17: + + - ERF() and ERFC() intrinsics are now generic intrinsics, mapping to + ERF/DERF and ERFC/DERFC, respectively -- NOTE: use 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 + + - New option -Wsurprising + + - DO loops with non-INTEGER variables now diagnosed only when -Wsurprising + specified (previously diagnosed unless -fpedantic or -fugly specified) + In 0.5.16: *************** This release supports ANSI FORTRAN 77 pl *** 716,725 **** - -g for local variables and external names; COMMON variables, local ! EQUIVALENCE variables, labels, and so on aren't support yet. - LOC(), if -funix-intrinsics-enable is in force. - %LOC, %VAL, %REF, and %DESCR -- where %DESCR currently means the same thing ! as passing the argument the normal way. - MIL-STD 1753 features (IAND, IOR, MVBITS, DO WHILE, END DO, etc). --- 785,794 ---- - -g for local variables and external names; COMMON variables, local ! EQUIVALENCE variables, labels, and so on aren't supported yet. - LOC(), if -funix-intrinsics-enable is in force. - %LOC, %VAL, %REF, and %DESCR -- where %DESCR currently means the same thing ! as passing the argument as if it was type CHARACTER. - MIL-STD 1753 features (IAND, IOR, MVBITS, DO WHILE, END DO, etc). *************** to find some cases where SAVE is erroneo *** 1034,1037 **** --- 1103,1112 ---- for variables and arrays. + The -W options tell g77 to warn about various suspicious constructs. + In particular, the -Wimplicit, `-O -Wuninitialized', and -Wsurprising + options can sometimes identify bugs in programs that appear to work + when compiled by other Fortran compilers but do not work when compiled + by g77 (or vice versa). + *OPTIONS FOR SPEEDING UP PROGRAMS* *************** specified (and -fno-f90 is in force) are *** 1113,1127 **** - Use of CHARACTER constants to initialize numeric entities, and vice versa. ! ! And these constructs actually are _enabled_ via -fpedantic, because they ! are considered too dangerous to allow under normal circumstances even ! though they are permitted by the standard: ! ! - DO loops with REAL or DOUBLE PRECISION DO variables (including ! implied-DO loops in I/O and DATA statements), since the implementation ! required by the standard, combined with the vagaries of floating-point ! arithmetic on most machines, will likely result in terminating ! conditions not meeting the programmer's expectations (with regard ! to the terminal value for the loop). *UGLY FEATURES* --- 1188,1193 ---- - Use of CHARACTER constants to initialize numeric entities, and vice versa. ! - Expressions having two arithmetic operators in a row, such as ! "X*-Y". *UGLY FEATURES* *************** The constructs enabled via -fugly includ *** 1146,1151 **** (e.g. "CALL FOO(,)" meaning "pass two null arguments" rather than "pass one null argument"). - - DO loops with REAL or DOUBLE PRECISION DO variables (including - implied-DO loops in I/O and DATA statements). As of 0.5.11, the -fugly-args and -fno-ugly-args options are available. --- 1212,1215 ---- *************** portions of the g77 product to be invoke *** 1503,1507 **** version numbers. 0.5.16 has changes to the g77 command to make this process automatic when `-v' is specified without additional ! options specifying actions other than displaying the version info.) Note that you should include with your bug report any files --- 1567,1577 ---- version numbers. 0.5.16 has changes to the g77 command to make this process automatic when `-v' is specified without additional ! options specifying actions other than displaying the version info. ! NOTE: Version 0.5.16 had a bug in `g77 -v' that resulted in the ! removal of the system's `/dev/null' file if the command was issued ! while logged in as `root'. Version 0.5.17 fixes this bug. You ! might want to use `ls -l /dev/null /dev/zero' to make sure the ! entry for `null' is similar to that for `zero' and, if not, contact ! your system administrator about using `mknod' to recreate `/dev/null'.) Note that you should include with your bug report any files *************** g77 simply asks for fewer zeros from the *** 1712,1715 **** --- 1782,1790 ---- intrinsics like AND, OR, and SHIFT. + - g77 rejects some particularly nonportable, silent data-type conversions + such as LOGICAL to REAL (as in "A=.FALSE." where A is REAL) that other + compilers might quietly accept. Some such conversions are accepted + when various forms of the -fugly option are specified, however. + - g77 defaults to specially processing backslashes (\) in character and hollerith constants a la the C language. Despite not being within the *************** g77 simply asks for fewer zeros from the *** 1724,1729 **** of UNIX `f77' commands change their defaults first). ! - g77 doesn't like INTEGER*2 and similar. This is explained in gcc/f/PROJECTS. ! It is considered a very important, though somewhat large, project. - g77 rejects things other compilers accept, like "INTRINSIC SIN,SIN". --- 1799,1805 ---- of UNIX `f77' commands change their defaults first). ! - g77 doesn't like INTEGER*2, LOGICAL*1, and so on. This is explained in ! gcc/f/PROJECTS. It is considered a very important, though somewhat ! large, project. - g77 rejects things other compilers accept, like "INTRINSIC SIN,SIN". *************** g77 simply asks for fewer zeros from the *** 1749,1757 **** important things to add to g77. ! - g77 doesn't support STRUCTURE, UNION, RECORD, MAP. This is quite a bit ! lower on the list of large, important things to add to g77, and in ! particular requires a great deal of work either upgrading or replacing libf2c. - g77 doesn't allow a COMMON block and an external procedure or BLOCK DATA to have the same name. Some systems allow this, but g77 does not, --- 1825,1841 ---- important things to add to g77. ! - g77 doesn't support the I/O statements TYPE and ACCEPT. These are ! common extensions that should be easy to support, but also are fairly ! easy to work around in user code. ! ! - g77 doesn't support STRUCTURE, UNION, RECORD, MAP. This set of extensions ! is quite a bit lower on the list of large, important things to add to g77, ! and in particular requires a great deal of work either upgrading or replacing libf2c. + - g77 doesn't support various OPEN, CLOSE, and INQUIRE keywords such + as "DISP='DELETE'". These extensions are easy to add to g77 itself + but require work upgrading or replacing libf2c. + - g77 doesn't allow a COMMON block and an external procedure or BLOCK DATA to have the same name. Some systems allow this, but g77 does not, *************** g77 simply asks for fewer zeros from the *** 1787,1790 **** --- 1871,1881 ---- is not standard-conforming. + - g77 doesn't allow non-integral exponentiation in PARAMETER statements, + such as "PARAMETER (R=2**.25)". It is unlikely g77 will ever support + this feature, as doing it properly requires complete emulation of + a target computer's floating-point facilities when building g77 + as a cross-compiler. But if the gcc back end is enhanced to provide + such a facility, g77 will likely follow suit by adding this feature. + - g77 doesn't support "FORMAT(I)" and the like. See the answer for not supporting STRUCTURE, UNION, RECORD, and MAP. *************** Assigned Statement Labels (The ASSIGN an *** 2383,2389 **** For portability to machines where a pointer (such as to a label, which is how g77 implements ASSIGN and its cousin, the assigned ! GOTO) is wider (bitwise) than an INTEGER, g77 does not use ! the same memory location to hold the ASSIGNed value of an variable ! as it does the numerical value in that variable. In particular, while g77 will implement --- 2474,2481 ---- For portability to machines where a pointer (such as to a label, which is how g77 implements ASSIGN and its cousin, the assigned ! GOTO) is wider (bitwise) than an INTEGER, g77 does not necessarily ! use the same memory location to hold the ASSIGNed value of an ! variable as it does the numerical value in that variable unless the ! variable is wide enough (can hold enough bits). In particular, while g77 will implement *************** In particular, while g77 will implement *** 2391,2395 **** I = 10 ! as, in C notation, "i = 10;", it will implement ASSIGN 10 TO I --- 2483,2487 ---- I = 10 ! as, in C notation, "i = 10;", it might implement ASSIGN 10 TO I *************** actually generate the name "L10" or any *** 2401,2408 **** since debuggers cannot access labels anyway). ! While this currently means that an ASSIGN statement will not overwrite the numeric contents of its target variable, _do not_ ! write any code depending on this feature. g77 might well ! change this implementation in a future version. This ! information is provided only to make debugging Fortran programs ! compiled with the current version of g77 somewhat easier. --- 2493,2508 ---- since debuggers cannot access labels anyway). ! While this currently means that an ASSIGN statement might not overwrite the numeric contents of its target variable, _do not_ ! write any code depending on this feature. g77 has already ! changed this implementation across versions and might do so ! in the future. This information is provided only to make debugging ! Fortran programs compiled with the current version of g77 somewhat ! easier. If there's no debugger-visible variable named "__g77_ASSIGN_I" ! in a program unit that does "ASSIGN 10 TO I", then g77 has decided ! it can store the pointer to the label directly into "I" itself. ! ! (Currently g77 always chooses to make the separate variable, to ! improve the likelihood that `-O -Wuninitialized' will diagnose ! failures to do things like "GOTO I" without "ASSIGN 10 TO I" ! despite doing "I=5".) diff -rcp2N g77-0.5.16/f/Make-lang.in g77-0.5.17/f/Make-lang.in *** g77-0.5.16/f/Make-lang.in Wed Aug 30 15:53:38 1995 --- g77-0.5.17/f/Make-lang.in Sat Nov 18 19:44:16 1995 *************** F77_FLAGS_TO_PASS = \ *** 69,73 **** # and also whether to uninstall it when using the uninstall target. # As shipped, the flag is a test of whether the `f77_install_ok' ! # flag exists in the build or source directories (top level), but # you can just change it here if you like. F77_INSTALL_FLAG = [ -f f77-install-ok -o -f $(srcdir)/f77-install-ok ] --- 69,73 ---- # and also whether to uninstall it when using the uninstall target. # As shipped, the flag is a test of whether the `f77_install_ok' ! # file exists in the build or source directories (top level), but # you can just change it here if you like. F77_INSTALL_FLAG = [ -f f77-install-ok -o -f $(srcdir)/f77-install-ok ] *************** F77_SRCS = \ *** 222,226 **** f771: $(P) $(F77_SRCS) $(LIBDEPS) stamp-objlist f/Makefile ! $(MAKE) -f f/Makefile $(FLAGS_TO_PASS) VPATH=$(srcdir) srcdir=$(srcdir)/f f771$(exeext) f/Makefile: $(srcdir)/f/Makefile.in $(srcdir)/configure --- 222,226 ---- f771: $(P) $(F77_SRCS) $(LIBDEPS) stamp-objlist f/Makefile ! $(MAKE) -f f/Makefile $(FLAGS_TO_PASS) VPATH=$(srcdir) srcdir=$(srcdir)/f f771 f/Makefile: $(srcdir)/f/Makefile.in $(srcdir)/configure diff -rcp2N g77-0.5.16/f/Makefile.in g77-0.5.17/f/Makefile.in *** g77-0.5.16/f/Makefile.in Wed Aug 30 15:53:38 1995 --- g77-0.5.17/f/Makefile.in Sat Nov 18 19:44:16 1995 *************** native: f771 *** 269,273 **** # prefixes, while the others don't because they'll be created # only in the build directory. ! ASSERT_H = $(srcdir)/assert.j assert.h CONFIG_H = $(srcdir)/config.j config.h CONVERT_H = $(srcdir)/convert.j $(srcdir)/../convert.h --- 269,273 ---- # prefixes, while the others don't because they'll be created # only in the build directory. ! ASSERT_H = $(srcdir)/assert.j $(srcdir)/../assert.h CONFIG_H = $(srcdir)/config.j config.h CONVERT_H = $(srcdir)/convert.j $(srcdir)/../convert.h *************** f/str-ot.h f/str-ot.j: f/fini f/str-ot.f *** 487,492 **** ./f/fini `echo $(srcdir)/str-ot.fin | sed 's,^\./,,'` f/str-ot.j f/str-ot.h ! f/fini: f/fini.o f/proj.o ! $(HOST_CC) $(HOST_CFLAGS) -W -Wall $(HOST_LDFLAGS) -o f/fini f/fini.o f/proj.o # Other than str-*.j, the *.j files are dummy #include files --- 487,500 ---- ./f/fini `echo $(srcdir)/str-ot.fin | sed 's,^\./,,'` f/str-ot.j f/str-ot.h ! f/fini: f/fini.o f/proj-h.o ! $(HOST_CC) $(HOST_CFLAGS) -W -Wall $(HOST_LDFLAGS) -o f/fini f/fini.o f/proj-h.o ! ! f/fini.o: ! $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ ! `echo $(srcdir)/fini.c | sed 's,^\./,,'` -o $@ ! ! f/proj-h.o: f/proj.o ! $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ ! `echo $(srcdir)/proj.c | sed 's,^\./,,'` -o $@ # Other than str-*.j, the *.j files are dummy #include files diff -rcp2N g77-0.5.16/f/NEWS g77-0.5.17/f/NEWS *** g77-0.5.16/f/NEWS Wed Aug 30 14:27:16 1995 --- g77-0.5.17/f/NEWS Sat Nov 18 19:44:17 1995 *************** notice and permission notice. Contribut *** 5,9 **** (burley@gnu.ai.mit.edu). ! 1995-08-30 Changes in 0.5.16: --- 5,64 ---- (burley@gnu.ai.mit.edu). ! 1995-11-18 ! ! Changes 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 particular insidious since 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 ASSIGNed 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. the f2c converter) ! 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 Changes in 0.5.16: diff -rcp2N g77-0.5.16/f/PROJECTS g77-0.5.17/f/PROJECTS *** g77-0.5.16/f/PROJECTS Wed Aug 23 15:51:57 1995 --- g77-0.5.17/f/PROJECTS Thu Nov 16 08:06:05 1995 *************** notice and permission notice. Contribut *** 5,9 **** (burley@gnu.ai.mit.edu). ! 1995-08-21 0. Improved efficiency. --- 5,9 ---- (burley@gnu.ai.mit.edu). ! 1995-11-16 0. Improved efficiency. *************** them show up only given certain kinds of *** 176,179 **** --- 176,185 ---- portable code. + * Automatic adjustable arrays. + + * Support more general expressions to dimension dummy and automatic + adjustable arrays, such as array element references, function + references, etc. + * A FLUSH statement that does what many systems provide via CALL FLUSH, but that supports * as the unit designator (same unit as for PRINT). *************** them show up only given certain kinds of *** 281,284 **** --- 287,300 ---- 5. Useful warnings. + + * Have -Wunused warn about unused labels. + + * Warn about assigned GOTO/FORMAT usage without any ASSIGN to variable + (actually, use of `-O -Wuninitialized' should take care of most of these). + + * Have -Wsurprising (or something -- not by default) warn about use of + non-standard intrinsics without explicit INTRINSIC statements for them + (to help find code that might fail silently when ported to another + compiler). * Support -fpedantic more thoroughly, and use it only to generate diff -rcp2N g77-0.5.16/f/bad.def g77-0.5.17/f/bad.def *** g77-0.5.16/f/bad.def Wed Aug 30 15:53:38 1995 --- g77-0.5.17/f/bad.def Thu Oct 26 19:06:49 1995 *************** FFEBAD_MSGS1 (FFEBAD_MISSING_OPERAND_FOR *** 45,61 **** FFEBAD_MSGS1 (FFEBAD_LABEL_ALREADY_DEFINED, FATAL, "Label %A already defined at %1 when redefined at %0") ! FFEBAD_MSGS2 (FFEBAD_UNRECOGNIZED_CHARACTER, FATAL, ! "Unrecognized character at %0 -- rest of statement ignored", "Unrecognized character at %0") FFEBAD_MSGS1 (FFEBAD_LABEL_WITHOUT_STMT, WARN, "Label definition %A at %0 on empty statement (as of %1)") ! FFEBAD_MSGS1 (FFEBAD_EXTRA_LABEL_DEF, FATAL, ! "Extra label definition %A at %0 ignored -- perhaps previous label definition %B at %1 should have CONTINUE statement?") FFEBAD_MSGS1 (FFEBAD_FIRST_CHAR_INVALID, FATAL, ! "Invalid first character at %0 -- line ignored") FFEBAD_MSGS1 (FFEBAD_LINE_TOO_LONG, FATAL, ! "Line too long as of %0 -- entire line ignored") FFEBAD_MSGS1 (FFEBAD_LABEL_FIELD_NOT_NUMERIC, FATAL, ! "Non-numeric character at %0 in label field -- line ignored") FFEBAD_MSGS1 (FFEBAD_LABEL_NUMBER_INVALID, FATAL, "Label number at %0 not in range 1-99999") --- 45,61 ---- FFEBAD_MSGS1 (FFEBAD_LABEL_ALREADY_DEFINED, FATAL, "Label %A already defined at %1 when redefined at %0") ! FFEBAD_MSGS1 (FFEBAD_UNRECOGNIZED_CHARACTER, FATAL, "Unrecognized character at %0") FFEBAD_MSGS1 (FFEBAD_LABEL_WITHOUT_STMT, WARN, "Label definition %A at %0 on empty statement (as of %1)") ! FFEBAD_MSGS2 (FFEBAD_EXTRA_LABEL_DEF, FATAL, ! "Extra label definition %A at %0 -- perhaps previous label definition %B at %1 should have CONTINUE statement?", ! "Extra label definition %A at %0 following label definition %B at %1") FFEBAD_MSGS1 (FFEBAD_FIRST_CHAR_INVALID, FATAL, ! "Invalid first character at %0") FFEBAD_MSGS1 (FFEBAD_LINE_TOO_LONG, FATAL, ! "Line too long as of %0") FFEBAD_MSGS1 (FFEBAD_LABEL_FIELD_NOT_NUMERIC, FATAL, ! "Non-numeric character at %0 in label field") FFEBAD_MSGS1 (FFEBAD_LABEL_NUMBER_INVALID, FATAL, "Label number at %0 not in range 1-99999") *************** FFEBAD_MSGS2 (FFEBAD_UNREC_STMT, FATAL, *** 168,172 **** "Invalid statement at %0") FFEBAD_MSGS2 (FFEBAD_UNIMPL_STMT, FATAL, ! "Unimplemented or invalid form of statement at %0 -- statement ignored (this is a catchall diagnostic that currently applies to a wide variety of errors, including things like invalid ordering of statements)", "Invalid statement at %0") FFEBAD_MSGS2 (FFEBAD_INVALID_STMT_FORM, FATAL, --- 168,172 ---- "Invalid statement at %0") FFEBAD_MSGS2 (FFEBAD_UNIMPL_STMT, FATAL, ! "Unimplemented or invalid form of statement at %0 (this is a catchall diagnostic that currently applies to a wide variety of errors, including things like invalid ordering of statements)", "Invalid statement at %0") FFEBAD_MSGS2 (FFEBAD_INVALID_STMT_FORM, FATAL, *************** FFEBAD_MSGS1 (FFEBAD_STRUCT_MISSING_NAME *** 360,364 **** "Missing structure name for outer structure definition at %0") FFEBAD_MSGS1 (FFEBAD_STRUCT_IGNORING_FIELD, FATAL, ! "Field names at %0 ignored for outer structure definition -- specify them in a subsequent RECORD statement instead") FFEBAD_MSGS1 (FFEBAD_STRUCT_MISSING_FIELD, FATAL, "Missing field name(s) for structure definition at %0 within structure definition at %1") --- 360,364 ---- "Missing structure name for outer structure definition at %0") FFEBAD_MSGS1 (FFEBAD_STRUCT_IGNORING_FIELD, FATAL, ! "Field names at %0 for outer structure definition -- specify them in a subsequent RECORD statement instead") FFEBAD_MSGS1 (FFEBAD_STRUCT_MISSING_FIELD, FATAL, "Missing field name(s) for structure definition at %0 within structure definition at %1") *************** FFEBAD_MSGS1 (FFEBAD_NAMELIST_CASE, WARN *** 630,634 **** "NAMELIST not adequately supported by run-time library for source files with case preserved") FFEBAD_MSGS1 (FFEBAD_NESTED_PERCENT, WARN, ! "Nested %% construct (%%VAL, %%REF, or %%DESCR) ignored at %0") FFEBAD_MSGS2 (FFEBAD_ACTUALARG, WARN, "Invalid actual argument at %0 -- replace hollerith constants with %%REF('string') and typeless constants with INTEGER constant equivalents, or use -fugly-args or -fugly", --- 630,634 ---- "NAMELIST not adequately supported by run-time library for source files with case preserved") FFEBAD_MSGS1 (FFEBAD_NESTED_PERCENT, WARN, ! "Nested %% construct (%%VAL, %%REF, or %%DESCR) at %0") FFEBAD_MSGS2 (FFEBAD_ACTUALARG, WARN, "Invalid actual argument at %0 -- replace hollerith constants with %%REF('string') and typeless constants with INTEGER constant equivalents, or use -fugly-args or -fugly", diff -rcp2N g77-0.5.16/f/com.c g77-0.5.17/f/com.c *** g77-0.5.16/f/com.c Wed Aug 30 15:53:37 1995 --- g77-0.5.17/f/com.c Sat Nov 18 19:44:18 1995 *************** ffecom_expr_ (ffebld expr, tree dest_tre *** 2095,2103 **** if (assignp) { /* ASSIGN'ed-label expr. */ ! t = ffesymbol_hook (s).length_tree; if (t == NULL_TREE) { s = ffecom_sym_transform_assign_ (s); ! t = ffesymbol_hook (s).length_tree; assert (t != NULL_TREE); } --- 2095,2103 ---- if (assignp) { /* ASSIGN'ed-label expr. */ ! t = ffesymbol_hook (s).assign_tree; if (t == NULL_TREE) { s = ffecom_sym_transform_assign_ (s); ! t = ffesymbol_hook (s).assign_tree; assert (t != NULL_TREE); } *************** ffecom_expr_ (ffebld expr, tree dest_tre *** 2307,2313 **** { case FFEINFO_basictypeLOGICAL: ! item = ffecom_2 (EQ_EXPR, integer_type_node, ! ffecom_expr (ffebld_left (expr)), ! convert (tree_type, integer_zero_node)); return convert (tree_type, item); --- 2307,2312 ---- { case FFEINFO_basictypeLOGICAL: ! item ! = ffecom_truth_value_invert (ffecom_expr (ffebld_left (expr))); return convert (tree_type, item); *************** ffecom_expr_ (ffebld expr, tree dest_tre *** 2376,2388 **** { case FFEINFO_basictypeLOGICAL: ! return ! ffecom_2 (TRUTH_ANDIF_EXPR, tree_type, ! ffecom_2 (NE_EXPR, tree_type, ! ffecom_expr (ffebld_left (expr)), ! convert (tree_type, integer_zero_node)), ! ffecom_2 (NE_EXPR, tree_type, ! ffecom_expr (ffebld_right (expr)), ! convert (tree_type, ! integer_zero_node))); case FFEINFO_basictypeINTEGER: --- 2375,2383 ---- { case FFEINFO_basictypeLOGICAL: ! item ! = ffecom_2 (TRUTH_ANDIF_EXPR, integer_type_node, ! ffecom_truth_value (ffecom_expr (ffebld_left (expr))), ! ffecom_truth_value (ffecom_expr (ffebld_right (expr)))); ! return convert (tree_type, item); case FFEINFO_basictypeINTEGER: *************** ffecom_expr_ (ffebld expr, tree dest_tre *** 2404,2416 **** { case FFEINFO_basictypeLOGICAL: ! return ! ffecom_2 (TRUTH_ORIF_EXPR, tree_type, ! ffecom_2 (NE_EXPR, tree_type, ! ffecom_expr (ffebld_left (expr)), ! convert (tree_type, integer_zero_node)), ! ffecom_2 (NE_EXPR, tree_type, ! ffecom_expr (ffebld_right (expr)), ! convert (tree_type, ! integer_zero_node))); case FFEINFO_basictypeINTEGER: --- 2399,2407 ---- { case FFEINFO_basictypeLOGICAL: ! item ! = ffecom_2 (TRUTH_ORIF_EXPR, integer_type_node, ! ffecom_truth_value (ffecom_expr (ffebld_left (expr))), ! ffecom_truth_value (ffecom_expr (ffebld_right (expr)))); ! return convert (tree_type, item); case FFEINFO_basictypeINTEGER: *************** ffecom_expr_ (ffebld expr, tree dest_tre *** 2433,2458 **** { case FFEINFO_basictypeLOGICAL: ! { ! tree left_tree = ffecom_expr (ffebld_left (expr)); ! tree right_tree = ffecom_expr (ffebld_right (expr)); ! ! if (left_tree == error_mark_node || right_tree == error_mark_node) ! return error_mark_node; ! ! item ! = ffecom_2 (BIT_XOR_EXPR, integer_type_node, ! ffecom_truth_value ! (ffecom_2 (NE_EXPR, ! integer_type_node, ! left_tree, ! convert (tree_type, ! integer_zero_node))), ! ffecom_truth_value ! (ffecom_2 (NE_EXPR, integer_type_node, ! right_tree, ! convert (tree_type, ! integer_zero_node)))); ! return convert (tree_type, item); ! } case FFEINFO_basictypeINTEGER: --- 2424,2432 ---- { case FFEINFO_basictypeLOGICAL: ! item ! = ffecom_2 (NE_EXPR, integer_type_node, ! ffecom_expr (ffebld_left (expr)), ! ffecom_expr (ffebld_right (expr))); ! return convert (tree_type, ffecom_truth_value (item)); case FFEINFO_basictypeINTEGER: *************** ffecom_expr_ (ffebld expr, tree dest_tre *** 2474,2512 **** { case FFEINFO_basictypeLOGICAL: ! { ! tree left_tree = ffecom_expr (ffebld_left (expr)); ! tree right_tree = ffecom_expr (ffebld_right (expr)); ! ! if (left_tree == error_mark_node || right_tree == error_mark_node) ! return error_mark_node; ! ! item ! = ffecom_2 (BIT_XOR_EXPR, integer_type_node, ! ffecom_2 (EQ_EXPR, integer_type_node, ! left_tree, ! convert (tree_type, ! integer_zero_node)), ! ffecom_truth_value ! (ffecom_2 (NE_EXPR, integer_type_node, ! right_tree, ! convert (tree_type, ! integer_zero_node)))); ! return convert (tree_type, item); ! } case FFEINFO_basictypeINTEGER: ! { ! tree left_tree = ffecom_expr (ffebld_left (expr)); ! tree right_tree = ffecom_expr (ffebld_right (expr)); ! ! if (left_tree == error_mark_node || right_tree == error_mark_node) ! return error_mark_node; ! ! return ! ffecom_1 (BIT_NOT_EXPR, tree_type, ! ffecom_2 (BIT_XOR_EXPR, tree_type, ! left_tree, ! right_tree)); ! } default: --- 2448,2463 ---- { case FFEINFO_basictypeLOGICAL: ! item ! = ffecom_2 (EQ_EXPR, integer_type_node, ! ffecom_expr (ffebld_left (expr)), ! ffecom_expr (ffebld_right (expr))); ! return convert (tree_type, ffecom_truth_value (item)); case FFEINFO_basictypeINTEGER: ! return ! ffecom_1 (BIT_NOT_EXPR, tree_type, ! ffecom_2 (BIT_XOR_EXPR, tree_type, ! ffecom_expr (ffebld_left (expr)), ! ffecom_expr (ffebld_right (expr)))); default: *************** ffecom_expr_power_integer_ (ffebld left, *** 5286,5289 **** --- 5237,5241 ---- r, integer_one_node)); + l = save_expr (l); l = ffecom_2 (MULT_EXPR, ltype, l, *************** ffecom_expr_power_integer_ (ffebld left, *** 5311,5314 **** --- 5263,5267 ---- assert (TREE_CODE (r) == INTEGER_CST); + l = save_expr (l); l = ffecom_2 (MULT_EXPR, ltype, l, *************** ffecom_finish_symbol_transform_ (ffesymb *** 5754,5758 **** use, and therefore we do all the VAR_DECL creating here. */ ! if (ffesymbol_hook (s).decl_tree == NULL_TREE) s = ffecom_sym_transform_ (s); --- 5707,5714 ---- use, and therefore we do all the VAR_DECL creating here. */ ! if ((ffesymbol_hook (s).decl_tree == NULL_TREE) ! && ((ffesymbol_kind (s) != FFEINFO_kindNONE) ! || (ffesymbol_where (s) != FFEINFO_whereNONE))) ! /* Not transformed, and not CHARACTER*(*). */ s = ffecom_sym_transform_ (s); *************** ffecom_let_char_ (tree dest_tree, tree d *** 6419,6422 **** --- 6375,6382 ---- assert (source_length != NULL_TREE); + if ((source_tree == error_mark_node) + || (source_length == error_mark_node)) + return; + if (dest_size == 1) { *************** ffecom_let_char_ (tree dest_tree, tree d *** 6493,6496 **** --- 6453,6463 ---- ffecom_char_args_ (&citem, &clength, ffecom_concat_list_expr_ (catlist, i)); + if ((citem == error_mark_node) + || (clength == error_mark_node)) + { + ffecom_concat_list_kill_ (catlist); + return; + } + items = ffecom_2 (COMPOUND_EXPR, TREE_TYPE (items), *************** ffecom_sym_transform_ (ffesymbol s) *** 7110,7161 **** resume_momentary (yes); ! if (ffestorag_parent (ffesymbol_storage (s)) != NULL) { /* Child of EQUIVALENCE parent. */ ffestorag est; tree et; int yes; ! if (st == NULL) ! est = NULL; ! else ! est = ffestorag_parent (st); ! if (est == NULL) ! et = NULL; ! else ! { ! ffecom_transform_equiv_ (est); ! et = ffestorag_hook (est); ! if (! TREE_STATIC (et)) ! put_var_into_stack (et); ! } yes = suspend_momentary (); ! if ((et == NULL_TREE) ! || (est == NULL)) ! t = error_mark_node; ! else ! { ! ffetargetOffset offset; ! ! offset = ffestorag_modulo (est) ! + ffestorag_offset (ffesymbol_storage (s)); ! /* (t_type *) (((void *) &et) + offset */ ! t = convert (string_type_node, /* (char *) */ ! ffecom_1 (ADDR_EXPR, ! build_pointer_type (TREE_TYPE (et)), ! et)); ! t = ffecom_2 (PLUS_EXPR, TREE_TYPE (t), ! t, ! build_int_2 (offset, 0)); ! t = convert (build_pointer_type (type), ! t); ! addr = TRUE; ! } resume_momentary (yes); --- 7077,7114 ---- resume_momentary (yes); ! if (ffestorag_parent (st) != NULL) { /* Child of EQUIVALENCE parent. */ ffestorag est; tree et; int yes; + ffetargetOffset offset; ! est = ffestorag_parent (st); ! ffecom_transform_equiv_ (est); ! et = ffestorag_hook (est); ! assert (et != NULL_TREE); ! if (! TREE_STATIC (et)) ! put_var_into_stack (et); yes = suspend_momentary (); ! offset = ffestorag_modulo (est) ! + ffestorag_offset (ffesymbol_storage (s)); ! /* (t_type *) (((void *) &et) + offset */ ! t = convert (string_type_node, /* (char *) */ ! ffecom_1 (ADDR_EXPR, ! build_pointer_type (TREE_TYPE (et)), ! et)); ! t = ffecom_2 (PLUS_EXPR, TREE_TYPE (t), ! t, ! build_int_2 (offset, 0)); ! t = convert (build_pointer_type (type), ! t); ! addr = TRUE; resume_momentary (yes); *************** ffecom_sym_transform_ (ffesymbol s) *** 7965,7969 **** resulting decl_tree has been deemed not usable for an ASSIGN target. (E.g. it isn't wide enough to hold a pointer.) So, here we invent ! another local symbol of type void * and stuff that in the length_tree argument. The F77/F90 standards allow this implementation. */ --- 7918,7922 ---- resulting decl_tree has been deemed not usable for an ASSIGN target. (E.g. it isn't wide enough to hold a pointer.) So, here we invent ! another local symbol of type void * and stuff that in the assign_tree argument. The F77/F90 standards allow this implementation. */ *************** ffecom_sym_transform_assign_ (ffesymbol *** 7999,8003 **** 0), TREE_TYPE (null_pointer_node)); ! TREE_STATIC (t) = 0; /* No need to make static. */ t = start_decl (t, FALSE); --- 7952,7991 ---- 0), TREE_TYPE (null_pointer_node)); ! ! switch (ffesymbol_where (s)) ! { ! case FFEINFO_whereLOCAL: ! /* Unlike for regular vars, SAVE status is easy to determine for ! ASSIGNed vars, since there's no initialization, there's no ! effective storage association (so "SAVE J" does not apply to ! K even given "EQUIVALENCE (J,K)"), there's no size issue ! to worry about, etc. */ ! if ((ffesymbol_save (s) || ffe_is_saveall ()) ! && (ffecom_primary_entry_kind_ != FFEINFO_kindPROGRAM) ! && (ffecom_primary_entry_kind_ != FFEINFO_kindBLOCKDATA) ! && ffestorag_save (ffestorag_parent (ffesymbol_storage (s)))) ! TREE_STATIC (t) = 1; /* SAVEd in proc, make static. */ ! else ! TREE_STATIC (t) = 0; /* No need to make static. */ ! break; ! ! case FFEINFO_whereCOMMON: ! TREE_STATIC (t) = 1; /* Assume COMMONs always SAVEd. */ ! break; ! ! case FFEINFO_whereDUMMY: ! /* Note that twinning a DUMMY means the caller won't see ! the ASSIGNed value. But both F77 and F90 allow implementations ! to do this, i.e. disallow Fortran code that would try and ! take advantage of actually putting a label into a variable ! via a dummy argument (or any other storage association, for ! that matter). */ ! TREE_STATIC (t) = 0; ! break; ! ! default: ! TREE_STATIC (t) = 0; ! break; ! } t = start_decl (t, FALSE); *************** ffecom_sym_transform_assign_ (ffesymbol *** 8006,8010 **** resume_momentary (yes); ! ffesymbol_hook (s).length_tree = t; lineno = old_lineno; --- 7994,7998 ---- resume_momentary (yes); ! ffesymbol_hook (s).assign_tree = t; lineno = old_lineno; *************** ffecom_arg_ptr_to_expr (ffebld expr, tre *** 9624,9627 **** --- 9612,9623 ---- ffecom_char_args_ (&citem, &clength, ffecom_concat_list_expr_ (catlist, i)); + if ((citem == error_mark_node) + || (clength == error_mark_node)) + { + ffecom_concat_list_kill_ (catlist); + *length = error_mark_node; + return error_mark_node; + } + items = ffecom_2 (COMPOUND_EXPR, TREE_TYPE (items), *************** ffecom_init_0 () *** 10900,10908 **** finish_decl (ffecom_tree_xargc_, NULL_TREE, FALSE); ! if (FLOAT_TYPE_SIZE != 32) { warning ("configuration: REAL, INTEGER, and LOGICAL are %d bits wide,", (int) FLOAT_TYPE_SIZE); ! warning ("but g77 doesn't yet work right unless they are 32 bits wide."); warning ("Please keep this in mind before you report bugs. g77 should"); warning ("support non-32-bit machines better as of version 0.6."); --- 10896,10907 ---- finish_decl (ffecom_tree_xargc_, NULL_TREE, FALSE); ! if ((FLOAT_TYPE_SIZE != 32) ! || (TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (null_pointer_node))) != 32)) { warning ("configuration: REAL, INTEGER, and LOGICAL are %d bits wide,", (int) FLOAT_TYPE_SIZE); ! warning ("and pointers are %d bits wide, but g77 doesn't yet work", ! (int) TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (null_pointer_node)))); ! warning ("properly unless they all are 32 bits wide."); warning ("Please keep this in mind before you report bugs. g77 should"); warning ("support non-32-bit machines better as of version 0.6."); *************** lang_print_error_function (file) *** 12644,12648 **** char *kind; ! if (ffecom_nested_entry_ == NULL) { s = ffecom_primary_entry_; --- 12643,12652 ---- char *kind; ! if (ffecom_primary_entry_ == NULL) ! { ! s = NULL; ! kind = NULL; ! } ! else if (ffecom_nested_entry_ == NULL) { s = ffecom_primary_entry_; *************** start_function (tree name, tree type, in *** 13005,13008 **** --- 13009,13035 ---- /* Here are the public functions the GNU back end needs. */ + /* This is used by the `assert' macro. It is provided in libgcc.a, + which `cc' doesn't know how to link. Note that the C++ front-end + no longer actually uses the `assert' macro (instead, it calls + my_friendly_assert). But all of the back-end files still need this. */ + void + __eprintf (string, expression, line, filename) + #ifdef __STDC__ + const char *string; + const char *expression; + unsigned line; + const char *filename; + #else + char *string; + char *expression; + unsigned line; + char *filename; + #endif + { + fprintf (stderr, string, expression, line, filename); + fflush (stderr); + abort (); + } + tree convert (type, expr) *************** signed_type (type) *** 13621,13624 **** --- 13648,13661 ---- if (type1 == long_long_unsigned_type_node) return long_long_integer_type_node; + #if 0 /* gcc/c-* files only */ + if (type1 == unsigned_intDI_type_node) + return intDI_type_node; + if (type1 == unsigned_intSI_type_node) + return intSI_type_node; + if (type1 == unsigned_intHI_type_node) + return intHI_type_node; + if (type1 == unsigned_intQI_type_node) + return intQI_type_node; + #endif type2 = type_for_size (TYPE_PRECISION (type1), 0); *************** unsigned_type (type) *** 13924,13927 **** --- 13961,13974 ---- if (type1 == long_long_integer_type_node) return long_long_unsigned_type_node; + #if 0 /* gcc/c-* files only */ + if (type1 == intDI_type_node) + return unsigned_intDI_type_node; + if (type1 == intSI_type_node) + return unsigned_intSI_type_node; + if (type1 == intHI_type_node) + return unsigned_intHI_type_node; + if (type1 == intQI_type_node) + return unsigned_intQI_type_node; + #endif type2 = type_for_size (TYPE_PRECISION (type1), 1); *************** unsigned_type (type) *** 13946,13949 **** --- 13993,14010 ---- /* From gcc/cccp.c, the code to handle -I. */ + /* 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) + { + while (dir[0] == '.' && dir[1] == '/') + for (dir += 2; *dir == '/'; dir++) + continue; + if (dir[0] == '.' && !dir[1]) + dir++; + return dir; + } + /* The file_name_map structure holds a mapping of file names for a particular directory. This mapping is read from the file named *************** static FILE *open_include_file (char *fi *** 14034,14037 **** --- 14095,14099 ---- struct file_name_list *searchptr); static void print_containing_files (ffebadSeverity sev); + static char *skip_redundant_dir_prefix (char *); static char *read_filename_string (int ch, FILE *f); static struct file_name_map *read_name_map (char *dirname); *************** read_name_map (dirname) *** 14258,14261 **** --- 14320,14327 ---- char *name; FILE *f; + size_t dirlen; + int separator_needed; + + dirname = skip_redundant_dir_prefix (dirname); for (map_list_ptr = map_list; map_list_ptr; *************** read_name_map (dirname) *** 14269,14277 **** map_list_ptr->map_list_map = NULL; ! name = (char *) xmalloc (strlen (dirname) + strlen (FILE_NAME_MAP_FILE) + 2); strcpy (name, dirname); ! if (*dirname) ! strcat (name, "/"); ! strcat (name, FILE_NAME_MAP_FILE); f = fopen (name, "r"); free (name); --- 14335,14344 ---- map_list_ptr->map_list_map = NULL; ! dirlen = strlen (dirname); ! separator_needed = dirlen != 0 && dirname[dirlen - 1] != '/'; ! name = (char *) xmalloc (dirlen + strlen (FILE_NAME_MAP_FILE) + 2); strcpy (name, dirname); ! name[dirlen] = '/'; ! strcpy (name + dirlen + separator_needed, FILE_NAME_MAP_FILE); f = fopen (name, "r"); free (name); *************** read_name_map (dirname) *** 14281,14285 **** { int ch; - int dirlen = strlen (dirname); while ((ch = getc (f)) != EOF) --- 14348,14351 ---- *************** read_name_map (dirname) *** 14307,14311 **** strcpy (ptr->map_to, dirname); ptr->map_to[dirlen] = '/'; ! strcpy (ptr->map_to + dirlen + 1, to); free (to); } --- 14373,14377 ---- strcpy (ptr->map_to, dirname); ptr->map_to[dirlen] = '/'; ! strcpy (ptr->map_to + dirlen + separator_needed, to); free (to); } *************** ffecom_open_include_ (char *name, ffewhe *** 14429,14433 **** { char *fbeg = name; ! int flen = strlen (fbeg); struct file_name_list *search_start = include; /* Chain of dirs to search */ struct file_name_list dsp[1]; /* First in chain, if #include "..." */ --- 14495,14499 ---- { char *fbeg = name; ! size_t flen = strlen (fbeg); struct file_name_list *search_start = include; /* Chain of dirs to search */ struct file_name_list dsp[1]; /* First in chain, if #include "..." */ *************** ffecom_open_include_ (char *name, ffewhe *** 14524,14529 **** if (searchptr->fname[0] == 0) continue; ! strcpy (fname, searchptr->fname); ! strcat (fname, "/"); fname[strlen (fname) + flen] = 0; } --- 14590,14596 ---- if (searchptr->fname[0] == 0) continue; ! strcpy (fname, skip_redundant_dir_prefix (searchptr->fname)); ! if (fname[0] && fname[strlen (fname) - 1] != '/') ! strcat (fname, "/"); fname[strlen (fname) + flen] = 0; } diff -rcp2N g77-0.5.16/f/com.h g77-0.5.17/f/com.h *** g77-0.5.16/f/com.h Wed Aug 30 15:53:37 1995 --- g77-0.5.17/f/com.h Fri Oct 27 08:20:49 1995 *************** struct _ffecom_symbol_ *** 202,207 **** { tree decl_tree; ! tree length_tree; /* For CHARACTER dummies and ASSIGN'ed vars. */ tree vardesc_tree; /* For NAMELIST. */ bool addr; /* Is address of item instead of item. */ }; --- 202,208 ---- { tree decl_tree; ! tree length_tree; /* For CHARACTER dummies. */ tree vardesc_tree; /* For NAMELIST. */ + tree assign_tree; /* For ASSIGN'ed vars. */ bool addr; /* Is address of item instead of item. */ }; diff -rcp2N g77-0.5.16/f/equiv.c g77-0.5.17/f/equiv.c *** g77-0.5.16/f/equiv.c Wed Aug 30 15:53:37 1995 --- g77-0.5.17/f/equiv.c Thu Nov 2 03:57:42 1995 *************** ffeequiv_layout_local_ (ffeequiv eq) *** 173,184 **** } ! if (!ok) { ! ffeequiv_kill (eq); /* Fully processed, no longer needed. */ return; } - - if (sr == NULL) - return; /* No syms in lists, return. */ /* We've got work to do, so make the LOCAL storage object that'll hold all --- 173,181 ---- } ! if (!ok || (sr == NULL)) { ! ffeequiv_kill (eq); return; } /* We've got work to do, so make the LOCAL storage object that'll hold all diff -rcp2N g77-0.5.16/f/expr.c g77-0.5.17/f/expr.c *** g77-0.5.16/f/expr.c Wed Aug 30 15:53:37 1995 --- g77-0.5.17/f/expr.c Thu Nov 2 07:40:08 1995 *************** static void *** 9482,9485 **** --- 9482,9505 ---- ffeexpr_exprstack_push_unary_ (ffeexprExpr_ e) { + if ((ffe_is_pedantic () + || ffe_is_warn_surprising ()) + && (ffeexpr_stack_->exprstack != NULL) + && (ffeexpr_stack_->exprstack->type != FFEEXPR_exprtypeOPERAND_) + && (ffeexpr_stack_->exprstack->u.operator.op != FFEEXPR_operatorNOT_) + && (e->u.operator.op != FFEEXPR_operatorNOT_)) + { + ffebad_start_msg ("Two arithmetic operators in a row at %0 and %1 -- use parentheses", + ffe_is_pedantic () + ? FFEBAD_severityPEDANTIC + : FFEBAD_severityWARNING); + ffebad_here (0, + ffelex_token_where_line (ffeexpr_stack_->exprstack->token), + ffelex_token_where_column (ffeexpr_stack_->exprstack->token)); + ffebad_here (1, + ffelex_token_where_line (e->token), + ffelex_token_where_column (e->token)); + ffebad_finish (); + } + ffeexpr_exprstack_push_ (e); } *************** ffeexpr_exprstack_push_binary_ (ffeexprE *** 9503,9506 **** --- 9523,9551 ---- ffeexprExpr_ ce; + if (ffe_is_warn_surprising () + /* These next two are always true (see assertions below). */ + && (ffeexpr_stack_->exprstack != NULL) + && (ffeexpr_stack_->exprstack->type == FFEEXPR_exprtypeOPERAND_) + /* If the previous operator is a unary minus, and the binary op + is of higher precedence, might not do what user expects, + e.g. "-2**2" is "-(2**2)", i.e. "-4", not "(-2)**2", which would + yield "4". */ + && (ffeexpr_stack_->exprstack->previous != NULL) + && (ffeexpr_stack_->exprstack->previous->type == FFEEXPR_exprtypeUNARY_) + && (ffeexpr_stack_->exprstack->previous->u.operator.op + == FFEEXPR_operatorSUBTRACT_) + && (e->u.operator.prec + < ffeexpr_stack_->exprstack->previous->u.operator.prec)) + { + ffebad_start_msg ("Operator at %0 has lower precedence than that at %1 -- use parentheses", FFEBAD_severityWARNING); + ffebad_here (0, + ffelex_token_where_line (ffeexpr_stack_->exprstack->previous->token), + ffelex_token_where_column (ffeexpr_stack_->exprstack->previous->token)); + ffebad_here (1, + ffelex_token_where_line (e->token), + ffelex_token_where_column (e->token)); + ffebad_finish (); + } + again: assert (ffeexpr_stack_->exprstack != NULL); *************** ffeexpr_reduced_eqop2_ (ffebld reduced, *** 10346,10350 **** } ! if ((lbt != FFEINFO_basictypeINTEGER) && (lbt != FFEINFO_basictypeREAL) && (lbt != FFEINFO_basictypeCOMPLEX) && (lbt != FFEINFO_basictypeCHARACTER)) { --- 10391,10407 ---- } ! if ((lbt == FFEINFO_basictypeLOGICAL) ! && (rbt == FFEINFO_basictypeLOGICAL)) ! { ! if (ffebad_start_msg ("Use .EQV./.NEQV. instead of .EQ./.NE. at %0 for LOGICAL operands at %1 and %2", ! FFEBAD_severityFATAL)) ! { ! ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); ! ffebad_here (1, ffelex_token_where_line (l->token), ffelex_token_where_column (l->token)); ! ffebad_here (2, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); ! ffebad_finish (); ! } ! } ! else if ((lbt != FFEINFO_basictypeINTEGER) && (lbt != FFEINFO_basictypeREAL) && (lbt != FFEINFO_basictypeCOMPLEX) && (lbt != FFEINFO_basictypeCHARACTER)) { diff -rcp2N g77-0.5.16/f/g77.1 g77-0.5.17/f/g77.1 *** g77-0.5.16/f/g77.1 Mon Aug 28 09:41:30 1995 --- g77-0.5.17/f/g77.1 Sat Nov 18 20:48:35 1995 *************** *** 2,6 **** .\" See section COPYING for conditions for redistribution .\" FIXME: no info here on predefines. Should there be? extra for F77... ! .TH G77 1 "15feb1995" "GNU Tools" "GNU Tools" .de BP .sp --- 2,6 ---- .\" See section COPYING for conditions for redistribution .\" FIXME: no info here on predefines. Should there be? extra for F77... ! .TH G77 1 "18nov1995" "GNU Tools" "GNU Tools" .de BP .sp *************** *** 9,16 **** .. .SH NAME ! g77 \- GNU project F77 Compiler (v0.5.5) .SH SYNOPSIS .RB g77 " [" \c ! .IR option " | " filename " ].\|.\|. .SH DESCRIPTION The C and F77 compilers are integrated; --- 9,16 ---- .. .SH NAME ! g77 \- GNU project F77 Compiler (v0.5.17) .SH SYNOPSIS .RB g77 " [" \c ! .IR option " | " "filename " ].\|.\|. .SH DESCRIPTION The C and F77 compilers are integrated; *************** Define macro \c *** 84,87 **** --- 84,100 ---- \&. .TP + .BI \-\-driver= command + Specifies that + .IR command , + rather than + .RB ` gcc ', + is to be invoked by + .RB ` g77 ' + to do its job. Example: Within the gcc build directory after building + GNU Fortran (but without having to install it), + .nf + ./g77 \-\-driver=./xgcc -B./ foo.f + .fi + .TP .B \-E Stop after the preprocessing stage; do not run the compiler proper. The *************** information. On most systems that use D *** 97,101 **** of extra debugging information that only GDB can use. ! Unlike most other C compilers, GNU CC allows you to use `\|\c .B \-g\c \&\|' with --- 110,114 ---- of extra debugging information that only GDB can use. ! Unlike most other Fortran compilers, GNU Fortran allows you to use `\|\c .B \-g\c \&\|' with *************** options (and the current directory, if a *** 141,145 **** .B \-O Optimize. Optimizing compilation takes somewhat more time, and a lot ! more memory for a large function. .TP .BI "\-o " file\c --- 154,160 ---- .B \-O Optimize. Optimizing compilation takes somewhat more time, and a lot ! more memory for a large function. See the GCC documentation for ! further optimisation options. Loop unrolling, in particular, may be ! worth investigating for typical numerical Fortran programs. .TP .BI "\-o " file\c *************** Undefine macro \c *** 159,162 **** --- 174,195 ---- \&. .TP + .B \-v + Print (on standard error output) the commands executed to run the + stages of compilation. Also print the version number of the compiler + driver program and of the preprocessor and the compiler proper. The + version numbers of g77 itself and the GCC distribution on which it is + based are distinct. Use + .RB ` \-\-driver=true ' + to disable actual invocation of + .RB ` gcc ' + (since + .RB ` true ' + is the name of a UNIX command that simply returns success status). + The command + .RB ` "gcc -v" ' + is the appropriate one to determine the g77 and GCC version numbers; + it will produce an irrelevant error message from + .RB ` ld '. + .TP .B \-Wall Issue warnings for conditions which pertain to usage that we recommend *************** files *** 199,206 **** .B #include files - .br - \fILIBDIR\fR/g77\-include additional g77 directory for - .B #include - .sp .I LIBDIR is usually --- 232,235 ---- *************** if available, else *** 217,220 **** --- 246,253 ---- \&). .SH "SEE ALSO" + The file + .B DOC + in the g77 distribution. + .br gcc(1), cpp(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1). .br *************** gld: the GNU linker\c *** 244,248 **** .SH BUGS ! For instructions on how to report bugs, see the GCC manual. .SH COPYING --- 277,283 ---- .SH BUGS ! For instructions on how to report bugs, see the file ! .B DOC ! in the g77 distribution. .SH COPYING *************** the original English. *** 265,266 **** --- 300,304 ---- .SH AUTHORS See the GNU CC Manual for the contributors to GNU CC. + See the file + .B CREDITS + in the g77 distribution for g77-specific information. diff -rcp2N g77-0.5.16/f/g77.c g77-0.5.17/f/g77.c *** g77-0.5.16/f/g77.c Wed Aug 30 15:53:36 1995 --- g77-0.5.17/f/g77.c Thu Nov 16 03:01:50 1995 *************** the Free Software Foundation, 59 Temple *** 53,56 **** --- 53,65 ---- #include "config.j" + #include + #include + + #ifndef _WIN32 + #include /* May get R_OK, etc. on some systems. */ + #else + #include + #endif + #ifdef __STDC__ #include *************** the Free Software Foundation, 59 Temple *** 59,69 **** #endif #include ! #include ! #ifndef _WIN32 ! #include /* May get R_OK, etc. on some systems. */ ! #else ! #include #endif - #include /* Defined to the name of the compiler; if using a cross compiler, the --- 68,77 ---- #endif #include ! ! #ifndef R_OK ! #define R_OK 4 ! #define W_OK 2 ! #define X_OK 1 #endif /* Defined to the name of the compiler; if using a cross compiler, the *************** the Free Software Foundation, 59 Temple *** 87,90 **** --- 95,107 ---- #endif + /* Add prototype support. */ + #ifndef PROTO + #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__) + #define PROTO(ARGS) ARGS + #else + #define PROTO(ARGS) () + #endif + #endif + #ifndef VPROTO #ifdef __STDC__ *************** the Free Software Foundation, 59 Temple *** 99,102 **** --- 116,172 ---- #endif + /* Define a generic NULL if one hasn't already been defined. */ + + #ifndef NULL + #define NULL 0 + #endif + + /* Define O_RDONLY if the system hasn't defined it for us. */ + #ifndef O_RDONLY + #define O_RDONLY 0 + #endif + + #ifndef GENERIC_PTR + #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__) + #define GENERIC_PTR void * + #else + #define GENERIC_PTR char * + #endif + #endif + + #ifndef NULL_PTR + #define NULL_PTR ((GENERIC_PTR)0) + #endif + + #ifdef USG + #define vfork fork + #endif /* USG */ + + /* On MSDOS, write temp files in current dir + because there's no place else we can expect to use. */ + #ifdef __MSDOS__ + #ifndef P_tmpdir + #define P_tmpdir "." + #endif + #endif + + /* By default there is no special suffix for executables. */ + #ifndef EXECUTABLE_SUFFIX + #define EXECUTABLE_SUFFIX "" + #endif + + /* By default, colon separates directories in a path. */ + #ifndef PATH_SEPARATOR + #define PATH_SEPARATOR ':' + #endif + + #ifndef DIR_SEPARATOR + #define DIR_SEPARATOR '/' + #endif + + static char dir_separator_str[] = {DIR_SEPARATOR, 0}; + + extern char *getenv (); + #ifndef errno extern int errno; *************** typedef enum *** 148,152 **** } Option; ! /* THE FOLLOWING COMES STRAIGHT FROM gcc-2.6.3/gcc.c: */ /* This defines which switch letters take arguments. */ --- 218,222 ---- } Option; ! /* THE FOLLOWING COMES STRAIGHT FROM gcc-2.7.0/gcc.c: */ /* This defines which switch letters take arguments. */ *************** typedef enum *** 156,160 **** ((CHAR) == 'D' || (CHAR) == 'U' || (CHAR) == 'o' \ || (CHAR) == 'e' || (CHAR) == 'T' || (CHAR) == 'u' \ ! || (CHAR) == 'I' || (CHAR) == 'm' \ || (CHAR) == 'L' || (CHAR) == 'A') #endif --- 226,230 ---- ((CHAR) == 'D' || (CHAR) == 'U' || (CHAR) == 'o' \ || (CHAR) == 'e' || (CHAR) == 'T' || (CHAR) == 'u' \ ! || (CHAR) == 'I' || (CHAR) == 'm' || (CHAR) == 'x' \ || (CHAR) == 'L' || (CHAR) == 'A') #endif *************** typedef enum *** 174,178 **** #endif ! /* END OF STUFF FROM gcc-2.6.3/gcc.c. */ char * --- 244,264 ---- #endif ! /* This is the common prefix we use to make temp file names. ! It is chosen once for each run of this program. ! It is substituted into a spec by %g. ! Thus, all temp file names contain this prefix. ! In practice, all temp file names start with this prefix. ! ! This prefix comes from the envvar TMPDIR if it is defined; ! otherwise, from the P_tmpdir macro if that is defined; ! otherwise, in /usr/tmp or /tmp. */ ! ! static char *temp_filename; ! ! /* Length of the prefix. */ ! ! static int temp_filename_length; ! ! /* END OF STUFF FROM gcc-2.7.0/gcc.c. */ char * *************** xmalloc (size) *** 291,311 **** } - /* Return a newly-allocated string whose contents concatenate those - of s1, s2, s3. */ static char * ! concat (s1, s2, s3) ! char *s1, *s2, *s3; { ! int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3); ! char *result = xmalloc (len1 + len2 + len3 + 1); strcpy (result, s1); strcpy (result + len1, s2); ! strcpy (result + len1 + len2, s3); ! *(result + len1 + len2 + len3) = 0; return result; } static void pfatal_with_name (name) --- 377,416 ---- } static char * ! concat (s1, s2) ! char *s1, *s2; { ! int len1 = strlen (s1); ! int len2 = strlen (s2); ! char *result = xmalloc (len1 + len2 + 1); strcpy (result, s1); strcpy (result + len1, s2); ! *(result + len1 + len2) = 0; return result; } + static char * + concat3 (s1, s2, s3) + char *s1, *s2, *s3; + { + return concat (concat (s1, s2), s3); + } + + static char * + concat4 (s1, s2, s3, s4) + char *s1, *s2, *s3, *s4; + { + return concat (concat (s1, s2), concat (s3, s4)); + } + + static char * + concat6 (s1, s2, s3, s4, s5, s6) + char *s1, *s2, *s3, *s4, *s5, *s6; + { + return concat3 (concat (s1, s2), concat (s3, s4), concat (s5, s6)); + } + static void pfatal_with_name (name) *************** pfatal_with_name (name) *** 315,319 **** if (errno < sys_nerr) ! s = concat ("%s: ", sys_errlist[errno], ""); else s = "cannot open %s"; --- 420,424 ---- if (errno < sys_nerr) ! s = concat3 ("%s: ", sys_errlist[errno], ""); else s = "cannot open %s"; *************** pfatal_with_name (name) *** 321,336 **** } ! #ifdef __MSDOS__ ! /* This is the common prefix we use to make temp file names. */ ! char *temp_filename; - /* Length of the prefix. */ - int temp_filename_length; - - /* Compute a string to use as the base of all temporary file names. */ static char * choose_temp_base_try (try, base) ! char *try; ! char *base; { char *rv; --- 426,436 ---- } ! /* Compute a string to use as the base of all temporary file names. ! It is substituted for %g. */ static char * choose_temp_base_try (try, base) ! char *try; ! char *base; { char *rv; *************** choose_temp_base () *** 360,376 **** #endif ! base = choose_temp_base_try ("/usr/tmp", base); ! base = choose_temp_base_try ("/tmp", base); ! /* If all else fails, use the current directory! */ if (base == (char *)0) ! base = "./"; len = strlen (base); ! temp_filename = xmalloc (len + sizeof("/ccXXXXXX")); strcpy (temp_filename, base); ! if (len > 0 && temp_filename[len-1] != '/') ! temp_filename[len++] = '/'; ! strcpy (temp_filename + len, "ccXXXXXX"); mktemp (temp_filename); --- 460,480 ---- #endif ! base = choose_temp_base_try (concat4 (dir_separator_str, "usr", ! dir_separator_str, "tmp"), ! base); ! base = choose_temp_base_try (concat (dir_separator_str, "tmp"), base); ! /* If all else fails, use the current directory! */ if (base == (char *)0) ! base = concat (".", dir_separator_str); len = strlen (base); ! temp_filename = xmalloc (len + strlen (concat (dir_separator_str, ! "gfXXXXXX")) + 1); strcpy (temp_filename, base); ! if (len > 0 && temp_filename[len-1] != '/' ! && temp_filename[len-1] != DIR_SEPARATOR) ! temp_filename[len++] = DIR_SEPARATOR; ! strcpy (temp_filename + len, "gfXXXXXX"); mktemp (temp_filename); *************** choose_temp_base () *** 380,383 **** --- 484,488 ---- } + #ifdef __MSDOS__ static void perror_exec (name) *************** perror_exec (name) *** 387,392 **** if (errno < sys_nerr) ! s = concat ("installation problem, cannot exec %s: ", ! my_strerror( errno ), ""); else s = "installation problem, cannot exec %s"; --- 492,497 ---- if (errno < sys_nerr) ! s = concat3 ("installation problem, cannot exec %s: ", ! my_strerror( errno ), ""); else s = "installation problem, cannot exec %s"; *************** main (argc, argv) *** 1017,1023 **** else if (verbose && add_version_magic) { append_arg ("-fnull-version"); append_arg ("-o"); ! append_arg ("/dev/null"); append_arg ("-xf77-cpp-input"); append_arg ("/dev/null"); --- 1122,1130 ---- else if (verbose && add_version_magic) { + choose_temp_base (); + append_arg ("-fnull-version"); append_arg ("-o"); ! append_arg (temp_filename); append_arg ("-xf77-cpp-input"); append_arg ("/dev/null"); diff -rcp2N g77-0.5.16/f/gbe/2.7.1.diff g77-0.5.17/f/gbe/2.7.1.diff *** g77-0.5.16/f/gbe/2.7.1.diff Wed Dec 31 19:00:00 1969 --- g77-0.5.17/f/gbe/2.7.1.diff Thu Nov 16 07:59:16 1995 *************** *** 0 **** --- 1,3 ---- + GNU Fortran Version 0.5.17 requires no patch to the GNU CC Version 2.7.1 + back end. Future versions of GNU Fortran might, however, so please + do not assume otherwise! diff -rcp2N g77-0.5.16/f/gbe/README g77-0.5.17/f/gbe/README *** g77-0.5.16/f/gbe/README Thu Aug 17 06:19:05 1995 --- g77-0.5.17/f/gbe/README Sat Nov 18 19:54:29 1995 *************** *** 1,11 **** ! 950815 This directory contains .diff files for various GNU CC distributions. ! The name of a file tells which version to which it applies. ! Currently, g77 will not build without the appropriate .diff file ! applied to the GNU CC distribution via patch. That is because g77 needs certain changes to be made to the GNU CC back end, which it shares with not only the C front end, but with other GNU front ! ends (C++, Objective-C, Pascal, ADA, Chill, ...) as well. This distribution of g77 is not supported for versions of gcc prior --- 1,14 ---- ! 951118 This directory contains .diff files for various GNU CC distributions. ! The name of a file tells which version to which it applies. Prior to ! gcc version 2.7.1, g77 will not build without the appropriate .diff ! file applied to the GNU CC distribution via patch. That is because g77 needs certain changes to be made to the GNU CC back end, which it shares with not only the C front end, but with other GNU front ! ends (C++, Objective-C, Pascal, ADA, Chill, ...) as well. Version ! 2.7.1 of gcc includes the changes needed by g77 versions through 0.5.17. ! Future versions of g77 might again require changes to versions 2.7.1, ! and later versions, of gcc. This distribution of g77 is not supported for versions of gcc prior *************** to 2.6.2. The 2.6.3 patch file should w *** 13,20 **** you should probably use gcc-2.6.3 in any case if that is possible. ! To apply a .diff file to, say, gcc 2.6.3, one might use the following command: ! patch -p1 -d gcc-2.6.3 < gcc-2.6.3/f/gbe/2.6.3.diff If you are using a version of gcc more recent than the most --- 16,23 ---- you should probably use gcc-2.6.3 in any case if that is possible. ! To apply a .diff file to, say, gcc 2.7.0, one might use the following command: ! patch -p1 -d gcc-2.7.0 < gcc-2.7.0/f/gbe/2.7.0.diff If you are using a version of gcc more recent than the most *************** being worked on. In the meantime, watch *** 29,34 **** (see gcc/f/DOC *TROUBLE (BUGS, ETC.)*) for information on support for the new version of gcc. - - We hope that changes to the back end required by g77 will soon - be folded into the official back end. Until then, this mechanism - is necessary, and we hope it is convenient for you to use. --- 32,33 ---- diff -rcp2N g77-0.5.16/f/intrin.c g77-0.5.17/f/intrin.c *** g77-0.5.16/f/intrin.c Wed Aug 30 15:53:36 1995 --- g77-0.5.17/f/intrin.c Thu Nov 2 05:22:50 1995 *************** static struct _ffeintrin_name_ ffeintrin *** 229,234 **** {"EOSHIFT", "eoshift", "EOShift", FFEINTRIN_genEOSHIFT, FFEINTRIN_specNONE,}, /* F90 */ {"EPSILON", "epsilon", "Epsilon", FFEINTRIN_genEPSILON, FFEINTRIN_specNONE,}, /* F90 */ ! {"ERF", "erf", "ErF", FFEINTRIN_genNONE, FFEINTRIN_specERF,}, /* UNIX */ ! {"ERFC", "erfc", "ErFC", FFEINTRIN_genNONE, FFEINTRIN_specERFC,}, /* UNIX */ {"EXIT", "exit", "Exit", FFEINTRIN_genNONE, FFEINTRIN_specEXIT,}, /* UNIX */ {"EXP", "exp", "Exp", FFEINTRIN_genEXP, FFEINTRIN_specEXP,}, --- 229,234 ---- {"EOSHIFT", "eoshift", "EOShift", FFEINTRIN_genEOSHIFT, FFEINTRIN_specNONE,}, /* F90 */ {"EPSILON", "epsilon", "Epsilon", FFEINTRIN_genEPSILON, FFEINTRIN_specNONE,}, /* F90 */ ! {"ERF", "erf", "ErF", FFEINTRIN_genERF, FFEINTRIN_specERF,}, /* UNIX */ ! {"ERFC", "erfc", "ErFC", FFEINTRIN_genERFC, FFEINTRIN_specERFC,}, /* UNIX */ {"EXIT", "exit", "Exit", FFEINTRIN_genNONE, FFEINTRIN_specEXIT,}, /* UNIX */ {"EXP", "exp", "Exp", FFEINTRIN_genEXP, FFEINTRIN_specEXP,}, diff -rcp2N g77-0.5.16/f/intrin.def g77-0.5.17/f/intrin.def *** g77-0.5.16/f/intrin.def Wed Aug 30 15:53:36 1995 --- g77-0.5.17/f/intrin.def Thu Nov 2 05:25:06 1995 *************** DEFGEN (FFEINTRIN_genEPSILON, "EPSILON", *** 1275,1278 **** --- 1275,1310 ---- FFEINTRIN_specNONE ) + DEFGEN (FFEINTRIN_genERF, "ERF", + FFEINTRIN_specERF, /* UNIX. */ + FFEINTRIN_specDERF, /* UNIX. */ + FFEINTRIN_specNONE, + FFEINTRIN_specNONE, + FFEINTRIN_specNONE, + FFEINTRIN_specNONE, + FFEINTRIN_specNONE, + FFEINTRIN_specNONE, + FFEINTRIN_specNONE, + FFEINTRIN_specNONE, + FFEINTRIN_specNONE, + FFEINTRIN_specNONE, + FFEINTRIN_specNONE, + FFEINTRIN_specNONE + ) + DEFGEN (FFEINTRIN_genERFC, "ERFC", + FFEINTRIN_specERFC, /* UNIX. */ + FFEINTRIN_specDERFC, /* UNIX. */ + FFEINTRIN_specNONE, + FFEINTRIN_specNONE, + FFEINTRIN_specNONE, + FFEINTRIN_specNONE, + FFEINTRIN_specNONE, + FFEINTRIN_specNONE, + FFEINTRIN_specNONE, + FFEINTRIN_specNONE, + FFEINTRIN_specNONE, + FFEINTRIN_specNONE, + FFEINTRIN_specNONE, + FFEINTRIN_specNONE + ) DEFGEN (FFEINTRIN_genEXPONENT, "EXPONENT", /* F90 */ FFEINTRIN_specEXPONENT, diff -rcp2N g77-0.5.16/f/lang-options.h g77-0.5.17/f/lang-options.h *** g77-0.5.16/f/lang-options.h Wed Aug 30 15:53:35 1995 --- g77-0.5.17/f/lang-options.h Thu Oct 26 17:39:47 1995 *************** the Free Software Foundation, 59 Temple *** 101,104 **** --- 101,108 ---- "-fmil-intrinsics-disable", "-fmil-intrinsics-enable", + "-funix-intrinsics-delete", + "-funix-intrinsics-hide", + "-funix-intrinsics-disable", + "-funix-intrinsics-enable", "-fvxt-intrinsics-delete", "-fvxt-intrinsics-hide", *************** the Free Software Foundation, 59 Temple *** 107,110 **** --- 111,116 ---- "-Wimplicit", "-Wno-implicit", + "-Wsurprising", + "-Wno-surprising", "-Wall", /* Prefix options. */ diff -rcp2N g77-0.5.16/f/malloc.c g77-0.5.17/f/malloc.c *** g77-0.5.16/f/malloc.c Wed Aug 30 15:53:35 1995 --- g77-0.5.17/f/malloc.c Tue Sep 12 14:17:58 1995 *************** malloc_find_inpool_ (mallocPool pool, vo *** 288,298 **** { mallocArea_ a; int n = 0; ! for (a = pool->first; a != (mallocArea_) & pool->first; a = a->next) { if (a->where == ptr) return a; ++n; } assert ("Couldn't find object in pool!" == NULL); --- 288,302 ---- { mallocArea_ a; + mallocArea_ b = (mallocArea_) &pool->first; int n = 0; ! for (a = pool->first; a != (mallocArea_) &pool->first; a = a->next) { + assert (("Infinite loop detected" != NULL) && (a != b)); if (a->where == ptr) return a; ++n; + if (n & 1) + b = b->next; } assert ("Couldn't find object in pool!" == NULL); diff -rcp2N g77-0.5.16/f/parse.c g77-0.5.17/f/parse.c *** g77-0.5.16/f/parse.c Wed Aug 30 15:53:35 1995 --- g77-0.5.17/f/parse.c Thu Oct 26 17:19:47 1995 *************** yyparse () *** 62,66 **** } #elif FFECOM_targetCURRENT == FFECOM_targetGCC ! ffe_set_is_pedantic (pedantic); #else #error --- 62,67 ---- } #elif FFECOM_targetCURRENT == FFECOM_targetGCC ! if (!ffe_is_pedantic ()) ! ffe_set_is_pedantic (pedantic); #else #error diff -rcp2N g77-0.5.16/f/runtime/ChangeLog g77-0.5.17/f/runtime/ChangeLog *** g77-0.5.16/f/runtime/ChangeLog Wed Aug 30 16:30:17 1995 --- g77-0.5.17/f/runtime/ChangeLog Sat Nov 18 19:38:09 1995 *************** *** 1,2 **** --- 1,25 ---- + Sat Nov 18 19:37:22 1995 Craig Burley (burley@gnu.ai.mit.edu) + + * Version 0.5.17 released. + + Thu Nov 16 07:20:35 1995 Craig Burley (burley@gnu.ai.mit.edu) + + * Incorporate changes by AT&T/Bellcore to libf2c through 1995-11-15. + + Fri Sep 22 02:19:59 1995 Craig Burley (burley@gnu.ai.mit.edu) + + * libI77/backspace.c, libI77/close.c, libI77/endfile.c, + libI77/fio.h, libI77/inquire.c, libI77/rawio.h, + libF77/s_paus.c: Not an MSDOS system if GO32 + is defined, in the sense that the run-time environment + is thus more UNIX-like. + + Wed Sep 20 02:24:51 1995 Craig Burley (burley@gnu.ai.mit.edu) + + * libF77/Makefile.in, libI77/Makefile.in: Comment out `ld -r -x' + and `mv' line pairs, since `-x' isn't supported on systems + such as Solaris, and these lines don't seem to do anything + useful after all. + Wed Aug 30 15:58:35 1995 Craig Burley (burley@gnu.ai.mit.edu) diff -rcp2N g77-0.5.16/f/runtime/libF77/Makefile.in g77-0.5.17/f/runtime/libF77/Makefile.in *** g77-0.5.16/f/runtime/libF77/Makefile.in Wed Aug 30 15:50:29 1995 --- g77-0.5.17/f/runtime/libF77/Makefile.in Tue Sep 5 13:59:15 1995 *************** CROSS = @CROSS@ *** 53,58 **** .c.o: $(CC) -c -DSkip_f2c_Undefs $(ALL_CFLAGS) $(CGFLAGS) $< ! ld -r -x -o $@x $@ ! mv $@x $@ MISC = F77_aloc.o VersionF.o main.o s_rnge.o abort_.o getarg_.o iargc_.o\ --- 53,60 ---- .c.o: $(CC) -c -DSkip_f2c_Undefs $(ALL_CFLAGS) $(CGFLAGS) $< ! # Next two lines were removed because Solaris doesn't like `ld -x', and ! # it seems there's no real benefit to doing this anyway. ! # ld -r -x -o $@x $@ ! # mv $@x $@ MISC = F77_aloc.o VersionF.o main.o s_rnge.o abort_.o getarg_.o iargc_.o\ *************** install: *** 101,106 **** VersionF.o: Version.c $(CC) -c $(CGFLAGS) -o $@ $(srcdir)/Version.c ! ld -r -x -o $@x $@ ! mv $@x $@ clean: --- 103,110 ---- VersionF.o: Version.c $(CC) -c $(CGFLAGS) -o $@ $(srcdir)/Version.c ! # Next two lines were removed because Solaris doesn't like `ld -x', and ! # it seems there's no real benefit to doing this anyway. ! # ld -r -x -o $@x $@ ! # mv $@x $@ clean: diff -rcp2N g77-0.5.16/f/runtime/libF77/README g77-0.5.17/f/runtime/libF77/README *** g77-0.5.16/f/runtime/libF77/README Sun Feb 12 01:06:46 1995 --- g77-0.5.17/f/runtime/libF77/README Thu Nov 16 04:57:27 1995 *************** requirement that the left-hand side of a *** 100,101 **** --- 100,112 ---- be involved in the right-hand side, compile s_cat.c and s_copy.c with -DNO_OVERWRITE . + + If your system lacks a ranlib command, you don't need it. + Either comment out the makefile's ranlib invocation, or install + a harmless "ranlib" command somewhere in your PATH, such as the + one-line shell script + + exit 0 + + or (on some systems) + + exec /usr/bin/ar lts $1 >/dev/null diff -rcp2N g77-0.5.16/f/runtime/libF77/Version.c g77-0.5.17/f/runtime/libF77/Version.c *** g77-0.5.16/f/runtime/libF77/Version.c Wed Aug 30 14:27:17 1995 --- g77-0.5.17/f/runtime/libF77/Version.c Sat Nov 18 19:44:18 1995 *************** *** 1,8 **** ! static char junk[] = "\n@(#)LIBF77 VERSION 2.01 29 Aug. 1995\n"; /* */ ! char __G77_LIBF77_VERSION__[] = "0.5.16"; /* --- 1,8 ---- ! static char junk[] = "\n@(#)LIBF77 VERSION 2.01 6 Sept. 1995\n"; /* */ ! char __G77_LIBF77_VERSION__[] = "0.5.17"; /* *************** char __G77_LIBF77_VERSION__[] = "0.5.16" *** 43,46 **** --- 43,47 ---- 30 May 1995: added subroutine exit(rc) integer rc. Version not changed. 29 Aug. 1995: add F77_aloc.c; use it in s_cat.c and system_.c. + 6 Sept. 1995: fix return type of system_ under -DKR_headers. */ diff -rcp2N g77-0.5.16/f/runtime/libF77/s_paus.c g77-0.5.17/f/runtime/libF77/s_paus.c *** g77-0.5.16/f/runtime/libF77/s_paus.c Fri Nov 18 16:26:22 1994 --- g77-0.5.17/f/runtime/libF77/s_paus.c Mon Oct 23 09:28:33 1995 *************** s_paus(char *s, ftnlen n) *** 61,65 **** s_1paus(stdin); else { ! #ifdef MSDOS FILE *fin; fin = fopen("con", "r"); --- 61,65 ---- s_1paus(stdin); else { ! #if defined (MSDOS) && !defined (GO32) FILE *fin; fin = fopen("con", "r"); diff -rcp2N g77-0.5.16/f/runtime/libI77/Makefile.in g77-0.5.17/f/runtime/libI77/Makefile.in *** g77-0.5.16/f/runtime/libI77/Makefile.in Wed Aug 30 15:49:06 1995 --- g77-0.5.17/f/runtime/libI77/Makefile.in Tue Sep 5 13:59:29 1995 *************** CROSS = @CROSS@ *** 53,58 **** .c.o: $(CC) -c -DSkip_f2c_Undefs $(ALL_CFLAGS) $(CGFLAGS) $< ! ld -r -x -o $@x $@ ! mv $@x $@ OBJ = VersionI.o backspace.o close.o dfe.o dolio.o due.o endfile.o err.o \ --- 53,60 ---- .c.o: $(CC) -c -DSkip_f2c_Undefs $(ALL_CFLAGS) $(CGFLAGS) $< ! # Next two lines were removed because Solaris doesn't like `ld -x', and ! # it seems there's no real benefit to doing this anyway. ! # ld -r -x -o $@x $@ ! # mv $@x $@ OBJ = VersionI.o backspace.o close.o dfe.o dolio.o due.o endfile.o err.o \ *************** install: *** 83,88 **** VersionI.o: Version.c $(CC) -c $(CGFLAGS) -o $@ $(srcdir)/Version.c ! ld -r -x -o $@x $@ ! mv $@x $@ clean: --- 85,92 ---- VersionI.o: Version.c $(CC) -c $(CGFLAGS) -o $@ $(srcdir)/Version.c ! # Next two lines were removed because Solaris doesn't like `ld -x', and ! # it seems there's no real benefit to doing this anyway. ! # ld -r -x -o $@x $@ ! # mv $@x $@ clean: diff -rcp2N g77-0.5.16/f/runtime/libI77/README g77-0.5.17/f/runtime/libI77/README *** g77-0.5.16/f/runtime/libI77/README Thu Aug 17 06:19:07 1995 --- g77-0.5.17/f/runtime/libI77/README Thu Nov 16 04:57:32 1995 *************** to omit this feature, compile rsne.c wit *** 148,151 **** --- 148,155 ---- 3. Namelist writes now insert newlines before each variable; to omit this feature, compile xwsne.c with -DNo_Extra_Namelist_Newlines. + 4. (Sept. 1995) When looking for the &name that starts namelist + input, lines whose first non-blank character is something other + than &, $, or ? are treated as comment lines and ignored, unless + rsne.c is compiled with -DNo_Namelist_Comments. Nonstandard extension (Feb. 1993) to open: for sequential files, *************** a zero before the decimal point. By def *** 185,186 **** --- 189,201 ---- superfluous zeros, but you can cause them to appear by compiling lwrite.c, wref.c, and wrtfmt.c with -DWANT_LEAD_0 . + + If your system lacks a ranlib command, you don't need it. + Either comment out the makefile's ranlib invocation, or install + a harmless "ranlib" command somewhere in your PATH, such as the + one-line shell script + + exit 0 + + or (on some systems) + + exec /usr/bin/ar lts $1 >/dev/null diff -rcp2N g77-0.5.16/f/runtime/libI77/Version.c g77-0.5.17/f/runtime/libI77/Version.c *** g77-0.5.16/f/runtime/libI77/Version.c Wed Aug 30 14:27:18 1995 --- g77-0.5.17/f/runtime/libI77/Version.c Sat Nov 18 19:44:18 1995 *************** *** 1,8 **** ! static char junk[] = "\n@(#) LIBI77 VERSION pjw,dmg-mods 29 Aug. 1995\n"; /* */ ! char __G77_LIBI77_VERSION__[] = "0.5.16"; /* --- 1,8 ---- ! static char junk[] = "\n@(#) LIBI77 VERSION pjw,dmg-mods 19951011\n"; /* */ ! char __G77_LIBI77_VERSION__[] = "0.5.17"; /* *************** wrtfmt.c: *** 217,220 **** --- 217,235 ---- an earlier position than some previous item. */ /* 29 Aug. 1995: backspace.c: adjust MSDOS logic. */ + /* 6 Sept. 1995: Adjust namelist input to treat a subscripted name + whose subscripts do not involve colons similarly + to the name without a subscript: accept several + values, stored in successive elements starting at + the indicated subscript. Adjust namelist output + to quote character strings (avoiding confusion with + arrays of character strings). Adjust f_init calls + for people who don't use libF77's main(); now open and + namelist read statements invoke f_init if needed. */ + /* 7 Sept. 1995: Fix some bugs with -DAllow_TYQUAD (for integer*8). + Add -DNo_Namelist_Comments lines to rsne.c. */ + /* 5 Oct. 1995: wrtfmt.c: fix bug with t editing (f__cursor was not + always zeroed in mv_cur). */ + /* 11 Oct. 1995: move defs of f__hiwater, f__svic, f__icptr from wrtfmt.c + to err.c */ #include "stdio.h" diff -rcp2N g77-0.5.16/f/runtime/libI77/backspace.c g77-0.5.17/f/runtime/libI77/backspace.c *** g77-0.5.16/f/runtime/libI77/backspace.c Wed Aug 30 14:27:19 1995 --- g77-0.5.17/f/runtime/libI77/backspace.c Mon Oct 23 08:59:32 1995 *************** integer f_back(alist *a) *** 8,12 **** { unit *b; int i, n, ndec; ! #ifdef MSDOS int j, k; long w, z; --- 8,12 ---- { unit *b; int i, n, ndec; ! #if defined (MSDOS) && !defined (GO32) int j, k; long w, z; *************** integer f_back(alist *a) *** 48,52 **** return(0); } ! #ifdef MSDOS w = -1; #endif --- 48,52 ---- return(0); } ! #if defined (MSDOS) && !defined (GO32) w = -1; #endif *************** integer f_back(alist *a) *** 63,67 **** { if(buf[i]!='\n') continue; ! #ifdef MSDOS for(j = k = 0; j <= i; j++) if (buf[j] == '\n') --- 63,67 ---- { if(buf[i]!='\n') continue; ! #if defined (MSDOS) && !defined (GO32) for(j = k = 0; j <= i; j++) if (buf[j] == '\n') *************** integer f_back(alist *a) *** 85,89 **** return(0); } ! #ifdef MSDOS break2: #endif --- 85,89 ---- return(0); } ! #if defined (MSDOS) && !defined (GO32) break2: #endif diff -rcp2N g77-0.5.16/f/runtime/libI77/close.c g77-0.5.17/f/runtime/libI77/close.c *** g77-0.5.16/f/runtime/libI77/close.c Fri Nov 18 16:17:45 1994 --- g77-0.5.17/f/runtime/libI77/close.c Mon Oct 23 08:59:32 1995 *************** integer f_clos(a) cllist *a; *** 13,17 **** #endif #else ! #ifdef MSDOS #include "io.h" #else --- 13,17 ---- #endif #else ! #if defined (MSDOS) && !defined (GO32) #include "io.h" #else diff -rcp2N g77-0.5.16/f/runtime/libI77/endfile.c g77-0.5.17/f/runtime/libI77/endfile.c *** g77-0.5.16/f/runtime/libI77/endfile.c Sun Feb 12 01:06:48 1995 --- g77-0.5.17/f/runtime/libI77/endfile.c Mon Oct 23 08:59:32 1995 *************** extern char *strcpy(); *** 19,23 **** #endif #else ! #ifdef MSDOS #include "io.h" #endif --- 19,23 ---- #endif #else ! #if defined (MSDOS) && !defined (GO32) #include "io.h" #endif diff -rcp2N g77-0.5.16/f/runtime/libI77/err.c g77-0.5.17/f/runtime/libI77/err.c *** g77-0.5.16/f/runtime/libI77/err.c Sun Feb 12 01:06:48 1995 --- g77-0.5.17/f/runtime/libI77/err.c Thu Nov 16 04:57:27 1995 *************** unit f__units[MXUNIT]; /*unit table*/ *** 22,25 **** --- 22,26 ---- flag f__init; /*0 on entry, 1 after initializations*/ cilist *f__elist; /*active external io list*/ + icilist *f__svic; /*active internal io list*/ flag f__reading; /*1 if reading, 0 if writing*/ flag f__cplus,f__cblank; *************** FILE *f__cf; /*current file*/ *** 40,44 **** unit *f__curunit; /*current unit*/ int f__recpos; /*place in current record*/ ! int f__cursor,f__scale; /*error messages*/ --- 41,46 ---- unit *f__curunit; /*current unit*/ int f__recpos; /*place in current record*/ ! int f__cursor, f__hiwater, f__scale; ! char *f__icptr; /*error messages*/ diff -rcp2N g77-0.5.16/f/runtime/libI77/fio.h g77-0.5.17/f/runtime/libI77/fio.h *** g77-0.5.16/f/runtime/libI77/fio.h Fri Nov 18 16:17:52 1994 --- g77-0.5.17/f/runtime/libI77/fio.h Mon Oct 23 08:59:32 1995 *************** *** 12,16 **** #endif ! #ifdef MSDOS #ifndef NON_UNIX_STDIO #define NON_UNIX_STDIO --- 12,16 ---- #endif ! #if defined (MSDOS) && !defined (GO32) #ifndef NON_UNIX_STDIO #define NON_UNIX_STDIO *************** typedef struct *** 28,32 **** { FILE *ufd; /*0=unconnected*/ char *ufnm; ! #ifndef MSDOS long uinode; int udev; --- 28,32 ---- { FILE *ufd; /*0=unconnected*/ char *ufnm; ! #if !(defined (MSDOS) && !defined (GO32)) long uinode; int udev; diff -rcp2N g77-0.5.16/f/runtime/libI77/fmt.h g77-0.5.17/f/runtime/libI77/fmt.h *** g77-0.5.16/f/runtime/libI77/fmt.h Fri Nov 18 16:17:54 1994 --- g77-0.5.17/f/runtime/libI77/fmt.h Thu Nov 16 04:57:25 1995 *************** extern int f__scale; *** 81,82 **** --- 81,96 ---- #define PUT(x) (*f__putn)(x) extern int f__cursor; + + #undef TYQUAD + #ifndef Allow_TYQUAD + #undef longint + #define longint long + #else + #define TYQUAD 14 + #endif + + #ifdef KR_headers + extern char *f__icvt(); + #else + extern char *f__icvt(longint, int*, int*, int); + #endif diff -rcp2N g77-0.5.16/f/runtime/libI77/fmtlib.c g77-0.5.17/f/runtime/libI77/fmtlib.c *** g77-0.5.16/f/runtime/libI77/fmtlib.c Fri Nov 18 16:17:56 1994 --- g77-0.5.17/f/runtime/libI77/fmtlib.c Thu Nov 16 04:57:25 1995 *************** *** 1,28 **** /* @(#)fmtlib.c 1.2 */ #define MAXINTLENGTH 23 #ifdef KR_headers ! char *f__icvt(value,ndigit,sign, base) long value; int *ndigit,*sign; register int base; #else ! char *f__icvt(long value, int *ndigit, int *sign, int base) #endif { static char buf[MAXINTLENGTH+1]; register int i; ! if(value>0) *sign=0; ! else if(value<0) ! { value = -value; ! *sign= 1; ! } ! else ! { *sign=0; ! *ndigit=1; ! buf[MAXINTLENGTH]='0'; ! return(&buf[MAXINTLENGTH]); ! } ! for(i=MAXINTLENGTH-1;value>0;i--) ! { *(buf+i)=(int)(value%base)+'0'; value /= base; } - *ndigit=MAXINTLENGTH-1-i; - return(&buf[i+1]); - } --- 1,39 ---- /* @(#)fmtlib.c 1.2 */ #define MAXINTLENGTH 23 + + #include "f2c.h" + #ifndef Allow_TYQUAD + #undef longint + #define longint long + #endif + #ifdef KR_headers ! char *f__icvt(value,ndigit,sign, base) longint value; int *ndigit,*sign; register int base; #else ! char *f__icvt(longint value, int *ndigit, int *sign, int base) #endif { static char buf[MAXINTLENGTH+1]; register int i; ! ! if(value > 0) ! *sign = 0; ! else if (value < 0) { ! value = -value; ! *sign = 1; ! } ! else { ! *sign = 0; ! *ndigit = 1; ! buf[MAXINTLENGTH-1] = '0'; ! return &buf[MAXINTLENGTH-1]; ! } ! i = MAXINTLENGTH; ! do { ! buf[--i] = (value%base) + '0'; value /= base; + } + while(value > 0); + *ndigit = MAXINTLENGTH - i; + return &buf[i]; } diff -rcp2N g77-0.5.16/f/runtime/libI77/inquire.c g77-0.5.17/f/runtime/libI77/inquire.c *** g77-0.5.16/f/runtime/libI77/inquire.c Fri Nov 18 16:18:00 1994 --- g77-0.5.17/f/runtime/libI77/inquire.c Mon Oct 23 08:59:32 1995 *************** *** 4,8 **** integer f_inqu(a) inlist *a; #else ! #ifdef MSDOS #undef abs #undef min --- 4,8 ---- integer f_inqu(a) inlist *a; #else ! #if defined (MSDOS) && !defined (GO32) #undef abs #undef min diff -rcp2N g77-0.5.16/f/runtime/libI77/lio.h g77-0.5.17/f/runtime/libI77/lio.h *** g77-0.5.16/f/runtime/libI77/lio.h Fri Nov 18 16:18:01 1994 --- g77-0.5.17/f/runtime/libI77/lio.h Thu Nov 16 04:57:25 1995 *************** *** 24,27 **** --- 24,28 ---- #define TYLOGICAL2 13 #ifdef Allow_TYQUAD + #undef TYQUAD #define TYQUAD 14 #endif diff -rcp2N g77-0.5.16/f/runtime/libI77/lread.c g77-0.5.17/f/runtime/libI77/lread.c *** g77-0.5.16/f/runtime/libI77/lread.c Wed Mar 15 12:47:54 1995 --- g77-0.5.17/f/runtime/libI77/lread.c Thu Nov 16 04:57:25 1995 *************** *** 7,10 **** --- 7,16 ---- extern char *f__fmtbuf; + + #ifdef Allow_TYQUAD + static longint f__llx; + static int quad_read; + #endif + #ifdef KR_headers extern double atof(); *************** l_R(int poststar) *** 103,106 **** --- 109,115 ---- f__lcount = 1; } + #ifdef Allow_TYQUAD + f__llx = 0; + #endif f__ltype = 0; exp = 0; *************** bad: *** 185,188 **** --- 194,213 ---- sp[1] = 0; f__lx = atof(s); + #ifdef Allow_TYQUAD + if (quad_read && (se = sp - sp1 + exp) > 14 && se < 20) { + /* Assuming 64-bit longint and 32-bit long. */ + if (exp < 0) + sp += exp; + if (sp1 <= sp) { + f__llx = *sp1 - '0'; + while(++sp1 <= sp) + f__llx = 10*f__llx + (*sp1 - '0'); + } + while(--exp >= 0) + f__llx *= 10; + if (*s == '-') + f__llx = -f__llx; + } + #endif } else *************** l_C(Void) *** 281,284 **** --- 306,312 ---- f__ly = f__lx; f__lx = lz; + #ifdef Allow_TYQUAD + f__llx = 0; + #endif nml_read = nml_save; return(0); *************** c_le(cilist *a) *** 457,460 **** --- 485,490 ---- #endif { + if(!f__init) + f_init(); f__fmtbuf="list io"; if(a->ciunit>=MXUNIT || a->ciunit<0) *************** l_read(ftnint *number, char *ptr, ftnlen *** 513,523 **** case TYSHORT: case TYLONG: - #ifdef TYQUAD - case TYQUAD: - #endif case TYREAL: case TYDREAL: ERR(l_R(0)); break; case TYCOMPLEX: case TYDCOMPLEX: --- 543,559 ---- case TYSHORT: case TYLONG: case TYREAL: case TYDREAL: ERR(l_R(0)); break; + #ifdef TYQUAD + case TYQUAD: + quad_read = 1; + n = l_R(0); + quad_read = 0; + if (n) + return n; + break; + #endif case TYCOMPLEX: case TYDCOMPLEX: *************** l_read(ftnint *number, char *ptr, ftnlen *** 561,567 **** Ptr->flint=f__lx; break; ! #ifdef TYQUAD case TYQUAD: ! Ptr->fllongint = f__lx; break; #endif --- 597,604 ---- Ptr->flint=f__lx; break; ! #ifdef Allow_TYQUAD case TYQUAD: ! if (!(Ptr->fllongint = f__llx)) ! Ptr->fllongint = f__lx; break; #endif *************** integer s_rsle(cilist *a) *** 603,607 **** int n; - if(!f__init) f_init(); if(n=c_le(a)) return(n); f__reading=1; --- 640,643 ---- diff -rcp2N g77-0.5.16/f/runtime/libI77/lwrite.c g77-0.5.17/f/runtime/libI77/lwrite.c *** g77-0.5.16/f/runtime/libI77/lwrite.c Thu Aug 17 06:19:07 1995 --- g77-0.5.17/f/runtime/libI77/lwrite.c Thu Nov 16 04:57:26 1995 *************** *** 3,7 **** --- 3,9 ---- #include "fmt.h" #include "lio.h" + ftnint L_len; + int f__Aquote; static VOID *************** t_putc(int c) *** 24,41 **** static VOID #ifdef KR_headers ! lwrt_I(n) long n; #else ! lwrt_I(long n) #endif { ! char buf[LINTW],*p; ! #ifdef USE_STRLEN ! (void) sprintf(buf," %ld",n); ! if(f__recpos+strlen(buf)>=L_len) ! #else ! if(f__recpos + sprintf(buf," %ld",n) >= L_len) ! #endif donewrec(); ! for(p=buf;*p;PUT(*p++)); } static VOID --- 26,45 ---- static VOID #ifdef KR_headers ! lwrt_I(n) longint n; #else ! lwrt_I(longint n) #endif { ! char *p; ! int ndigit, sign; ! ! p = f__icvt(n, &ndigit, &sign, 10); ! if(f__recpos + ndigit >= L_len) donewrec(); ! PUT(' '); ! if (sign) ! PUT('-'); ! while(*p) ! PUT(*p++); } static VOID *************** lwrt_A(char *p, ftnlen len) *** 57,68 **** #endif { ! int i; ! if(f__recpos+len>=L_len) donewrec(); #ifndef OMIT_BLANK_CC ! if (!f__recpos) ! PUT(' '); #endif ! for(i=0;i 1 && p[len-1] == ' ') { ! while(--len > 1 && p[len-1] == ' '); ! pe = p + len; ! } ! p1 = p; ! while(p1 < pe) ! if (*p1++ == '\'') ! a++; ! } ! if(f__recpos+len+a >= L_len) donewrec(); + if (a #ifndef OMIT_BLANK_CC ! || !f__recpos #endif ! ) ! PUT(' '); ! if (a) { ! PUT('\''); ! while(p < pe) { ! if (*p == '\'') ! PUT('\''); ! PUT(*p++); ! } ! PUT('\''); ! } ! else ! while(p < pe) ! PUT(*p++); } *************** l_write(ftnint *number, char *ptr, ftnle *** 216,220 **** #define Ptr ((flex *)ptr) int i; ! long x; double y,z; real *xx; --- 248,252 ---- #define Ptr ((flex *)ptr) int i; ! longint x; double y,z; real *xx; *************** l_write(ftnint *number, char *ptr, ftnle *** 231,235 **** x=Ptr->flshort; goto xint; ! #ifdef TYQUAD case TYQUAD: x = Ptr->fllongint; --- 263,267 ---- x=Ptr->flshort; goto xint; ! #ifdef Allow_TYQUAD case TYQUAD: x = Ptr->fllongint; diff -rcp2N g77-0.5.16/f/runtime/libI77/open.c g77-0.5.17/f/runtime/libI77/open.c *** g77-0.5.16/f/runtime/libI77/open.c Sun Aug 20 17:06:09 1995 --- g77-0.5.17/f/runtime/libI77/open.c Thu Nov 16 05:08:30 1995 *************** integer f_open(olist *a) *** 82,88 **** struct stat stb; #endif - if(!f__init) f_init(); if(a->ounit>=MXUNIT || a->ounit<0) err(a->oerr,101,"open") f__curunit = b = &f__units[a->ounit]; if(b->ufd) { --- 82,89 ---- struct stat stb; #endif if(a->ounit>=MXUNIT || a->ounit<0) err(a->oerr,101,"open") + if (!f__init) + f_init(); f__curunit = b = &f__units[a->ounit]; if(b->ufd) { diff -rcp2N g77-0.5.16/f/runtime/libI77/rawio.h g77-0.5.17/f/runtime/libI77/rawio.h *** g77-0.5.16/f/runtime/libI77/rawio.h Mon Aug 7 08:17:41 1995 --- g77-0.5.17/f/runtime/libI77/rawio.h Mon Oct 23 08:59:32 1995 *************** *** 2,6 **** extern FILE *fdopen(); #else ! #ifdef MSDOS #include "io.h" #define close _close --- 2,6 ---- extern FILE *fdopen(); #else ! #if defined (MSDOS) && !defined (GO32) #include "io.h" #define close _close *************** extern FILE *fdopen(); *** 13,17 **** extern "C" { #endif ! #ifndef MSDOS #ifdef OPEN_DECL extern int creat(const char*,int), open(const char*,int); --- 13,17 ---- extern "C" { #endif ! #if !(defined (MSDOS) && !defined (GO32)) #ifdef OPEN_DECL extern int creat(const char*,int), open(const char*,int); diff -rcp2N g77-0.5.16/f/runtime/libI77/rdfmt.c g77-0.5.17/f/runtime/libI77/rdfmt.c *** g77-0.5.16/f/runtime/libI77/rdfmt.c Fri Nov 18 16:18:08 1994 --- g77-0.5.17/f/runtime/libI77/rdfmt.c Thu Nov 16 04:57:26 1995 *************** rd_I(n,w,len, base) Uint *n; int w; ftnl *** 98,102 **** rd_I(Uint *n, int w, ftnlen len, register int base) #endif ! { long x; int sign,ch; char s[84], *ps; --- 98,102 ---- rd_I(Uint *n, int w, ftnlen len, register int base) #endif ! { longint x; int sign,ch; char s[84], *ps; diff -rcp2N g77-0.5.16/f/runtime/libI77/rsne.c g77-0.5.17/f/runtime/libI77/rsne.c *** g77-0.5.16/f/runtime/libI77/rsne.c Sun Aug 20 17:06:09 1995 --- g77-0.5.17/f/runtime/libI77/rsne.c Thu Nov 16 05:09:31 1995 *************** *** 32,35 **** --- 32,36 ---- static n_nlcache; static hashentry **zot; + static int colonseen; extern ftnlen f__typesize[]; *************** getdimen(int *chp, dimen *d, ftnlen delt *** 248,251 **** --- 249,253 ---- return 123; x2 /= x3; + colonseen = 1; } if (x2 < 0 || x2 >= extent) *************** x_rsne(cilist *a) *** 295,299 **** #endif { ! int ch, got1, k, n, nd, quote; Namelist *nl; static char where[] = "namelist read"; --- 297,301 ---- #endif { ! int ch, got1, k, n, nd, quote, readall; Namelist *nl; static char where[] = "namelist read"; *************** x_rsne(cilist *a) *** 317,320 **** --- 319,323 ---- for(;;) switch(GETC(ch)) { case EOF: + eof: err(a->ciend,(EOF),where0); case '&': *************** x_rsne(cilist *a) *** 329,333 **** --- 332,342 ---- if (ch <= ' ' && ch >= 0) continue; + #ifndef No_Namelist_Comments + while(GETC(ch) != '\n') + if (ch == EOF) + goto eof; + #else errfl(a->cierr, 115, where0); + #endif } have_amp: *************** x_rsne(cilist *a) *** 405,409 **** size = f__typesize[type]; ivae = size; ! iva = 0; if (ch == '(' /*)*/ ) { dn = dimens; --- 414,418 ---- size = f__typesize[type]; ivae = size; ! iva = readall = 0; if (ch == '(' /*)*/ ) { dn = dimens; *************** x_rsne(cilist *a) *** 427,430 **** --- 436,440 ---- nomax = span = dims[1]; ivae = iva + size*nomax; + colonseen = 0; if (k = getdimen(&ch, dn, size, nomax, &b)) errfl(a->cierr, k, where); *************** x_rsne(cilist *a) *** 448,451 **** --- 458,462 ---- if (ch != ')') errfl(a->cierr, 115, where); + readall = 1 - colonseen; b -= b0; if (b < 0 || b >= nomax) *************** x_rsne(cilist *a) *** 471,474 **** --- 482,487 ---- goto delta_adj; } + if (readall) + goto delta_adj; for(; dn0 < dn; dn0++) { if (dn0->extent != *dims++ || dn0->stride != 1) *************** x_rsne(cilist *a) *** 514,519 **** if (f__lquit == 1) return 0; mustend: ! if (GETC(ch) == '/' || ch == '$' || ch == '&') { f__lquit = 1; return 0; --- 527,558 ---- if (f__lquit == 1) return 0; + if (readall) { + iva += dn0->delta; + if (f__lcount > 0) { + no1 = (ivae - iva)/size; + if (no1 > f__lcount) + no1 = f__lcount; + iva += no1 * dn0->delta; + if (k = l_read(&no1, vaddr + iva, + size, type)) + return k; + } + } mustend: ! GETC(ch); ! if (readall) ! if (iva >= ivae) ! readall = 0; ! else for(;;) { ! switch(ch) { ! case ' ': ! case '\t': ! case '\n': ! GETC(ch); ! continue; ! } ! break; ! } ! if (ch == '/' || ch == '$' || ch == '&') { f__lquit = 1; return 0; *************** x_rsne(cilist *a) *** 528,531 **** --- 567,572 ---- } Ungetc(ch,f__cf); + if (readall && !Alpha[ch & 0xff]) + goto readloop; if ((no -= no1) <= 0) break; *************** s_rsne(cilist *a) *** 552,556 **** int n; - if(!f__init) f_init(); f__external=1; l_eof = 0; --- 593,596 ---- diff -rcp2N g77-0.5.16/f/runtime/libI77/wrtfmt.c g77-0.5.17/f/runtime/libI77/wrtfmt.c *** g77-0.5.16/f/runtime/libI77/wrtfmt.c Thu Aug 17 06:19:08 1995 --- g77-0.5.17/f/runtime/libI77/wrtfmt.c Thu Nov 16 05:00:52 1995 *************** *** 2,52 **** #include "fio.h" #include "fmt.h" ! extern int f__cursor; ! #ifdef KR_headers ! extern char *f__icvt(); ! #else ! extern char *f__icvt(long, int*, int*, int); ! #endif ! int f__hiwater; ! icilist *f__svic; ! char *f__icptr; mv_cur(Void) /* shouldn't use fseek because it insists on calling fflush */ /* instead we know too much about stdio */ { if(f__external == 0) { ! if(f__cursor < 0) { if(f__hiwater < f__recpos) f__hiwater = f__recpos; ! f__recpos += f__cursor; ! f__icptr += f__cursor; ! f__cursor = 0; if(f__recpos < 0) err(f__elist->cierr, 110, "left off"); } ! else if(f__cursor > 0) { ! if(f__recpos + f__cursor >= f__svic->icirlen) err(f__elist->cierr, 110, "recend"); if(f__hiwater <= f__recpos) ! for(; f__cursor > 0; f__cursor--) (*f__putn)(' '); ! else if(f__hiwater <= f__recpos + f__cursor) { ! f__cursor -= f__hiwater - f__recpos; f__icptr += f__hiwater - f__recpos; f__recpos = f__hiwater; ! for(; f__cursor > 0; f__cursor--) (*f__putn)(' '); } else { ! f__icptr += f__cursor; ! f__recpos += f__cursor; } - f__cursor = 0; } return(0); } ! if(f__cursor > 0) { if(f__hiwater <= f__recpos) ! for(;f__cursor>0;f__cursor--) (*f__putn)(' '); ! else if(f__hiwater <= f__recpos + f__cursor) { #if ! defined (NON_UNIX_STDIO) && ! defined (MISSING_FILE_ELEMS) if(f__cf->_ptr + f__hiwater - f__recpos < buf_end(f__cf)) --- 2,48 ---- #include "fio.h" #include "fmt.h" ! ! extern icilist *f__svic; ! extern char *f__icptr; ! ! static int mv_cur(Void) /* shouldn't use fseek because it insists on calling fflush */ /* instead we know too much about stdio */ { + int cursor = f__cursor; + f__cursor = 0; if(f__external == 0) { ! if(cursor < 0) { if(f__hiwater < f__recpos) f__hiwater = f__recpos; ! f__recpos += cursor; ! f__icptr += cursor; if(f__recpos < 0) err(f__elist->cierr, 110, "left off"); } ! else if(cursor > 0) { ! if(f__recpos + cursor >= f__svic->icirlen) err(f__elist->cierr, 110, "recend"); if(f__hiwater <= f__recpos) ! for(; cursor > 0; cursor--) (*f__putn)(' '); ! else if(f__hiwater <= f__recpos + cursor) { ! cursor -= f__hiwater - f__recpos; f__icptr += f__hiwater - f__recpos; f__recpos = f__hiwater; ! for(; cursor > 0; cursor--) (*f__putn)(' '); } else { ! f__icptr += cursor; ! f__recpos += cursor; } } return(0); } ! if(cursor > 0) { if(f__hiwater <= f__recpos) ! for(;cursor>0;cursor--) (*f__putn)(' '); ! else if(f__hiwater <= f__recpos + cursor) { #if ! defined (NON_UNIX_STDIO) && ! defined (MISSING_FILE_ELEMS) if(f__cf->_ptr + f__hiwater - f__recpos < buf_end(f__cf)) *************** mv_cur(Void) /* shouldn't use fseek beca *** 55,89 **** #endif (void) fseek(f__cf, (long) (f__hiwater - f__recpos), SEEK_CUR); ! f__cursor -= f__hiwater - f__recpos; f__recpos = f__hiwater; ! for(; f__cursor > 0; f__cursor--) (*f__putn)(' '); } else { #if ! defined (NON_UNIX_STDIO) && ! defined (MISSING_FILE_ELEMS) ! if(f__cf->_ptr + f__cursor < buf_end(f__cf)) ! f__cf->_ptr += f__cursor; else #endif ! (void) fseek(f__cf, (long)f__cursor, SEEK_CUR); ! f__recpos += f__cursor; } } ! if(f__cursor<0) { ! if(f__cursor+f__recpos<0) err(f__elist->cierr,110,"left off"); #if ! defined (NON_UNIX_STDIO) && ! defined (MISSING_FILE_ELEMS) ! if(f__cf->_ptr + f__cursor >= f__cf->_base) ! f__cf->_ptr += f__cursor; else #endif if(f__curunit && f__curunit->useek) ! (void) fseek(f__cf,(long)f__cursor,SEEK_CUR); else err(f__elist->cierr,106,"fmt"); if(f__hiwater < f__recpos) f__hiwater = f__recpos; ! f__recpos += f__cursor; ! f__cursor=0; } return(0); --- 51,84 ---- #endif (void) fseek(f__cf, (long) (f__hiwater - f__recpos), SEEK_CUR); ! cursor -= f__hiwater - f__recpos; f__recpos = f__hiwater; ! for(; cursor > 0; cursor--) (*f__putn)(' '); } else { #if ! defined (NON_UNIX_STDIO) && ! defined (MISSING_FILE_ELEMS) ! if(f__cf->_ptr + cursor < buf_end(f__cf)) ! f__cf->_ptr += cursor; else #endif ! (void) fseek(f__cf, (long)cursor, SEEK_CUR); ! f__recpos += cursor; } } ! if(cursor<0) { ! if(cursor+f__recpos<0) err(f__elist->cierr,110,"left off"); #if ! defined (NON_UNIX_STDIO) && ! defined (MISSING_FILE_ELEMS) ! if(f__cf->_ptr + cursor >= f__cf->_base) ! f__cf->_ptr += cursor; else #endif if(f__curunit && f__curunit->useek) ! (void) fseek(f__cf,(long)cursor,SEEK_CUR); else err(f__elist->cierr,106,"fmt"); if(f__hiwater < f__recpos) f__hiwater = f__recpos; ! f__recpos += cursor; } return(0); *************** wrt_I(Uint *n, int w, ftnlen len, regist *** 152,156 **** #endif { int ndigit,sign,spare,i; ! long x; char *ans; if(len==sizeof(integer)) x=n->il; --- 147,151 ---- #endif { int ndigit,sign,spare,i; ! longint x; char *ans; if(len==sizeof(integer)) x=n->il; *************** wrt_IM(Uint *n, int w, int m, ftnlen len *** 180,187 **** #endif { int ndigit,sign,spare,i,xsign; ! long x; char *ans; if(sizeof(integer)==len) x=n->il; else if(len == sizeof(char)) x = n->ic; else x=n->is; ans=f__icvt(x,&ndigit,&sign, base); --- 175,185 ---- #endif { int ndigit,sign,spare,i,xsign; ! longint x; char *ans; if(sizeof(integer)==len) x=n->il; else if(len == sizeof(char)) x = n->ic; + #ifdef Allow_TYQUAD + else if (len == sizeof(longint)) x = n->ili; + #endif else x=n->is; ans=f__icvt(x,&ndigit,&sign, base); *************** wrt_AP(char *s) *** 214,218 **** #endif { char quote; ! if(f__cursor && mv_cur()) return(mv_cur()); quote = *s++; for(;*s;s++) --- 212,219 ---- #endif { char quote; ! int i; ! ! if(f__cursor && (i = mv_cur())) ! return i; quote = *s++; for(;*s;s++) *************** wrt_H(int a, char *s) *** 230,234 **** #endif { ! if(f__cursor && mv_cur()) return(mv_cur()); while(a--) (*f__putn)(*s++); return(1); --- 231,238 ---- #endif { ! int i; ! ! if(f__cursor && (i = mv_cur())) ! return i; while(a--) (*f__putn)(*s++); return(1); *************** w_ed(struct syl *p, char *ptr, ftnlen le *** 314,318 **** #endif { ! if(f__cursor && mv_cur()) return(mv_cur()); switch(p->op) { --- 318,325 ---- #endif { ! int i; ! ! if(f__cursor && (i = mv_cur())) ! return i; switch(p->op) { diff -rcp2N g77-0.5.16/f/runtime/libI77/wsle.c g77-0.5.17/f/runtime/libI77/wsle.c *** g77-0.5.16/f/runtime/libI77/wsle.c Fri Nov 18 16:18:24 1994 --- g77-0.5.17/f/runtime/libI77/wsle.c Thu Nov 16 04:57:24 1995 *************** integer s_wsle(cilist *a) *** 11,15 **** { int n; - if(!f__init) f_init(); if(n=c_le(a)) return(n); f__reading=0; --- 11,14 ---- diff -rcp2N g77-0.5.16/f/runtime/libI77/wsne.c g77-0.5.17/f/runtime/libI77/wsne.c *** g77-0.5.16/f/runtime/libI77/wsne.c Fri Nov 18 16:18:25 1994 --- g77-0.5.17/f/runtime/libI77/wsne.c Thu Nov 16 04:57:24 1995 *************** s_wsne(cilist *a) *** 12,17 **** int n; - if(!f__init) - f_init(); if(n=c_le(a)) return(n); --- 12,15 ---- diff -rcp2N g77-0.5.16/f/runtime/libI77/xwsne.c g77-0.5.17/f/runtime/libI77/xwsne.c *** g77-0.5.16/f/runtime/libI77/xwsne.c Fri Nov 18 16:18:26 1994 --- g77-0.5.17/f/runtime/libI77/xwsne.c Thu Nov 16 04:57:24 1995 *************** *** 4,7 **** --- 4,9 ---- #include "fmt.h" + extern int f__Aquote; + static VOID nl_donewrec(Void) *************** x_wsne(cilist *a) *** 34,37 **** --- 36,40 ---- PUT(*s); PUT(' '); + f__Aquote = 1; vd = nl->vars; vde = vd + nl->nvars; *************** x_wsne(cilist *a) *** 65,68 **** --- 68,72 ---- nl_donewrec(); } + f__Aquote = 0; PUT('/'); } diff -rcp2N g77-0.5.16/f/sta.c g77-0.5.17/f/sta.c *** g77-0.5.16/f/sta.c Wed Aug 30 15:53:35 1995 --- g77-0.5.17/f/sta.c Thu Nov 2 05:08:48 1995 *************** ffesta_add_possible_nonexec_ (ffelexHand *** 200,204 **** Invokes ffestc_exec_transition, but first enables ffebad and ffesta and ! afterwards disables them again. Then returns the result of the invoke. */ static bool --- 200,205 ---- Invokes ffestc_exec_transition, but first enables ffebad and ffesta and ! afterwards disables them again. Then returns the result of the ! invocation of ffestc_exec_transition. */ static bool *************** ffesta_save_ (ffelexToken t) *** 330,334 **** } ! next_handler: /* :::::::::::::::::::: */ /* Note that a shutdown also happens after seeing the first two tokens --- 331,335 ---- } ! next_handler: /* :::::::::::::::::::: */ /* Note that a shutdown also happens after seeing the first two tokens *************** next_handler: /* :::::::::::::::::::: *** 410,420 **** { /* Switching from [empty?] list of nonexecs to nonempty list of execs at this point. */ - if (!ffesta_seen_first_exec) - { /* Make sure ffestc_exec_transition() - returned TRUE, fyi; it should be tested in - the if statement that sends us here. */ - ffesta_seen_first_exec = TRUE; - ffestd_exec_begin (); - } ffesta_tokens[0] = ffelex_token_use (ffesta_token_0_); ffesymbol_set_retractable (ffesta_scratch_pool); --- 411,414 ---- *************** ffesta_second_ (ffelexToken t) *** 1141,1157 **** else if (ffesta_seen_first_exec) ; /* Have an exec stmt after exec transition. */ ! else if (ffestc_exec_transition ()) ! { /* Have an exec stmt before the exec ! transition AND our statement state allows ! such a transition at this point, in which ! case f_e_t_ updates that state and returns ! TRUE. */ ! ffesta_seen_first_exec = TRUE; ! ffestd_exec_begin (); ! } ! else /* Can't do exec stmt yet. */ goto no_stmts; /* :::::::::::::::::::: */ - /* 1 exec stmt only, but not valid in context, so pretend as though - statement is unrecognized. */ break; --- 1135,1142 ---- else if (ffesta_seen_first_exec) ; /* Have an exec stmt after exec transition. */ ! else if (!ffestc_exec_transition ()) ! /* 1 exec stmt only, but not valid in context, so pretend as though ! statement is unrecognized. */ goto no_stmts; /* :::::::::::::::::::: */ break; *************** ffesta_second_ (ffelexToken t) *** 1167,1180 **** if (!ffesta_seen_first_exec) { /* Need to do exec transition now. */ ! if (ffestc_exec_transition ()) ! { /* Have an exec stmt before the exec ! transition AND our statement state allows ! such a transition at this point, in which ! case f_e_t_ updates that state and returns ! TRUE. */ ! ffesta_seen_first_exec = TRUE; ! ffestd_exec_begin (); ! } ! else goto no_stmts; /* :::::::::::::::::::: */ } --- 1152,1156 ---- if (!ffesta_seen_first_exec) { /* Need to do exec transition now. */ ! if (!ffestc_exec_transition ()) goto no_stmts; /* :::::::::::::::::::: */ } diff -rcp2N g77-0.5.16/f/stc.c g77-0.5.17/f/stc.c *** g77-0.5.16/f/stc.c Wed Aug 30 15:53:34 1995 --- g77-0.5.17/f/stc.c Sat Nov 18 19:44:19 1995 *************** ffestc_promote_sfdummy_ (ffelexToken t) *** 4448,4465 **** ffesymbol_set_state (sp, FFESYMBOL_stateSEEN); ffesymbol_set_attrs (sp, na); ! if (!ffeimplic_establish_symbol (sp)) ffesymbol_error (sp, t); ! if ((ffesymbol_basictype (sp) == FFEINFO_basictypeCHARACTER) ! && (ffesymbol_size (sp) == FFETARGET_charactersizeNONE)) ! ffesymbol_error (sp, t); ! ffesymbol_signal_unreported (sp); ! ffesymbol_set_info (s, ! ffeinfo_new (ffesymbol_basictype (sp), ! ffesymbol_kindtype (sp), ! 0, ! FFEINFO_kindENTITY, ! FFEINFO_whereDUMMY, ! ffesymbol_size (sp))); } --- 4448,4465 ---- ffesymbol_set_state (sp, FFESYMBOL_stateSEEN); ffesymbol_set_attrs (sp, na); ! if (!ffeimplic_establish_symbol (sp) ! || ((ffesymbol_basictype (sp) == FFEINFO_basictypeCHARACTER) ! && (ffesymbol_size (sp) == FFETARGET_charactersizeNONE))) ffesymbol_error (sp, t); ! else ! ffesymbol_set_info (s, ! ffeinfo_new (ffesymbol_basictype (sp), ! ffesymbol_kindtype (sp), ! 0, ! FFEINFO_kindENTITY, ! FFEINFO_whereDUMMY, ! ffesymbol_size (sp))); ! ffesymbol_signal_unreported (sp); } *************** ffestc_eof () *** 5611,5615 **** which, say, a CONTINUE statement would be valid, then enter the state we'd be in after seeing CONTINUE (without, of course, generating any ! CONTINUE code) and return TRUE. Otherwise return FALSE. This function cannot be invoked once the first executable statement --- 5611,5616 ---- which, say, a CONTINUE statement would be valid, then enter the state we'd be in after seeing CONTINUE (without, of course, generating any ! CONTINUE code), call ffestd_exec_begin, and return TRUE. Otherwise ! return FALSE. This function cannot be invoked once the first executable statement *************** ffestc_eof () *** 5621,5629 **** the error message, should subsequent statements still be interpreted as being within the construct, or should the construct be terminated upon ! seeing the unrecognized statement? we do the former at the moment). ! ! 28-Nov-90 JCB 1.1 ! Must allow BLOCKDATA transitions also, else the END statement for one ! won't be recognized. */ bool --- 5622,5626 ---- the error message, should subsequent statements still be interpreted as being within the construct, or should the construct be terminated upon ! seeing the unrecognized statement? we do the former at the moment). */ bool *************** recurse: *** 5684,5687 **** --- 5681,5688 ---- if (update) ffestw_update (NULL); /* Update state line/col info. */ + + ffesta_seen_first_exec = TRUE; + ffestd_exec_begin (); + return TRUE; } *************** ffestc_R501_item (ffelexToken name, ffeb *** 6354,6358 **** if (!ffesta_is_entry_valid ! && ((na & (FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY) == (FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY)))) na = FFESYMBOL_attrsetNONE; --- 6355,6359 ---- if (!ffesta_is_entry_valid ! && (((na & (FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY)) == (FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY)))) na = FFESYMBOL_attrsetNONE; *************** ffestc_R819A (ffelexToken construct_name *** 9305,9310 **** case FFEBLD_opSYMTER: if ((ffeinfo_basictype (ffebld_info (var)) == FFEINFO_basictypeREAL) ! && !ffe_is_pedantic () ! && !ffe_is_ugly ()) { ffebad_start (FFEBAD_DO_REAL); /* See error message!!! */ --- 9306,9310 ---- case FFEBLD_opSYMTER: if ((ffeinfo_basictype (ffebld_info (var)) == FFEINFO_basictypeREAL) ! && ffe_is_warn_surprising ()) { ffebad_start (FFEBAD_DO_REAL); /* See error message!!! */ *************** ffestc_R820A (ffelexToken construct_name *** 9472,9477 **** case FFEBLD_opSYMTER: if ((ffeinfo_basictype (ffebld_info (var)) == FFEINFO_basictypeREAL) ! && !ffe_is_pedantic () ! && !ffe_is_ugly ()) { ffebad_start (FFEBAD_DO_REAL); /* See error message!!! */ --- 9472,9476 ---- case FFEBLD_opSYMTER: if ((ffeinfo_basictype (ffebld_info (var)) == FFEINFO_basictypeREAL) ! && ffe_is_warn_surprising ()) { ffebad_start (FFEBAD_DO_REAL); /* See error message!!! */ diff -rcp2N g77-0.5.16/f/ste.c g77-0.5.17/f/ste.c *** g77-0.5.16/f/ste.c Wed Aug 30 15:53:34 1995 --- g77-0.5.17/f/ste.c Fri Nov 10 19:16:00 1995 *************** ffeste_begin_iterdo_ (ffestw block, tree *** 432,437 **** expand_start_loop_continue_elsewhere (1)); ! expr = ffecom_truth_value (ffecom_2 (GT_EXPR, integer_type_node, ! ffecom_2 (POSTDECREMENT_EXPR, ffecom_integer_type_node, niters, --- 432,437 ---- expand_start_loop_continue_elsewhere (1)); ! expr = ffecom_truth_value (ffecom_2 (GE_EXPR, integer_type_node, ! ffecom_2 (PREDECREMENT_EXPR, ffecom_integer_type_node, niters, *************** ffeste_io_cilist_ (bool have_err, *** 1074,1079 **** if (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (formatexp))) < GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (null_pointer_node)))) ! error ("Cannot safely convert to assigned-FORMAT an expression\ ! narrower than a pointer"); formatexp = convert (string_type_node, formatexp); break; --- 1074,1078 ---- if (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (formatexp))) < GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (null_pointer_node)))) ! error ("ASSIGNed FORMAT specifier is too small"); formatexp = convert (string_type_node, formatexp); break; *************** ffeste_io_icilist_ (bool have_err, *** 1398,1403 **** if (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (formatexp))) < GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (null_pointer_node)))) ! error ("Cannot safely convert to assigned-FORMAT an expression\ ! narrower than a pointer"); formatexp = convert (string_type_node, formatexp); break; --- 1397,1401 ---- if (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (formatexp))) < GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (null_pointer_node)))) ! error ("ASSIGNed FORMAT specifier is too small"); formatexp = convert (string_type_node, formatexp); break; *************** ffeste_R838 (ffelab label, ffebld target *** 2772,2777 **** if (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (target_tree))) < GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (label_tree)))) ! error ("Cannot safely ASSIGN to an target narrower than a\ ! label-pointer"); label_tree = convert (TREE_TYPE (target_tree), label_tree); expr_tree = ffecom_modify (void_type_node, --- 2770,2774 ---- 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, *************** ffeste_R839 (ffebld target) *** 2815,2819 **** if (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (t))) < GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (null_pointer_node)))) ! error ("Cannot safely GOTO an expression narrower than a pointer"); expand_computed_goto (convert (TREE_TYPE (null_pointer_node), t)); --- 2812,2816 ---- 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)); diff -rcp2N g77-0.5.16/f/target.h g77-0.5.17/f/target.h *** g77-0.5.16/f/target.h Wed Aug 30 15:53:32 1995 --- g77-0.5.17/f/target.h Thu Nov 2 07:58:35 1995 *************** void *ffetarget_memcpy_ (void *dst, void *** 1220,1226 **** #define ffetarget_eqv_integer2(res,l,r) (*(res) = (l) ^ ~(r), FFEBAD) #define ffetarget_eqv_integer3(res,l,r) (*(res) = (l) ^ ~(r), FFEBAD) ! #define ffetarget_eqv_logical1(res,l,r) (*(res) = !!(l) == !!(r), FFEBAD) ! #define ffetarget_eqv_logical2(res,l,r) (*(res) = !!(l) == !!(r), FFEBAD) ! #define ffetarget_eqv_logical3(res,l,r) (*(res) = !!(l) == !!(r), FFEBAD) #define ffetarget_ge_integer1(res,l,r) \ (*(res) = ((l) >= (r)) ? TRUE : FALSE, FFEBAD) --- 1220,1226 ---- #define ffetarget_eqv_integer2(res,l,r) (*(res) = (l) ^ ~(r), FFEBAD) #define ffetarget_eqv_integer3(res,l,r) (*(res) = (l) ^ ~(r), FFEBAD) ! #define ffetarget_eqv_logical1(res,l,r) (*(res) = (l) == (r), FFEBAD) ! #define ffetarget_eqv_logical2(res,l,r) (*(res) = (l) == (r), FFEBAD) ! #define ffetarget_eqv_logical3(res,l,r) (*(res) = (l) == (r), FFEBAD) #define ffetarget_ge_integer1(res,l,r) \ (*(res) = ((l) >= (r)) ? TRUE : FALSE, FFEBAD) *************** void *ffetarget_memcpy_ (void *dst, void *** 1442,1448 **** #define ffetarget_neqv_integer2(res,l,r) (*(res) = (l) ^ (r), FFEBAD) #define ffetarget_neqv_integer3(res,l,r) (*(res) = (l) ^ (r), FFEBAD) ! #define ffetarget_neqv_logical1(res,l,r) (*(res) = !!(l) != !!(r), FFEBAD) ! #define ffetarget_neqv_logical2(res,l,r) (*(res) = !!(l) != !!(r), FFEBAD) ! #define ffetarget_neqv_logical3(res,l,r) (*(res) = !!(l) != !!(r), FFEBAD) #define ffetarget_not_integer1(res,l) (*(res) = ~(l), FFEBAD) #define ffetarget_not_integer2(res,l) (*(res) = ~(l), FFEBAD) --- 1442,1448 ---- #define ffetarget_neqv_integer2(res,l,r) (*(res) = (l) ^ (r), FFEBAD) #define ffetarget_neqv_integer3(res,l,r) (*(res) = (l) ^ (r), FFEBAD) ! #define ffetarget_neqv_logical1(res,l,r) (*(res) = (l) != (r), FFEBAD) ! #define ffetarget_neqv_logical2(res,l,r) (*(res) = (l) != (r), FFEBAD) ! #define ffetarget_neqv_logical3(res,l,r) (*(res) = (l) != (r), FFEBAD) #define ffetarget_not_integer1(res,l) (*(res) = ~(l), FFEBAD) #define ffetarget_not_integer2(res,l) (*(res) = ~(l), FFEBAD) *************** void *ffetarget_memcpy_ (void *dst, void *** 1643,1649 **** #define ffetarget_xor_integer2(res,l,r) (*(res) = (l) ^ (r), FFEBAD) #define ffetarget_xor_integer3(res,l,r) (*(res) = (l) ^ (r), FFEBAD) ! #define ffetarget_xor_logical1(res,l,r) (*(res) = !!(l) != !!(r), FFEBAD) ! #define ffetarget_xor_logical2(res,l,r) (*(res) = !!(l) != !!(r), FFEBAD) ! #define ffetarget_xor_logical3(res,l,r) (*(res) = !!(l) != !!(r), FFEBAD) /* End of #include file. */ --- 1643,1649 ---- #define ffetarget_xor_integer2(res,l,r) (*(res) = (l) ^ (r), FFEBAD) #define ffetarget_xor_integer3(res,l,r) (*(res) = (l) ^ (r), FFEBAD) ! #define ffetarget_xor_logical1(res,l,r) (*(res) = (l) != (r), FFEBAD) ! #define ffetarget_xor_logical2(res,l,r) (*(res) = (l) != (r), FFEBAD) ! #define ffetarget_xor_logical3(res,l,r) (*(res) = (l) != (r), FFEBAD) /* End of #include file. */ diff -rcp2N g77-0.5.16/f/top.c g77-0.5.17/f/top.c *** g77-0.5.16/f/top.c Wed Aug 30 15:53:32 1995 --- g77-0.5.17/f/top.c Thu Oct 26 17:23:32 1995 *************** bool ffe_is_version_ = FALSE; *** 84,87 **** --- 84,88 ---- bool ffe_is_vxt_not_90_ = FFETARGET_defaultIS_VXT_NOT_90; bool ffe_is_warn_implicit_ = FALSE; + bool ffe_is_warn_surprising_ = FALSE; ffeCase ffe_case_intrin_ = FFETARGET_defaultCASE_INTRIN; ffeCase ffe_case_match_ = FFETARGET_defaultCASE_MATCH; *************** ffe_decode_option (char *opt) *** 386,392 **** ; /* cpp handles this one. */ else if (!strcmp (&opt[2], "implicit")) ! ffe_set_is_warn_implicit(TRUE); else if (!strcmp (&opt[2], "no-implicit")) ! ffe_set_is_warn_implicit(FALSE); else if (!strcmp (&opt[2], "all")) { --- 387,397 ---- ; /* cpp handles this one. */ else if (!strcmp (&opt[2], "implicit")) ! ffe_set_is_warn_implicit (TRUE); else if (!strcmp (&opt[2], "no-implicit")) ! ffe_set_is_warn_implicit (FALSE); ! else if (!strcmp (&opt[2], "surprising")) ! ffe_set_is_warn_surprising (TRUE); ! else if (!strcmp (&opt[2], "no-surprising")) ! ffe_set_is_warn_surprising (FALSE); else if (!strcmp (&opt[2], "all")) { *************** ffe_decode_option (char *opt) *** 397,400 **** --- 402,406 ---- warn_uninitialized = 2; warn_unused = 1; + ffe_set_is_warn_surprising (TRUE); } else diff -rcp2N g77-0.5.16/f/top.h g77-0.5.17/f/top.h *** g77-0.5.16/f/top.h Wed Aug 30 15:53:32 1995 --- g77-0.5.17/f/top.h Thu Oct 26 17:24:17 1995 *************** extern bool ffe_is_version_; *** 99,102 **** --- 99,103 ---- extern bool ffe_is_vxt_not_90_; extern bool ffe_is_warn_implicit_; + extern bool ffe_is_warn_surprising_; extern ffeCase ffe_case_intrin_; extern ffeCase ffe_case_match_; *************** void ffe_terminate_4 (void); *** 172,175 **** --- 173,177 ---- #define ffe_is_vxt_not_90() ffe_is_vxt_not_90_ #define ffe_is_warn_implicit() ffe_is_warn_implicit_ + #define ffe_is_warn_surprising() ffe_is_warn_surprising_ #define ffe_fixed_line_length() ffe_fixed_line_length_ #define ffe_pool_file() (ffe_file_pool_) *************** void ffe_terminate_4 (void); *** 206,209 **** --- 208,212 ---- #define ffe_set_is_vxt_not_90(f) (ffe_is_vxt_not_90_ = (f)) #define ffe_set_is_warn_implicit(f) (ffe_is_warn_implicit_ = (f)) + #define ffe_set_is_warn_surprising(f) (ffe_is_warn_surprising_ = (f)) #define ffe_set_fixed_line_length(l) (ffe_fixed_line_length_ = (l)) #define ffe_state_max(s1,s2) ((s1) > (s2) ? (s1) : (s2)) diff -rcp2N g77-0.5.16/f/zzz.c g77-0.5.17/f/zzz.c *** g77-0.5.16/f/zzz.c Wed Aug 30 15:53:32 1995 --- g77-0.5.17/f/zzz.c Sat Nov 18 19:44:20 1995 *************** the Free Software Foundation, 59 Temple *** 44,48 **** #endif ! char *ffezzz_version_string = "0.5.16"; char *ffezzz_date = FFEZZZ_DATE; char *ffezzz_time = FFEZZZ_TIME; --- 44,48 ---- #endif ! char *ffezzz_version_string = "0.5.17"; char *ffezzz_date = FFEZZZ_DATE; char *ffezzz_time = FFEZZZ_TIME;