diff -rcp2N g77-0.5.17/README.g77 g77-0.5.18/README.g77 *** g77-0.5.17/README.g77 Sat Nov 18 19:46:01 1995 --- g77-0.5.18/README.g77 Tue Mar 5 01:38:19 1996 *************** *** 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. --- 1,5 ---- ! 1996-03-05 ! This directory contains the version 0.5.18 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.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 --- 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 *************** contains all of the Fortran files. *** 30,60 **** If you have just unpacked the g77 distribution, before proceeding, 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 ! keep track of where an installed version of g77 comes from. ! ! (There are other ways to combine the gcc and g77 distributions, but ! the above are the only ones recommended. Try others only at your ! own peril, and if you run into problems, please restart from scratch ! using one of the methods documented above. Report a bug only if a ! problem occurs using one of the above methods.) ! 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) --- 30,44 ---- If you have just unpacked the g77 distribution, before proceeding, you must merge the contents of the g77 distribution with the appropriate ! gcc distribution on your system before proceeding. ! * Read and follow the instructions in g77-0.5.18/f/INSTALL that ! explain how to merge a g77 source directory into a gcc source ! directory. You can use Info to read the same installation ! instructions via: ! ! info -f g77-0.5.18/f/g77.info -n Unpacking ! ! The resulting directory layout includes the following, where gcc/ might be ! a link to, for example, gcc-2.7.2/: gcc/ Non-Fortran files in gcc (not part of g77*.tar) *************** bugs and facilitate automatic configurat *** 109,130 **** libf2c for use by g77 users. See gcc/f/runtime/README for more information. ! gcc/f/BUGS lists some important bugs known to be in g77. ! gcc/f/ChangeLog lists recent changes to g77 internals. ! gcc/f/CREDITS lists people and organizations that have helped make g77 happen. ! gcc/f/DOC provides some rudimentary documentation for g77, including ! user-visible changes made to recent releases. ! gcc/f/INSTALL describes how to build and install GNU Fortran. gcc/f/NEWS contains the per-release changes (not just user-visible ones ! seen in gcc/f/DOC) listed in the ~fortran/.plan file. ! gcc/f/PROJECTS contains various lists of things still needing to be done ! to g77 to improve it in various ways. ! * Read gcc/f/BUGS, gcc/f/DOC, and gcc/f/INSTALL at the very least! If you want to get into the FFE code, which lives entirely in gcc/f/, here --- 93,115 ---- libf2c for use by g77 users. See gcc/f/runtime/README for more information. ! gcc/f/BUGS lists some important bugs known to be in g77. Or: ! info -f gcc/f/g77.info -n "Actual Bugs" ! gcc/f/ChangeLog lists recent changes to g77 internals. ! gcc/f/INSTALL describes how to build and install GNU Fortran. Or: ! info -f gcc/f/g77.info -n Installation gcc/f/NEWS contains the per-release changes (not just user-visible ones ! seen in gcc/f/DOC) listed in the ~fortran/.plan file. Or: ! info -f gcc/f/g77.info -n News ! * Read gcc/f/BUGS, gcc/f/INSTALL, and gcc/f/NEWS at the very least! ! All users of g77 (not just installers) should read gcc/f/g77.info* ! as well, using the "more" command if the "info" command is ! unavailable or they aren't used to using it. If you want to get into the FFE code, which lives entirely in gcc/f/, here diff -rcp2N g77-0.5.17/f/BUGS g77-0.5.18/f/BUGS *** g77-0.5.17/f/BUGS Thu Nov 16 07:02:12 1995 --- g77-0.5.18/f/BUGS Mon Mar 25 21:26:44 1996 *************** *** 1,119 **** ! This file documents known bugs in the GNU Fortran system. ! Copyright (C) 1995 Free Software Foundation, Inc. You may copy, ! distribute, and modify it freely as long as you preserve this copyright ! notice and permission notice. Contributed by James Craig Burley ! (burley@gnu.ai.mit.edu). ! ! 1995-11-16 ! ! 1. g77 statically assumes INTEGER constants range from -2**31 to 2**31-1, ! instead of determining their range from the actual range of the INTEGER ! type. And, further, it generally doesn't implement the handling ! of constants very well in that it makes assumptions about the ! configuration that it no longer makes regarding variables (types). ! Included with this item is the fact that g77 doesn't recognize ! that, on IEEE-754/854-compliant systems, 0./0. should produce a NaN ! and no warning instead of the value 0. and a warning. This is to be ! fixed in 0.6, when g77 will use the gcc back end's constant-handling ! mechanisms instead of its own. ! ! 2. g77 uses way too much memory and CPU time to process large aggregate ! areas having any initialized elements. E.g. REAL A(1000000) followed ! by DATA A(1)/1/ will take up way too much time and space, including ! the size of the generated assembler file. This is to be mitigated ! somewhat in 0.6. (NOTE: 0.5.5 adds a warning message to at least ! notify the user before the compiler appears to hang. See f/data.c, ! macro FFEDATA_sizeTOO_BIG_INIT_, for the minimum # of storage units ! that trigger the diagnostic. Adjust as desired. If 0, no diagnostic ! gets produced.) ! ! 3. g77 doesn't emit variable and array members of COMMON areas for use ! with a debugger (the -g command-line option). The code is present ! to do this, but doesn't work with at least one debug format -- perhaps ! it works with others. And it turns out there's a similar bug for ! local EQUIVALENCE areas, so that has been disabled as well. ! ! 4. When debugging, after starting up the debugger but before being able ! to see the source code for the main program unit, the user must currently ! set a breakpoint at MAIN__ (or MAIN___ or MAIN_ if MAIN__ doesn't exist) ! and run the program until it hits the breakpoint. At that point, the ! main program unit is activated and about to execute its first ! executable statement, but that's the state in which the debugger should ! start up, as is the case for languages like C. ! ! 5. The current external-interface design, which includes naming of ! external procedures, COMMON blocks, and the library interface, ! has various usability problems, including things like adding ! underscores where not really necessary (and preventing easier ! inter-language operability) and yet not providing complete ! namespace freedom for user C code linked with Fortran apps (due ! to the naming of functions in the library, among other things). ! The GNU project should at least get all this "right" for systems ! it fully controls, such as the Hurd, and provide defaults and ! options for compatibility with existing systems and interoperability ! with popular existing compilers. ! ! 6. g77 currently inserts needless padding for things like "COMMON A,IPAD" ! where A is CHARACTER*1 and IPAD is INTEGER*4 on machines like x86, because ! the back end insists that IPAD be aligned to a 4-byte boundary, but ! the processor has no such requirement (though it's good for ! performance). ! ! 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 ! this but also suppresses warnings. The default should be to suppress ! info messages. ! ! 9. It should be possible to build the runtime without building cc1 etc. ! ! 10. g77 requires GNU C, not just ANSI C, to compile it. Fixing this wouldn't ! be very hard (just tedious), but the code using GNU-C extensions is ! expected to be rewritten for 0.6, so there are no plans for an ! interim fix. ! ! 11. RS/6000 support is not complete as of the gcc 2.6.3 back end. The ! 2.7.0 back end appears to fix this problem, or at least mitigate ! it significantly, but there is at least one known problem that is ! likely to be a code-generation bug in gcc-2.7.0+g77-0.5.16. This ! problem shows up only when compiling the Fortran program with -O. ! ! 12. There's a problem similar to the one mentioned in #11 above that ! shows up on SGI machines. This problem shows up only when ! compiling the Fortran program with -O. ! ! 13. g77 doesn't work on 64-bit configurations such as the Alpha. The ! 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. --- 1,161 ---- ! This file lists known bugs in the GNU Fortran compiler. Copyright (C) ! 1995, 1996 Free Software Foundation, Inc. You may copy, distribute, ! and modify it freely as long as you preserve this copyright notice and ! permission notice. ! ! Bugs in GNU Fortran ! ******************* ! ! This section identifies bugs that `g77' *users* might run into. ! This includes bugs that are actually in the `gcc' back end (GBE) or in ! `libf2c', because those sets of code are at least somewhat under the ! control of (and necessarily intertwined with) `g77', so it isn't worth ! separating them out. ! ! For information on bugs that might afflict people who configure, ! port, build, and install `g77', *Note Problems Installing::. ! ! * When using `-fugly', `g77' assumes an extra `%VAL(0)' argument is ! to be passed to intrinsics taking no arguments, such as `IARGC()', ! which in turn reject such a call. Although this has been worked ! around for 0.5.18 due to changes in the handling of intrinsics, ! `g77' needs to do the ugly-argument-appending trick only for ! external-function invocation, as this would probably be more ! consistent with compilers that default to using that trick. ! ! * Although `g77' generally supports `SELECT CASE', it doesn't do so ! for `CHARACTER' types. Worse, it just crashes with a barely ! servicable diagnostic. If the time can't be taken soon to finish ! implementing this feature, at least a better way of diagnosing the ! problem should be provided. ! ! * To accept a lot of fine code, `g77' needs to accept `FORMAT' and ! `ENTRY' before an `IMPLICIT NONE'. ! ! * Some crashes occur when compiling under Solaris on x86 machines. ! ! * Something about `g77''s straightforward handling of label ! references and definitions sometimes prevents the GBE from ! unrolling loops. Until this is solved, try inserting or removing ! `CONTINUE' statements as the terminal statement, using the `END DO' ! form instead, and so on. ! ! * The `g77' command itself should more faithfully process options ! the way the `gcc' command does. For example, `gcc' accepts ! abbreviated forms of long options, `g77' generally doesn't. ! ! * `g77' could use a `--help' option of some sort. ! ! * Some confusion in diagnostics concerning failing `INCLUDE' ! statements from within `INCLUDE''d or `#include''d files. ! ! * Some problems on RS/6000 regarding statement functions and/or ! `COMPLEX' arithmetic? ! ! * `g77' assumes that `INTEGER' constants range from `-2**31' to ! `2**31-1' (the range for two's-complement 32-bit values), instead ! of determining their range from the actual range of the `INTEGER' ! type for the configuration (and, someday, for the constant). ! ! Further, it generally doesn't implement the handling of constants ! very well in that it makes assumptions about the configuration ! that it no longer makes regarding variables (types). ! ! Included with this item is the fact that `g77' doesn't recognize ! that, on IEEE-754/854-compliant systems, `0./0.' should produce a ! NaN and no warning instead of the value `0.' and a warning. This ! is to be fixed in version 0.6, when `g77' will use the `gcc' back ! end's constant-handling mechanisms to replace its own. ! ! * `g77' uses way too much memory and CPU time to process large ! aggregate areas having any initialized elements. ! ! For example, `REAL A(1000000)' followed by `DATA A(1)/1/' takes up ! way too much time and space, including the size of the generated ! assembler file. This is to be mitigated somewhat in version 0.6. ! ! Version 0.5.18 improves cases like this--specifically, cases of ! *sparse* initialization that leave large, contiguous areas ! uninitialized--significantly. However, even with the ! improvements, these cases still require too much memory and CPU ! time. ! ! (Version 0.5.18 also improves cases where the initial values are ! zero to a much greater degree, so if the above example ends with ! `DATA A(1)/0/', the compile-time performance will be about as good ! as it will ever get, aside from unrelated improvements to the ! compiler.) ! ! Note that `g77' does display a warning message to notify the user ! before the compiler appears to hang. *Note Initialization of ! Large Aggregate Areas: Large Initialization, for information on ! how to change the point at which `g77' decides to issue this ! warning. ! ! * `g77' doesn't emit variable and array members of common blocks for ! use with a debugger (the `-g' command-line option). The code is ! present to do this, but doesn't work with at least one debug ! format--perhaps it works with others. And it turns out there's a ! similar bug for local equivalence areas, so that has been disabled ! as well. ! ! * When debugging, after starting up the debugger but before being ! able to see the source code for the main program unit, the user ! must currently set a breakpoint at `MAIN__' (or `MAIN___' or ! `MAIN_' if `MAIN__' doesn't exist) and run the program until it ! hits the breakpoint. At that point, the main program unit is ! activated and about to execute its first executable statement, but ! that's the state in which the debugger should start up, as is the ! case for languages like C. ! ! * `g77' currently inserts needless padding for things like `COMMON ! A,IPAD' where `A' is `CHARACTER*1' and `IPAD' is `INTEGER*4' on ! machines like x86, because the back end insists that `IPAD' be ! aligned to a 4-byte boundary, but the processor has no such ! requirement (though it's good for performance). ! ! It is possible that this is not a real bug, and could be considered ! a performance feature, but it might be important to provide the ! ability to Fortran code to specify minimum padding for aggregate ! areas such as common blocks--and, certainly, there is the ! potential, with the current setup, for interface differences in ! the way such areas are laid out between `g77' and other compilers. ! ! * RS/6000 support is not complete as of the gcc 2.6.3 back end. The ! 2.7.0 back end appears to fix this problem, or at least mitigate ! it significantly, but there is at least one known problem that is ! likely to be a code-generation bug in `gcc-2.7.0' plus ! `g77-0.5.16'. This problem shows up only when compiling the ! Fortran program with `-O'. ! ! * SGI support is known to be a bit buggy. The known problem shows ! up only when compiling the Fortran program with `-O'. ! ! * `g77' doesn't work on 64-bit configurations such as the Alpha. ! The problem is not yet adequately investigated, and some Alpha ! users are having quite a bit of success, so perhaps it depends on ! the OS and configuration of `gcc' they are using. ! ! * 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. ! ! * 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, and it apparently occurs only when compiling ! sufficiently complicated functions *without* the `-O' option. ! ! This might be fixed in version 2.7.2 of `gcc'. ! diff -rcp2N g77-0.5.17/f/CREDITS g77-0.5.18/f/CREDITS *** g77-0.5.17/f/CREDITS Mon Aug 21 16:08:48 1995 --- g77-0.5.18/f/CREDITS Mon Mar 4 01:14:27 1996 *************** *** 1,32 **** ! 1995-02-16 ! The front end for GNU Fortran ("g77"), which is almost all of the source ! code in the directory gcc/f/, was written by James Craig Burley ! (burley@gnu.ai.mit.edu). ! ! The following individuals and organizations contributed significant money ! and/or equipment to Craig's efforts: ! ! Cygnus Support ! The Free Software Foundation ! ! The following individuals served as alpha testers prior to g77's public ! release, testing, researching, sometimes debugging, and occasionally ! providing small amounts of code and fixes for g77, plus offering plenty ! of helpful advice to Craig: ! ! Jonathan Corbet ! Dr. Mark Fernyhough ! Takafumi Hayashi (The University of AIzu) - takafumi@u-aizu.ac.jp ! Kate Hedstrom ! Michel Kern (INRIA and Rice University) - Michel.Kern@inria.fr ! Dr. A. O. V. Le Blanc ! Dave Love ! Rick Lutowski ! Toon Moene ! Rick Niles ! Derk Reefman ! Wayne K. Schroll ! Bill Thorson ! Pedro A. M. Vazquez ! Ian Watson --- 1,6 ---- ! THIS FILE HAS BEEN OBSOLETED in the GNU Fortran distribution as ! of version 0.5.18. It will be removed in a future distribution. ! Its contents have been assimilated into the Info documentation, ! the source to which is in gcc/f/g77.texi. In particular, ! see the node ``(g77)Contributors''. diff -rcp2N g77-0.5.17/f/ChangeLog g77-0.5.18/f/ChangeLog *** g77-0.5.17/f/ChangeLog Sat Nov 18 19:44:16 1995 --- g77-0.5.18/f/ChangeLog Mon Apr 1 10:14:13 1996 *************** *** 1,2 **** --- 1,349 ---- + Mon Apr 1 10:14:02 1996 Craig Burley + + * Version 0.5.18 released. + + Mon Mar 25 20:52:24 1996 Craig Burley + + * com.c (ffecom_expr_power_integer_): Don't generate code + that compares COMPLEX (or, as it happens, REAL) via "LT_EXPR", + since the back end crashes on that. (This code would never + be executed anyway, but the test that avoids it has now been + translated to control whether the code gets generated at all.) + Fixes 960323-3.f. + + * com.c (ffecom_type_localvar_): Handle variable-sized + dimension bounds expressions here, so they get calculated + and saved on procedure entry. Fixes 960323-4.f. + + * com.c (ffecom_notify_init_symbol): Symbol has no init + info at all if only zeros have been used to initialize it. + Fixes 960324-0.f. + + * expr.c, expr.h (ffeexpr_type_combine): Renamed from + ffeexpr_type_combine_ and now a public procedure; last arg now + a token, instead of an internal structure used to extract a token. + Now allows the outputs to be aliased with the inputs. + Now allows a NULL token to mean "don't report error". + (ffeexpr_reduced_bool2_, ffeexpr_reduced_eqop2_, + ffeexpr_reduced_math2_, ffeexpr_reduced_power_, + ffeexpr_reduced_relop2_): Handle new calling sequence for + ffeexpr_type_combine. + * (ffeexpr_convert): Don't put an opCONVERT node + in just because the size is unknown; all downstream code + should be able to deal without it being there anyway, and + getting rid of it allows new intrinsic code to more easily + combine types and such without generating bad code. + * info.c, info.h (ffeinfo_kindtype_max): Rewrite to do + proper comparison of size of types, not just comparison + of their internal kind numbers (so I2.eq.I1 doesn't promote + I1 to I2, rather the other way around). + * intrin.c (ffeintrin_check_): Combine types of arguments + in COL a la expression handling, for greater flexibility + and permissiveness (though, someday, -fpedantic should + report use of this kind of thing). + Make sure Hollerith/typeless where CHARACTER expected is + rejected. This all fixes 960323-2.f. + + * ste.c (ffeste_begin_iterdo_): Fix some more type conversions + so INTEGER*2-laden DO loops don't crash at compile time on + certain machines. Believed to fix 960323-1.f. + + * stu.c (ffestu_sym_end_transition): Certainly reject + whereDUMMY not in any dummy list, whether stateUNCERTAIN + or stateUNDERSTOOD. Fixes 960323-0.f. + + Tue Mar 19 13:12:40 1996 Craig Burley + + * data.c (ffedata_value): Fix crash on opANY, and simplify + the code at the same time. + + * Make-lang.in (f77-runtime): Also depends on lib[FI]77/Makefile... + (include/f2c.h...): ...which in turn depend on */Makefile.in. + (f77.rebuilt): Rebuild runtime stuff too. + + * intrin.c (ffeintrin_check_): Accommodate TYPELESS/HOLLERITH + types, convert args as necessary, etc. + + * expr.c (ffeexpr_convert): Fix test for TYPELESS/HOLLERITH + to obey the docs; crash if no source token when error. + (ffeexpr_collapse_convert): Crash if no token when error. + + Mon Mar 18 15:51:30 1996 Craig Burley + + * com.c (ffecom_init_zero_): Renamed from + ffecom_init_local_zero_; now handles top-level + (COMMON) initializations too. + + * bld.c (ffebld_constant_is_zero): + * com.c (ffecom_symbol_transform_, ffecom_sym_transform_assign_, + ffecom_transform_common_, ffecom_transform_equiv_): + * data.c: + * equiv.c: + * equiv.h: + * lang-options.h: + * stc.c: + * storag.c: + * storag.h: + * symbol.c: + * symbol.h: + * target.c: + * target.h: + * top.c: + * top.h: All of this is mostly housekeeping-type changes + to support -f(no-)zeros, i.e. not always stuff zero + values into the initializer fields of symbol/storage objects, + but still track that they have been given initial values. + + * bad.def: Fix wording for DATA-related diagnostics. + + * com.c (ffecom_sym_transform_assign_): Don't check + any EQUIVALENCE stuff for local ASSIGN, the check was + bad (crashing), and it's not necessary, anyway. + + * com.c (ffecom_expr_intrinsic_): For MAX and MIN, + ignore null arguments as far arg[123], and fix handling + of ANY arguments. (New intrinsic support now allows + spurious trailing null arguments.) + + * com.c (ffecom_init_0): Add HOLLERITH (unsigned) + equivalents for INTEGER*2, *4, and *8, so shift intrinsics + and other things that need unsigned versions of signed + types work. + + Sat Mar 16 12:11:40 1996 Craig Burley + + * storag.c (ffestorag_exec_layout): Treat adjustable + local array like dummy -- don't create storage object. + * com.c (ffecom_sym_transform_): Allow for NULL storage + object in LOCAL case (adjustable array). + + Fri Mar 15 13:09:41 1996 Craig Burley + + * com.c (ffecom_sym_transform_): Allow local symbols + with nonconstant sizes (adjustable local arrays). + (ffecom_type_localvar_): Allow dimensions with nonconstant + component (adjustable local arrays). + * expr.c: Various minor changes to handle adjustable + local arrays (a new case of stateUNCERTAIN). + * stu.c (ffestu_sym_end_transition, + ffestu_sym_exec_transition): Ditto. + * symbol.def: Update docs to reflect these changes. + + * com.c (ffecom_expr_): Reduce space/time needed for + opACCTER case by handling it here instead of converting + it to opARRTER earlier on. + (ffecom_notify_init_storage): Don't convert ACCTER to ARRTER. + (ffecom_notify_init_symbol): Ditto. + + * com.c (ffecom_init_0): Crash and burn if any of the types' + sizes, according to the GBE, disagrees with the sizes of + the FFE's internal implementation. This might catch + Alpha/SGI bugs earlier. + + Fri Mar 15 01:09:41 1996 Craig Burley + + * com-rt.def, com.c, com.h: Changes for rewrite of intrinsic + handling. + * com.c (ffecom_arglist_expr_): New function. + (ffecom_widest_expr_type_): New function. + (ffecom_expr_intrinsic_): Reorganize, some rewriting. + (ffecom_f2c_make_type_): Layout complex types. + (ffecom_gfrt_args_): New function. + (ffecom_list_expr): Trivial change for consistency. + + * expr.c (ffeexpr_token_name_rhs_): Go back to getting + type from specific, not implementation, info. + (ffeexpr_token_funsubstr_): Set intrinsic implementation too! + * intrin.c: Major rewrite of most portions. + * intrin.def: Major rearchitecting of tables. + * intrin.h (ffeintrin_basictype, ffeintrin_kindtype): + Now (once again) take ffeintrinSpec as arg, not ffeintrinImp; + for now, these return NONE, since they're not really needed + and adding the necessary info to the tables is not trivial. + (ffeintrin_codegen_imp): New function. + * stc.c (ffestc_R1208_item): Change way ffeintrin funcs called, + back to original per above; but comment out the code anyway. + + * intrin.c (ffe_init_0): Do internal checks only if + -fset-g77-defaults not specified. + + * lang-options.h: Add -fset-g77-defaults option. + * lang-specs.h: Always pass -fset-g77-defaults. + * top.c, top.h: New option. + + Sat Mar 9 17:49:50 1996 Craig Burley + + * Make-lang.in (stmp-int-hdrs): Use --no-validate when + generating the f77.rebuilt files (BUGS, INSTALL, NEWS) + so cross-references can work properly in g77.info + without a lot of hassle. Users can probably deal with + the way they end up looking in the f77.rebuilt files. + + * bld.c (ffebld_constant_new_integer4_val): INTEGER*8 + support -- new function. + (ffebld_constant_new_logical4_val): New function. + * com.c (ffecom_f2c_longint_type_node): New type. + (FFECOM_rttypeLONGINT_): New return type code. + (ffecom_expr_): Add code to invoke pow_qq instead + of pow_ii for INTEGER4 (INTEGER*8) case. + If ffecom_expr_power_integer_ returns NULL_TREE, just do + the usual work. + (ffecom_make_gfrt_): Handle new type. + (ffecom_expr_power_integer_): Let caller do the work if in + dummy-transforming case, since + caller now knows about INTEGER*8 and such, by returning + NULL_TREE. + * expr.c (ffeexpr_reduced_power_): Complain about non-INTEGER + raised to INTEGER4 (INTEGER*8) power. + + * target.c (ffetarget_power_integerdefault_integerdefault): + Fix any**negative. + * com.c (ffecom_expr_power_integer_): Fix (-1)**(-8) and similar + to ABS() the integral result if the exponent is negative + and even. + + * ste.c (ffeste_begin_iterdo_): Clean up a type ref. + Always convert iteration count to _default_ INTEGER. + + * sta.c (ffesta_second_): Add BYTE and WORD type/stmts; + changes by Scott Snyder . + * stb.c (ffestb_decl_recursive): Ditto. + (ffestb_decl_recursive): Ditto. + (ffestb_decl_entsp_2_): Ditto. + (ffestb_decl_entsp_3_): Ditto. + (ffestb_decl_funcname_2_): Ditto. + (ffestb_decl_R539): Ditto. + (ffestb_decl_R5395_): Ditto. + * stc.c (ffestc_establish_declstmt_): Ditto. + * std.c (ffestd_R539item): Ditto. + (ffestd_R1219): Ditto. + * stp.h: Ditto. + * str-1t.fin: Ditto. + * str-2t.fin: Ditto. + + * expr.c (ffeexpr_finished_): For DO loops, allow + any INTEGER type; convert LOGICAL (assuming -fugly) + to corresponding INTEGER type instead of always default + INTEGER; let later phases do conversion of DO start, + end, incr vars for implied-DO; change checks for non-integral + DO vars to be -Wsurprising warnings. + * ste.c (ffeste_io_impdo_): Convert start, end, and incr + to type of DO variable. + + * com.c (ffecom_init_0): Add new types for [IL][234], + much of which was done by Scott Snyder . + * target.c: Ditto. + * target.h: Ditto. + + Wed Mar 6 14:08:45 1996 Craig Burley + + * top.c (ffe_init_gbe_): Make -frerun-loop-opt the default. + + Mon Mar 4 12:27:00 1996 Craig Burley + + * expr.c (ffeexpr_exprstack_push_unary_): Really warn only + about two successive _arithmetic_ operators. + + * stc.c (ffestc_R522item_object): Allow SAVE of (understood) + local entity. + + * top.c (ffe_decode_option): New -f(no-)second-underscore options. + * top.h: New options. + * com.c (ffecom_get_external_identifier_, ffecom_get_identifier_): + New options. + + * Make-lang.in (f77.maintainer-clean): Clean f/BUGS, f/INSTALL, + f/NEWS. + ($(srcdir)/f/BUGS, $(srcdir)/f/INSTALL, $(srcdir)/f/NEWS): + New rules. + ($(srcdir)/f/g77.info, $(srcdir)/f/g77.dvi): Depend on + f/bugs.texi and f/news.texi. + (f77.install-man): Install f77 man pages (if enabled). + (f77.uninstall): Uninstall info docs, f77 man pages (if enabled). + + * top.c (ffe_init_gbe_): New function. + (ffe_decode_option, ffe_file): Call ffe_init_gbe_ to + set defaults for gcc options. + + Sat Jan 20 13:57:19 1996 Craig Burley + + * com.c (ffecom_get_identifier_): Eliminate needless + comparison of results of strchr. + + Tue Dec 26 11:41:56 1995 Craig Burley + + * Make-lang.in: Add rules for new files g77.texi, g77.info, + and g77.dvi. + Reorganize the *clean rules to more closely parallel gcc's. + + * config-lang.in: Exclude g77.info from diffs. + + Sun Dec 10 02:29:13 1995 Craig Burley + + * expr.c (ffeexpr_declare_unadorned_, + ffeexpr_declare_parenthesized_): Break out handling of + contextDATAIMPDO[INDEX,CTRL] so it's independent of symbol state. + Don't exec-transition these here (let ffeexpr_sym_impdoitem_ + handle that when appropriate). Don't "declare" them twice. + + Tue Dec 5 06:48:26 1995 Craig Burley + + * stc.c (ffestc_promote_sfdummy_): Allow whereNONE parent + symbol, since it is not necessarily known whether it will + become LOCAL or DUMMY. + + Mon Dec 4 03:46:55 1995 Craig Burley + + * lex.c (ffelex_display_token, ffelex_type_string_): Resurrect + these from their old versions and update them for possible invocation + from debugger. + * lex.h (ffelex_display_token): Declare this in case anyone + else wants to call it. + + * lex.c (ffelex_total_tokens_): Have this reflect actual allocated + tokens, no longer include outstanding "uses" of tokens. + + * malloc.c, malloc.h (MALLOC_DEBUG): New macro to control + checking of whether callers follow rules, now defaults to 0 + for "no checking" to improve compile times. + + * malloc.c (malloc_pool_kill): Fix bug that could prevent + subpool from actually being killed (wasn't setting its use + count to 1). + + * proj.h, *.c (dmpout): Replace all occurrences of `stdout' + and some of `stderr' with `dmpout', so where to dump debugging + output can be easily controlled during build; add default + for `dmpout' of `stderr' to proj.h. + + Sun Dec 3 00:56:29 1995 Craig Burley + + * com.c (ffecom_return_expr): Eliminate attempt at warning + about unset return values, since the back end does this better, + with better wording, and is not triggered by clearly working + (but spaghetti) code as easily as this test. + + Sat Dec 2 08:28:56 1995 Craig Burley + + * target.c (ffetarget_power_*_integerdefault): Raising 0 to + integer constant power should not be an error condition; + if so, other code should catch 0 to any power, etc. + + * bad.def (FFEBAD_BAD_POWER): 0**integer now a warning instead + of an error. + + Fri Dec 1 00:12:03 1995 Craig Burley (burley@gnu.ai.mit.edu) + + * bad.def: Clarify diagnostic regarding complex constant elements. + * expr.c (ffeexpr_cb_comma_c_): Capitalize real/imaginary + for clarified diagnostic. + + * com.c (ffecom_close_include_): Close the file! + + * lex.c (ffelex_file_fixed): Update line info if the line + has any content, not just if it finishes a previous line + or has a label. + (ffelex_file_free): Clarify switch statement code. + Sat Nov 18 19:37:22 1995 Craig Burley (burley@gnu.ai.mit.edu) *************** Fri Oct 14 15:03:35 1994 Craig Burley *** 1776,1783 **** * Makefile.in: Handle the Fortran-77 front-end in a subdirectory. * f-*: Move Fortran-77 front-end to f/*. - - Local Variables: - eval: (auto-fill-mode) - left-margin: 8 - fill-column: 76 - End: --- 2123,2124 ---- diff -rcp2N g77-0.5.17/f/DOC g77-0.5.18/f/DOC *** g77-0.5.17/f/DOC Sat Nov 18 20:07:09 1995 --- g77-0.5.18/f/DOC Sat Mar 23 22:06:58 1996 *************** notice and permission notice. Contribut *** 5,9 **** (burley@gnu.ai.mit.edu). ! 1995-11-18 Please read all of this information before using (especially before --- 5,28 ---- (burley@gnu.ai.mit.edu). ! 1996-03-23 ! ! [WARNING: THIS FILE IS BEING DEPRECATED as of version 0.5.18 of ! GNU Fortran. ! ! This is the last version of this file that is up-to-date with ! respect to changes to GNU Fortran itself. ! ! In future versions of GNU Fortran, this file will become obsolete ! and, at some point, will be removed from the distribution ! entirely. ! ! The contents of this file have been assimilated into the Info ! documentation for GNU Fortran, newly available as of version 0.5.18. ! ! The one-version overlap, or coexistence, of both the Info ! documentation and the contents of this file, is being provided ! for your convenience in discovering information on what's new ! for g77-0.5.18 without having to immediately plunge into the new ! Info documentation.] Please read all of this information before using (especially before *************** indicates defaults, where appropriate. *** 237,240 **** --- 256,269 ---- Specify whether to allow certain F90 constructs. + NOTE: This also changes the interpretation of `REAL(Z)', where Z + is type DOUBLE COMPLEX. With -fno-f90 in force, that expression + is defined to return type REAL, to conform to apparent industry + convention for the DOUBLE COMPLEX extension to FORTRAN 77. With + -ff90 in force, that expression is defined to return type DOUBLE + PRECISION. + + In other words, with -fno-f90, REAL(Z) is the same as REAL(REAL(Z)). + With -ff90, it is the same as DBLE(Z). + -fautomatic * -fno-automatic *************** indicates defaults, where appropriate. *** 384,387 **** --- 413,427 ---- interfaces. + -fsecond-underscore * + -fno-second-underscore + Controls whether to append a second underscore to names of + entities specified in the Fortran source file. + + This option has no effect if -funderscoring is in effect. + + Otherwise, with -fno-second-underscore, an external name such as + `MAX_COUNT' is implemented as a reference to the link-time external + symbol `max_count_', isntead of `max_count__'. + -fintrin-case-initcap -fintrin-case-upper *************** been cobbled together below. *** 570,573 **** --- 610,616 ---- -ffloat-store -fsyntax-only + -fmove-all-movables + -freduce-all-givs + -frerun-loop-opt See the gcc documentation. *************** been cobbled together below. *** 588,592 **** g77 has code to support these gcc options. See the gcc documentation. Note that for -Wuninitialized to work, optimization must be specified ! (via `-O', for example). -Wall --- 631,637 ---- g77 has code to support these gcc options. See the gcc documentation. Note that for -Wuninitialized to work, optimization must be specified ! (via `-O', for example). `-Wimplicit' has the effect of using ! the IMPLICIT NONE statement in every program unit, and as such is ! g77's version of what f77 traditionally provides via the `-u' option. -Wall *************** a given program, but rather should make *** 645,648 **** --- 690,723 ---- *USER-VISIBLE CHANGES DURING 0.5.x* + In 0.5.18: + + - The BYTE and WORD statements now are supported, to a limited + extent. + + - INTEGER*1, INTEGER*2, INTEGER*8, and their LOGICAL equivalents, + now are supported to a limited extent. Among the missing elements + are complete intrinsic and constant support. + + - Support automatic arrays in procedures. For example, + `REAL A(N)', where `A' is not a dummy argument, specifies that + `A' is an automatic array. The size of `A' is calculated from + the value of `N' each time the procedure is called, that amount + of space is allocated, and that space is freed when the procedure + returns to its caller. + + - Add `-fno-zeros' option, enabled by default, to reduce compile-time + CPU and memory usage for code that provides initial zero values + for variables and arrays. + + - Introduce three new options that apply to all compilations by + g77-aware GNU compilers -- -fmove-all-movables, -freduce-all-givs, + and -frerun-loop-opt -- which can improve the run-time performance + of some programs. + + - Replace much of the existing documentation (including the file you + are reading right now) with a single Info document. + + - New option -fno-second-underscore. + In 0.5.17: *************** for Fortran 90.) *** 864,867 **** --- 939,944 ---- When -ff90 is specified, the following constructs are accepted: + - REAL(Z), where Z is DOUBLE COMPLEX, as meaning DBLE(Z) instead + of the canonical F77 meaning of REAL(REAL(Z)) - Zero-length CHARACTER entities even when -fpedantic specified - Zero-size array dimensions (as in INTEGER I(10,20,4:2)) (not supported *************** version of gcc built in the same release *** 1000,1015 **** numeric-type(KIND=N): N=1 for REAL, INTEGER, LOGICAL, COMPLEX; ! N=2 for DOUBLE PRECISION, DOUBLE COMPLEX [this is proposed for now; ! it might change in the future] ! ! For now, g77 does not support numeric types other than the ones listed ! above. So, on a typical 32-bit machine, only INTEGER*4, REAL*4, ! LOGICAL*4, COMPLEX*8, etc., will work. When g77 does support other ! types, they will be derived from gcc types such as "char", "short", ! "int", "long", "long long", "long double", and so on. That is, whatever ! types gcc already supports, g77 will someday support. The rules for ! the "numeric-type*N" notation will be applied to the new types, and ! new values for "numeric-type(KIND=N)" will be assigned on a clear, ! consistent basis, which we will invent when the time is right. Regarding constants, g77 strictly assigns types to all constants not --- 1077,1084 ---- numeric-type(KIND=N): N=1 for REAL, INTEGER, LOGICAL, COMPLEX; ! N=2 for DOUBLE PRECISION, DOUBLE COMPLEX, char INTEGER/LOGICAL (*1); ! N=3 for short INTEGER/LOGICAL (*2); ! N=4 for long long INTEGER/LOGICAL (*8). ! [These proposed values might change in the future.] Regarding constants, g77 strictly assigns types to all constants not *************** When -ff90-not-vxt is specified, the fol *** 1040,1045 **** made: - - "TYPE " and "TYPE (), <...>" - statements recognized as the Fortran 90 variety, not I/O statements. - Double-quote character (") delimits character constant just as does apostrophe ('), rather than beginning an octal constant of INTEGER type. --- 1109,1112 ---- *************** made: *** 1047,1050 **** --- 1114,1123 ---- a continuation character rather than the beginning of a comment (as it does in any other column). + - "TYPE " and "TYPE (), <...>" + statements recognized as the Fortran 90 variety, not I/O statements. + (However, the F90 variety is _not_ supported, so this really just + ensures that g77 will produce a diagnostic instead of trying to + implement the VXT TYPE statement -- which currently is not supported + as well.) *LIBRARY AND PROCEDURE-CALLING INTERFACE* *************** However, due to g77's youth, lots of sel *** 1700,1704 **** performed. As a result, this improvement is as yet unrealized (though the potential seems to be there for quite a big speedup ! in the future). Optimization (Program Speed) --- 1773,1779 ---- performed. As a result, this improvement is as yet unrealized (though the potential seems to be there for quite a big speedup ! in the future). It is possible that, as of version 0.5.18, g77 ! is noticably faster compiling many Fortran source files than using ! f2c in conjunction with gcc. Optimization (Program Speed) *************** debugging support than f2c+gcc, there st *** 1733,1742 **** in the near future. ! For example, while g77 doesn't have to worry about reserved names ! like f2c does -- e.g. try "FOR = WHILE", which f2c must necessarily ! translate to something _other_ than "for = while;" since C reserves ! those words -- it still uses things like an extra level of indirection ! for ENTRY-laden procedures (in this case, because the back end doesn't ! yet support multiple entry points). Another example is that, given --- 1808,1819 ---- in the near future. ! For example, g77 doesn't have to worry about reserved names ! like f2c does. Given "FOR = WHILE", f2c must necessarily ! translate this to something _other_ than "for = while;" since C reserves ! those words. ! ! However, g77 does still uses things like an extra level of indirection ! for ENTRY-laden procedures -- in this case, because the back end doesn't ! yet support multiple entry points. Another example is that, given *************** Yet another example is arrays. g77 repr *** 1759,1763 **** using the same "dimensionality" as in the source code, while f2c must necessarily convert them all to one-dimensional arrays to fit ! into the confines of the C language. Character And Hollerith Constants --- 1836,1844 ---- using the same "dimensionality" as in the source code, while f2c must necessarily convert them all to one-dimensional arrays to fit ! into the confines of the C language. However, the level of support ! offered by debuggers for interactive Fortran-style access to arrays ! as compiled by g77 can vary widely; in some cases, it can actually ! be an advantage that f2c converts everything to widely supported ! C semantics. Character And Hollerith Constants *************** g77 simply asks for fewer zeros from the *** 1799,1806 **** 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". As time permits in the future, some of these things that are easy for --- 1880,1883 ---- *************** g77 simply asks for fewer zeros from the *** 1855,1861 **** probably invites more trouble than it's worth.) - - g77 doesn't support BYTE. Maybe this will be supported at the same - time INTEGER*2 and such are supported. - - g77 doesn't allow, e.g., "CALL IFIX". g77 knows about intrinsic subroutines, not just functions, and is able to support both having --- 1932,1935 ---- *************** Adjustable Arrays (The DIMENSION Stateme *** 2166,2175 **** ------------------------------------------- ! Adjustable arrays in Fortran require the implementation (in this ! case, the g77 compiler) to "memorize" the expressions that dimension the arrays each time the procedure is invoked. This is so that subsequent changes to variables used in those expressions, made during execution of the procedure, do not ! have any effect on the dimensions of those adjustable arrays. For example, given --- 2240,2249 ---- ------------------------------------------- ! Adjustable and automatic arrays in Fortran require the implementation ! (in this case, the g77 compiler) to "memorize" the expressions that dimension the arrays each time the procedure is invoked. This is so that subsequent changes to variables used in those expressions, made during execution of the procedure, do not ! have any effect on the dimensions of those arrays. For example, given *************** To support this, g77 generates code that *** 2196,2200 **** code (and before the internally generated computed GOTO to handle alternate entry points, as described below) that evaluates each ! (nonconstant) expression in the list of subscripts for an adjustable array, and saves the result of each such evaluation to be used when determining the size of the array (instead of re-evaluating the --- 2270,2274 ---- code (and before the internally generated computed GOTO to handle alternate entry points, as described below) that evaluates each ! (nonconstant) expression in the list of subscripts for an array, and saves the result of each such evaluation to be used when determining the size of the array (instead of re-evaluating the *************** for any dummy arguments used in calculat *** 2225,2229 **** arrays or leave undefined any values used for that purpose in COMMON -- because the way g77 implements these things might ! well change in the future!) Subroutines (The SUBROUTINE and ENTRY Statements) --- 2299,2303 ---- arrays or leave undefined any values used for that purpose in COMMON -- because the way g77 implements these things might ! change in the future!) Subroutines (The SUBROUTINE and ENTRY Statements) diff -rcp2N g77-0.5.17/f/INSTALL g77-0.5.18/f/INSTALL *** g77-0.5.17/f/INSTALL Mon Aug 28 09:41:25 1995 --- g77-0.5.18/f/INSTALL Tue Mar 19 13:18:29 1996 *************** *** 1,347 **** ! This file describes the installation of the GNU Fortran compiler. ! Copyright (C) 1995 Free Software Foundation, Inc. You may copy, ! distribute, and modify it freely as long as you preserve this copyright ! notice and permission notice. Contributed by James Craig Burley ! (burley@gnu.ai.mit.edu). ! ! 1995-08-22 ! ! Please read all of this information before configuring, building, ! and installing g77. ! ! Contents: ! *BUILDING GNU FORTRAN* ! *BUILDING BINARIES FOR DISTRIBUTION* ! *OBSCURE CONFIGURATION INFORMATION* ! ! *BUILDING GNU FORTRAN* ! ! 1. The g77 sources are intended to live in a subdirectory "f" of a ! gcc source tree. For example, the g77 sources for g77-2.6.3-0.5.14 ! are intended to have names such as gcc-2.6.3/f/proj.h. Ensure ! that you have a gcc source tree with an "f" directory containing ! the g77 sources (such as this file, named INSTALL). ! ! Please use only gcc and g77 source trees as distributed by the FSF. ! Use of modified versions, such as the Pentium-specific-optimization ! port of gcc, is likely to result in problems that appear to be ! in the g77 code but in fact is not. Do not use such modified versions ! unless you understand all the differences between them and the versions ! the FSF distributes -- in which case you should be able to modify the ! g77 (or gcc) source trees appropriately so g77 and gcc can coexist ! as they do in the stock FSF distributions. ! ! 2. Read the file f/gbe/README, if it exists, and apply the appropriate ! patch file for the version of the GNU CC compiler you have, if ! that exists. If the directory exists but the appropriate file ! does not exist, you are using either too old a release, or one that ! is in advance of the release corresponding to the version of g77 ! you have. If the information in f/gbe/README doesn't provide ! adequate information, the latter is more likely, and you should wait ! for a new release of g77 that provides explicit support for the ! new version. Note that a new version of gcc that differs only ! in the third field from a version g77 already supports is likely ! to be well-supported by g77 using that supported version. So, ! for example, if g77 has support for versions 2.7.0 and 2.7.1, it ! is likely that gcc-2.7.2 would work well with g77 by using the ! 2.7.1 patch file provided with g77 (aside from some offsets ! reported by `patch'). However, gcc-2.8.0 would almost certainly ! not work with that version of g77 no matter which patch file was ! used, so a new version of g77 would be needed (and you should ! wait for it rather than bothering the author!). ! ! NOTE: g77's configuration file gcc/f/config-lang.in tries to ! detect whether at least one necessary patch "hunk" has been ! applied and, if not, aborts the configuration with an explanation. ! PLEASE do not try to fool this code by applying just the patch ! hunk it looks for, because then g77 might well appear to build ! and install correctly, and even appear to compile correctly, ! but could easily produce broken code. (If someone does this and ! reports a bug that takes time to track down to this kind of ! incident, g77 developers will have to waste further time ! by adding more code to g77 to ensure all the patches have been ! made, instead of using that time to improve g77! So behave.) ! ! ALSO NOTE: If you don't have `patch', you can obtain it from ! the usual GNU distribution sites. You can also apply the ! patches by hand -- patch files were originally designed for ! humans to read them, because the tool that creates them, ! `diff', existed before `patch'. `diff -rcp2N' is typically ! used to create the patch files, if that helps. ! ! 3. Decide whether you want installation of g77 to also install ! an `f77' command. On systems with a native f77, this is not ! normally desired, so g77 as shipped does not do this. ! ! If you want `f77' installed, create the file `f77-install-ok' ! (e.g. via the UNIX command `touch f77-install-ok') in the ! source or build top-level directory (the same directory in ! which the g77 `f' directory resides, not the `f' directory ! itself), or edit gcc/f/Make-lang.in and change the definition ! of the F77_INSTALL_FLAG macro appropriately. ! ! When you enable installation of `f77', either a link to or a ! direct copy of the `g77' command is made. No attempt is made ! to install a program (like a shell script) that provides ! compatibility with any other f77 programs. ! ! Note that invoking the `uninstall' target also tests this ! macro/file at that time to determine whether to delete the ! installed copy of `f77'. ! ! 4. Decide how installation of g77 should affect any existing installation ! of f2c on your system. ! ! If you do not have f2c on your system (e.g. no /usr/bin/f2c, no ! /usr/include/f2c.h, and no /usr/lib/libf2c.a, /usr/lib/libF77.a, ! or /usr/lib/libI77.a), you don't need to be concerned with this ! item. ! ! If you do have f2c on your system, you need to decide how users ! of f2c will be affected by your installing g77. Since g77 is ! currently designed to be object-code-compatible with f2c (with ! very few, clear exceptions), users of f2c might want to combine ! f2c-compiled object files with g77-compiled object files in a ! single executable. ! ! To do this, users of f2c should use the same copies of f2c.h and ! libf2c.a that g77 uses (and that get built as part of g77). ! ! If you do nothing here, the g77 installation process will not ! overwrite the include/f2c.h and lib/libf2c.a files with its ! own versions, and in fact will not even install libf2c.a for use ! with the newly installed versions of gcc and g77 if it sees ! that lib/libf2c.a exists -- instead, it will print an explanatory ! message and skip this part of the installation. ! ! To install g77's versions of f2c.h and libf2c.a in the appropriate ! places, create the file `f2c-install-ok' (e.g. via the UNIX ! command `touch f2c-install-ok') in the source or build top-level ! directory (the same directory in which the g77 `f' directory ! resides, not the `f' directory itself), or edit gcc/f/Make-lang.in ! and change the definition of the F2C_INSTALL_FLAG macro appropriately. ! ! Make sure that when you enable the overwriting of f2c.h and libf2c.a ! as used by f2c, you have a recent and properly configured version of ! bin/f2c so that it generates code that is compatible with g77. ! ! If you don't want installation of g77 to overwrite f2c's existing ! installation, but you do want g77 installation to proceed with ! installation of its own versions of f2c.h and libf2c.a in places ! where gcc/g77 will pick them up (even when linking f2c-compiled ! object files -- which might lead to incompatibilities), create ! the file `f2c-exists-ok' (e.g. via the UNIX command ! `touch f2c-exists-ok') in the source or build top-level directory, ! or edit gcc/f/Make-lang.in and change the definition of the ! F2CLIBOK macro appropriately. ! ! 5. Follow the directions in the INSTALL file in the gcc source ! tree (such as running ./configure, doing "make ...", and so on -- ! you MUST run ./configure before you run make, even if you're ! using an already existing gcc development directory, because ! ./configure does the work to recognize that you've added ! g77 to the configuration!!). ! ! Because the `gcc' command is necessarily modified by the GNU ! Fortran patches, so that it recognizes Fortran source files, ! make sure the configuration you select will result in the ! proper installation of `gcc'. For example, if `gcc' ! lives in `/usr/bin/gcc' on your system, you have to make sure ! installation of GNU Fortran causes that old version of `gcc' ! to get overwritten by the new one, by doing: ! ! ./configure --prefix=/usr ! ! You might want to back up your existing copy of `bin/gcc', and ! perhaps even the entire `lib/gcc-lib' directory, first. These ! typically are found in `/usr' or `/usr/local'. If you aren't ! certain where the currently installed version of `gcc' and its ! related programs reside, look at the output of this command: ! ! gcc -v -o /dev/null -xc /dev/null -xnone ! ! Just building GNU Fortran should not overwrite any installed ! programs -- but obviously after you build g77, you will want ! to install it, so backing up anything it might overwrite is ! a good idea (for any package, not just g77, though in this case ! it is intentional that g77 overwrites gcc if it is already ! installed). ! ! WARNING: If you follow the procedure to build successive "stages" ! and you compare the object files produced by various stages, ! the file f/zzz.o WILL be different. That is because it ! contains a string with an expansion of the __TIME__ macro, ! which expands to the current time of day. It is nothing ! to worry about, since f/zzz.c doesn't contain any actual code. ! This file does allow you to override its use of __DATE__ and ! __TIME__ by defining macros for the compilation -- see the ! source code for details. ! ! NOTE: Configuring with the --srcdir argument is only known ! to work with GNU make. Irix5.2 and SunOS4.1 makes definitely ! won't work outside the source directory at present. g77's ! portion of the `configure' script issues a warning message ! about this (when you configure for building binaries outside ! the source directory). ! ! ALSO NOTE: If you have the appropriate version of gcc ! already installed on your system, doing ! ! make -k CC=gcc LANGUAGES=f77 g77 install ! ! should suffice to build and install just g77 and gcc, without building ! any of the other GNU compilers. HOWEVER, if this approach fails ! miserably, you should be able to do the installation by following ! the usual gcc installation method. (If libf2c.a is not installed ! as expected, try specifying the install-libf77 and install-f2c-all ! targets explicitly. These shouldn't have to be separately specified, ! but might need to be when using non-GNU versions of make. We don't ! know why this is, yet.) Using the "-k" option makes it continue after ! installation problems like not having makeinfo installed on your system, ! and the `g77' target ensures that the g77 command driver is built and ! thus installed. ! ! ALSO**2 NOTE: It seems that building g77 might require bison and ! makeinfo to be installed. g77 itself has no need for these, but ! other portions of gcc might, so before you start building gcc or ! g77, make sure bison and makeinfo are installed. ! ! IF YOU CANNOT INSTALL bison: make sure you start with a _fresh_ ! distribution of gcc, do _not_ do "make realclean", and to be safe, ! type these commands to convince make not to try rebuilding them ! from the bison input files: ! ! cd gcc-2.6.2 # or 2.6.3 ! touch bi-parser.c bi-parser.h c-parse.c c-parse.h cexp.c ! touch cp/parse.c cp/parse.h objc-parse.c ! ! IF YOU CANNOT INSTALL makeinfo: either use the -k option when ! invoking make to specify the install or install-libf77 targets, ! or specify "MAKEINFO=echo" on the make command line. If you fail ! to do one of these, some things like libf2c.a will fail to be ! installed after the attempt to use makeinfo fails. ! ! ALSO**3 NOTE: Most of gcc/f/*.c is compiled using the `-W -Wall' ! options. There are some prototype declarations in gcc/f/com.h that ! get around the lack of them in the back-end code in gcc/*.c, but ! turning on strict checking of prototypes and such has not yet ! been tried. ! ! ALSO**4 NOTE: g77 currently requires GNU C, not just ANSI C, to ! build it. This is expected to be fixed in 0.6. If you use a ! non-GNU C compiler, syntax errors are likely to be reported for ! source files like gcc/f/expr.c. As of 0.5.16, an explicit ! `#error' directive is used to catch use of a non-gcc compiler ! in a friendlier, self-documenting way. ! ! ALSO**5 NOTE: g77 _does_ require a working ANSI C environment ! to build it. In particular, some systems are missing strtoul(), ! bsearch(), etc in their libraries. See gcc/f/proj.h for information ! on how to temporarily work around the bugs on these systems. ! (These are emphatically _not_ g77 bugs. DO NOT REPORT THEM ! TO THE g77 AUTHOR!!!) ! ! *BUILDING BINARIES FOR DISTRIBUTION* ! ! If you are building g77 for distribution to others in binary form, ! first make sure you are aware of your legal responsibilities (read ! the file gcc/COPYING thoroughly). ! ! Then, consider your target audience and decide where g77 should ! be installed. ! ! For systems like Linux that have no native Fortran compiler (or ! where g77 could be considered the native compiler for Fortran and ! gcc for C, etc.), you should definitely configure g77 for installation ! in /usr/bin instead of /usr/local/bin. E.g. specify the ! `--prefix=/usr' option when running `./configure'. You might ! also want to set up the distribution so the `f77' command is a ! link to `g77' -- just make an empty file named `f77-install-ok' in ! the source or build directory (the one in which the `f' directory ! resides, not the `f' directory itself) when you specify one of the ! `install' or `uninstall' targets in a `make' command. ! For a system that might already have f2c installed, you definitely will want to make another empty file (in the same directory) named either `f2c-exists-ok' or `f2c-install-ok'. Use the former if you ! don't want your distribution to overwrite f2c-related files in existing ! systems; use the latter if you want to improve the likelihood that ! users will be able to use both f2c and g77 to compile code for a ! single program without encountering link-time or run-time incompatibilities. ! For other systems with native f77 (and cc) compilers, configure ! g77 as you (or most of your audience) would configure gcc for ! their installations. Typically this is for installation in ! /usr/local, and would not include a copy of g77 named `f77', so ! users could still use the native f77. ! ! In any case, for g77 to work properly, you MUST ensure that the ! binaries you distribute include not only the `g77' and `f771' ! executables in bin/, plus the `libf2c.a' library in lib/, but ! the new (updated) version of the `gcc' executable in bin/. ! Whether you want to include the slightly updated (and possibly ! improved) versions of `cc1', `cc1plus', and whatever other ! binaries get rebuilt with the changes the GNU Fortran distribution ! makes to the GNU back end, is up to you. These changes are ! highly unlikely to break any compilers, and it is possible ! they'll fix back-end bugs that can be demonstrated using front ! ends other than GNU Fortran's. Please assure users that unless ! their version of the `gcc' command is older than, say, 2.6.2, ! they are unlikely to experience any problems by overwriting ! it with your version -- though they could certainly protect ! themselves by making backup copies first! ! ! Further, PLEASE find a way to include the `gcc/f/DOC' and ! `gcc/f/BUGS' files in your distribution, so users have some way ! to read the documentation. There is a `g77.1' file for ! installation in man/, but this is incredibly incomplete. There ! is plenty of room for improvement in g77 documentation, but ! at least the DOC and BUGS files have important information even ! though in a primitive form (straight text). If you can help out ! the GNU Fortran project by converting these files (plus this ! one, INSTALL) into canonical GNU documentation formats (.texi, ! info, whatever), please offer this to `fortran@gnu.ai.mit.edu'. ! ! Finally, PLEASE ask for bug reports to go to you first, at least ! until you're sure your distribution is widely used and has been ! well tested. This especially goes for those of you making any ! changes to the g77 sources to port g77, e.g. to OS/2. ! `fortran@gnu.ai.mit.edu' has received a fair amount of bug ! reports that turned out to be problems with other peoples' ports ! and distributions, about which nothing could be done for the ! user. Once you are quite certain a bug report does not involve ! your efforts, you can forward it to us. ! ! *OBSCURE CONFIGURATION INFORMATION* ! ! g77 now, on most machines, puts more variables and arrays on the stack ! where possible, and can be configured (by changing FFECOM_sizeMAXSTACKITEM ! in gcc/f/com.c) to force smaller-sized entities into static storage (saving ! on stack space) or permit larger-sized entities to be put on the ! stack (which can improve run-time performance). ! ! The g77 build will crash if an attempt is made to build it as a cross-compiler ! for a target when g77 cannot reliably determine the bit pattern of ! floating-point constants for the target. Planned improvements for g77-0.6 ! will give it the capabilities it needs to not have to crash the build ! but rather generate correct code for the target. (Currently, g77 ! would generate bad code under such circumstances if it didn't crash ! during the build, e.g. when compiling a source file that does ! something like EQUIVALENCE (I,R) and DATA R/3.1415926535/.) ! ! A warning message is issued when g77 sees code that provides ! initial values (e.g. via DATA) to an aggregate area (COMMON or ! EQUIVALENCE, or even a large enough array or CHARACTER variable) ! that is large enough to increase g77's compile time by roughly ! a factor of 10. This size is currently quite small, since g77 ! currently has a known bug (see f/BUGS) requiring too much memory ! and time to handle such cases. See f/data.c macro ! FFEDATA_sizeTOO_BIG_INIT_ for the minimum size (in storage units, ! which can be bytes, words, or whatever, on a case-by-case basis). ! ! As of 0.5.16, g77 warns when it is used to compile Fortran code ! for a target configuration that is not basically a 32-bit ! machine (e.g. an Alpha). This is because g77 is known to not work ! properly on such configurations. This is expected to be fixed ! at 0.6, at which point the warning would be dropped. --- 1,1311 ---- ! This file contains installation information for the GNU Fortran ! compiler. Copyright (C) 1995, 1996 Free Software Foundation, Inc. You ! may copy, distribute, and modify it freely as long as you preserve this ! copyright notice and permission notice. ! ! Installing GNU Fortran ! ********************** ! ! The following information describes how to install `g77'. ! ! The information in this file generally pertains to dealing with ! *source* distributions of `g77' and `gcc'. It is possible that some of ! this information will be applicable to some *binary* distributions of ! these products--however, since these distributions are not made by the ! maintainers of `g77', responsibility for binary distributions rests with ! whoever built and first distributed them. ! ! Nevertheless, efforts to make `g77' easier to both build and install ! from source and package up as a binary distribution are ongoing. ! ! Prerequisites ! ============= ! ! The procedures described to unpack, configure, build, and install ! `g77' assume your system has certain programs already installed. ! ! The following prerequisites should be met by your system before you ! follow the `g77' installation instructions: ! ! `gzip' ! To unpack the `gcc' and `g77' distributions, you'll need the ! `gunzip' utility in the `gzip' distribution. Most UNIX systems ! already have `gzip' installed. If yours doesn't, you can get it ! from the FSF. ! ! Note that you'll need `tar' and other utilities as well, but all ! UNIX systems have these. There are GNU versions of all these ! available--in fact, a complete GNU UNIX system can be put together ! on most systems, if desired. ! ! `gcc-2.7.2.tar.gz' ! You need to have this, or some other applicable, version of `gcc' ! on your system. The version should be an exact copy of a ! distribution from the FSF. It is approximately 7MB large. ! ! If you've already unpacked `gcc-2.7.2.tar.gz' into a directory ! (named `gcc-2.7.2') called the "source tree" for `gcc', you can ! delete the distribution itself, but you'll need to remember to ! skip any instructions to unpack this distribution. ! ! Without an applicable `gcc' source tree, you cannot build `g77'. ! You can obtain an FSF distribution of `gcc' from the FSF. ! ! `g77-0.5.18.tar.gz' ! You probably have already unpacked this distribution, or you are ! reading an advanced copy of this manual, which is contained in ! this distribution. This distribution approximately 1MB large. ! ! You can obtain an FSF distribution of `g77' from the FSF, the same ! way you obtained `gcc'. ! ! 100MB disk space ! For a complete "bootstrap" build, about 100MB of disk space is ! required for `g77' by the author's current Linux system. ! ! Some juggling can reduce the amount of space needed; during the ! bootstrap process, once Stage 3 starts, during which the version ! of `gcc' that has been copied into the `stage2/' directory is used ! to rebuild the system, you can delete the `stage1/' directory to ! free up some space. ! ! It is likely that many systems don't require the complete ! bootstrap build, as they already have a recent version of `gcc' ! installed. Such systems might be able to build `g77' with only ! about 75MB of free space. ! ! `patch' ! Although you can do everything `patch' does yourself, by hand, ! without much trouble, having `patch' installed makes installation ! of new versions of GNU utilities such as `g77' so much easier that ! it is worth getting. You can obtain `patch' the same way you ! obtained `gcc' and `g77'. ! ! In any case, you can apply patches by hand--patch files are ! designed for humans to read them. ! ! `make' ! Your system must have `make', and you will probably save yourself ! a lot of trouble if it is GNU `make' (sometimes referred to as ! `gmake'). ! ! `cc' ! Your system must have a working C compiler. ! ! *Note Installing GNU CC: (gcc)Installation, for more information ! on prerequisites for installing `gcc'. ! ! `bison' ! If you do not have `bison' installed, you can usually work around ! any need for it, since `g77' itself does not use it, and `gcc' ! normally includes all files generated by running it in its ! distribution. You can obtain `bison' the same way you obtained ! `gcc' and `g77'. ! ! *Note Missing bison?::, for information on how to work around not ! having `bison'. ! ! `makeinfo' ! If you are missing `makeinfo', you can usually work around any ! need for it. You can obtain `makeinfo' the same way you obtained ! `gcc' and `g77'. ! ! *Note Missing makeinfo?::, for information on getting around the ! lack of `makeinfo'. ! ! `root' access ! To perform the complete installation procedures on a system, you ! need to have `root' access to that system, or equivalent access. ! ! Portions of the procedure (such as configuring and building `g77') ! can be performed by any user with enough disk space and virtual ! memory. ! ! However, these instructions are oriented towards less-experienced ! users who want to install `g77' on their own personal systems. ! ! System administrators with more experience will want to determine ! for themselves how they want to modify the procedures described ! below to suit the needs of their installation. ! ! Problems Installing ! =================== ! ! This is a list of problems (and some apparent problems which don't ! really mean anything is wrong) that show up when configuring, building, ! installing, or porting GNU Fortran. ! ! *Note Installation Problems: (gcc)Installation Problems, for more ! information on installation problems that can afflict either `gcc' or ! `g77'. ! ! General Problems ! ---------------- ! ! * On SunOS systems, linking the `f771' program produces an error ! message concerning an undefined symbol named `_strtoul'. ! ! This is not a `g77' bug. *Note Patching GNU Fortran::, for ! information on a workaround provided by `g77'. ! ! The proper fix is either to upgrade your system to one that ! provides a complete ANSI C environment, or improve `gcc' so that ! it provides one for all the languages and configurations it ! supports. ! ! *Note:* In earlier versions of `g77', an automated workaround for ! this problem was attempted. It worked for systems without ! `_strtoul', substituting the incomplete-yet-sufficient version ! supplied with `g77' for those systems. However, the automated ! workaround failed mysteriously for systems that appeared to have ! conforming ANSI C environments, and it was decided that, lacking ! resources to more fully investigate the problem, it was better to ! not punish users of those systems either by requiring them to work ! around the problem by hand or by always substituting an incomplete ! `strtoul()' implementation when their systems had a complete, ! working one. Unfortunately, this meant inconveniencing users of ! systems not having `strtoul()', but they're using obsolete (and ! generally unsupported) systems anyway. ! ! * It'd be helpful if `g77''s `Makefile.in' or `Make-lang.in' would ! create the various `stageN' directories and their subdirectories, ! so expert installers wouldn't have to reconfigure after cleaning ! up. ! ! * Improvements to the way `libf2c' is built could make building ! `g77' as a cross-compiler easier--for example, passing and using ! `LD' and `AR' in the appropriate ways. ! ! * `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. ! These patch files might contain unnecessary, but possibly helpful, ! patches. As a result, it is possible this issue might never be ! resolved, except by eliminating the need for the person ! configuring `g77' to apply a patch by hand, by going to a more ! automated approach (such as configure-time patching). ! ! * It should be possible to build the runtime without building `cc1' ! and other non-Fortran items, but, for now, an easy way to do that ! is not yet established. ! ! * Compiling `g77' requires GNU C, not just ANSI C. Fixing this ! wouldn't be very hard (just tedious), but the code using GNU ! extensions to the C language is expected to be rewritten for 0.6 ! anyway, so there are no plans for an interim fix. ! ! Cross-compiler Problems ! ----------------------- ! ! `g77' has been in alpha testing since September of 1992, and in ! public beta testing since February of 1995. Alpha testing was done by ! a small number of people worldwide on a fairly wide variety of ! machines, involving self-compilation in most or all cases. Beta ! testing has been done primarily via self-compilation, but in more and ! more cases, cross-compilation (and "criss-cross compilation", where a ! version of a compiler is built on one machine to run on a second and ! generate code that runs on a third) has been tried and has succeeded, ! to varying extents. ! ! Generally, `g77' can be ported to any configuration to which `gcc', ! `f2c', and `libf2c' can be ported and made to work together, aside from ! the known problems described in this manual. If you want to port `g77' ! to a particular configuration, you should first make sure `gcc' and ! `libf2c' can be ported to that configuration before focusing on `g77', ! because `g77' is so dependent on them. ! ! Even for cases where `gcc' and `libf2c' work, you might run into ! problems with cross-compilation on certain machines, for several ! reasons. ! ! * There is one known bug (a design bug to be fixed in 0.6) that ! prevents configuration of `g77' as a cross-compiler in some cases, ! though there are assumptions made during configuration that ! probably make doing non-self-hosting builds a hassle, requiring ! manual intervention. ! ! * `gcc' might still have some trouble being configured for certain ! combinations of machines. For example, it might not know how to ! handle floating-point constants. ! ! * There are still some challenges putting together the right ! run-time libraries (needed by `libf2c') for a target system, ! depending on the systems involved in the configuration. (This is ! a general problem with cross-compilation, and with `gcc' in ! particular.) ! ! Quick Start ! =========== ! ! This procedure configures, builds, and installs `g77' "out of the ! box" and works on most UNIX systems. Each command is identified by a ! unique number, used in the explanatory text that follows. For the most ! part, the output of each command is not shown, though indications of ! the types of responses are given in a few cases. ! ! To perform this procedure, the installer must be logged in as user ! `root'. Much of it can be done while not logged in as `root', and ! users experienced with UNIX administration should be able to modify the ! procedure properly to do so. ! ! Following traditional UNIX conventions, it is assumed that the ! source trees for `g77' and `gcc' will be placed in `/usr/src'. It also ! is assumed that the source distributions themselves already reside in ! `/usr/FSF', a naming convention used by the author of `g77' on his own ! system: ! ! /usr/FSF/gcc-2.7.2.tar.gz ! /usr/FSF/g77-0.5.18.tar.gz ! ! Users of the following systems should not blindly follow these ! quick-start instructions, because of problems their systems have coping ! with straightforward installation of `g77': ! ! * SunOS ! ! * Alpha ! ! Instead, see *Note Complete Installation::, for detailed information ! on how to configure, build, and install `g77' for your particular ! system. Also, see *Note Known Causes of Trouble with GNU Fortran: ! Trouble, for information on bugs and other problems known to afflict the ! installation process, and how to report newly discovered ones. ! ! If your system is *not* on the above list, and *is* a UNIX system or ! one of its variants, you should be able to follow the instructions ! below. If you vary *any* of the steps below, you might run into ! trouble, including possibly breaking existing programs for other users ! of your system. Before doing so, it is wise to review the explanations ! of some of the steps. These explanations follow this list of steps. ! ! sh[ 1]# `cd /usr/src' ! ! sh[ 2]# `gunzip -c < /usr/FSF/gcc-2.7.2.tar.gz | tar xf -' ! ! [Might say "Broken pipe"...that is normal on some systems.] ! sh[ 3]# `gunzip -c < /usr/FSF/g77-0.5.18.tar.gz | tar xf -' ! ! ["Broken pipe" again possible.] ! sh[ 4]# `ln -s gcc-2.7.2 gcc' ! ! sh[ 5]# `ln -s g77-0.5.18 g77' ! ! sh[ 6]# `mv -i g77/* gcc' ! ! [No questions should be asked by mv here; or, you made a mistake.] ! sh[ 7]# `patch -p1 -V t -d gcc-2.7.2 < gcc-2.7.2/f/gbe/2.7.2.diff' ! ! [Unless patch complains about rejected patches, this step worked.] ! sh[ 8]# `cd gcc' ! sh[ 9]# `touch f77-install-ok' ! ! [Do not do the above if your system already has an f77 ! command, unless you've checked that overwriting it ! is okay.] ! sh[10]# `touch f2c-install-ok' ! ! [Do not do the above if your system already has an f2c ! command, unless you've checked that overwriting it ! is okay. Else, `touch f2c-exists-ok'.] ! sh[11]# `./configure --prefix=/usr' ! ! [Do not do the above if gcc is not installed in /usr/bin. ! You might need a different `--prefix=...', as ! described below.] ! sh[12]# `make bootstrap' ! ! [This takes a long time, and is where most problems occur.] ! sh[13]# `rm -fr stage1' ! ! sh[14]# `make -k install' ! ! [The actual installation.] ! sh[15]# `g77 -v' ! ! [Verify that g77 is installed, obtain version info.] ! sh[16]# ! ! *Note Updating Your Info Directory: Updating Documentation, for ! information on how to update your system's top-level `info' directory ! to contain a reference to this manual, so that users of `g77' can ! easily find documentation instead of having to ask you for it. ! ! Elaborations of many of the above steps follows: ! ! Step 1: `cd /usr/src' ! You can build `g77' pretty much anyplace. By convention, this ! manual assumes `/usr/src'. It might be helpful if other users on ! your system knew where to look for the source code for the ! installed version of `g77' and `gcc' in any case. ! ! Step 4: `ln -s gcc-2.7.2 gcc' ! Step 5: `ln -s g77-0.5.18 g77' ! These commands mainly help reduce typing, and help reduce visual ! clutter in examples in this manual showing what to type to install ! `g77'. ! ! *Note Unpacking::, for information on using distributions of `g77' ! made by organizations other than the FSF. ! ! Step 6: `mv -i g77/* gcc' ! After doing this, you can, if you like, type `rm g77' and `rmdir ! g77-0.5.18' to remove the empty directory and the symbol link to ! it. But, it might be helpful to leave them around as quick ! reminders of which version(s) of `g77' are installed on your ! system. ! ! *Note Unpacking::, for information on the contents of the `g77' ! directory (as merged into the `gcc' directory). ! ! Step 7: `patch -p1 ...' ! This can produce a wide variety of printed output, from `Hmm, I ! can't seem to find a patch in there anywhere...' to long lists of ! messages indicated that patches are being found, applied ! successfully, and so on. ! ! If messages about "fuzz", "offset", or especially "reject files" ! are printed, it might mean you applied the wrong patch file. If ! you believe this is the case, it is best to restart the sequence ! after deleting (or at least renaming to unused names) the ! top-level directories for `g77' and `gcc' and their symbolic links. ! ! After this command finishes, the `gcc' directory might have old ! versions of several files as saved by `patch'. To remove these, ! after `cd gcc', type `rm -i *.~*~'. ! ! *Note Merging Distributions::, for more information. ! ! Step 9: `touch f77-install-ok' ! Don't do this if you don't want to overwrite an existing version ! of `f77' (such as a native compiler, or a script that invokes ! `f2c'). Otherwise, installation will overwrite the `f77' command ! and the `f77' man pages with copies of the corresponding `g77' ! material. ! ! *Note Installing `f77': Installing f77, for more information. ! ! Step 10: `touch f2c-install-ok' ! Don't do this if you don't want to overwrite an existing ! installation of `libf2c' (though, chances are, you do). Instead, ! `touch f2c-exists-ok' to allow the installation to continue ! without any error messages about `/usr/lib/libf2c.a' already ! existing. ! ! *Note Installing `f2c': Installing f2c, for more information. ! ! Step 11: `./configure --prefix=/usr' ! This is where you specify that the `g77' executable is to be ! installed in `/usr/bin/', the `libf2c.a' library is to be ! installed in `/usr/lib/', and so on. ! ! You should ensure that any existing installation of the `gcc' ! executable is in `/usr/bin/'. Otherwise, installing `g77' so that ! it does not fully replace the existing installation of `gcc' is ! likely to result in the inability to compile Fortran programs. ! ! *Note Where in the World Does Fortran (and GNU C) Go?: Where to ! Install, for more information on determining where to install ! `g77'. *Note Configuring gcc::, for more information on the ! configuration process triggered by invoking the `./configure' ! script. ! ! Step 12: `make bootstrap' ! *Note Installing GNU CC: (gcc)Installation, for information on the ! kinds of diagnostics you should expect during this procedure. ! ! *Note Building gcc::, for complete `g77'-specific information on ! this step. ! ! Step 13: `rm -fr stage1' ! You don't need to do this, but it frees up disk space. ! ! Step 14: `make -k install' ! If this doesn't seem to work, try: ! ! make -k install install-libf77 install-f2c-all ! ! *Note Installation of Binaries::, for more information. ! ! *Note Updating Your Info Directory: Updating Documentation, for ! information on entering this manual into your system's list of ! texinfo manuals. ! ! Complete Installation ! ===================== ! ! Here is the complete `g77'-specific information on how to configure, ! build, and install `g77'. ! ! Unpacking ! --------- ! ! The `gcc' source distribution is a stand-alone distribution. It is ! designed to be unpacked (producing the `gcc' source tree) and built as ! is, assuming certain prerequisites are met (including the availability ! of compatible UNIX programs such as `make', `cc', and so on). ! ! However, before building `gcc', you will want to unpack and merge ! the `g77' distribution in with it, so that you build a Fortran-capable ! version of `gcc', which includes the `g77' command, the necessary ! run-time libraries, and this manual. ! ! Unlike `gcc', the `g77' source distribution is *not* a stand-alone ! distribution. It is designed to be unpacked and, afterwards, ! immediately merged into an applicable `gcc' source tree. That is, the ! `g77' distribution *augments* a `gcc' distribution--without `gcc', ! generally only the documentation is immediately usable. ! ! A sequence of commands typically used to unpack `gcc' and `g77' is: ! ! sh# `cd /usr/src' ! sh# `gunzip -d < /usr/FSF/gcc-2.7.2.tar.gz | tar xf -' ! sh# `gunzip -d < /usr/FSF/g77-0.5.18.tar.gz | tar xf -' ! sh# `ln -s gcc-2.7.2 gcc' ! sh# `ln -s g77-0.5.18 g77' ! sh# `mv -i g77/* gcc' ! ! *Notes:* The commands beginning with `gunzip...' might print `Broken ! pipe...' as they complete. That is nothing to worry about, unless you ! actually *hear* a pipe breaking. The `ln' commands are helpful in ! reducing typing and clutter in installation examples in this manual. ! Hereafter, the top level of `gcc' source tree is referred to as `gcc', ! and the top level of just the `g77' source tree (prior to issuing the ! `mv' command, above) is referred to as `g77'. ! ! There are three top-level names in a `g77' distribution: ! ! g77/COPYING.g77 ! g77/README.g77 ! g77/f ! ! All three entries should be moved (or copied) into a `gcc' source ! tree (typically named after its version number and as it appears in the ! FSF distributions--e.g. `gcc-2.7.2'). ! ! `g77/f' is the subdirectory containing all of the code, ! documentation, and other information that is specific to `g77'. The ! other two files exist to provide information on `g77' to someone ! encountering a `gcc' source tree with `g77' already present, who has ! not yet read these installation instructions and thus needs help ! understanding that the source tree they are looking at does not come ! from a single FSF distribution. They also help people encountering an ! unmerged `g77' source tree for the first time. ! ! *Note:* Please use *only* `gcc' and `g77' source trees as ! distributed by the FSF. Use of modified versions, such as the ! Pentium-specific-optimization port of `gcc', is likely to result in ! problems that appear to be in the `g77' code but, in fact, are not. Do ! not use such modified versions unless you understand all the ! differences between them and the versions the FSF distributes--in which ! case you should be able to modify the `g77' (or `gcc') source trees ! appropriately so `g77' and `gcc' can coexist as they do in the stock ! FSF distributions. ! ! Merging Distributions ! --------------------- ! ! After merging the `g77' source tree into the `gcc' source tree, the ! final merge step is done by applying the pertinent patches the `g77' ! distribution provides for the `gcc' source tree. ! ! Read the file `gcc/f/gbe/README', and apply the appropriate patch ! file for the version of the GNU CC compiler you have, if that exists. ! If the directory exists but the appropriate file does not exist, you ! are using either an old, unsupported version, or a release one that is ! newer than the newest `gcc' version supported by the version of `g77' ! you have. ! ! GNU version numbers make it easy to figure out whether a particular ! version of a distribution is newer or older than some other version of ! that distribution. The format is, generally, MAJOR.MINOR.PATCH, with ! each field being a decimal number. (You can safely ignore leading ! zeros; for example, 1.5.3 is the same as 1.5.03.) The MAJOR field only ! increases with time. The other two fields are reset to 0 when the ! field to their left is incremented; otherwise, they, too, only increase ! with time. So, version 2.6.2 is newer than version 2.5.8, and version ! 3.0 is newer than both. (Trailing `.0' fields often are omitted in ! announcements and in names for distributions and the directories they ! create.) ! ! If your version of `gcc' is older than the oldest version supported ! by `g77' (as casually determined by listing the contents of ! `gcc/f/gbe/'), you should obtain a newer, supported version of `gcc'. ! (You could instead obtain an older version of `g77', or try and get ! your `g77' to work with the old `gcc', but neither approach is ! recommended, and you shouldn't bother reporting any bugs you find if you ! take either approach, because they're probably already fixed in the ! newer versions you're not using.) ! ! If your version of `gcc' is newer than the newest version supported ! by `g77', it is possible that your `g77' will work with it anyway. If ! the version number for `gcc' differs only in the PATCH field, you might ! as well try applying the `g77' patch that is for the newest version of ! `gcc' having the same MAJOR and MINOR fields, as this is likely to work. ! ! So, for example, if `g77' has support for versions 2.7.0 and 2.7.1, ! it is likely that `gcc-2.7.2' would work well with `g77' by using the ! `2.7.1.diff' patch file provided with `g77' (aside from some offsets ! reported by `patch', which usually are harmless). ! ! However, `gcc-2.8.0' would almost certainly not work with that ! version of `g77' no matter which patch file was used, so a new version ! of `g77' would be needed (and you should wait for it rather than ! bothering the maintainers--*note User-Visible Changes: Changes.). ! ! This complexity is the result of `gcc' and `g77' being separate ! distributions. By keeping them separate, each product is able to be ! independently improved and distributed to its user base more frequently. ! ! However, `g77' often requires changes to contemporary versions of ! `gcc'. Also, the GBE interface defined by `gcc' typically undergoes ! some incompatible changes at least every time the MINOR field of the ! version number is incremented, and such changes require corresponding ! changes to the `g77' front end (FFE). ! ! It is hoped that the GBE interface, and the `gcc' and `g77' products ! in general, will stabilize sufficiently for the need for hand-patching ! to disappear. ! ! Invoking `patch' as described in `gcc/f/gbe/README' can produce a ! wide variety of printed output, from `Hmm, I can't seem to find a patch ! in there anywhere...' to long lists of messages indicated that patches ! are being found, applied successfully, and so on. ! ! If messages about "fuzz", "offset", or especially "reject files" are ! printed, it might mean you applied the wrong patch file. If you ! believe this is the case, it is best to restart the sequence after ! deleting (or at least renaming to unused names) the top-level ! directories for `g77' and `gcc' and their symbolic links. That is ! because `patch' might have partially patched some `gcc' source files, ! so reapplying the correct patch file might result in the correct ! patches being applied incorrectly (due to the way `patch' necessarily ! works). ! ! After `patch' finishes, the `gcc' directory might have old versions ! of several files as saved by `patch'. To remove these, after `cd gcc', ! type `rm -i *.~*~'. ! ! *Note:* `g77''s configuration file `gcc/f/config-lang.in' ensures ! that the source code for the version of `gcc' being configured has at ! least one GBE function required specifically by `g77'. This function ! was added to `gcc-2.7.1', making the patch file ! `g77-0.5.17/f/gbe/2.7.1.diff' empty of actual patches. ! ! For `gcc-2.7.0' and earlier, this configuration-time checking should ! catch failure to apply the correct patch and, if so caught, it should ! abort the configuration with an explanation. *Please* do not try to ! disable the check, otherwise `g77' might well appear to build and ! install correctly, and even appear to compile correctly, but could ! easily produce broken code. ! ! `diff -rcp2N' is used to create the patch files in `gcc/f/gbe/'. ! ! Installing `f77' ! ---------------- ! ! You should decide whether you want installation of `g77' to also ! install an `f77' command. On systems with a native `f77', this is not ! normally desired, so `g77' does not do this by default. ! ! If you want `f77' installed, create the file `f77-install-ok' (e.g. ! via the UNIX command `touch f77-install-ok') in the source or build ! top-level directory (the same directory in which the `g77' `f' ! directory resides, not the `f' directory itself), or edit ! `gcc/f/Make-lang.in' and change the definition of the ! `F77_INSTALL_FLAG' macro appropriately. ! ! Usually, this means that, after typing `cd gcc', you would type ! `touch f77-install-ok'. ! ! When you enable installation of `f77', either a link to or a direct ! copy of the `g77' command is made. Similarly, `f77.1' is installed as ! a man page. ! ! (The `uninstall' target in the `gcc/Makefile' also tests this macro ! and file, when invoked, to determine whether to delete the installed ! copies of `f77' and `f77.1'.) ! ! *Note:* No attempt is yet made to install a program (like a shell ! script) that provides compatibility with any other `f77' programs. ! Only the most rudimentary invocations of `f77' will work the same way ! with `g77'. ! ! Installing `f2c' ! ---------------- ! ! Currently, `g77' does not include `f2c' itself in its distribution. ! However, it does include a modified version of the `libf2c'. This ! version is normally compatible with `f2c', but has been modified to ! meet the needs of `g77' in ways that might possibly be incompatible ! with some versions or configurations of `f2c'. ! ! Decide how installation of `g77' should affect any existing ! installation of `f2c' on your system. ! ! If you do not have `f2c' on your system (e.g. no `/usr/bin/f2c', no ! `/usr/include/f2c.h', and no `/usr/lib/libf2c.a', `/usr/lib/libF77.a', ! or `/usr/lib/libI77.a'), you don't need to be concerned with this item. ! ! If you do have `f2c' on your system, you need to decide how users of ! `f2c' will be affected by your installing `g77'. Since `g77' is ! currently designed to be object-code-compatible with `f2c' (with very ! few, clear exceptions), users of `f2c' might want to combine ! `f2c'-compiled object files with `g77'-compiled object files in a ! single executable. ! ! To do this, users of `f2c' should use the same copies of `f2c.h' and ! `libf2c.a' that `g77' uses (and that get built as part of `g77'). ! ! If you do nothing here, the `g77' installation process will not ! overwrite the `include/f2c.h' and `lib/libf2c.a' files with its own ! versions, and in fact will not even install `libf2c.a' for use with the ! newly installed versions of `gcc' and `g77' if it sees that ! `lib/libf2c.a' exists--instead, it will print an explanatory message ! and skip this part of the installation. ! ! To install `g77''s versions of `f2c.h' and `libf2c.a' in the ! appropriate places, create the file `f2c-install-ok' (e.g. via the UNIX ! command `touch f2c-install-ok') in the source or build top-level ! directory (the same directory in which the `g77' `f' directory resides, ! not the `f' directory itself), or edit `gcc/f/Make-lang.in' and change ! the definition of the `F2C_INSTALL_FLAG' macro appropriately. ! ! Usually, this means that, after typing `cd gcc', you would type ! `touch f2c-install-ok'. ! ! Make sure that when you enable the overwriting of `f2c.h' and ! `libf2c.a' as used by `f2c', you have a recent and properly configured ! version of `bin/f2c' so that it generates code that is compatible with ! `g77'. ! ! If you don't want installation of `g77' to overwrite `f2c''s existing ! installation, but you do want `g77' installation to proceed with ! installation of its own versions of `f2c.h' and `libf2c.a' in places ! where `g77' will pick them up (even when linking `f2c'-compiled object ! files--which might lead to incompatibilities), create the file ! `f2c-exists-ok' (e.g. via the UNIX command `touch f2c-exists-ok') in ! the source or build top-level directory, or edit `gcc/f/Make-lang.in' ! and change the definition of the `F2CLIBOK' macro appropriately. ! ! Patching GNU Fortran ! -------------------- ! ! If you're using a SunOS system, you'll need to make the following ! change to `gcc/f/proj.h': edit the line reading ! ! #define FFEPROJ_STRTOUL 1 ... ! ! by replacing the `1' with `0'. ! ! This causes a minimal version of `strtoul()' provided as part of the ! `g77' distribution to be compiled and linked into whatever `g77' ! programs need it, since some systems (like SunOS) do not provide this ! function in their system libraries. ! ! Similarly, a minimal version of `bsearch()' is available and can be ! enabled by editing a line similar to the one for `strtoul()' above in ! `gcc/f/proj.h', if your system libraries lack `bsearch()'. ! ! These are not problems with `g77', which requires an ANSI C ! environment. You should upgrade your system to one that provides a ! full ANSI C environment, or encourage the maintainers of `gcc' to ! provide one to all `gcc'-based compilers in future `gcc' distributions. ! ! *Note Problems Installing::, for more information on why `strtoul()' ! comes up missing and on approaches to dealing with this problem that ! have already been tried. ! ! Where in the World Does Fortran (and GNU C) Go? ! ----------------------------------------------- ! ! Before configuring, you should make sure you know where you want the ! `g77' and `gcc' binaries to be installed after they're built, because ! this information is given to the configuration tool and used during the ! build itself. ! ! A `g77' installation necessarily requires installation of a ! `g77'-aware version of `gcc', so that the `gcc' command recognizes ! Fortran source files and knows how to compile them. ! ! For this to work, the version of `gcc' that you will be building as ! part of `g77' *must* be installed as the "active" version of `gcc' on ! the system. ! ! Sometimes people make the mistake of installing `gcc' as ! `/usr/local/bin/gcc', leaving an older, non-Fortran-aware version in ! `/usr/bin/gcc'. (Or, the opposite happens.) This can result in `g77' ! being unable to compile Fortran source files, because when it calls on ! `gcc' to do the actual compilation, `gcc' complains that it does not ! recognize the language, or the file name suffix. ! ! So, determine whether `gcc' already is installed on your system, ! and, if so, *where* it is installed, and prepare to configure the new ! version of `gcc' you'll be building so that it installs over the ! existing version of `gcc'. ! ! You might want to back up your existing copy of `bin/gcc', and the ! entire `lib/' directory, before you perform the actual installation (as ! described in this manual). ! ! Existing `gcc' installations typically are found in `/usr' or ! `/usr/local'. If you aren't certain where the currently installed ! version of `gcc' and its related programs reside, look at the output of ! this command: ! ! gcc -v -o /tmp/delete-me -xc /dev/null -xnone ! ! All sorts of interesting information on the locations of various ! `gcc'-related programs and data files should be visible in the output ! of the above command. However, you do have to sift through it ! yourself; `gcc' currently provides no easy way to ask it where it is ! installed and where it looks for the various programs and data files it ! calls on to do its work. ! ! Just *building* `g77' should not overwrite any installed ! programs--but, usually, after you build `g77', you will want to install ! it, so backing up anything it might overwrite is a good idea. (This is ! true for any package, not just `g77', though in this case it is ! intentional that `g77' overwrites `gcc' if it is already installed--it ! is unusual that the installation process for one distribution ! intentionally overwrites a program or file installed by another ! distribution.) ! ! Another reason to back up the existing version first, or make sure ! you can restore it easily, is that it might be an older version on ! which other users have come to depend for certain behaviors. However, ! even the new version of `gcc' you install will offer users the ability ! to specify an older version of the actual compilation programs if ! desired, and these older versions need not include any `g77' components. ! *Note Specifying Target Machine and Compiler Version: (gcc)Target ! Options, for information on the `-V' option of `gcc'. ! ! Configuring GNU CC ! ------------------ ! ! `g77' is configured automatically when you configure `gcc'. There ! are two parts of `g77' that are configured in two different ! ways--`g77', which "camps on" to the `gcc' configuration mechanism, and ! `libf2c', which uses a variation of the GNU `autoconf' configuration ! system. ! ! Generally, you shouldn't have to be concerned with either `g77' or ! `libf2c' configuration, unless you're configuring `g77' as a ! cross-compiler. In this case, the `libf2c' configuration, and possibly ! the `g77' and `gcc' configurations as well, might need special ! attention. (This also might be the case if you're porting `gcc' to a ! whole new system--even if it is just a new operating system on an ! existing, supported CPU.) ! ! To configure the system, see *Note Installing GNU CC: ! (gcc)Installation, following the instructions for running `./configure'. ! Pay special attention to the `--prefix=' option, which you almost ! certainly will need to specify. ! ! (Note that `gcc' installation information is provided as a straight ! text file in `gcc/INSTALL'.) ! ! The information printed by the invocation of `./configure' should ! show that the `f' directory (the Fortran language) has been configured. ! If it does not, there is a problem. ! ! *Note:* Configuring with the `--srcdir' argument is known to work ! with GNU `make', but it is not known to work with other variants of ! `make'. Irix5.2 and SunOS4.1 versions of `make' definitely won't work ! outside the source directory at present. `g77''s portion of the ! `configure' script issues a warning message about this when you ! configure for building binaries outside the source directory. ! ! Building GNU CC ! --------------- ! ! Building `g77' requires building enough of `gcc' that these ! instructions assume you're going to build all of `gcc', including ! `g++', `protoize', and so on. You can save a little time and disk ! space by changes the `LANGUAGES' macro definition in `gcc/Makefile.in' ! or `gcc/Makefile', but if you do that, you're on your own. One change ! is almost *certainly* going to cause failures: removing `c' or `f77' ! from the definition of the `LANGUAGES' macro. ! ! After configuring `gcc', which configures `g77' and `libf2c' ! automatically, you're ready to start the actual build by invoking ! `make'. ! ! *Note:* You *must* have run `./configure' before you run `make', ! even if you're using an already existing `gcc' development directory, ! because `./configure' does the work to recognize that you've added ! `g77' to the configuration. ! ! There are two general approaches to building GNU CC from scratch: ! ! "bootstrap" ! This method uses minimal native system facilities to build a ! barebones, unoptimized `gcc', that is then used to compile ! ("bootstrap") the entire system. ! ! "straight" ! This method assumes a more complete native system exists, and uses ! that just once to build the entire system. ! ! On all systems without a recent version of `gcc' already installed, ! the bootstrap method must be used. In particular, `g77' uses ! extensions to the C language offered, apparently, only by `gcc'. ! ! On most systems with a recent version of `gcc' already installed, ! the straight method can be used. This is an advantage, because it ! takes less CPU time and disk space for the build. However, it does ! require that the system have fairly recent versions of many GNU ! programs and other programs, which are not enumerated here. ! ! Bootstrap Build ! ............... ! ! A complete bootstrap build is done by issuing a command beginning ! with `make bootstrap ...', as described in *Note Installing GNU CC: ! (gcc)Installation. This is the most reliable form of build, but it ! does require the most disk space and CPU time, since the complete system ! is built twice (in Stages 2 and 3), after an initial build (during ! Stage 1) of a minimal `gcc' compiler using the native compiler and ! libraries. ! ! You might have to, or want to, control the way a bootstrap build is ! done by entering the `make' commands to build each stage one at a time, ! as described in the `gcc' manual. For example, to save time or disk ! space, you might want to not bother doing the Stage 3 build, in which ! case you are assuming that the `gcc' compiler you have built is ! basically sound (because you are giving up the opportunity to compare a ! large number of object files to ensure they're identical). ! ! To save some disk space during installation, after Stage 2 is built, ! you can type `rm -fr stage1' to remove the binaries built during Stage ! 1. ! ! *Note:* If you do build Stage 3 and you compare the object files ! produced by various stages, the file `gcc/f/zzz.o' *will* be different. ! That is because it contains a string with an expansion of the ! `__TIME__' macro, which expands to the current time of day. It is ! nothing to worry about, since `gcc/f/zzz.c' doesn't contain any actual ! code. It does allow you to override its use of `__DATE__' and ! `__TIME__' by defining macros for the compilation--see the source code ! for details. ! ! *Note Installing GNU CC: (gcc)Installation, for important ! information on building `gcc' that is not described in this `g77' ! manual. For example, explanations of diagnostic messages and whether ! they're expected, or indicate trouble, are found there. ! ! Straight Build ! .............. ! ! If you have a recent version of `gcc' already installed on your ! system, and if you're reasonably certain it produces code that is ! object-compatible with the version of `gcc' you want to build as part ! of building `g77', you can save time and disk space by doing a straight ! build. ! ! To build just the C and Fortran compilers and the necessary run-time ! libraries, issue the following command: ! ! make -k CC=gcc LANGUAGES=f77 all g77 ! ! (The `g77' target is necessary because the `gcc' build procedures ! apparently do not automatically build command drivers for languages in ! subdirectories. It's the `all' target that triggers building ! everything except, apparently, the `g77' command itself.) ! ! If you run into problems using this method, you have two options: ! ! * Abandon this approach and do a bootstrap build. ! ! * Try to make this approach work by diagnosing the problems you're ! running into and retrying. ! ! Especially if you do the latter, you might consider submitting any ! solutions as bug/fix reports. *Note Known Causes of Trouble with GNU ! Fortran: Trouble. ! ! However, understand that many problems preventing a straight build ! from working are not `g77' problems, and, in such cases, are not likely ! to be addressed in future versions of `g77'. ! ! Pre-installation Checks ! ----------------------- ! ! Before installing the system, which includes installing `gcc', you ! might want to do some minimum checking to ensure that some basic things ! work. ! ! Here are some commands you can try, and output typically printed by ! them when they work: ! ! sh# `cd /usr/src/gcc' ! sh# `./g77 --driver=./xgcc -B./ -v' ! ./xgcc -B./ -v -fnull-version -o /tmp/gfa03648 ... ! Reading specs from ./specs ! gcc version 2.7.1 ! ./cpp -lang-c -v -isystem ./include -undef ... ! GNU CPP version 2.7.1 (80386, BSD syntax) ! #include "..." search starts here: ! #include <...> search starts here: ! ./include ! /usr/include ! /usr/i486-unknown-linuxaout/include ! /usr/lib/gcc-lib/i486-unknown-linuxaout/2.7.1/include ! /usr/include ! End of search list. ! ./f771 /tmp/cca03648.i -quiet -dumpbase null.F -version ... ! GNU F77 version 2.7.1 (80386, BSD syntax) compiled ... ! GNU Fortran Front End version 0.5.18 compiled: ... ! as -o /tmp/cca036481.o /tmp/cca03648.s ! ld -m i386linux -o /tmp/gfa03648 /usr/lib/crt0.o -L. ... ! /usr/lib/crt0.o(.text+0x35): undefined reference to `main' ! sh# `./xgcc -B./ -v -o /tmp/delete-me -xc /dev/null -xnone' ! Reading specs from ./specs ! gcc version 2.7.1 ! ./cpp -lang-c -v -isystem ./include -undef ... ! GNU CPP version 2.7.1 (80386, BSD syntax) ! #include "..." search starts here: ! #include <...> search starts here: ! ./include ! /usr/include ! /usr/i486-unknown-linuxaout/include ! /usr/lib/gcc-lib/i486-unknown-linuxaout/2.7.1/include ! /usr/include ! End of search list. ! ./cc1 /tmp/cca03659.i -quiet -dumpbase null.c -version ... ! GNU C version 2.7.1 (80386, BSD syntax) compiled ... ! as -o /tmp/cca036591.o /tmp/cca03659.s ! ld -m i386linux -o /tmp/delete-me /usr/lib/crt0.o -L. ... ! /usr/lib/crt0.o(.text+0x35): undefined reference to `main' ! sh# ! ! (Note that long lines have been truncated, and `...' used to ! indicate such truncations.) ! ! The above two commands test whether `g77' and `gcc', respectively, ! are able to compile empty (null) source files, whether invocation of ! the C preprocessor works, whether libraries can be linked (even though ! there is an undefined reference due to there being no main program ! unit), and so on. ! ! If the output you get from either of the above two commands is ! noticably different, especially if it is shorter or longer in ways that ! do not look consistent with the above sample output, you probably ! should not install `gcc' and `g77' until you have investigated further. ! ! For example, you could try compiling actual applications and seeing ! how that works. (You might want to do that anyway, even if the above ! tests work.) ! ! To compile using the not-yet-installed versions of `gcc' and `g77', ! use the following commands to invoke them. ! ! To invoke `g77', type: ! ! /usr/src/gcc/g77 --driver=/usr/src/gcc/xgcc -B/usr/src/gcc/ ... ! ! To invoke `gcc', type: ! ! /usr/src/gcc/xgcc -B/usr/src/gcc/ ... ! ! Installation of Binaries ! ------------------------ ! ! After configuring, building, and testing `g77' and `gcc', when you ! are ready to install them on your system, type: ! ! make -k CC=gcc LANGUAGES=f77 install ! ! As described in *Note Installing GNU CC: (gcc)Installation, the ! values for the `CC' and `LANGUAGES' macros should be the same as those ! you supplied for the build itself. ! ! So, the details of the above command might vary if you used a ! bootstrap build (where you might be able to omit both definitions, or ! might have to supply the same definitions you used when building the ! final stage) or if you deviated from the instructions for a straight ! build. ! ! If the above command does not install `libf2c.a' as expected, try ! this: ! ! make -k ... install install-libf77 install-f2c-all ! ! We don't know why some non-GNU versions of `make' sometimes require ! this alternate command, but they do. (Remember to supply the ! appropriate definitions for `CC' and `LANGUAGES' where you see `...' in ! the above command.) ! ! Note that using the `-k' option tells `make' to continue after some ! installation problems, like not having `makeinfo' installed on your ! system. It might not be necessary. ! ! Updating Your Info Directory ! ---------------------------- ! ! As part of installing `g77', you should make sure users of `info' ! can easily access this manual on-line. Do this by making sure a line ! such as the following exists in `/usr/info/dir', or in whatever file is ! the top-level file in the `info' directory on your system (perhaps ! `/usr/local/info/dir': ! ! * g77: (g77). The GNU Fortran programming language. ! ! If the menu in `dir' is organized into sections, `g77' probably ! belongs in a section with a name such as the following: ! ! * Writing Programs ! ! * Programming Languages ! ! * Languages Other Than C ! ! * Scientific/Engineering Tools ! ! * GNU Compilers ! ! Missing `bison'? ! ---------------- ! ! If you cannot install `bison', make sure you have started with a ! *fresh* distribution of `gcc', do *not* do `make maintainer-clean' (in ! other versions of `gcc', this was called `make realclean'), and, to ! ensure that `bison' is not invoked by `make' during the build, type ! these commands: ! ! sh# `cd gcc' ! sh# `touch bi-parser.c bi-parser.h c-parse.c c-parse.h cexp.c' ! sh# `touch cp/parse.c cp/parse.h objc-parse.c' ! sh# ! ! These commands update the date-time-modified information for all the ! files produced by the various invocations of `bison' in the current ! versions of `gcc', so that `make' no longer believes it needs to update ! them. All of these files should already exist in a `gcc' distribution, ! but the application of patches to upgrade to a newer version can leave ! the modification information set such that the `bison' input files look ! more "recent" than the corresponding output files. ! ! *Note:* New versions of `gcc' might change the set of files it ! generates by invoking `bison'--if you cannot figure out for yourself ! how to handle such a situation, try an older version of `gcc' until you ! find someone who can (or until you obtain and install `bison'). ! ! Missing `makeinfo'? ! ------------------- ! ! If you cannot install `makeinfo', either use the `-k' option when ! invoking make to specify any of the `install' or related targets, or ! specify `MAKEINFO=echo' on the `make' command line. ! ! If you fail to do one of these things, some files, like `libf2c.a', ! might not be installed, because the failed attempt by `make' to invoke ! `makeinfo' causes it to cancel any further processing. ! ! Distributing Binaries ! ===================== ! ! If you are building `g77' for distribution to others in binary form, ! first make sure you are aware of your legal responsibilities (read the ! file `gcc/COPYING' thoroughly). ! ! Then, consider your target audience and decide where `g77' should be ! installed. ! ! For systems like Linux that have no native Fortran compiler (or ! where `g77' could be considered the native compiler for Fortran and ! `gcc' for C, etc.), you should definitely configure `g77' for ! installation in `/usr/bin' instead of `/usr/local/bin'. Specify the ! `--prefix=/usr' option when running `./configure'. You might also want ! to set up the distribution so the `f77' command is a link to ! `g77'--just make an empty file named `f77-install-ok' in the source or ! build directory (the one in which the `f' directory resides, not the ! `f' directory itself) when you specify one of the `install' or ! `uninstall' targets in a `make' command. ! For a system that might already have `f2c' installed, you definitely will want to make another empty file (in the same directory) named either `f2c-exists-ok' or `f2c-install-ok'. Use the former if you ! don't want your distribution to overwrite `f2c'-related files in ! existing systems; use the latter if you want to improve the likelihood ! that users will be able to use both `f2c' and `g77' to compile code for ! a single program without encountering link-time or run-time incompatibilities. ! (Make sure you clearly document, in the "advertising" for your ! distribution, how installation of your distribution will affect ! existing installations of `gcc', `f2c', `f77', `libf2c.a', and so on. ! Similarly, you should clearly document any requirements you assume are ! met by users of your distribution.) ! ! For other systems with native `f77' (and `cc') compilers, configure ! `g77' as you (or most of your audience) would configure `gcc' for their ! installations. Typically this is for installation in `/usr/local', and ! would not include a copy of `g77' named `f77', so users could still use ! the native `f77'. ! ! In any case, for `g77' to work properly, you *must* ensure that the ! binaries you distribute include: ! ! `bin/g77' ! This is the command most users use to compile Fortran. ! ! `bin/gcc' ! This is the command all users use to compile Fortran, either ! directly or indirectly via the `g77' command. The `bin/gcc' ! executable file must have been built from a `gcc' source tree into ! which a `g77' source tree was merged and configured, or it will ! not know how to compile Fortran programs. ! ! `bin/f77' ! In installations with no non-GNU native Fortran compiler, this is ! the same as `bin/g77'. Otherwise, it should be omitted from the ! distribution, so the one on already on a particular system does ! not get overwritten. ! ! `info/g77.info*' ! This is the documentation for `g77'. ! ! Please edit this documentation (by editing `gcc/f/*.texi' and ! doing `make doc' from the `/usr/src/gcc' directory) to reflect any ! changes you've made to `g77', or at least to encourage users of ! your binary distribution to report bugs to you first. ! ! Also, whether you distribute binaries or install `g77' on your own ! system, it might be helpful for everyone to add a line listing ! this manual by name and topic to the top-level `info' node in ! `/usr/info/dir'. That way, users can find `g77' documentation more ! easily. *Note Updating Your Info Directory: Updating ! Documentation. ! ! `man/man1/g77.1' ! This is the short man page for `g77'. ! ! `man/man1/f77.1' ! In installations where `f77' is the same as `g77', this is the ! same as `man/man1/g77.1'. Otherwise, it should be omitted from ! the distribution, so the one already on a particular system does ! not get overwritten. ! ! `lib/gcc-lib/.../f771' ! This is the actual Fortran compiler. ! ! `lib/gcc-lib/.../libf2c.a' ! This is the run-time library for `g77'-compiled programs. ! ! Whether you want to include the slightly updated (and possibly ! improved) versions of `cc1', `cc1plus', and whatever other binaries get ! rebuilt with the changes the GNU Fortran distribution makes to the GNU ! back end, is up to you. These changes are highly unlikely to break any ! compilers, and it is possible they'll fix back-end bugs that can be ! demonstrated using front ends other than GNU Fortran's. ! ! Please assure users that unless they have a specific need for their ! existing, older versions of `gcc' command, they are unlikely to ! experience any problems by overwriting it with your version--though ! they could certainly protect themselves by making backup copies first! ! Otherwise, users might try and install your binaries in a "safe" place, ! find they cannot compile Fortran programs with your distribution ! (because, perhaps, they're picking up their old version of the `gcc' ! command, which does not recognize Fortran programs), and assume that ! your binaries (or, more generally, GNU Fortran distributions in ! general) are broken, at least for their system. ! ! Finally, *please* ask for bug reports to go to you first, at least ! until you're sure your distribution is widely used and has been well ! tested. This especially goes for those of you making any changes to ! the `g77' sources to port `g77', e.g. to OS/2. ! `fortran@gnu.ai.mit.edu' has received a fair amount of bug reports that ! turned out to be problems with other peoples' ports and distributions, ! about which nothing could be done for the user. Once you are quite ! certain a bug report does not involve your efforts, you can forward it ! to us. ! ! Changing Settings Before Building ! ================================= ! ! Here are some internal `g77' settings that can be changed by editing ! source files in `gcc/f/' before building. ! ! This information, and perhaps even these settings, represent ! stop-gap solutions to problems people doing various ports of `g77' have ! encountered. As such, none of the following information is expected to ! be pertinent in future versions of `g77'. ! ! Maximum Stackable Size ! ---------------------- ! ! `g77', on most machines, puts many variables and arrays on the stack ! where possible, and can be configured (by changing ! `FFECOM_sizeMAXSTACKITEM' in `gcc/f/com.c') to force smaller-sized ! entities into static storage (saving on stack space) or permit ! larger-sized entities to be put on the stack (which can improve ! run-time performance, as it presents more opportunities for the GBE to ! optimize the generated code). ! ! Floating-point Bit Patterns ! --------------------------- ! ! The `g77' build will crash if an attempt is made to build it as a ! cross-compiler for a target when `g77' cannot reliably determine the ! bit pattern of floating-point constants for the target. Planned ! improvements for g77-0.6 will give it the capabilities it needs to not ! have to crash the build but rather generate correct code for the target. ! (Currently, `g77' would generate bad code under such circumstances if ! it didn't crash during the build, e.g. when compiling a source file ! that does something like `EQUIVALENCE (I,R)' and `DATA ! R/3.1415926535/'.) ! ! Initialization of Large Aggregate Areas ! --------------------------------------- ! ! A warning message is issued when `g77' sees code that provides ! initial values (e.g. via `DATA') to an aggregate area (`COMMON' or ! `EQUIVALENCE', or even a large enough array or `CHARACTER' variable) ! that is large enough to increase `g77''s compile time by roughly a ! factor of 10. ! ! This size currently is quite small, since `g77' currently has a ! known bug requiring too much memory and time to handle such cases. In ! `gcc/f/data.c', the macro `FFEDATA_sizeTOO_BIG_INIT_' is defined to the ! minimum size for the warning to appear. The size is specified in ! storage units, which can be bytes, words, or whatever, on a ! case-by-case basis. ! ! After changing this macro definition, you must (of course) rebuild ! and reinstall `g77' for the change to take effect. ! ! Note that, as of version 0.5.18, improvements have reduced the scope ! of the problem for *sparse* initialization of large arrays, especially ! those with large, contiguous uninitialized areas. However, the warning ! is issued at a point prior to when `g77' knows whether the ! initialization is sparse, and delaying the warning could mean it is ! produced too late to be helpful. ! ! Therefore, the macro definition should not be adjusted to reflect ! sparse cases. Instead, adjust it to generate the warning when densely ! initialized arrays begin to cause responses noticably slower than ! linear performance would suggest. ! ! Alpha Problems ! -------------- ! ! `g77' might warn when it is used to compile Fortran code for a ! target configuration that is not basically a 32-bit machine (such as an ! Alpha, which is a 64-bit machine, especially if it has a 64-bit ! operating system running on it). This is because `g77' is known to not ! work properly on such configurations, although the reasons for this are ! not fully explored. This is expected to be fixed at 0.6, at which ! point the warning would be dropped. (The reason the unexplored ! problems are expected to be fixed at 0.6 is because some known internal ! design problems `g77' has, which reduce portability and the ability to ! configure it as a cross-compiler, are presumed to be at least partly ! responsible for the problems being encountered on the Alpha. The ! problems remain unexplored partly because the known problems exist and ! are scheduled to be addressed anyway. Plus, the `g77' maintainer does ! not yet possess an Alpha workstation of his own.) ! diff -rcp2N g77-0.5.17/f/Make-lang.in g77-0.5.18/f/Make-lang.in *** g77-0.5.17/f/Make-lang.in Sat Nov 18 19:44:16 1995 --- g77-0.5.18/f/Make-lang.in Tue Mar 19 13:45:33 1996 *************** F77 f77: f771 f77-runtime *** 106,120 **** f77.uninstall f77.mostlyclean f77.clean f77.distclean f77.extraclean \ f77.maintainer-clean f77.realclean f77.stage1 f77.stage2 f77.stage3 \ ! f77.stage4 f77.distdir # Create the compiler driver for g77. ! g77: $(srcdir)/f/g77.c $(CONFIG_H) $(LIBDEPS) $(CC) $(ALL_CFLAGS) $(INCLUDES) $(LDFLAGS) -o $@ $(srcdir)/f/g77.c $(LIBS) # Create a version of the g77 driver which calls the cross-compiler. ! g77-cross: $(srcdir)/f/g77.c version.o $(LIBDEPS) $(CC) $(ALL_CFLAGS) $(INCLUDES) $(LDFLAGS) -o $@ \ -DGCC_NAME=\"$(GCC_CROSS_NAME)\" $(srcdir)/f/g77.c version.o $(LIBS) F77_SRCS = \ $(srcdir)/f/assert.j \ --- 106,127 ---- f77.uninstall f77.mostlyclean f77.clean f77.distclean f77.extraclean \ f77.maintainer-clean f77.realclean f77.stage1 f77.stage2 f77.stage3 \ ! f77.stage4 f77.distdir f77.rebuilt # Create the compiler driver for g77. ! g77: f/g77.c $(CONFIG_H) $(LIBDEPS) $(CC) $(ALL_CFLAGS) $(INCLUDES) $(LDFLAGS) -o $@ $(srcdir)/f/g77.c $(LIBS) # Create a version of the g77 driver which calls the cross-compiler. ! g77-cross: f/g77.c version.o $(LIBDEPS) $(CC) $(ALL_CFLAGS) $(INCLUDES) $(LDFLAGS) -o $@ \ -DGCC_NAME=\"$(GCC_CROSS_NAME)\" $(srcdir)/f/g77.c version.o $(LIBS) + # g77 documentation. + $(srcdir)/f/g77.info: f/g77.texi f/bugs.texi f/install.texi f/news.texi + cd $(srcdir)/f; $(MAKEINFO) g77.texi + + $(srcdir)/f/g77.dvi: f/g77.texi f/bugs.texi f/install.texi f/news.texi + cd $(srcdir)/f; $(TEXI2DVI) g77.texi + F77_SRCS = \ $(srcdir)/f/assert.j \ *************** f/Makefile: $(srcdir)/f/Makefile.in $(sr *** 234,238 **** # We depend on GCC_PASSES through f/runtime/Makefile. stmp-int-hdrs = stmp-int-hdrs # to be overrideable in unsafe version ! f77-runtime: f/runtime/Makefile include/f2c.h $(stmp-int-headers) case "$(LANGUAGES)" in \ *f77*) top=`pwd`; \ --- 241,246 ---- # We depend on GCC_PASSES through f/runtime/Makefile. stmp-int-hdrs = stmp-int-hdrs # to be overrideable in unsafe version ! f77-runtime: f/runtime/Makefile include/f2c.h $(stmp-int-headers) \ ! f/runtime/libF77/Makefile f/runtime/libI77/Makefile case "$(LANGUAGES)" in \ *f77*) top=`pwd`; \ *************** f77-runtime-unsafe: *** 254,260 **** # appropriate (cross-)compiler has been built, thus depend on GCC_PARTS. # NB, sh uses the *first* value of $a from `a=fred a=joe prog'. ! include/f2c.h f/runtime/Makefile: $(srcdir)/f/runtime/f2c.h.in \ ! $(srcdir)/f/com.h f/proj.h $(srcdir)/f/runtime/Makefile.in $(GCC_PARTS) \ ! $(srcdir)/config/$(xmake_file) $(srcdir)/config/$(tmake_file) # The make "stage?" in compiler spec. is fully qualified as above top=`pwd`; \ --- 262,272 ---- # appropriate (cross-)compiler has been built, thus depend on GCC_PARTS. # NB, sh uses the *first* value of $a from `a=fred a=joe prog'. ! include/f2c.h f/runtime/Makefile \ ! f/runtime/libF77/Makefile f/runtime/libI77/Makefile: \ ! $(srcdir)/f/runtime/f2c.h.in \ ! $(srcdir)/f/com.h f/proj.h $(srcdir)/f/runtime/Makefile.in \ ! $(srcdir)/f/runtime/libF77/Makefile.in \ ! $(srcdir)/f/runtime/libI77/Makefile.in \ ! $(GCC_PARTS) $(srcdir)/config/$(xmake_file) $(srcdir)/config/$(tmake_file) # The make "stage?" in compiler spec. is fully qualified as above top=`pwd`; \ *************** f77.start.encap: g77 maybe-f2c *** 286,291 **** f77.rest.encap: ! f77.info: ! f77.dvi: maybe-f2c: --- 298,321 ---- f77.rest.encap: ! f77.info: $(srcdir)/f/g77.info ! f77.dvi: $(srcdir)/f/g77.dvi ! ! $(srcdir)/f/BUGS: f/bugs0.texi f/bugs.texi ! cd $(srcdir)/f; $(MAKEINFO) -D BUGSONLY --no-header --no-split \ ! --no-validate bugs0.texi -o BUGS ! ! $(srcdir)/f/INSTALL: f/install0.texi f/install.texi ! cd $(srcdir)/f; $(MAKEINFO) -D INSTALLONLY --no-header --no-split \ ! --no-validate install0.texi -o INSTALL ! ! $(srcdir)/f/NEWS: f/news0.texi f/news.texi ! cd $(srcdir)/f; $(MAKEINFO) -D NEWSONLY --no-header --no-split \ ! --no-validate news0.texi -o NEWS ! ! $(srcdir)/f/runtime/configure: f/runtime/configure.in ! cd f/runtime && $(MAKE) rebuilt ! ! f77.rebuilt: f/g77.info f/BUGS f/INSTALL f/NEWS f/runtime/configure ! echo Fortran rebuildable files rebuilt. maybe-f2c: *************** f77.install-common: *** 372,375 **** --- 402,409 ---- f77.install-info: + -rm -f $(infodir)/g77.info* + cd $(srcdir)/f; for f in g77.info*; \ + do $(INSTALL_DATA) $$f $(infodir)/$$f; done + -chmod a-x $(infodir)/g77.info* f77.install-man: $(srcdir)/f/g77.1 *************** f77.install-man: $(srcdir)/f/g77.1 *** 379,386 **** --- 413,432 ---- $(INSTALL_DATA) $(srcdir)/f/g77.1 $(mandir)/$(G77_CROSS_NAME)$(manext); \ chmod a-x $(mandir)/$(G77_CROSS_NAME)$(manext); \ + if $(F77_INSTALL_FLAG) ; then \ + rm -f $(mandir)/$(F77_CROSS_NAME)$(manext); \ + ln $(mandir)/$(G77_CROSS_NAME)$(manext) $(mandir)/$(F77_CROSS_NAME)$(manext) \ + > /dev/null 2>&1 \ + || cp $(mandir)/$(F77_CROSS_NAME)$(manext) $(mandir)/$(F77_CROSS_NAME)$(manext) ; \ + fi ;\ else \ rm -f $(mandir)/$(G77_INSTALL_NAME)$(manext); \ $(INSTALL_DATA) $(srcdir)/f/g77.1 $(mandir)/$(G77_INSTALL_NAME)$(manext); \ chmod a-x $(mandir)/$(G77_INSTALL_NAME)$(manext); \ + if $(F77_INSTALL_FLAG) ; then \ + rm -f $(mandir)/$(F77_INSTALL_NAME)$(manext); \ + ln $(mandir)/$(G77_INSTALL_NAME)$(manext) $(mandir)/$(F77_INSTALL_NAME)$(manext) \ + > /dev/null 2>&1 \ + || cp $(mandir)/$(F77_INSTALL_NAME)$(manext) $(mandir)/$(F77_INSTALL_NAME)$(manext) ; \ + fi ;\ fi; \ else true; fi *************** f77.uninstall: *** 390,393 **** --- 436,441 ---- rm -rf $(bindir)/$(F77_INSTALL_NAME)$(exeext) ; \ rm -rf $(bindir)/$(F77_CROSS_NAME)$(exeext) ; \ + rm -rf $(mandir)/$(F77_INSTALL_NAME)$(manext) ; \ + rm -rf $(mandir)/$(F77_CROSS_NAME)$(manext) ; \ fi -rm -rf $(bindir)/$(G77_INSTALL_NAME)$(exeext) *************** f77.uninstall: *** 395,398 **** --- 443,447 ---- -rm -rf $(mandir)/$(G77_INSTALL_NAME)$(manext) -rm -rf $(mandir)/$(G77_CROSS_NAME)$(manext) + -rm -rf $(infodir)/g77.info* -rm -rf $(libsubdir)/libf2c.a -if $(F2C_INSTALL_FLAG) ; then \ *************** f77.uninstall: *** 407,418 **** f77.mostlyclean: -rm -f f/*$(objext) -cd f/runtime; $(MAKE) mostlyclean f77.clean: f77.mostlyclean f77.distclean: f77.clean -rm -f f/Makefile - -rm -f f/fini f/f771 f/stamp-str f/str-*.h f/str-*.j -cd f/runtime; $(MAKE) distclean # realclean is the pre-2.7.0 name for maintainer-clean ! f77.extraclean f77.maintainer-clean f77.realclean: f77.distclean # Stage hooks: --- 456,482 ---- f77.mostlyclean: -rm -f f/*$(objext) + -rm -f f/fini f/f771 f/stamp-str f/str-*.h f/str-*.j -cd f/runtime; $(MAKE) mostlyclean f77.clean: f77.mostlyclean + -cd f/runtime; $(MAKE) clean f77.distclean: f77.clean -rm -f f/Makefile -cd f/runtime; $(MAKE) distclean + # like gcc's extraclean, which does clean f/ for us, but not f/gbe, + # f/runtime, f/runtime/libF77, and f/runtime/libI77, so do those. + f77.extraclean: f77.distclean + -rm -f f/*/=* f/*/"#"* f/*/*~* + -rm -f f/*/patch* f/*/*.orig f/*/*.rej + -rm -f f/*/*.dvi f/*/*.oaux f/*/*.d f/*/*.[zZ] f/*/*.gz + -rm -f f/*/*.tar f/*/*.xtar f/*/*diff f/*/*.diff.* f/*/*.tar.* f/*/*.xtar.* f/*/*diffs + -rm -f f/*/*lose f/*/*.s f/*/*.s[0-9] f/*/*.i + -rm -f f/*/*/=* f/*/*/"#"* f/*/*/*~* + -rm -f f/*/*/patch* f/*/*/*.orig f/*/*/*.rej + -rm -f f/*/*/*.dvi f/*/*/*.oaux f/*/*/*.d f/*/*/*.[zZ] f/*/*/*.gz + -rm -f f/*/*/*.tar f/*/*/*.xtar f/*/*/*diff f/*/*/*.diff.* f/*/*/*.tar.* f/*/*/*.xtar.* f/*/*/*diffs + -rm -f f/*/*/*lose f/*/*/*.s f/*/*/*.s[0-9] f/*/*/*.i # realclean is the pre-2.7.0 name for maintainer-clean ! f77.maintainer-clean f77.realclean: f77.distclean ! -rm -f f/g77.info* f/g77.*aux f/TAGS f/BUGS f/INSTALL f/NEWS # Stage hooks: *************** f77.stage4: *** 450,456 **** # This target creates the files that can be rebuilt, but go in the # distribution anyway. It then copies the files to the distdir directory. ! f77.distdir: mkdir tmp/f - # cd f ; $(MAKE) $(FLAGS_TO_PASS) $(F77_FLAGS_TO_PASS) ?no files? cd f; \ for file in *[0-9a-zA-Z+]; do \ --- 514,519 ---- # This target creates the files that can be rebuilt, but go in the # distribution anyway. It then copies the files to the distdir directory. ! f77.distdir: f77.rebuilt mkdir tmp/f cd f; \ for file in *[0-9a-zA-Z+]; do \ diff -rcp2N g77-0.5.17/f/Makefile.in g77-0.5.18/f/Makefile.in *** g77-0.5.17/f/Makefile.in Sat Nov 18 19:44:16 1995 --- g77-0.5.18/f/Makefile.in Mon Apr 1 10:10:49 1996 *************** INCLUDES = -If -I. -I$(srcdir) -I$(srcdi *** 162,169 **** # Flags_to_pass to recursive makes. FLAGS_TO_PASS = \ "CROSS=$(CROSS)" \ "AR_FLAGS=$(AR_FLAGS)" \ ! "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ "BISON=$(BISON)" \ "BISONFLAGS=$(BISONFLAGS)" \ --- 162,171 ---- # Flags_to_pass to recursive makes. + # Note that we don't need to distinguish the `_FOR_TARGET' cross tools + # as AR and RANLIB are set appropriately by configure iff cross compiling. FLAGS_TO_PASS = \ "CROSS=$(CROSS)" \ "AR_FLAGS=$(AR_FLAGS)" \ ! "AR=$(AR)" \ "BISON=$(BISON)" \ "BISONFLAGS=$(BISONFLAGS)" \ *************** FLAGS_TO_PASS = \ *** 177,182 **** "MAKEINFO=$(MAKEINFO)" \ "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \ ! "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ ! "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \ "SHELL=$(SHELL)" \ "exec_prefix=$(exec_prefix)" \ --- 179,184 ---- "MAKEINFO=$(MAKEINFO)" \ "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \ ! "RANLIB=$(RANLIB)" \ ! "RANLIB_TEST=$(RANLIB_TEST)" \ "SHELL=$(SHELL)" \ "exec_prefix=$(exec_prefix)" \ diff -rcp2N g77-0.5.17/f/NEWS g77-0.5.18/f/NEWS *** g77-0.5.17/f/NEWS Sat Nov 18 19:44:17 1995 --- g77-0.5.18/f/NEWS Mon Apr 1 10:20:52 1996 *************** *** 1,343 **** ! This file lists recent changes to the GNU Fortran compiler. ! Copyright (C) 1995 Free Software Foundation, Inc. You may copy, distribute, and modify it freely as long as you preserve this copyright ! notice and permission notice. Contributed by James Craig Burley ! (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: - Fix a code-generation bug involving complicated EQUIVALENCE statements - not involving COMMON - Fix code-generation bugs involving invoking "gratis" library procedures - in libf2c from code compiled with -fno-f2c by making these - procedures known to g77 as intrinsics (not affected by -fno-f2c); - this is known to fix code invoking ERF(), ERFC(), DERF(), and DERFC() - Update libf2c to include netlib patches through 950816, and - define WANT_LEAD_0 to 1 to make g77-compiled code more - consistent with other Fortran implementations by outputting - leading zeros in formatted and list-directed output - Fix a code-generation bug involving adjustable dummy arrays with high - bounds whose primaries are changed during procedure execution, and - which might well improve code-generation performance for such arrays - vis-a-vis f2c|gcc (but apparently only when using gcc-2.7.0 or - later) - Fix a code-generation bug involving invocation of [DOUBLE] COMPLEX - FUNCTIONs and doing [DOUBLE] COMPLEX divides when the result - of the invocation/divide is assigned directly to a variable - that overlaps one or more of the arguments to the invocation/divide - Fix crash by not generating new optimal code for X**I if I is - nonconstant and the expression is used to dimension a dummy - array, since the gcc back end does not support the necessary - mechanics (and the gcc front end rejects the equivalent - construct, as it turns out) - Fix crash on expressions like COMPLEX**INTEGER - Fix crash on expressions like (1D0,2D0)**2, i.e. raising a - DOUBLE COMPLEX constant to an INTEGER constant power - Fix crashes and such involving diagnosed code - Diagnose, instead of crashing on, statement function definitions - having duplicate dummy argument names - Fix bug causing rejection of good code involving statement function - definitions - Fix bug resulting in debugger not knowing size of local equivalence - area when any member of area has initial value (via DATA etc.) - Fix installation bug that prevented installation of `g77' driver; - provide for easy selection of whether to install copy of `g77' - as `f77' to replace the broken code - Fix gcc driver (affects g77 thereby) to not gratuitously invoke the - f771 compiler (e.g. when -E is specified) - Fix diagnostic to point to right source line when it immediately - follows an INCLUDE statement - Support more compiler options in gcc/g77 when compiling Fortran files - (such as -p, -pg, -aux-info, -P, correct setting of version- - number macros for preprocessing, full recognition of -O0, - automatic insertion of configuration-specific linker specs) - Add new intrinsics that interface to existing routines in libf2c: - ABORT, DERF, DERFC, ERF, ERFC, EXIT, FLUSH, GETARG, GETENV, IARGC, - SIGNAL, and SYSTEM; note that ABORT, EXIT, FLUSH, SIGNAL, and - SYSTEM are intrinsic subroutines, not functions (since they - have side effects), so to get the return values from SIGNAL - and SYSTEM, append a final argument specifying an INTEGER - variable or array element (e.g. "CALL SYSTEM('rm foo',ISTAT)") - Add new intrinsic group named `unix' to contain the new intrinsics, - and by default enable this new group - Move LOC() intrinsic out of the `vxt' group to the new `unix' group - Improve g77 so that `g77 -v' by itself (or with certain other options, - including -B, -b, -i, -nostdlib, and -V) reports lots more useful - version info, and so that long-form options gcc accepts are - understood by g77 as well (even in truncated, unambiguous forms); - add new option --driver=name to specify driver when default, gcc, - isn't appropriate - Add support for # directives (as output by the preprocessor) in the - compiler, and enable generation of those directives by the - preprocessor (when compiling .F files) so diagnostics and debugging - info are more useful to users of the preprocessor - Produce better diagnostics, more like gcc, with info such as - "In function `foo':" and "In file included from...:" - Support gcc's -fident and -fno-ident options - When -Wunused in effect, don't warn about local vars used as - statement-function dummy arguments or DATA implied-DO iteration - variables, even though strictly speaking these are not uses - of the local vars themselves - When `-W -Wunused' in effect, don't warn about unused dummy arguments - at all, since there's no way to turn this off for individual - cases (g77 might someday start warning about these) -- applies - to gcc versions 2.7.0 and later, since earlier versions didn't - warn about unused dummy arguments - New option `-fno-underscoring' that inhibits transformation of names - (by appending one or two underscores) so users may experiment - with implications of such an environment - Minor improvement to gcc/f/info module to make it easier to build - g77 using the native (non-gcc) compiler on certain machines - (but definitely not all machines nor all non-gcc compilers; please - do not report bugs showing problems compilers have with - macros defined in gcc/f/target.h and used in places like - gcc/f/expr.c) - Add warning to be printed for each invocation of the compiler - if the target machine INTEGER, REAL, or LOGICAL size is not 32 bits, - since g77 is known to not work well for such cases (to be - fixed in 0.6 -- see gcc/f/BUGS) - Lots of new documentation (though work is still needed to put it into - canonical GNU format) - Build libf2c with -g0, not -g2, in effect (by default), to produce - smaller library without lots of debugging clutter - - Changes in 0.5.15: - Fix bad code generation involving X**I and temporary, internal variables - generated by g77 and the back end (such as for DO loops) - Fix crash given CHARACTER A;DATA A/.TRUE./ - Replace crash with diagnostic given CHARACTER A;DATA A/1.0/ - Fix crash or other erratic behavior when null character constant - ('') is encountered - Fix crash or other erratic behavior involving diagnosed code - Fix code generation for external functions returning type REAL when - the -ff2c option is in force (which it is by default) so that - f2c compatibility is indeed provided - Disallow COMMON I(10) if I has previously been specified with an - array declarator - New -ffixed-line-length-N option, where N is the maximum length - of a typical fixed-form line, defaulting to 72 columns, such - that characters beyond column N are ignored, or N is "none", - meaning no characters are ignored -- does not affect lines - with "&" in column 1, which are always processed as if - -ffixed-line-length-none were in effect - No longer generate better code for some kinds of array references, - as gcc back end is to be fixed to do this even better, and it - turned out to slow down some code in some cases after all - In COMMON and EQUIVALENCE areas with any members given initial - values (e.g. via DATA), uninitialized members now always - initialized to binary zeros (though this is not required by - the F77 standard, and might not be done in future versions - of g77) -- previously, in some COMMON/EQUIVALENCE areas - (essentially those with members of more than one type), the - uninitialized members were initialized to spaces, to - cater to CHARACTER types, but it seems no existing code expects - that, while much existing code expects binary zeros - - Changes in 0.5.14: - Don't emit bad code when low bound of adjustable array is nonconstant - and thus might vary as an expression at run time - Emit correct code for calculation of # trips in DO loops for cases - where the loop should not execute at all (bug affected cases - where the difference between the begin and end values was less - than the step count, though probably not for floating-point cases) - Fix crash when extra parentheses surround item in DATA implied-DO list - Fix crash over minor internal inconsistencies in handling diagnostics, - just substitute dummy strings where necessary - Fix crash on some systems when compiling call to MVBITS() intrinsic - Fix crash on array assignment "TYPEddd(...)=...", where ddd is a - string of digits (at least one) - Fix crash on DCMPLX() with a single INTEGER argument - Fix various crashes involving code with diagnosed errors - Support -I option for INCLUDE statement, plus gcc's `header.gcc' - facility for handling systems like MS-DOS - Allow INCLUDE statement to be continued across multiple lines, - even allow it to coexist with other statements on the same line - Incorporate Bellcore fixes to libf2c through 950315 -- this fixes a - bug involving infinite loops reading EOF with empty list-directed - I/O list - Remove all the g77-specific auto-configuration scripts, code, &c, - except for temporary substitutes for bsearch() and strtoul(), as - too many configure/build problems were reported in these areas -- - people will have to fix their systems' problems themselves, or at - least somewhere other than g77, which expects a working ANSI C - environment (and, for now, a GNU C compiler to compile g77 itself) - Complain if initialized common redeclared as larger in subsequent program - unit - Warn if blank common initialized, since its size can vary and hence - related warnings that might be helpful won't be seen - New -fbackslash option, on by default, that causes `\' within CHARACTER - and Hollerith constants to be interpreted a la GNU C -- NOTE that - this behavior is somewhat different from f2c's, which supports only - a limited subset of backslash (escape) sequences - Make -fugly-args the default - New -fugly-init option, on by default, that allows typeless/hollerith - to be specified as initial values for variables or named constants - (PARAMETER), and also allows character<->numeric conversion in - those contexts -- turn off via -fno-ugly-init - New -finit-local-zero option to initialize local variables to binary zeros - (does not affect whether they are SAVEd, i.e. made automatic or static) - New -Wimplicit option to warn about implicitly typed variables, arrays, - and functions -- like IMPLICIT NONE but doesn't produce errors - -Wall now implies -Wuninitialized as with gcc (i.e. unless -O not - specified, since -Wuninitialized requires -O), and implies - -Wunused as well - -Wunused no longer gives spurious messages for unused EXTERNAL names - (since they are assumed to refer to BLOCK DATA program units, - to make use of libraries more reliable) - Support %LOC() and LOC() of character arguments - Support null (zero-length) character constants and expressions - Support f2c's IMAG() generic intrinsic - Support ICHAR(), IACHAR(), and LEN() of character expressions that - are valid in assignments but not normally as actual arguments - Support f2c-style '&' in column 1 to mean continuation line - Allow NAMELIST, EXTERNAL, INTRINSIC, and VOLATILE in BLOCK DATA, even - though these are not allowed by the standard - Allow RETURN in main program unit - Changes to Hollerith-constant support to obey F77 Appendix C: now - padded on the right with zeros, not spaces; hollerith "format - specifications" in the form of arrays of non-character allowed; - warnings issued when non-blank truncation occurs when converting - to another type; when specified as actual argument, now passed - by reference to INTEGER (padded on right with spaces if constant - too small, otherwise fully intact if constant wider the INTEGER - type) instead of by value; WARNING: f2c differs on the - interpretation of CALL FOO(1HX), which it treats exactly the - same as CALL FOO('X'), but which the standard and g77 treat - as CALL FOO(%REF('X ')) (padded with as many blanks as necessary - to widen to INTEGER), essentially - Changes and fixes to typeless-constant support: now treated as - a typeless double-length INTEGER value; warnings issued when - overflow occurs; padded on the left with zeros when converting - to a larger type; should be properly aligned and ordered on - the target machine for whatever type it is turned into; when - specified as actual argument, now passed as reference to - a default INTEGER constant - %DESCR() of a non-CHARACTER expression now passes a pointer to - the expression plus a length for the expression just as if - it were a CHARACTER expression (so CALL FOO(%DESCR(D)), where - D is REAL*8, is the same as CALL FOO(D,%VAL(8))) - Name of multi-entrypoint master function changed to incorporate - the name of the primary entry point instead of a decimal - value, so the name of the master function for SUBROUTINE X - with alternate entry points is now "__g77_masterfun_x" - Remove redundant message about zero-step-count DO loops - Clean up diagnostic messages, shortening many of them - Fix typo in g77.1 documentation - Clarify implications of constant-handling bugs in BUGS - Generate better code for ** operator with a right-hand operand of - type INTEGER - Generate better code for SQRT() and DSQRT(), also when -ffast-math - specified, enable better code generation for SIN() and COS() - Generate better code for some kinds of array references - Speed up lexing somewhat (this makes the compilation phase noticably - faster) - - Changes in 0.5.13: - Fix crash compiling calls to functions passed as dummy arguments - Fix crash compiling CHARACTER comparison when either operand involves - concatenation - Fix crash when initialized COMMON area's size is smaller than - size of area in previously compiled program unit - Fix crash involving assigning to 3+-dimensional array having a - name like TYPE or PRINT - Fix crash when DATA statement after first executable statement - makes first use of a variable name as an iterative-DO variable - Fix various crashes involving code with diagnosed errors - Fix dumb bug introduced in 0.5.9 that resulted in columns 73 and - beyond being treated as real code unless a tab was present, - instead of the other way 'round (fixed-form source) - Unless -fpedantic, don't complain about "SAVE" by itself conflicting - with any other occurrence of SAVE as statement or attribute, - since there are solid reasons to write such code even though - it is strictly non-standard-conforming (and only warn if - -fpedantic) - - Changes in 0.5.12: - Don't crash when DO loop iteration variable isn't INTEGER - Don't crash when DO loop end expression has an error - Fix a couple of Makefile shell "if" commands to have "else true;" - - Changes in 0.5.11: - Compile-time conversion of negative INTEGER constant to REAL, - DOUBLE PRECISION, COMPLEX, or DOUBLE COMPLEX is now fixed - DFLOAT() is now recognized as an f2c intrinsic - New compiler option -fugly-args allows passing of hollerith and - typeless constants as actual arguments (a very specific - version of -fugly); diagnostic when option not specified - has more helpful information - %VAL() now works when given a hollerith or typeless argument, - as do other things like %REF() - Help FreeBSD users build g77 driver out of the box - - Changes in 0.5.10: - Fix invocation of DOUBLE COMPLEX (aka COMPLEX*16) external functions - Minor fixes and changes to Makefiles - - Changes in 0.5.9: - Treatment of source lines with tabs is slightly different than before - Carriage returns (^M) in source lines now ignored - Fix character-compare and other operations - Change to using ANSI-C-approved techniques in a few places so non-gcc - compilers can compile g77 - Fix crash when trying to output warning about slow compile - Fix crash combining COMPLEX and ENTRY - Fix use of COMPLEX operators/functions within statement-function - definitions - Support ASSIGN on any machine gcc supports - Don't put build files in source directory when separate --- 1,575 ---- ! This file lists recent changes to the GNU Fortran compiler. Copyright ! (C) 1995, 1996 Free Software Foundation, Inc. You may copy, distribute, and modify it freely as long as you preserve this copyright ! notice and permission notice. ! News About GNU Fortran ! ********************** ! ! In 0.5.18: ! ========== ! ! * Add some rudimentary support for `INTEGER*1', `INTEGER*2', ! `INTEGER*8', and their `LOGICAL' equivalents. (This support works ! on most, maybe all, `gcc' targets.) ! ! Thanks to Scott Snyder (`snyder@d0sgif.fnal.gov') for providing ! the patch for this! ! ! Among the missing elements from the support for these features are ! full intrinsic support and constants. ! ! * Add some rudimentary support for the `BYTE' and `WORD' ! type-declaration statements. `BYTE' corresponds to `INTEGER*1', ! while `WORD' corresponds to `INTEGER*2'. ! ! Thanks to Scott Snyder (`snyder@d0sgif.fnal.gov') for providing ! the patch for this! ! ! * The compiler code handling intrinsics has been largely rewritten ! to accommodate the new types. No new intrinsics or arguments for ! existing intrinsics have been added, so there is, at this point, ! no intrinsic to convert to `INTEGER*8', for example. ! ! * Support automatic arrays in procedures. ! ! * Reduce space/time requirements for handling large *sparsely* ! initialized aggregate arrays. This improvement applies to only a ! subset of the general problem to be addressed in 0.6. ! ! * Treat initial values of zero as if they weren't specified (in DATA ! and type-declaration statements). The initial values will be set ! to zero anyway, but the amount of compile time processing them ! will be reduced, in some cases significantly (though, again, this ! is only a subset of the general problem to be addressed in 0.6). ! ! A new option, `-fzeros', is introduced to enable the traditional ! treatment of zeros as any other value. ! ! * With `-ff90' in force, `g77' incorrectly interpreted `REAL(Z)' as ! returning a `REAL' result, instead of as a `DOUBLE PRECISION' ! result. (Here, `Z' is `DOUBLE COMPLEX'.) ! ! With `-fno-f90' in force, the interpretation remains unchanged, ! since this appears to be how at least some F77 code using the ! `DOUBLE COMPLEX' extension expected it to work. ! ! Essentially, `REAL(Z)' in F90 is the same as `DBLE(Z)', while in ! extended F77, it appears to be the same as `REAL(REAL(Z))'. ! ! * An expression involving exponentiation, where both operands were ! type `INTEGER' and the right-hand operand was negative, was ! erroneously evaluated. ! ! * Fix bugs involving `DATA' implied-`DO' constructs (these involved ! an errant diagnostic and a crash, both on good code, one involving ! subsequent statement-function definition). ! ! * Close `INCLUDE' files after processing them, so compiling source ! files with lots of `INCLUDE' statements does not result in being ! unable to open `INCLUDE' files after all the available file ! descriptors are used up. ! ! * Speed up compiling, especially of larger programs, and perhaps ! slightly reduce memory utilization while compiling (this is *not* ! the improvement planned for 0.6 involving large aggregate ! areas)--these improvements result from simply turning off some ! low-level code to do self-checking that hasn't been triggered in a ! long time. ! ! * Introduce three new options that implement optimizations in the ! `gcc' back end (GBE). These options are `-fmove-all-movables', ! `-freduce-all-givs', and `-frerun-loop-opt', which are enabled, by ! default, for Fortran compilations. These optimizations are ! intended to help toon Fortran programs. ! ! * Patch the GBE to do a better job optimizing certain kinds of ! references to array elements. ! ! * Due to patches to the GBE, the version number of `gcc' also is ! patched to make it easier to manage installations, especially ! useful if it turns out a `g77' change to the GBE has a bug. ! ! The `g77'-modified version number is the `gcc' version number with ! the string `.f.N' appended, where `f' identifies the version as ! enhanced for Fortran, and N is `1' for the first Fortran patch for ! that version of `gcc', `2' for the second, and so on. ! ! So, this introduces version `2.7.2.f.1' of `gcc'. ! ! * Make several improvements and fixes to diagnostics, including the ! removal of two that were inappropriate or inadequate. ! ! * Warning about two successive arithmetic operators, produced by ! `-Wsurprising', now produced *only* when both operators are, ! indeed, arithmetic (not relational/boolean). ! ! * `-Wsurprising' now warns about the remaining cases of using ! non-integral variables for implied-`DO' loops, instead of these ! being rejected unless `-fpedantic' or `-fugly' specified. ! ! * Allow `SAVE' of a local variable or array, even after it has been ! given an initial value via `DATA', for example. ! ! * Introduce an Info version of `g77' documentation, which supercedes ! `gcc/f/CREDITS', `gcc/f/DOC', and `gcc/f/PROJECTS'. These files ! will be removed in a future release. The files `gcc/f/BUGS', ! `gcc/f/INSTALL', and `gcc/f/NEWS' now are automatically built from ! the texinfo source when distributions are made. ! ! This effort was inspired by a first pass at translating ! `g77-0.5.16/f/DOC' that was contributed to Craig by David Ronis ! (`ronis@onsager.chem.mcgill.ca'). ! ! * New `-fno-second-underscore' option to specify that, when ! `-funderscoring' is in effect, a second underscore is not to be ! appended to Fortran names already containing an underscore. ! ! * Change the way iterative `DO' loops work to follow the F90 ! standard. In particular, calculation of the iteration count is ! still done by converting the start, end, and increment parameters ! to the type of the `DO' variable, but the result of the ! calculation is always converted to the default `INTEGER' type. ! ! (This should have no effect on existing code compiled by `g77', ! but code written to assume that use of a *wider* type for the `DO' ! variable will result in an iteration count being fully calculated ! using that wider type (wider than default `INTEGER') must be ! rewritten.) ! ! * Upgrade to `libf2c' as of 1996-03-23, and fix up some of the build ! procedures. ! ! Note that the email addresses related to `f2c' have changed--the ! distribution site now is named `netlib.bell-labs.com', and the ! maintainer's new address is `dmg@bell-labs.com'. ! ! In 0.5.17: ! ========== ! ! * *Fix serious bug* in `g77 -v' command that can cause removal of a ! system's `/dev/null' special file if run by user `root'. ! ! *All users* of version 0.5.16 should ensure that they have not ! removed `/dev/null' or replaced it with an ordinary file (e.g. by ! comparing the output of `ls -l /dev/null' with `ls -l /dev/zero'. ! If the output isn't basically the same, contact your system ! administrator about restoring `/dev/null' to its proper status). ! ! This bug is particularly insidious because removing `/dev/null' as ! a special file can go undetected for quite a while, aside from ! various applications and programs exhibiting sudden, strange ! behaviors. ! ! I sincerely apologize for not realizing the implications of the ! fact that when `g77 -v' runs the `ld' command with `-o /dev/null' ! that `ld' tries to *remove* the executable it is supposed to build ! (especially if it reports unresolved references, which it should ! in this case)! ! ! * Fix crash on `CHARACTER*(*) FOO' in a main or block data program ! unit. ! ! * Fix crash that can occur when diagnostics given outside of any ! program unit (such as when input file contains `@foo'). ! ! * Fix crashes, infinite loops (hangs), and such involving diagnosed ! code. ! ! * Fix `ASSIGN''ed variables so they can be `SAVE''d or dummy ! arguments, and issue clearer error message in cases where target ! of `ASSIGN' or `ASSIGN'ed `GOTO'/`FORMAT' is too small (which ! should never happen). ! ! * Make `libf2c' build procedures work on more systems again by ! eliminating unnecessary invocations of `ld -r -x' and `mv'. ! ! * Fix omission of `-funix-intrinsics-...' options in list of ! permitted options to compiler. ! ! * Fix failure to always diagnose missing type declaration for ! `IMPLICIT NONE'. ! ! * Fix compile-time performance problem (which could sometimes crash ! the compiler, cause a hang, or whatever, due to a bug in the back ! end) involving exponentiation with a large `INTEGER' constant for ! the right-hand operator (e.g. `I**32767'). ! ! * Fix build procedures so cross-compiling `g77' (the `fini' utility ! in particular) is properly built using the host compiler. ! ! * Add new `-Wsurprising' option to warn about constructs that are ! interpreted by the Fortran standard (and `g77') in ways that are ! surprising to many programmers. ! ! * Add `ERF()' and `ERFC()' as generic intrinsics mapping to existing ! `ERF'/`DERF' and `ERFC'/`DERFC' specific intrinsics. ! ! *Note:* You should specify `INTRINSIC ERF,ERFC' in any code where ! you might use these as generic intrinsics, to improve likelihood ! of diagnostics (instead of subtle run-time bugs) when using a ! compiler that doesn't support these as intrinsics (e.g. `f2c'). ! ! * Remove from `-fno-pedantic' the diagnostic about `DO' with ! non-`INTEGER' index variable; issue that under `-Wsurprising' ! instead. ! ! * Clarify some diagnostics that say things like "ignored" when that's ! misleading. ! ! * Clarify diagnostic on use of `.EQ.'/`.NE.' on `LOGICAL' operands. ! ! * Minor improvements to code generation for various operations on ! `LOGICAL' operands. ! ! * Minor improvement to code generation for some `DO' loops on some ! machines. ! ! * Support `gcc' version 2.7.1. ! ! * Upgrade to `libf2c' as of 1995-11-15. ! ! In 0.5.16: ! ========== ! ! * Fix a code-generation bug involving complicated `EQUIVALENCE' ! statements not involving `COMMON' ! ! * Fix code-generation bugs involving invoking "gratis" library ! procedures in `libf2c' from code compiled with `-fno-f2c' by ! making these procedures known to `g77' as intrinsics (not affected ! by -fno-f2c). This is known to fix code invoking `ERF()', ! `ERFC()', `DERF()', and `DERFC()'. ! ! * Update `libf2c' to include netlib patches through 1995-08-16, and ! `#define' `WANT_LEAD_0' to 1 to make `g77'-compiled code more ! consistent with other Fortran implementations by outputting ! leading zeros in formatted and list-directed output. ! ! * Fix a code-generation bug involving adjustable dummy arrays with ! high bounds whose primaries are changed during procedure ! execution, and which might well improve code-generation ! performance for such arrays compared to `f2c' plus `gcc' (but ! apparently only when using `gcc-2.7.0' or later). ! ! * Fix a code-generation bug involving invocation of `COMPLEX' and ! `DOUBLE COMPLEX' `FUNCTION's and doing `COMPLEX' and `DOUBLE ! COMPLEX' divides, when the result of the invocation or divide is ! assigned directly to a variable that overlaps one or more of the ! arguments to the invocation or divide. ! ! * Fix crash by not generating new optimal code for `X**I' if `I' is ! nonconstant and the expression is used to dimension a dummy array, ! since the `gcc' back end does not support the necessary mechanics ! (and the `gcc' front end rejects the equivalent construct, as it ! turns out). ! ! * Fix crash on expressions like `COMPLEX**INTEGER'. ! ! * Fix crash on expressions like `(1D0,2D0)**2', i.e. raising a ! `DOUBLE COMPLEX' constant to an `INTEGER' constant power. ! ! * Fix crashes and such involving diagnosed code. ! ! * Diagnose, instead of crashing on, statement function definitions ! having duplicate dummy argument names. ! ! * Fix bug causing rejection of good code involving statement function ! definitions. ! ! * Fix bug resulting in debugger not knowing size of local equivalence ! area when any member of area has initial value (via `DATA', for ! example). ! ! * Fix installation bug that prevented installation of `g77' driver. ! Provide for easy selection of whether to install copy of `g77' as ! `f77' to replace the broken code. ! ! * Fix `gcc' driver (affects `g77' thereby) to not gratuitously ! invoke the `f771' program (e.g. when `-E' is specified). ! ! * Fix diagnostic to point to correct source line when it immediately ! follows an `INCLUDE' statement. ! ! * Support more compiler options in `gcc'/`g77' when compiling ! Fortran files. These options include `-p', `-pg', `-aux-info', ! `-P', correct setting of version-number macros for preprocessing, ! full recognition of `-O0', and automatic insertion of ! configuration-specific linker specs. ! ! * Add new intrinsics that interface to existing routines in `libf2c': ! `ABORT', `DERF', `DERFC', `ERF', `ERFC', `EXIT', `FLUSH', ! `GETARG', `GETENV', `IARGC', `SIGNAL', and `SYSTEM'. Note that ! `ABORT', `EXIT', `FLUSH', `SIGNAL', and `SYSTEM' are intrinsic ! subroutines, not functions (since they have side effects), so to ! get the return values from `SIGNAL' and `SYSTEM', append a final ! argument specifying an `INTEGER' variable or array element (e.g. ! `CALL SYSTEM('rm foo',ISTAT)'). ! ! * Add new intrinsic group named `unix' to contain the new intrinsics, ! and by default enable this new group. ! ! * Move `LOC()' intrinsic out of the `vxt' group to the new `unix' ! group. ! ! * Improve `g77' so that `g77 -v' by itself (or with certain other ! options, including `-B', `-b', `-i', `-nostdlib', and `-V') ! reports lots more useful version info, and so that long-form ! options `gcc' accepts are understood by `g77' as well (even in ! truncated, unambiguous forms). ! ! * Add new `g77' option `--driver=name' to specify driver when ! default, `gcc', isn't appropriate. ! ! * Add support for `#' directives (as output by the preprocessor) in ! the compiler, and enable generation of those directives by the ! preprocessor (when compiling `.F' files) so diagnostics and ! debugging info are more useful to users of the preprocessor. ! ! * Produce better diagnostics, more like `gcc', with info such as `In ! function `foo':' and `In file included from...:'. ! ! * Support `gcc''s `-fident' and `-fno-ident' options. ! ! * When `-Wunused' in effect, don't warn about local variables used as ! statement-function dummy arguments or `DATA' implied-`DO' iteration ! variables, even though, strictly speaking, these are not uses of ! the variables themselves. ! ! * When `-W -Wunused' in effect, don't warn about unused dummy ! arguments at all, since there's no way to turn this off for ! individual cases (`g77' might someday start warning about ! these)--applies to `gcc' versions 2.7.0 and later, since earlier ! versions didn't warn about unused dummy arguments. ! ! * New option `-fno-underscoring' that inhibits transformation of ! names (by appending one or two underscores) so users may experiment ! with implications of such an environment. ! ! * Minor improvement to `gcc/f/info' module to make it easier to build ! `g77' using the native (non-`gcc') compiler on certain machines ! (but definitely not all machines nor all non-`gcc' compilers). ! Please do not report bugs showing problems compilers have with ! macros defined in `gcc/f/target.h' and used in places like ! `gcc/f/expr.c'. ! ! * Add warning to be printed for each invocation of the compiler if ! the target machine `INTEGER', REAL, or `LOGICAL' size is not 32 ! bits, since `g77' is known to not work well for such cases (to be ! fixed in Version 0.6--*note Actual Bugs We Haven't Fixed Yet: ! Actual Bugs.). ! ! * Lots of new documentation (though work is still needed to put it ! into canonical GNU format). ! ! * Build `libf2c' with `-g0', not `-g2', in effect (by default), to ! produce smaller library without lots of debugging clutter. ! ! In 0.5.15: ! ========== ! ! * Fix bad code generation involving `X**I' and temporary, internal ! variables generated by `g77' and the back end (such as for `DO' ! loops). ! ! * Fix crash given `CHARACTER A;DATA A/.TRUE./'. ! ! * Replace crash with diagnostic given `CHARACTER A;DATA A/1.0/'. ! ! * Fix crash or other erratic behavior when null character constant ! (`''') is encountered. ! ! * Fix crash or other erratic behavior involving diagnosed code. ! ! * Fix code generation for external functions returning type `REAL' ! when the `-ff2c' option is in force (which it is by default) so ! that `f2c' compatibility is indeed provided. ! ! * Disallow `COMMON I(10)' if `I' has previously been specified with ! an array declarator. ! ! * New `-ffixed-line-length-N' option, where N is the maximum length ! of a typical fixed-form line, defaulting to 72 columns, such that ! characters beyond column N are ignored, or N is `none', meaning no ! characters are ignored. does not affect lines with `&' in column ! 1, which are always processed as if `-ffixed-line-length-none' was ! in effect. ! ! * No longer generate better code for some kinds of array references, ! as `gcc' back end is to be fixed to do this even better, and it ! turned out to slow down some code in some cases after all. ! ! * In `COMMON' and `EQUIVALENCE' areas with any members given initial ! values (e.g. via `DATA'), uninitialized members now always ! initialized to binary zeros (though this is not required by the ! standard, and might not be done in future versions of `g77'). ! Previously, in some `COMMON'/`EQUIVALENCE' areas (essentially ! those with members of more than one type), the uninitialized ! members were initialized to spaces, to cater to `CHARACTER' types, ! but it seems no existing code expects that, while much existing ! code expects binary zeros. ! ! In 0.5.14: ! ========== ! ! * Don't emit bad code when low bound of adjustable array is ! nonconstant and thus might vary as an expression at run time. ! ! * Emit correct code for calculation of number of trips in `DO' loops ! for cases where the loop should not execute at all. (This bug ! affected cases where the difference between the begin and end ! values was less than the step count, though probably not for ! floating-point cases.) ! ! * Fix crash when extra parentheses surround item in `DATA' ! implied-`DO' list. ! ! * Fix crash over minor internal inconsistencies in handling ! diagnostics, just substitute dummy strings where necessary. ! ! * Fix crash on some systems when compiling call to `MVBITS()' ! intrinsic. ! ! * Fix crash on array assignment `TYPEDDD(...)=...', where DDD is a ! string of one or more digits. ! ! * Fix crash on `DCMPLX()' with a single `INTEGER' argument. ! ! * Fix various crashes involving code with diagnosed errors. ! ! * Support `-I' option for `INCLUDE' statement, plus `gcc''s ! `header.gcc' facility for handling systems like MS-DOS. ! ! * Allow `INCLUDE' statement to be continued across multiple lines, ! even allow it to coexist with other statements on the same line. ! ! * Incorporate Bellcore fixes to `libf2c' through 1995-03-15--this ! fixes a bug involving infinite loops reading EOF with empty ! list-directed I/O list. ! ! * Remove all the `g77'-specific auto-configuration scripts, code, ! and so on, except for temporary substitutes for bsearch() and ! strtoul(), as too many configure/build problems were reported in ! these areas. People will have to fix their systems' problems ! themselves, or at least somewhere other than `g77', which expects ! a working ANSI C environment (and, for now, a GNU C compiler to ! compile `g77' itself). ! ! * Complain if initialized common redeclared as larger in subsequent ! program unit. ! ! * Warn if blank common initialized, since its size can vary and hence ! related warnings that might be helpful won't be seen. ! ! * New `-fbackslash' option, on by default, that causes `\' within ! `CHARACTER' and Hollerith constants to be interpreted a la GNU C. ! Note that this behavior is somewhat different from `f2c''s, which ! supports only a limited subset of backslash (escape) sequences. ! ! * Make `-fugly-args' the default. ! ! * New `-fugly-init' option, on by default, that allows ! typeless/Hollerith to be specified as initial values for variables ! or named constants (`PARAMETER'), and also allows ! character<->numeric conversion in those contexts--turn off via ! `-fno-ugly-init'. ! ! * New `-finit-local-zero' option to initialize local variables to ! binary zeros. This does not affect whether they are `SAVE'd, i.e. ! made automatic or static. ! ! * New `-Wimplicit' option to warn about implicitly typed variables, ! arrays, and functions. (Basically causes all program units to ! default to `IMPLICIT NONE'.) ! ! * `-Wall' now implies `-Wuninitialized' as with `gcc' (i.e. unless ! `-O' not specified, since `-Wuninitialized' requires `-O'), and ! implies `-Wunused' as well. ! ! * `-Wunused' no longer gives spurious messages for unused `EXTERNAL' ! names (since they are assumed to refer to block data program ! units, to make use of libraries more reliable). ! ! * Support `%LOC()' and `LOC()' of character arguments. ! ! * Support null (zero-length) character constants and expressions. ! ! * Support `f2c''s `IMAG()' generic intrinsic. ! ! * Support `ICHAR()', `IACHAR()', and `LEN()' of character ! expressions that are valid in assignments but not normally as ! actual arguments. ! ! * Support `f2c'-style `&' in column 1 to mean continuation line. ! ! * Allow `NAMELIST', `EXTERNAL', `INTRINSIC', and `VOLATILE' in ! `BLOCK DATA', even though these are not allowed by the standard. ! ! * Allow `RETURN' in main program unit. ! ! * Changes to Hollerith-constant support to obey Appendix C of the ! standard: ! ! - Now padded on the right with zeros, not spaces. ! ! - Hollerith "format specifications" in the form of arrays of ! non-character allowed. ! ! - Warnings issued when non-blank truncation occurs when ! converting to another type. ! ! - When specified as actual argument, now passed by reference to ! `INTEGER' (padded on right with spaces if constant too small, ! otherwise fully intact if constant wider the `INTEGER' type) ! instead of by value. ! ! *Warning:* `f2c' differs on the interpretation of `CALL FOO(1HX)', ! which it treats exactly the same as `CALL FOO('X')', but which the ! standard and `g77' treat as `CALL FOO(%REF('X '))' (padded with ! as many blanks as necessary to widen to `INTEGER'), essentially. ! ! * Changes and fixes to typeless-constant support: ! ! - Now treated as a typeless double-length `INTEGER' value. ! ! - Warnings issued when overflow occurs. ! ! - Padded on the left with zeros when converting to a larger ! type. ! ! - Should be properly aligned and ordered on the target machine ! for whatever type it is turned into. ! ! - When specified as actual argument, now passed as reference to ! a default `INTEGER' constant. ! ! * `%DESCR()' of a non-`CHARACTER' expression now passes a pointer to ! the expression plus a length for the expression just as if it were ! a `CHARACTER' expression. For example, `CALL FOO(%DESCR(D))', ! where `D' is `REAL*8', is the same as `CALL FOO(D,%VAL(8)))'. ! ! * Name of multi-entrypoint master function changed to incorporate ! the name of the primary entry point instead of a decimal value, so ! the name of the master function for `SUBROUTINE X' with alternate ! entry points is now `__g77_masterfun_x'. ! ! * Remove redundant message about zero-step-count `DO' loops. ! ! * Clean up diagnostic messages, shortening many of them. ! ! * Fix typo in `g77' man page. ! ! * Clarify implications of constant-handling bugs in `f/BUGS'. ! ! * Generate better code for `**' operator with a right-hand operand of ! type `INTEGER'. ! ! * Generate better code for `SQRT()' and `DSQRT()', also when ! `-ffast-math' specified, enable better code generation for `SIN()' ! and `COS()'. ! ! * Generate better code for some kinds of array references. ! ! * Speed up lexing somewhat (this makes the compilation phase ! noticably faster). diff -rcp2N g77-0.5.17/f/PROJECTS g77-0.5.18/f/PROJECTS *** g77-0.5.17/f/PROJECTS Thu Nov 16 08:06:05 1995 --- g77-0.5.18/f/PROJECTS Mon Mar 4 01:14:40 1996 *************** *** 1,436 **** ! This file lists projects still to be done for the GNU Fortran system. ! Copyright (C) 1995 Free Software Foundation, Inc. You may copy, ! distribute, and modify it freely as long as you preserve this copyright ! notice and permission notice. Contributed by James Craig Burley ! (burley@gnu.ai.mit.edu). ! 1995-11-16 ! ! 0. Improved efficiency. ! ! Don't bother doing any performance analysis until most of the ! following items are taken care of, because there's no question ! they represent serious space/time problems, although some of ! them show up only given certain kinds of (popular) input. ! ! * Improve malloc package and its uses to specify more info about ! memory pools and, where feasible, use obstacks to implement them. ! ! * Skip over uninitialized portions of aggregate areas (arrays, ! COMMON areas, EQUIVALENCE areas) so zeros need not be output. ! This would reduce memory usage for large initialized aggregate ! areas, even ones with only one initialized element. ! ! * Prescan the statement (in sta.c) so that the nature of the statement ! is determined as much as possible by looking entirely at its form, ! and not looking at any context (previous statements, including types ! of symbols). This would allow ripping out of the statement- ! confirmation, symbol retraction/confirmation, and diagnostic inhibition ! mechanisms. Plus, it would result in much-improved diagnostics. For ! example, "CALL some-intrinsic(...)", where the intrinsic is not a ! subroutine intrinsic, would result actual error instead of the ! unimplemented-statement catch-all. ! ! * Throughout g77, don't pass ffewhereLine/ffewhereColumn pairs where ! a simple ffewhere type, which points to the error as much as is ! desired by the configuration, will do, and don't pass ffelexToken types ! where a simple ffewhere type will do. Then, allow new default ! configuration of ffewhere such that the source line text is not ! preserved, and leave it to things like EMACS' next-error function ! to point to them (now that next-error supports column numbers). ! The change in calling sequences should improve performance somewhat, ! as should not having to save source lines. It might even be possible ! to change ffewhere from a pointer to a single 32-bit item that has ! 24 bits for line#, 8 bits for col#, or something like that, if it's ! worthwhile for performance' sake at that point. It might also be ! worthwhile to make it easy to configure away preservation of column ! numbers if that might make g77 faster, though with most Fortran ! programs, column numbers are quite helpful. (Whether this whole ! item will improve performance is questionable, but it should greatly ! improve maintainability.) ! ! * Handle DATA (A(I),I=1,1000000)/1000000*2/ more efficiently, especially ! as regards the assembly output. Some of this might require improving ! the back end, but lots of improvement in space/time required in g77 ! itself can be fairly easily obtained without touching the back end. ! Maybe type-conversion, where necessary, can be speeded up as well in ! cases like the one shown (converting the "2" into "2."). ! ! * If analysis shows it to be worthwhile, optimize lex.c. ! ! 1. Better optimization. ! ! * Get the back end to produce at least as good code involving array ! references as does f2c+gcc. (NOTE: 0.5.16 seems to have improved ! this, at least based on preliminary feedback during alpha testing. ! Please provide detailed information on cases where it doesn't, for ! possible future improvements. Apparently the improvement works ! only as of gcc-2.7.0; it doesn't kick in for 2.6.3, for example. ! Further analysis shows that cases where the improvement doesn't ! occur include those involving 3-dimensional arrays, for example.) ! ! * Do the equivalent of the trick of putting "extern inline" in front ! of every function definition in libf2c and #include'ing the resulting ! file in f2c+gcc -- that is, inline all run-time-library functions ! that are at all worth inlining. (Some of this has already been ! done, e.g. for integral exponentiation.) ! ! * Provide some way, a la gcc, for Fortran code to specify assembler ! code. ! ! * When doing CHAR_VAR = CHAR_FUNC(...), and it's clear that types line up ! and CHAR_VAR is addressable or not a VAR_DECL, make CHAR_VAR, not a ! temporary, be the receiver for CHAR_FUNC. (This is now done for ! COMPLEX variables.) ! ! * Design and implement Fortran-specific optimizations that don't ! really belong in the back end, or where the front end needs to ! give the back end more info than it currently does. ! ! * Design and implement a new run-time library interface, with the ! code going into libgcc so no special linking is required to ! link Fortran programs using standard language features. This library ! would speed up lots of things, from I/O (using precompiled formats, ! doing single or small #s of calls for arrays or array sections, and ! so on) to general computing (array/section implementations of ! various intrinsics, implementation of commonly performed loops that ! aren't likely to be optimally compiled otherwise, etc.). Among ! the important things the library would do are: be a one-stop-shop-type ! library, hence shareable and usable by all, in that what are now ! library-build-time options in libf2c would be moved at least to the ! g77 compile phase, if not to finer grains (such as choosing how ! list-directed I/O formatting is done by default at OPEN time, for ! preconnected units via options or even statements in the main program ! unit, maybe even on a per-I/O basis with appropriate pragma-like ! devices). ! ! * Probably requiring the new library design, change interface to ! normally have COMPLEX functions return their values in the way ! gcc would if they were declared complex float, rather than using ! the mechanism currently used by CHARACTER functions (whereby the ! functions are compiled as returning void and their first arg is ! a pointer to where to store the result). Don't append underscores on ! external names for COMPLEX functions in some cases once g77 uses ! gcc rather than f2c calling conventions. ! ! * Do something useful with "doiter" references where possible. E.g. ! CALL FOO(I) cannot modify I if within a DO loop that uses I as the ! iteration variable, and the back end might find that info useful ! in determining whether it needs to read I back into a register after ! the call. (It normally has to do that, unless it knows FOO never ! modifies its passed-by-reference argument, which is rarely the case ! for F77 code.) ! ! 2. Simpler porting. ! ! * A new library (see above) should improve portability as well as ! produce more optimal code. Further, g77 and the new library should ! conspire to simplify naming of externals, such as by removing unnecessarily ! added underscores, and to reduce/eliminate the possibility of naming ! conflicts, while making debugger more straightforward. Also, it should ! make multi-language applications more feasible, such as by providing ! Fortran intrinsics that get Fortran unit numbers given C FILE * ! descriptors. ! ! * Possibly related to a new library, g77 should produce the equivalent ! of a gcc "main(argc, argv)" function when it compiles a main program ! unit, instead of compiling something that must be called by a library ! implementation of main(). This would do many useful things such as ! provide more flexibility in terms of setting up exception handling, ! not requiring programmers to start their debugging sessions with ! "breakpoint MAIN__" followed by "run", and so on. ! ! * The back end needs to understand the difference between alignment ! requirements and desires. E.g. on x86 machines, g77 currently imposes ! overly strict alignment requirements, due to the back end, but it ! would be useful for Fortran and C programmers to be able to override ! these _recommendations_ as long as they don't violate the actual ! processor _requirements_. ! ! 3. More extensions. ! ! * Support INTEGER/REAL/COMPLEX equivalents for all applicable back-end- ! supported types (char, short int, int, long int, long long int, and long ! double). This means providing intrinsic support &c as well, and for most ! machines will result in automatic support of INTEGER*1, INTEGER*2, ! INTEGER*8, and so on. ! ! * Provide as the default source-line model a "pure visual" mode, where ! the interpretation of a source program in this mode can be accurately ! determined by a user looking at a traditionally displayed rendition ! of the program (assuming the user knows whether the program is fixed ! or free form). That is, assume the user cannot tell tabs from spaces ! and cannot see trailing spaces on lines, but has canonical tab stops ! and, for fixed-form source, has the ability to always know exactly ! where column 72 is. Then provide common alternate models (Digital, f2c, ! &c) via command-line options. This includes allowing arbitrarily long ! lines for free-form source as well as fixed-form source and providing ! pedantic limits and diagnostics as appropriate, plus even on a non- ! tabbed fixed-form line, treating a line with the first non-blank character ! starting with column 6 being a digit as a continuation line (to effect ! the "1continuationline..." behavior in "pure visual" mode -- ! actually, g77 already does this). ! ! * Intrinsics in constant expressions. This, plus F90 intrinsics such ! as SELECTED_INT_KIND, would give users the ability to write clear, ! 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). ! ! * Finish support for V027 VXT PARAMETER statement (like PARAMETER in ! stc but type of destination is set from type of source expression). ! ! * Consider adding a NUMERIC type to designate typeless numeric constants, ! named and unnamed. The idea is to provide a forward-looking, effective ! replacement for things like the VXT PARAMETER statement when people ! really need typelessness in a maintainable, portable, clearly documented ! way. Maybe TYPELESS would include CHARACTER, POINTER, and whatever ! else might come along. ! ! * Allow DATA VAR/.../ to come before COMMON /.../ ...,VAR,.... Then again, ! maybe it is better to have g77 always require placement of DATA so that ! it can possibly immediately write constants to the output file, thus ! saving time and space? That is, DATA A/1000000*1/ should perhaps always ! be immediately writable to canonical assembler, unless it's already known ! to be in a COMMON area following as-yet-uninitialized stuff, and to do ! this it cannot be followed by COMMON A. ! ! * Character-type selector/cases for SELECT CASE. ! ! * Option to initialize everything not explicitly initialized to "weird" ! (machine-dependent) values, e.g. NANs, bad (non-NULL) pointers, and ! "-0" integers. Right now, only -finit-local-zero is supported, which ! initializes local vars to binary zeros. ! ! * Add run-time bounds-checking of array/subscript references a la f2c. ! ! * Output labels for use by debuggers that know how to support them. Same ! with weirder things like construct names. It is not yet known if any ! debug formats or debuggers support these. ! ! * Provide necessary g77/gdb support to make better native Fortran-language ! debugging. ! ! * Support the POSIX standard for Fortran. ! ! * Support DEC-style lossage of virtual blanks at end of source line ! if some command-line option specified. This affects cases where ! a character constant is continued onto the next line in a fixed-form ! source file -- g77, and many other compilers, virtually extend ! the continued line through column 72 with blanks that become part ! of the character constant, but DEC Fortran normally didn't. (Fairly ! recently, at least one version of DEC Fortran was enhanced to provide ! the g77 behavior when a command-line option is specified, apparently due ! to demand from readers of the USENET group comp.lang.fortran. It'd ! be nice to return the favor!) ! ! * Consider a preprocessor designed specifically for Fortran to replace ! cpp -traditional. There are several on the 'net to look at. ! ! * Support OPEN(...,KEY=(...),...). ! ! * OPEN(NOSPANBLOCKS,...) is treated as OPEN(UNIT=NOSPANBLOCKS,...), so a ! later UNIT= in the first example is invalid. Make sure this is ! what DEC Fortran users expect. ! ! * Currently we disallow READ(1'10) since it is an obnoxious syntax, but ! supporting it might be pretty easy if needed (more details needed, such ! as whether general expressions separated by an apostrophe are supported, ! or maybe the record number can be a general expression, &c). ! ! * Support STRUCTURE/UNION/MAP/RECORD fully. Currently no support at all ! for %FILL in STRUCTURE and related syntax, whereas the rest of the ! stuff has at least some parsing support. This requires either major ! changes to libf2c or its replacement. ! ! * F90 and g77 probably disagree about label scoping relative to INTERFACE/ ! END INTERFACE and their contained SUBROUTINE/FUNCTION interface bodies ! (blocks?). ! ! * F90: ENTRY doesn't support RESULT() yet, since that was added after S8.112. ! ! * F90: Empty-statement handling (10 ;;CONTINUE;;) probably isn't consistent ! with the final form of the standard (it was vague at S8.112). ! ! * It seems to be an "open" question whether a file, immediately after being ! OPENed, is positioned at the beginning, the end, or wherever -- it might ! be nice to offer an option of opening to "undefined" status, requiring ! an explicit absolute-positioning operation to be performed before any ! other (besides CLOSE) to assist in making applications port to systems ! (some IBM?) that OPEN to the end of a file or some such thing. ! ! 4. Generalize the machine model. ! ! * Switch to using REAL_VALUE_TYPE to represent REAL/DOUBLE constants ! exclusively so the target float format need not be required. This ! means changing the way g77 handles initialization of aggregate areas ! having more than one type, such as REAL and INTEGER, because currently ! it initializes them as if they were arrays of "char" and uses the ! bit patterns of the constants of the various types in them to determine ! what to stuff in elements of the arrays. ! ! * Rely more and more on back-end info and capabilities, especially in the ! area of constants (where having the g77 front-end's IL just store ! the appropriate tree nodes containing constants might be best). ! ! * Suite of C and Fortran programs that a user/administrator can run on a ! machine to help determine the configuration for GNU Fortran before building ! and help determine if the compiler works (especially with whatever ! libraries are installed) after building. ! ! 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 ! warnings instead of rejecting constructs outright. Have it warn: ! if a variable that dimensions an array is not a dummy or placed ! explicitly in COMMON (the 77 standard does not allow it to be ! placed in COMMON via EQUIVALENCE); if specification statements ! follow statement-function-definition statements; about all sorts of ! syntactic extensions. ! ! * Warn about modifying DO variables via EQUIVALENCE. This test might ! be useful in setting the "doiter" flag for a variable or even array ! reference within a loop, since that might produce faster code someday. ! ! * Warn if brain-damage auto-decimal-convert-constant-to-REAL*8 ! feature might be expected in source (if such warnings are enabled); for ! example, warn in cases like "parameter (pi=3.14159);foo=pi*3d0;" because ! apparently in these and other cases, some compilers append decimal zeros ! to the original single-precision constant and converts the result to ! double-precision -- though undoubtedly it uses an easier equivalent ! implementation (and I suppose g77 could, too, if this kind of dangerous ! feature were actually more useful than just fixing the source). ! ! 6. Better documentation. ! ! * Convert existing documentation into the format(s) used by gcc, for ! all the right reasons. ! ! * Better info on how g77 works and how to port it. ! ! 7. Better internals. ! ! * Generally make expression handling focus ! more on critical syntax stuff, leaving semantics to callers. E.g. ! anything a caller can check, semantically, let it do so, rather ! than having expr.c do it. (Exceptions might include things like ! diagnosing "FOO(I--K:)=BAR" where FOO is a PARAMETER -- if it seems ! important to preserve the left-to-right-in-source order of production ! of diagnostics.) ! ! * Come up with better naming conventions for -D to establish requirements ! to achieve desired "language" via proj.h. ! ! * In global, clean up used tokens and ffewheres in _terminate_1. ! ! * Replace sta outpooldisp mechanism with malloc_pool_use. ! ! * Check for opANY in more places in com.c, std.c, and ste.c, and get ! rid of the opCONVERT(opANY) kludge (after determining if there is ! indeed no real need for it). ! ! * Utility to read and check bad.def msgs and their references in the ! code, to make sure calls are consistent with message templates. ! ! * Make a symbol dumper for standalone FFE so testing can be more exhaustive. ! ! * Search and fix "&ffe" and similar so that "ffe...ptr..." macros are ! available instead (a good argument for wishing we could have written all ! this stuff in C++, I suppose). ! ! * Some modules truly export the member names of their structures (and the ! structures themselves), maybe fix this, and fix other modules that just ! appear to as well (by appending "_", though it'd be ugly and probably ! not worth the time). ! ! * Implement C macros RETURNS(value) and SETS(something,value) in proj.h ! and use them throughout FFE source code so they can be tailored to catch ! code writing into a RETURNS() or reading from a SETS(). ! ! * Decorate throughout with "const" and other such stuff. ! ! * All F90 notational derivations in the source code are still based ! on the S8.112 version of the draft standard. Probably should update ! to the official standard, or put documentation of the rules as used ! in the code...uh...in the code. ! ! * Some ffebld_new calls (those outside of ffeexpr or inside but invoked ! via paths not involving ffeexpr_lhs or ffeexpr_rhs) might be creating things ! in improper pools, leading to such things staying around too long or ! (doubtful, but possible and dangerous) not long enough. ! ! * Some ffebld_list_new (or whatever) calls might not be matched by ! ffebld_list_bottom (or whatever) calls, which might someday matter. ! ! * Probably not doing clean things when we fail to EQUIVALENCE something ! due to alignment/mismatch or other problems -- they end up without ! ffestorag objects, so maybe the backend (and other parts of the front ! end) can notice that and handle like an "opANY" (do what it wants, just ! don't complain or crash). Most of this seems to have been addressed ! by now, but a code review wouldn't hurt. ! ! 8. Better diagnostics. ! ! * Implement non-F90 messages (especially avoid mentioning F90 things g77 ! doesn't yet support). Much of this has been done as of 0.5.14. ! ! * Generally continue processing for warnings and recoverable (user) ! errors whenever possible -- don't gratuitously make bad code. Example: ! INTRINSIC ZABS;CALL FOO(ZABS);END when -ff2c-intrinsics-disable should ! complain about passing ZABS but still compile, instead of rejecting ! the entire CALL statement (some of this is related to improving sta.c ! to do the statement-preprocessing work). ! ! * If -fno-ugly, reject badly designed trailing-radix quoted (typeless) ! numbers, such as '123'O. ! ! * -Wugly*, -Wautomatic, -Wvxt-not-f90 (syn. -Wf90-not-vxt), -Wf90, and so ! on all should flag places (via diagnostics) where ambiguities ! are found. ! ! * -Wconversion and related should flag places where non-standard ! conversions are found. Perhaps much of this would be part of ! -Wugly*. ! ! * When FUNCTION and ENTRY point types disagree (CHARACTER lengths, ! type classes, &c), ANY-ize the offending ENTRY point and any _new_ dummies ! it specifies. ! ! * Complain when list of dummies containing an adjustable dummy array does ! not also contain every variable listed in the dimension list of the ! adjustable array. Currently g77 does complain about a variable that ! dimensions an array but doesn't appear in any dummy list or COMMON area, ! but this needs to be extended to catch cases where it doesn't appear in ! every dummy list that also lists any arrays it dimensions. ! ! * Make sure things like RETURN 2HAB are invalid in both source forms (must ! be RETURN (2HAB), which probably still makes no sense but at least can ! be reliably parsed). Fixed form rejects it, but not free form, except ! in a way that is a bit difficult to understand. ! ! * Speed up and improve error handling for data when repeat-count is ! specified; as in "integer x(20);continue;data (x(i),j=1,20)/20*5/;end", ! so 20 messages don't come out after the important one. ! ! 9. More library routines. ! ! * The sort of routines usually found in the BSD-ish libU77 should be ! provided in addition to the few utility routines in libF77. Some of ! this work has been done. --- 1,5 ---- ! THIS FILE HAS BEEN OBSOLETED in the GNU Fortran distribution as ! of version 0.5.18. It will be removed in a future distribution. ! Its contents have been assimilated into the Info documentation, ! the source to which is in gcc/f/g77.texi. diff -rcp2N g77-0.5.17/f/README.NEXTSTEP g77-0.5.18/f/README.NEXTSTEP *** g77-0.5.17/f/README.NEXTSTEP Mon Aug 28 09:41:25 1995 --- g77-0.5.18/f/README.NEXTSTEP Mon Mar 4 01:21:25 1996 *************** *** 1,38 **** ! 1995-02-16 ! This file contributed by Toon Moene (toon@moene.indiv.nluug.nl). ! ! Developers of FORTRAN code on NEXTSTEP (all architectures) have to ! watch out for the following problem when writing programs with ! large, statically allocated (i.e. non-stack based) data structures ! (common blocks, saved arrays). ! ! Due to the way the native loader ('/bin/ld') on NEXTSTEP lays out ! data structures in virtual memory, it is very easy to create an ! executable wherein the '__DATA' segment overlaps (has addresses in ! common) with the 'UNIX STACK' segment. ! ! This leads to all sorts of trouble, from the executable simply 'not ! being executable' to Bus errors. The NEXTSTEP command line tool ! 'ebadexec' points to the problem as follows: ! ! % /bin/ebadexec a.out ! /bin/ebadexec: __LINKEDIT segment (truncated address = 0x3de000 ! rounded size = 0x2a000) of executable file: a.out overlaps with UNIX ! STACK segment (truncated address = 0x400000 rounded size = ! 0x3c00000) of executable file: a.out ! ! (in this case it is the '__LINKEDIT' segment which overlaps the ! stack segment). This can be cured by assigning the '__DATA' segment ! (virtual) addresses beyond the stack segment. A conservative ! estimate for this is from address 6000000 (hexadecimal) onwards - ! this has always worked for me [Toon Moene]: ! ! % g77 -segaddr __DATA 6000000 test.f ! % ebadexec a.out ! ebadexec: file: a.out appears to be executable ! ! Browsing through the Makefile in the f/ directory in your gcc ! distribution, you will find that linking f771 itself also has to be ! done with these flags - it apparently has large statically allocated ! data structures. --- 1,6 ---- ! THIS FILE HAS BEEN OBSOLETED in the GNU Fortran distribution as ! of version 0.5.18. It will be removed in a future distribution. ! Its contents have been assimilated into the Info documentation, ! the source to which is in gcc/f/g77.texi. In particular, see ! the node ``(g77)But-bugs''. diff -rcp2N g77-0.5.17/f/bad.def g77-0.5.18/f/bad.def *** g77-0.5.17/f/bad.def Thu Oct 26 19:06:49 1995 --- g77-0.5.18/f/bad.def Mon Mar 18 16:42:26 1996 *************** FFEBAD_MSGS2 (FFEBAD_INVALID_TYPELESS_HE *** 121,126 **** "Invalid hexadecimal constant at %0") FFEBAD_MSGS2 (FFEBAD_INVALID_COMPLEX_PART, FATAL, ! "Invalid expression at %0 -- must be a constant integer or real expression to form the %A part of a complex constant", ! "Invalid %A part of complex constant at %0") FFEBAD_MSGS2 (FFEBAD_INVALID_PERCENT, FATAL, "Invalid keyword `%%%A' at %0 in this context", --- 121,126 ---- "Invalid hexadecimal constant at %0") FFEBAD_MSGS2 (FFEBAD_INVALID_COMPLEX_PART, FATAL, ! "%A part of complex constant at %0 must be a real or integer constant -- otherwise use CMPLX() in place of ()", ! "%A part of complex constant at %0 not a real or integer constant") FFEBAD_MSGS2 (FFEBAD_INVALID_PERCENT, FATAL, "Invalid keyword `%%%A' at %0 in this context", *************** FFEBAD_MSGS1 (FFEBAD_BAD_COMPLEX, FATAL, *** 453,457 **** FFEBAD_MSGS1 (FFEBAD_BAD_DBLCMPLX, FATAL, "Target machine does not support DOUBLE COMPLEX, specified at %0") ! FFEBAD_MSGS1 (FFEBAD_BAD_POWER, FATAL, "Attempt to raise constant zero to a power at %0") FFEBAD_MSGS2 (FFEBAD_BOOL_ARGS_TYPE, FATAL, --- 453,457 ---- FFEBAD_MSGS1 (FFEBAD_BAD_DBLCMPLX, FATAL, "Target machine does not support DOUBLE COMPLEX, specified at %0") ! FFEBAD_MSGS1 (FFEBAD_BAD_POWER, WARN, "Attempt to raise constant zero to a power at %0") FFEBAD_MSGS2 (FFEBAD_BOOL_ARGS_TYPE, FATAL, *************** FFEBAD_MSGS1 (FFEBAD_VXT_UNSUPPORTED, FA *** 542,550 **** "Unsupported VXT statement at %0") FFEBAD_MSGS1 (FFEBAD_DATA_REINIT, FATAL, ! "Attempt to specify second initial value for `%A' in statement at %0") FFEBAD_MSGS1 (FFEBAD_DATA_TOOFEW, FATAL, ! "Too few initial values for list of initializers at %0 (target symbol `%A')") FFEBAD_MSGS1 (FFEBAD_DATA_TOOMANY, FATAL, ! "Too many initial values starting at %0 for list of initializers") FFEBAD_MSGS1 (FFEBAD_DATA_RANGE, FATAL, "Array or substring specification for `%A' out of range in statement at %0") --- 542,550 ---- "Unsupported VXT statement at %0") FFEBAD_MSGS1 (FFEBAD_DATA_REINIT, FATAL, ! "Attempt to specify second initial value for `%A' at %0") FFEBAD_MSGS1 (FFEBAD_DATA_TOOFEW, FATAL, ! "Too few initial values in list of initializers for `%A' at %0") FFEBAD_MSGS1 (FFEBAD_DATA_TOOMANY, FATAL, ! "Too many initial values in list of initializers starting at %0") FFEBAD_MSGS1 (FFEBAD_DATA_RANGE, FATAL, "Array or substring specification for `%A' out of range in statement at %0") diff -rcp2N g77-0.5.17/f/bld.c g77-0.5.18/f/bld.c *** g77-0.5.17/f/bld.c Wed Aug 30 15:53:38 1995 --- g77-0.5.18/f/bld.c Mon Mar 18 20:14:45 1996 *************** ffebld_constant_dump (ffebldConstant c) *** 454,458 **** #if FFETARGET_okINTEGER1 case FFEBLD_constINTEGER1: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER1); ffebld_constantunion_dump (ffebld_constant_union (c), --- 454,458 ---- #if FFETARGET_okINTEGER1 case FFEBLD_constINTEGER1: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER1); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 463,467 **** #if FFETARGET_okINTEGER2 case FFEBLD_constINTEGER2: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER2); ffebld_constantunion_dump (ffebld_constant_union (c), --- 463,467 ---- #if FFETARGET_okINTEGER2 case FFEBLD_constINTEGER2: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER2); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 472,476 **** #if FFETARGET_okINTEGER3 case FFEBLD_constINTEGER3: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER3); ffebld_constantunion_dump (ffebld_constant_union (c), --- 472,476 ---- #if FFETARGET_okINTEGER3 case FFEBLD_constINTEGER3: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER3); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 481,485 **** #if FFETARGET_okINTEGER4 case FFEBLD_constINTEGER4: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER4); ffebld_constantunion_dump (ffebld_constant_union (c), --- 481,485 ---- #if FFETARGET_okINTEGER4 case FFEBLD_constINTEGER4: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER4); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 490,494 **** #if FFETARGET_okINTEGER5 case FFEBLD_constINTEGER5: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER5); ffebld_constantunion_dump (ffebld_constant_union (c), --- 490,494 ---- #if FFETARGET_okINTEGER5 case FFEBLD_constINTEGER5: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER5); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 499,503 **** #if FFETARGET_okINTEGER6 case FFEBLD_constINTEGER6: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER6); ffebld_constantunion_dump (ffebld_constant_union (c), --- 499,503 ---- #if FFETARGET_okINTEGER6 case FFEBLD_constINTEGER6: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER6); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 508,512 **** #if FFETARGET_okINTEGER7 case FFEBLD_constINTEGER7: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER7); ffebld_constantunion_dump (ffebld_constant_union (c), --- 508,512 ---- #if FFETARGET_okINTEGER7 case FFEBLD_constINTEGER7: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER7); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 517,521 **** #if FFETARGET_okINTEGER8 case FFEBLD_constINTEGER8: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER8); ffebld_constantunion_dump (ffebld_constant_union (c), --- 517,521 ---- #if FFETARGET_okINTEGER8 case FFEBLD_constINTEGER8: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER8); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 526,530 **** #if FFETARGET_okLOGICAL1 case FFEBLD_constLOGICAL1: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL1); ffebld_constantunion_dump (ffebld_constant_union (c), --- 526,530 ---- #if FFETARGET_okLOGICAL1 case FFEBLD_constLOGICAL1: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL1); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 535,539 **** #if FFETARGET_okLOGICAL2 case FFEBLD_constLOGICAL2: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL2); ffebld_constantunion_dump (ffebld_constant_union (c), --- 535,539 ---- #if FFETARGET_okLOGICAL2 case FFEBLD_constLOGICAL2: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL2); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 544,548 **** #if FFETARGET_okLOGICAL3 case FFEBLD_constLOGICAL3: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL3); ffebld_constantunion_dump (ffebld_constant_union (c), --- 544,548 ---- #if FFETARGET_okLOGICAL3 case FFEBLD_constLOGICAL3: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL3); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 553,557 **** #if FFETARGET_okLOGICAL4 case FFEBLD_constLOGICAL4: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL4); ffebld_constantunion_dump (ffebld_constant_union (c), --- 553,557 ---- #if FFETARGET_okLOGICAL4 case FFEBLD_constLOGICAL4: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL4); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 562,566 **** #if FFETARGET_okLOGICAL5 case FFEBLD_constLOGICAL5: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL5); ffebld_constantunion_dump (ffebld_constant_union (c), --- 562,566 ---- #if FFETARGET_okLOGICAL5 case FFEBLD_constLOGICAL5: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL5); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 571,575 **** #if FFETARGET_okLOGICAL6 case FFEBLD_constLOGICAL6: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL6); ffebld_constantunion_dump (ffebld_constant_union (c), --- 571,575 ---- #if FFETARGET_okLOGICAL6 case FFEBLD_constLOGICAL6: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL6); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 580,584 **** #if FFETARGET_okLOGICAL7 case FFEBLD_constLOGICAL7: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL7); ffebld_constantunion_dump (ffebld_constant_union (c), --- 580,584 ---- #if FFETARGET_okLOGICAL7 case FFEBLD_constLOGICAL7: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL7); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 589,593 **** #if FFETARGET_okLOGICAL8 case FFEBLD_constLOGICAL8: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL8); ffebld_constantunion_dump (ffebld_constant_union (c), --- 589,593 ---- #if FFETARGET_okLOGICAL8 case FFEBLD_constLOGICAL8: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL8); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 598,602 **** #if FFETARGET_okREAL1 case FFEBLD_constREAL1: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeREAL, FFEINFO_kindtypeREAL1); ffebld_constantunion_dump (ffebld_constant_union (c), --- 598,602 ---- #if FFETARGET_okREAL1 case FFEBLD_constREAL1: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeREAL, FFEINFO_kindtypeREAL1); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 607,611 **** #if FFETARGET_okREAL2 case FFEBLD_constREAL2: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeREAL, FFEINFO_kindtypeREAL2); ffebld_constantunion_dump (ffebld_constant_union (c), --- 607,611 ---- #if FFETARGET_okREAL2 case FFEBLD_constREAL2: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeREAL, FFEINFO_kindtypeREAL2); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 616,620 **** #if FFETARGET_okREAL3 case FFEBLD_constREAL3: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeREAL, FFEINFO_kindtypeREAL3); ffebld_constantunion_dump (ffebld_constant_union (c), --- 616,620 ---- #if FFETARGET_okREAL3 case FFEBLD_constREAL3: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeREAL, FFEINFO_kindtypeREAL3); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 625,629 **** #if FFETARGET_okREAL4 case FFEBLD_constREAL4: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeREAL, FFEINFO_kindtypeREAL4); ffebld_constantunion_dump (ffebld_constant_union (c), --- 625,629 ---- #if FFETARGET_okREAL4 case FFEBLD_constREAL4: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeREAL, FFEINFO_kindtypeREAL4); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 634,638 **** #if FFETARGET_okREAL5 case FFEBLD_constREAL5: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeREAL, FFEINFO_kindtypeREAL5); ffebld_constantunion_dump (ffebld_constant_union (c), --- 634,638 ---- #if FFETARGET_okREAL5 case FFEBLD_constREAL5: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeREAL, FFEINFO_kindtypeREAL5); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 643,647 **** #if FFETARGET_okREAL6 case FFEBLD_constREAL6: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeREAL, FFEINFO_kindtypeREAL6); ffebld_constantunion_dump (ffebld_constant_union (c), --- 643,647 ---- #if FFETARGET_okREAL6 case FFEBLD_constREAL6: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeREAL, FFEINFO_kindtypeREAL6); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 652,656 **** #if FFETARGET_okREAL7 case FFEBLD_constREAL7: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeREAL, FFEINFO_kindtypeREAL7); ffebld_constantunion_dump (ffebld_constant_union (c), --- 652,656 ---- #if FFETARGET_okREAL7 case FFEBLD_constREAL7: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeREAL, FFEINFO_kindtypeREAL7); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 661,665 **** #if FFETARGET_okREAL8 case FFEBLD_constREAL8: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeREAL, FFEINFO_kindtypeREAL8); ffebld_constantunion_dump (ffebld_constant_union (c), --- 661,665 ---- #if FFETARGET_okREAL8 case FFEBLD_constREAL8: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeREAL, FFEINFO_kindtypeREAL8); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 670,674 **** #if FFETARGET_okCOMPLEX1 case FFEBLD_constCOMPLEX1: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeCOMPLEX, FFEINFO_kindtypeREAL1); ffebld_constantunion_dump (ffebld_constant_union (c), --- 670,674 ---- #if FFETARGET_okCOMPLEX1 case FFEBLD_constCOMPLEX1: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeCOMPLEX, FFEINFO_kindtypeREAL1); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 679,683 **** #if FFETARGET_okCOMPLEX2 case FFEBLD_constCOMPLEX2: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeCOMPLEX, FFEINFO_kindtypeREAL2); ffebld_constantunion_dump (ffebld_constant_union (c), --- 679,683 ---- #if FFETARGET_okCOMPLEX2 case FFEBLD_constCOMPLEX2: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeCOMPLEX, FFEINFO_kindtypeREAL2); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 688,692 **** #if FFETARGET_okCOMPLEX3 case FFEBLD_constCOMPLEX3: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeCOMPLEX, FFEINFO_kindtypeREAL3); ffebld_constantunion_dump (ffebld_constant_union (c), --- 688,692 ---- #if FFETARGET_okCOMPLEX3 case FFEBLD_constCOMPLEX3: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeCOMPLEX, FFEINFO_kindtypeREAL3); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 697,701 **** #if FFETARGET_okCOMPLEX4 case FFEBLD_constCOMPLEX4: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeCOMPLEX, FFEINFO_kindtypeREAL4); ffebld_constantunion_dump (ffebld_constant_union (c), --- 697,701 ---- #if FFETARGET_okCOMPLEX4 case FFEBLD_constCOMPLEX4: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeCOMPLEX, FFEINFO_kindtypeREAL4); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 706,710 **** #if FFETARGET_okCOMPLEX5 case FFEBLD_constCOMPLEX5: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeCOMPLEX, FFEINFO_kindtypeREAL5); ffebld_constantunion_dump (ffebld_constant_union (c), --- 706,710 ---- #if FFETARGET_okCOMPLEX5 case FFEBLD_constCOMPLEX5: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeCOMPLEX, FFEINFO_kindtypeREAL5); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 715,719 **** #if FFETARGET_okCOMPLEX6 case FFEBLD_constCOMPLEX6: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeCOMPLEX, FFEINFO_kindtypeREAL6); ffebld_constantunion_dump (ffebld_constant_union (c), --- 715,719 ---- #if FFETARGET_okCOMPLEX6 case FFEBLD_constCOMPLEX6: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeCOMPLEX, FFEINFO_kindtypeREAL6); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 724,728 **** #if FFETARGET_okCOMPLEX7 case FFEBLD_constCOMPLEX7: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeCOMPLEX, FFEINFO_kindtypeREAL7); ffebld_constantunion_dump (ffebld_constant_union (c), --- 724,728 ---- #if FFETARGET_okCOMPLEX7 case FFEBLD_constCOMPLEX7: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeCOMPLEX, FFEINFO_kindtypeREAL7); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 733,737 **** #if FFETARGET_okCOMPLEX8 case FFEBLD_constCOMPLEX8: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeCOMPLEX, FFEINFO_kindtypeREAL8); ffebld_constantunion_dump (ffebld_constant_union (c), --- 733,737 ---- #if FFETARGET_okCOMPLEX8 case FFEBLD_constCOMPLEX8: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeCOMPLEX, FFEINFO_kindtypeREAL8); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 742,746 **** #if FFETARGET_okCHARACTER1 case FFEBLD_constCHARACTER1: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeCHARACTER, FFEINFO_kindtypeCHARACTER1); ffebld_constantunion_dump (ffebld_constant_union (c), --- 742,746 ---- #if FFETARGET_okCHARACTER1 case FFEBLD_constCHARACTER1: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeCHARACTER, FFEINFO_kindtypeCHARACTER1); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 751,755 **** #if FFETARGET_okCHARACTER2 case FFEBLD_constCHARACTER2: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeCHARACTER, FFEINFO_kindtypeCHARACTER2); ffebld_constantunion_dump (ffebld_constant_union (c), --- 751,755 ---- #if FFETARGET_okCHARACTER2 case FFEBLD_constCHARACTER2: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeCHARACTER, FFEINFO_kindtypeCHARACTER2); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 760,764 **** #if FFETARGET_okCHARACTER3 case FFEBLD_constCHARACTER3: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeCHARACTER, FFEINFO_kindtypeCHARACTER3); ffebld_constantunion_dump (ffebld_constant_union (c), --- 760,764 ---- #if FFETARGET_okCHARACTER3 case FFEBLD_constCHARACTER3: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeCHARACTER, FFEINFO_kindtypeCHARACTER3); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 769,773 **** #if FFETARGET_okCHARACTER4 case FFEBLD_constCHARACTER4: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeCHARACTER, FFEINFO_kindtypeCHARACTER4); ffebld_constantunion_dump (ffebld_constant_union (c), --- 769,773 ---- #if FFETARGET_okCHARACTER4 case FFEBLD_constCHARACTER4: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeCHARACTER, FFEINFO_kindtypeCHARACTER4); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 778,782 **** #if FFETARGET_okCHARACTER5 case FFEBLD_constCHARACTER5: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeCHARACTER, FFEINFO_kindtypeCHARACTER5); ffebld_constantunion_dump (ffebld_constant_union (c), --- 778,782 ---- #if FFETARGET_okCHARACTER5 case FFEBLD_constCHARACTER5: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeCHARACTER, FFEINFO_kindtypeCHARACTER5); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 787,791 **** #if FFETARGET_okCHARACTER6 case FFEBLD_constCHARACTER6: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeCHARACTER, FFEINFO_kindtypeCHARACTER6); ffebld_constantunion_dump (ffebld_constant_union (c), --- 787,791 ---- #if FFETARGET_okCHARACTER6 case FFEBLD_constCHARACTER6: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeCHARACTER, FFEINFO_kindtypeCHARACTER6); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 796,800 **** #if FFETARGET_okCHARACTER7 case FFEBLD_constCHARACTER7: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeCHARACTER, FFEINFO_kindtypeCHARACTER7); ffebld_constantunion_dump (ffebld_constant_union (c), --- 796,800 ---- #if FFETARGET_okCHARACTER7 case FFEBLD_constCHARACTER7: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeCHARACTER, FFEINFO_kindtypeCHARACTER7); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 805,809 **** #if FFETARGET_okCHARACTER8 case FFEBLD_constCHARACTER8: ! ffebld_dump_prefix (stdout, FFEINFO_basictypeCHARACTER, FFEINFO_kindtypeCHARACTER8); ffebld_constantunion_dump (ffebld_constant_union (c), --- 805,809 ---- #if FFETARGET_okCHARACTER8 case FFEBLD_constCHARACTER8: ! ffebld_dump_prefix (dmpout, FFEINFO_basictypeCHARACTER, FFEINFO_kindtypeCHARACTER8); ffebld_constantunion_dump (ffebld_constant_union (c), *************** ffebld_constant_dump (ffebldConstant c) *** 813,864 **** case FFEBLD_constHOLLERITH: ! fprintf (stdout, "H%" ffetargetHollerithSize_f "u/", ffebld_constant_hollerith (c).length); ! ffetarget_print_hollerith (stdout, ffebld_constant_hollerith (c)); break; case FFEBLD_constBINARY_MIL: ! fprintf (stdout, "BM/"); ! ffetarget_print_binarymil (stdout, ffebld_constant_typeless (c)); break; case FFEBLD_constBINARY_VXT: ! fprintf (stdout, "BV/"); ! ffetarget_print_binaryvxt (stdout, ffebld_constant_typeless (c)); break; case FFEBLD_constOCTAL_MIL: ! fprintf (stdout, "OM/"); ! ffetarget_print_octalmil (stdout, ffebld_constant_typeless (c)); break; case FFEBLD_constOCTAL_VXT: ! fprintf (stdout, "OV/"); ! ffetarget_print_octalvxt (stdout, ffebld_constant_typeless (c)); break; case FFEBLD_constHEX_X_MIL: ! fprintf (stdout, "XM/"); ! ffetarget_print_hexxmil (stdout, ffebld_constant_typeless (c)); break; case FFEBLD_constHEX_X_VXT: ! fprintf (stdout, "XV/"); ! ffetarget_print_hexxvxt (stdout, ffebld_constant_typeless (c)); break; case FFEBLD_constHEX_Z_MIL: ! fprintf (stdout, "ZM/"); ! ffetarget_print_hexzmil (stdout, ffebld_constant_typeless (c)); break; case FFEBLD_constHEX_Z_VXT: ! fprintf (stdout, "ZV/"); ! ffetarget_print_hexzvxt (stdout, ffebld_constant_typeless (c)); break; default: assert ("bad constant type" == NULL); ! fprintf (stdout, "?/?"); break; } --- 813,864 ---- case FFEBLD_constHOLLERITH: ! fprintf (dmpout, "H%" ffetargetHollerithSize_f "u/", ffebld_constant_hollerith (c).length); ! ffetarget_print_hollerith (dmpout, ffebld_constant_hollerith (c)); break; case FFEBLD_constBINARY_MIL: ! fprintf (dmpout, "BM/"); ! ffetarget_print_binarymil (dmpout, ffebld_constant_typeless (c)); break; case FFEBLD_constBINARY_VXT: ! fprintf (dmpout, "BV/"); ! ffetarget_print_binaryvxt (dmpout, ffebld_constant_typeless (c)); break; case FFEBLD_constOCTAL_MIL: ! fprintf (dmpout, "OM/"); ! ffetarget_print_octalmil (dmpout, ffebld_constant_typeless (c)); break; case FFEBLD_constOCTAL_VXT: ! fprintf (dmpout, "OV/"); ! ffetarget_print_octalvxt (dmpout, ffebld_constant_typeless (c)); break; case FFEBLD_constHEX_X_MIL: ! fprintf (dmpout, "XM/"); ! ffetarget_print_hexxmil (dmpout, ffebld_constant_typeless (c)); break; case FFEBLD_constHEX_X_VXT: ! fprintf (dmpout, "XV/"); ! ffetarget_print_hexxvxt (dmpout, ffebld_constant_typeless (c)); break; case FFEBLD_constHEX_Z_MIL: ! fprintf (dmpout, "ZM/"); ! ffetarget_print_hexzmil (dmpout, ffebld_constant_typeless (c)); break; case FFEBLD_constHEX_Z_VXT: ! fprintf (dmpout, "ZV/"); ! ffetarget_print_hexzvxt (dmpout, ffebld_constant_typeless (c)); break; default: assert ("bad constant type" == NULL); ! fprintf (dmpout, "?/?"); break; } *************** ffebld_constant_is_magical (ffebldConsta *** 885,890 **** } ! /* Determine if constant is zero. Used only to ensure that step count ! for DO loops isn't zero, so doesn't get called for COMPLEX. */ bool --- 885,891 ---- } ! /* Determine if constant is zero. Used to ensure step count ! for DO loops isn't zero, also to determine if values will ! be binary zeros, so not entirely portable at this point. */ bool *************** ffebld_constant_is_zero (ffebldConstant *** 1013,1019 **** #endif default: ! assert ("bad constant type" == NULL); ! return TRUE; } } --- 1014,1089 ---- #endif + #if FFETARGET_okCOMPLEX1 + case FFEBLD_constCOMPLEX1: + return ffetarget_iszero_real1 (ffebld_constant_complex1 (c).real) + && ffetarget_iszero_real1 (ffebld_constant_complex1 (c).imaginary); + #endif + + #if FFETARGET_okCOMPLEX2 + case FFEBLD_constCOMPLEX2: + return ffetarget_iszero_real2 (ffebld_constant_complex2 (c).real) + && ffetarget_iszero_real2 (ffebld_constant_complex2 (c).imaginary); + #endif + + #if FFETARGET_okCOMPLEX3 + case FFEBLD_constCOMPLEX3: + return ffetarget_iszero_real3 (ffebld_constant_complex3 (c).real) + && ffetarget_iszero_real3 (ffebld_constant_complex3 (c).imaginary); + #endif + + #if FFETARGET_okCOMPLEX4 + case FFEBLD_constCOMPLEX4: + return ffetarget_iszero_real4 (ffebld_constant_complex4 (c).real) + && ffetarget_iszero_real4 (ffebld_constant_complex4 (c).imaginary); + #endif + + #if FFETARGET_okCOMPLEX5 + case FFEBLD_constCOMPLEX5: + return ffetarget_iszero_real5 (ffebld_constant_complex5 (c).real) + && ffetarget_iszero_real5 (ffebld_constant_complex5 (c).imaginary); + #endif + + #if FFETARGET_okCOMPLEX6 + case FFEBLD_constCOMPLEX6: + return ffetarget_iszero_real6 (ffebld_constant_complex6 (c).real) + && ffetarget_iszero_real6 (ffebld_constant_complex6 (c).imaginary); + #endif + + #if FFETARGET_okCOMPLEX7 + case FFEBLD_constCOMPLEX7: + return ffetarget_iszero_real7 (ffebld_constant_complex7 (c).real) + && ffetarget_iszero_real7 (ffebld_constant_complex7 (c).imaginary); + #endif + + #if FFETARGET_okCOMPLEX8 + case FFEBLD_constCOMPLEX8: + return ffetarget_iszero_real8 (ffebld_constant_complex8 (c).real) + && ffetarget_iszero_real8 (ffebld_constant_complex8 (c).imaginary); + #endif + + #if FFETARGET_okCHARACTER1 + case FFEBLD_constCHARACTER1: + return ffetarget_iszero_character1 (ffebld_constant_character1 (c)); + #endif + + #if FFETARGET_okCHARACTER2 || FFETARGET_okCHARACTER3 /* ... */ + #error no support for these!! + #endif + + case FFEBLD_constHOLLERITH: + return ffetarget_iszero_hollerith (ffebld_constant_hollerith (c)); + + case FFEBLD_constBINARY_MIL: + case FFEBLD_constBINARY_VXT: + case FFEBLD_constOCTAL_MIL: + case FFEBLD_constOCTAL_VXT: + case FFEBLD_constHEX_X_MIL: + case FFEBLD_constHEX_X_VXT: + case FFEBLD_constHEX_Z_MIL: + case FFEBLD_constHEX_Z_VXT: + return ffetarget_iszero_typeless (ffebld_constant_typeless (c)); + default: ! return FALSE; } } *************** ffebld_constant_new_integer3_val (ffetar *** 1379,1382 **** --- 1449,1490 ---- #endif + /* ffebld_constant_new_integer4_val -- Return an integer4 constant object + + See prototype. */ + + #if FFETARGET_okINTEGER4 + ffebldConstant + ffebld_constant_new_integer4_val (ffetargetInteger4 val) + { + ffebldConstant c; + ffebldConstant nc; + int cmp; + + for (c = (ffebldConstant) &ffebld_constant_integer4_; + c->next != NULL; + c = c->next) + { + cmp = ffetarget_cmp_integer4 (val, ffebld_constant_integer4 (c->next)); + if (cmp == 0) + return c->next; + if (cmp > 0) + break; + } + + nc = malloc_new_kp (ffebld_constant_pool(), + "FFEBLD_constINTEGER4", + sizeof (*nc)); + nc->next = c->next; + nc->consttype = FFEBLD_constINTEGER4; + nc->u.integer4 = val; + #ifdef FFECOM_constantHOOK + nc->hook = FFECOM_constantNULL; + #endif + c->next = nc; + + return nc; + } + + #endif /* ffebld_constant_new_integeroctal -- Return octal constant object from token *************** ffebld_constant_new_logical3_val (ffetar *** 1529,1532 **** --- 1637,1678 ---- #endif + /* ffebld_constant_new_logical4_val -- Return a logical4 constant object + + See prototype. */ + + #if FFETARGET_okLOGICAL4 + ffebldConstant + ffebld_constant_new_logical4_val (ffetargetLogical4 val) + { + ffebldConstant c; + ffebldConstant nc; + int cmp; + + for (c = (ffebldConstant) &ffebld_constant_logical4_; + c->next != NULL; + c = c->next) + { + cmp = ffetarget_cmp_logical4 (val, ffebld_constant_logical4 (c->next)); + if (cmp == 0) + return c->next; + if (cmp > 0) + break; + } + + nc = malloc_new_kp (ffebld_constant_pool(), + "FFEBLD_constLOGICAL4", + sizeof (*nc)); + nc->next = c->next; + nc->consttype = FFEBLD_constLOGICAL4; + nc->u.logical4 = val; + #ifdef FFECOM_constantHOOK + nc->hook = FFECOM_constantNULL; + #endif + c->next = nc; + + return nc; + } + + #endif /* ffebld_constant_new_real1 -- Return real1 constant object from token *************** ffebld_constantarray_dump (ffebldConstan *** 1824,1830 **** ffetargetOffset i; ! ffebld_dump_prefix (stdout, bt, kt); ! fprintf (stdout, "\\("); if (bits == NULL) --- 1970,1976 ---- ffetargetOffset i; ! ffebld_dump_prefix (dmpout, bt, kt); ! fprintf (dmpout, "\\("); if (bits == NULL) *************** ffebld_constantarray_dump (ffebldConstan *** 1835,1839 **** kt); if (i != size - 1) ! fputc (',', stdout); } } --- 1981,1985 ---- kt); if (i != size - 1) ! fputc (',', dmpout); } } *************** ffebld_constantarray_dump (ffebldConstan *** 1850,1856 **** { if (length == 1) ! fprintf (stdout, "[%" ffetargetOffset_f "u]:", offset); else ! fprintf (stdout, "[%" ffetargetOffset_f "u..%" ffetargetOffset_f "u]:", offset, offset + length - 1); --- 1996,2002 ---- { if (length == 1) ! fprintf (dmpout, "[%" ffetargetOffset_f "u]:", offset); else ! fprintf (dmpout, "[%" ffetargetOffset_f "u..%" ffetargetOffset_f "u]:", offset, offset + length - 1); *************** ffebld_constantarray_dump (ffebldConstan *** 1860,1866 **** offset), bt, kt); if (i != length - 1) ! fputc (',', stdout); } ! fprintf (stdout, ";"); } else --- 2006,2012 ---- offset), bt, kt); if (i != length - 1) ! fputc (',', dmpout); } ! fprintf (dmpout, ";"); } else *************** ffebld_constantarray_dump (ffebldConstan *** 1869,1873 **** while (length != 0); } ! fprintf (stdout, "\\)"); } --- 2015,2019 ---- while (length != 0); } ! fprintf (dmpout, "\\)"); } *************** ffebld_constantunion_dump (ffebldConstan *** 4235,4239 **** #if FFETARGET_okINTEGER1 case FFEINFO_kindtypeINTEGER1: ! ffetarget_print_integer1 (stdout, u.integer1); break; #endif --- 4381,4385 ---- #if FFETARGET_okINTEGER1 case FFEINFO_kindtypeINTEGER1: ! ffetarget_print_integer1 (dmpout, u.integer1); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4241,4245 **** #if FFETARGET_okINTEGER2 case FFEINFO_kindtypeINTEGER2: ! ffetarget_print_integer2 (stdout, u.integer2); break; #endif --- 4387,4391 ---- #if FFETARGET_okINTEGER2 case FFEINFO_kindtypeINTEGER2: ! ffetarget_print_integer2 (dmpout, u.integer2); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4247,4251 **** #if FFETARGET_okINTEGER3 case FFEINFO_kindtypeINTEGER3: ! ffetarget_print_integer3 (stdout, u.integer3); break; #endif --- 4393,4397 ---- #if FFETARGET_okINTEGER3 case FFEINFO_kindtypeINTEGER3: ! ffetarget_print_integer3 (dmpout, u.integer3); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4253,4257 **** #if FFETARGET_okINTEGER4 case FFEINFO_kindtypeINTEGER4: ! ffetarget_print_integer4 (stdout, u.integer4); break; #endif --- 4399,4403 ---- #if FFETARGET_okINTEGER4 case FFEINFO_kindtypeINTEGER4: ! ffetarget_print_integer4 (dmpout, u.integer4); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4259,4263 **** #if FFETARGET_okINTEGER5 case FFEINFO_kindtypeINTEGER5: ! ffetarget_print_integer5 (stdout, u.integer5); break; #endif --- 4405,4409 ---- #if FFETARGET_okINTEGER5 case FFEINFO_kindtypeINTEGER5: ! ffetarget_print_integer5 (dmpout, u.integer5); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4265,4269 **** #if FFETARGET_okINTEGER6 case FFEINFO_kindtypeINTEGER6: ! ffetarget_print_integer6 (stdout, u.integer6); break; #endif --- 4411,4415 ---- #if FFETARGET_okINTEGER6 case FFEINFO_kindtypeINTEGER6: ! ffetarget_print_integer6 (dmpout, u.integer6); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4271,4275 **** #if FFETARGET_okINTEGER7 case FFEINFO_kindtypeINTEGER7: ! ffetarget_print_integer7 (stdout, u.integer7); break; #endif --- 4417,4421 ---- #if FFETARGET_okINTEGER7 case FFEINFO_kindtypeINTEGER7: ! ffetarget_print_integer7 (dmpout, u.integer7); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4277,4281 **** #if FFETARGET_okINTEGER8 case FFEINFO_kindtypeINTEGER8: ! ffetarget_print_integer8 (stdout, u.integer8); break; #endif --- 4423,4427 ---- #if FFETARGET_okINTEGER8 case FFEINFO_kindtypeINTEGER8: ! ffetarget_print_integer8 (dmpout, u.integer8); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4292,4296 **** #if FFETARGET_okLOGICAL1 case FFEINFO_kindtypeLOGICAL1: ! ffetarget_print_logical1 (stdout, u.logical1); break; #endif --- 4438,4442 ---- #if FFETARGET_okLOGICAL1 case FFEINFO_kindtypeLOGICAL1: ! ffetarget_print_logical1 (dmpout, u.logical1); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4298,4302 **** #if FFETARGET_okLOGICAL2 case FFEINFO_kindtypeLOGICAL2: ! ffetarget_print_logical2 (stdout, u.logical2); break; #endif --- 4444,4448 ---- #if FFETARGET_okLOGICAL2 case FFEINFO_kindtypeLOGICAL2: ! ffetarget_print_logical2 (dmpout, u.logical2); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4304,4308 **** #if FFETARGET_okLOGICAL3 case FFEINFO_kindtypeLOGICAL3: ! ffetarget_print_logical3 (stdout, u.logical3); break; #endif --- 4450,4454 ---- #if FFETARGET_okLOGICAL3 case FFEINFO_kindtypeLOGICAL3: ! ffetarget_print_logical3 (dmpout, u.logical3); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4310,4314 **** #if FFETARGET_okLOGICAL4 case FFEINFO_kindtypeLOGICAL4: ! ffetarget_print_logical4 (stdout, u.logical4); break; #endif --- 4456,4460 ---- #if FFETARGET_okLOGICAL4 case FFEINFO_kindtypeLOGICAL4: ! ffetarget_print_logical4 (dmpout, u.logical4); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4316,4320 **** #if FFETARGET_okLOGICAL5 case FFEINFO_kindtypeLOGICAL5: ! ffetarget_print_logical5 (stdout, u.logical5); break; #endif --- 4462,4466 ---- #if FFETARGET_okLOGICAL5 case FFEINFO_kindtypeLOGICAL5: ! ffetarget_print_logical5 (dmpout, u.logical5); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4322,4326 **** #if FFETARGET_okLOGICAL6 case FFEINFO_kindtypeLOGICAL6: ! ffetarget_print_logical6 (stdout, u.logical6); break; #endif --- 4468,4472 ---- #if FFETARGET_okLOGICAL6 case FFEINFO_kindtypeLOGICAL6: ! ffetarget_print_logical6 (dmpout, u.logical6); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4328,4332 **** #if FFETARGET_okLOGICAL7 case FFEINFO_kindtypeLOGICAL7: ! ffetarget_print_logical7 (stdout, u.logical7); break; #endif --- 4474,4478 ---- #if FFETARGET_okLOGICAL7 case FFEINFO_kindtypeLOGICAL7: ! ffetarget_print_logical7 (dmpout, u.logical7); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4334,4338 **** #if FFETARGET_okLOGICAL8 case FFEINFO_kindtypeLOGICAL8: ! ffetarget_print_logical8 (stdout, u.logical8); break; #endif --- 4480,4484 ---- #if FFETARGET_okLOGICAL8 case FFEINFO_kindtypeLOGICAL8: ! ffetarget_print_logical8 (dmpout, u.logical8); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4349,4353 **** #if FFETARGET_okREAL1 case FFEINFO_kindtypeREAL1: ! ffetarget_print_real1 (stdout, u.real1); break; #endif --- 4495,4499 ---- #if FFETARGET_okREAL1 case FFEINFO_kindtypeREAL1: ! ffetarget_print_real1 (dmpout, u.real1); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4355,4359 **** #if FFETARGET_okREAL2 case FFEINFO_kindtypeREAL2: ! ffetarget_print_real2 (stdout, u.real2); break; #endif --- 4501,4505 ---- #if FFETARGET_okREAL2 case FFEINFO_kindtypeREAL2: ! ffetarget_print_real2 (dmpout, u.real2); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4361,4365 **** #if FFETARGET_okREAL3 case FFEINFO_kindtypeREAL3: ! ffetarget_print_real3 (stdout, u.real3); break; #endif --- 4507,4511 ---- #if FFETARGET_okREAL3 case FFEINFO_kindtypeREAL3: ! ffetarget_print_real3 (dmpout, u.real3); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4367,4371 **** #if FFETARGET_okREAL4 case FFEINFO_kindtypeREAL4: ! ffetarget_print_real4 (stdout, u.real4); break; #endif --- 4513,4517 ---- #if FFETARGET_okREAL4 case FFEINFO_kindtypeREAL4: ! ffetarget_print_real4 (dmpout, u.real4); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4373,4377 **** #if FFETARGET_okREAL5 case FFEINFO_kindtypeREAL5: ! ffetarget_print_real5 (stdout, u.real5); break; #endif --- 4519,4523 ---- #if FFETARGET_okREAL5 case FFEINFO_kindtypeREAL5: ! ffetarget_print_real5 (dmpout, u.real5); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4379,4383 **** #if FFETARGET_okREAL6 case FFEINFO_kindtypeREAL6: ! ffetarget_print_real6 (stdout, u.real6); break; #endif --- 4525,4529 ---- #if FFETARGET_okREAL6 case FFEINFO_kindtypeREAL6: ! ffetarget_print_real6 (dmpout, u.real6); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4385,4389 **** #if FFETARGET_okREAL7 case FFEINFO_kindtypeREAL7: ! ffetarget_print_real7 (stdout, u.real7); break; #endif --- 4531,4535 ---- #if FFETARGET_okREAL7 case FFEINFO_kindtypeREAL7: ! ffetarget_print_real7 (dmpout, u.real7); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4391,4395 **** #if FFETARGET_okREAL8 case FFEINFO_kindtypeREAL8: ! ffetarget_print_real8 (stdout, u.real8); break; #endif --- 4537,4541 ---- #if FFETARGET_okREAL8 case FFEINFO_kindtypeREAL8: ! ffetarget_print_real8 (dmpout, u.real8); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4406,4414 **** #if FFETARGET_okCOMPLEX1 case FFEINFO_kindtypeREAL1: ! fprintf (stdout, "("); ! ffetarget_print_real1 (stdout, u.complex1.real); ! fprintf (stdout, ","); ! ffetarget_print_real1 (stdout, u.complex1.imaginary); ! fprintf (stdout, ")"); break; #endif --- 4552,4560 ---- #if FFETARGET_okCOMPLEX1 case FFEINFO_kindtypeREAL1: ! fprintf (dmpout, "("); ! ffetarget_print_real1 (dmpout, u.complex1.real); ! fprintf (dmpout, ","); ! ffetarget_print_real1 (dmpout, u.complex1.imaginary); ! fprintf (dmpout, ")"); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4416,4424 **** #if FFETARGET_okCOMPLEX2 case FFEINFO_kindtypeREAL2: ! fprintf (stdout, "("); ! ffetarget_print_real2 (stdout, u.complex2.real); ! fprintf (stdout, ","); ! ffetarget_print_real2 (stdout, u.complex2.imaginary); ! fprintf (stdout, ")"); break; #endif --- 4562,4570 ---- #if FFETARGET_okCOMPLEX2 case FFEINFO_kindtypeREAL2: ! fprintf (dmpout, "("); ! ffetarget_print_real2 (dmpout, u.complex2.real); ! fprintf (dmpout, ","); ! ffetarget_print_real2 (dmpout, u.complex2.imaginary); ! fprintf (dmpout, ")"); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4426,4434 **** #if FFETARGET_okCOMPLEX3 case FFEINFO_kindtypeREAL3: ! fprintf (stdout, "("); ! ffetarget_print_real3 (stdout, u.complex3.real); ! fprintf (stdout, ","); ! ffetarget_print_real3 (stdout, u.complex3.imaginary); ! fprintf (stdout, ")"); break; #endif --- 4572,4580 ---- #if FFETARGET_okCOMPLEX3 case FFEINFO_kindtypeREAL3: ! fprintf (dmpout, "("); ! ffetarget_print_real3 (dmpout, u.complex3.real); ! fprintf (dmpout, ","); ! ffetarget_print_real3 (dmpout, u.complex3.imaginary); ! fprintf (dmpout, ")"); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4436,4444 **** #if FFETARGET_okCOMPLEX4 case FFEINFO_kindtypeREAL4: ! fprintf (stdout, "("); ! ffetarget_print_real4 (stdout, u.complex4.real); ! fprintf (stdout, ","); ! ffetarget_print_real4 (stdout, u.complex4.imaginary); ! fprintf (stdout, ")"); break; #endif --- 4582,4590 ---- #if FFETARGET_okCOMPLEX4 case FFEINFO_kindtypeREAL4: ! fprintf (dmpout, "("); ! ffetarget_print_real4 (dmpout, u.complex4.real); ! fprintf (dmpout, ","); ! ffetarget_print_real4 (dmpout, u.complex4.imaginary); ! fprintf (dmpout, ")"); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4446,4454 **** #if FFETARGET_okCOMPLEX5 case FFEINFO_kindtypeREAL5: ! fprintf (stdout, "("); ! ffetarget_print_real5 (stdout, u.complex5.real); ! fprintf (stdout, ","); ! ffetarget_print_real5 (stdout, u.complex5.imaginary); ! fprintf (stdout, ")"); break; #endif --- 4592,4600 ---- #if FFETARGET_okCOMPLEX5 case FFEINFO_kindtypeREAL5: ! fprintf (dmpout, "("); ! ffetarget_print_real5 (dmpout, u.complex5.real); ! fprintf (dmpout, ","); ! ffetarget_print_real5 (dmpout, u.complex5.imaginary); ! fprintf (dmpout, ")"); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4456,4464 **** #if FFETARGET_okCOMPLEX6 case FFEINFO_kindtypeREAL6: ! fprintf (stdout, "("); ! ffetarget_print_real6 (stdout, u.complex6.real); ! fprintf (stdout, ","); ! ffetarget_print_real6 (stdout, u.complex6.imaginary); ! fprintf (stdout, ")"); break; #endif --- 4602,4610 ---- #if FFETARGET_okCOMPLEX6 case FFEINFO_kindtypeREAL6: ! fprintf (dmpout, "("); ! ffetarget_print_real6 (dmpout, u.complex6.real); ! fprintf (dmpout, ","); ! ffetarget_print_real6 (dmpout, u.complex6.imaginary); ! fprintf (dmpout, ")"); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4466,4474 **** #if FFETARGET_okCOMPLEX7 case FFEINFO_kindtypeREAL7: ! fprintf (stdout, "("); ! ffetarget_print_real7 (stdout, u.complex7.real); ! fprintf (stdout, ","); ! ffetarget_print_real7 (stdout, u.complex7.imaginary); ! fprintf (stdout, ")"); break; #endif --- 4612,4620 ---- #if FFETARGET_okCOMPLEX7 case FFEINFO_kindtypeREAL7: ! fprintf (dmpout, "("); ! ffetarget_print_real7 (dmpout, u.complex7.real); ! fprintf (dmpout, ","); ! ffetarget_print_real7 (dmpout, u.complex7.imaginary); ! fprintf (dmpout, ")"); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4476,4484 **** #if FFETARGET_okCOMPLEX8 case FFEINFO_kindtypeREAL8: ! fprintf (stdout, "("); ! ffetarget_print_real8 (stdout, u.complex8.real); ! fprintf (stdout, ","); ! ffetarget_print_real8 (stdout, u.complex8.imaginary); ! fprintf (stdout, ")"); break; #endif --- 4622,4630 ---- #if FFETARGET_okCOMPLEX8 case FFEINFO_kindtypeREAL8: ! fprintf (dmpout, "("); ! ffetarget_print_real8 (dmpout, u.complex8.real); ! fprintf (dmpout, ","); ! ffetarget_print_real8 (dmpout, u.complex8.imaginary); ! fprintf (dmpout, ")"); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4495,4499 **** #if FFETARGET_okCHARACTER1 case FFEINFO_kindtypeCHARACTER1: ! ffetarget_print_character1 (stdout, u.character1); break; #endif --- 4641,4645 ---- #if FFETARGET_okCHARACTER1 case FFEINFO_kindtypeCHARACTER1: ! ffetarget_print_character1 (dmpout, u.character1); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4501,4505 **** #if FFETARGET_okCHARACTER2 case FFEINFO_kindtypeCHARACTER2: ! ffetarget_print_character2 (stdout, u.character2); break; #endif --- 4647,4651 ---- #if FFETARGET_okCHARACTER2 case FFEINFO_kindtypeCHARACTER2: ! ffetarget_print_character2 (dmpout, u.character2); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4507,4511 **** #if FFETARGET_okCHARACTER3 case FFEINFO_kindtypeCHARACTER3: ! ffetarget_print_character3 (stdout, u.character3); break; #endif --- 4653,4657 ---- #if FFETARGET_okCHARACTER3 case FFEINFO_kindtypeCHARACTER3: ! ffetarget_print_character3 (dmpout, u.character3); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4513,4517 **** #if FFETARGET_okCHARACTER4 case FFEINFO_kindtypeCHARACTER4: ! ffetarget_print_character4 (stdout, u.character4); break; #endif --- 4659,4663 ---- #if FFETARGET_okCHARACTER4 case FFEINFO_kindtypeCHARACTER4: ! ffetarget_print_character4 (dmpout, u.character4); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4519,4523 **** #if FFETARGET_okCHARACTER5 case FFEINFO_kindtypeCHARACTER5: ! ffetarget_print_character5 (stdout, u.character5); break; #endif --- 4665,4669 ---- #if FFETARGET_okCHARACTER5 case FFEINFO_kindtypeCHARACTER5: ! ffetarget_print_character5 (dmpout, u.character5); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4525,4529 **** #if FFETARGET_okCHARACTER6 case FFEINFO_kindtypeCHARACTER6: ! ffetarget_print_character6 (stdout, u.character6); break; #endif --- 4671,4675 ---- #if FFETARGET_okCHARACTER6 case FFEINFO_kindtypeCHARACTER6: ! ffetarget_print_character6 (dmpout, u.character6); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4531,4535 **** #if FFETARGET_okCHARACTER7 case FFEINFO_kindtypeCHARACTER7: ! ffetarget_print_character7 (stdout, u.character7); break; #endif --- 4677,4681 ---- #if FFETARGET_okCHARACTER7 case FFEINFO_kindtypeCHARACTER7: ! ffetarget_print_character7 (dmpout, u.character7); break; #endif *************** ffebld_constantunion_dump (ffebldConstan *** 4537,4541 **** #if FFETARGET_okCHARACTER8 case FFEINFO_kindtypeCHARACTER8: ! ffetarget_print_character8 (stdout, u.character8); break; #endif --- 4683,4687 ---- #if FFETARGET_okCHARACTER8 case FFEINFO_kindtypeCHARACTER8: ! ffetarget_print_character8 (dmpout, u.character8); break; #endif *************** ffebld_dump (ffebld b) *** 4566,4570 **** if (b == NULL) { ! fprintf (stdout, "(null)"); return; } --- 4712,4716 ---- if (b == NULL) { ! fprintf (dmpout, "(null)"); return; } *************** ffebld_dump (ffebld b) *** 4573,4584 **** { case FFEBLD_opITEM: ! fputs ("[", stdout); while (b != NULL) { ffebld_dump (ffebld_head (b)); if ((b = ffebld_trail (b)) != NULL) ! fputs (",", stdout); } ! fputs ("]", stdout); return; --- 4719,4730 ---- { case FFEBLD_opITEM: ! fputs ("[", dmpout); while (b != NULL) { ffebld_dump (ffebld_head (b)); if ((b = ffebld_trail (b)) != NULL) ! fputs (",", dmpout); } ! fputs ("]", dmpout); return; *************** ffebld_dump (ffebld b) *** 4589,4598 **** case FFEBLD_opLABTOK: case FFEBLD_opIMPDO: ! fputs (ffebld_op_string (ffebld_op (b)), stdout); break; default: if (ffeinfo_size (ffebld_info (b)) != FFETARGET_charactersizeNONE) ! fprintf (stdout, "%s%d%s%s*%" ffetargetCharacterSize_f "u", ffebld_op_string (ffebld_op (b)), (int) ffeinfo_rank (ffebld_info (b)), --- 4735,4744 ---- case FFEBLD_opLABTOK: case FFEBLD_opIMPDO: ! fputs (ffebld_op_string (ffebld_op (b)), dmpout); break; default: if (ffeinfo_size (ffebld_info (b)) != FFETARGET_charactersizeNONE) ! fprintf (dmpout, "%s%d%s%s*%" ffetargetCharacterSize_f "u", ffebld_op_string (ffebld_op (b)), (int) ffeinfo_rank (ffebld_info (b)), *************** ffebld_dump (ffebld b) *** 4601,4612 **** ffeinfo_size (ffebld_info (b))); else ! fprintf (stdout, "%s%d%s%s", ffebld_op_string (ffebld_op (b)), (int) ffeinfo_rank (ffebld_info (b)), ffeinfo_basictype_string (ffeinfo_basictype (ffebld_info (b))), ffeinfo_kindtype_string (ffeinfo_kindtype (ffebld_info (b)))); if ((k = ffeinfo_kind (ffebld_info (b))) != FFEINFO_kindNONE) ! fprintf (stdout, "/%s", ffeinfo_kind_string (k)); if ((w = ffeinfo_where (ffebld_info (b))) != FFEINFO_whereNONE) ! fprintf (stdout, "@%s", ffeinfo_where_string (w)); break; } --- 4747,4758 ---- ffeinfo_size (ffebld_info (b))); else ! fprintf (dmpout, "%s%d%s%s", ffebld_op_string (ffebld_op (b)), (int) ffeinfo_rank (ffebld_info (b)), ffeinfo_basictype_string (ffeinfo_basictype (ffebld_info (b))), ffeinfo_kindtype_string (ffeinfo_kindtype (ffebld_info (b)))); if ((k = ffeinfo_kind (ffebld_info (b))) != FFEINFO_kindNONE) ! fprintf (dmpout, "/%s", ffeinfo_kind_string (k)); if ((w = ffeinfo_where (ffebld_info (b))) != FFEINFO_whereNONE) ! fprintf (dmpout, "@%s", ffeinfo_where_string (w)); break; } *************** ffebld_dump (ffebld b) *** 4615,4629 **** { case 2: ! fputs ("(", stdout); ffebld_dump (ffebld_left (b)); ! fputs (",", stdout); ffebld_dump (ffebld_right (b)); ! fputs (")", stdout); break; case 1: ! fputs ("(", stdout); ffebld_dump (ffebld_left (b)); ! fputs (")", stdout); break; --- 4761,4775 ---- { case 2: ! fputs ("(", dmpout); ffebld_dump (ffebld_left (b)); ! fputs (",", dmpout); ffebld_dump (ffebld_right (b)); ! fputs (")", dmpout); break; case 1: ! fputs ("(", dmpout); ffebld_dump (ffebld_left (b)); ! fputs (")", dmpout); break; *************** ffebld_dump (ffebld b) *** 4632,4681 **** { case FFEBLD_opCONTER: ! fprintf (stdout, "<"); ffebld_constant_dump (b->u.conter.expr); ! fprintf (stdout, ">"); break; case FFEBLD_opACCTER: ! fprintf (stdout, "<"); ffebld_constantarray_dump (b->u.accter.array, ffeinfo_basictype (ffebld_info (b)), ffeinfo_kindtype (ffebld_info (b)), ffebit_size (b->u.accter.bits), b->u.accter.bits); ! fprintf (stdout, ">"); break; case FFEBLD_opARRTER: ! fprintf (stdout, "<"); ffebld_constantarray_dump (b->u.arrter.array, ffeinfo_basictype (ffebld_info (b)), ffeinfo_kindtype (ffebld_info (b)), b->u.arrter.size, NULL); ! fprintf (stdout, ">"); break; case FFEBLD_opLABTER: if (b->u.labter == NULL) ! fprintf (stdout, "<>"); else ! fprintf (stdout, "<%" ffelabValue_f "u>", ffelab_value (b->u.labter)); break; case FFEBLD_opLABTOK: ! fprintf (stdout, "<%s>", ffelex_token_text (b->u.labtok)); break; case FFEBLD_opSYMTER: ! fprintf (stdout, "<"); ffesymbol_dump (b->u.symter.symbol); if ((b->u.symter.generic != FFEINTRIN_genNONE) || (b->u.symter.specific != FFEINTRIN_specNONE)) ! fprintf (stdout, "{%s:%s:%s}", ffeintrin_name_generic (b->u.symter.generic), ffeintrin_name_specific (b->u.symter.specific), ffeintrin_name_implementation (b->u.symter.implementation)); if (b->u.symter.do_iter) ! fprintf (stdout, "{/do-iter}"); ! fprintf (stdout, ">"); break; --- 4778,4827 ---- { case FFEBLD_opCONTER: ! fprintf (dmpout, "<"); ffebld_constant_dump (b->u.conter.expr); ! fprintf (dmpout, ">"); break; case FFEBLD_opACCTER: ! fprintf (dmpout, "<"); ffebld_constantarray_dump (b->u.accter.array, ffeinfo_basictype (ffebld_info (b)), ffeinfo_kindtype (ffebld_info (b)), ffebit_size (b->u.accter.bits), b->u.accter.bits); ! fprintf (dmpout, ">"); break; case FFEBLD_opARRTER: ! fprintf (dmpout, "<"); ffebld_constantarray_dump (b->u.arrter.array, ffeinfo_basictype (ffebld_info (b)), ffeinfo_kindtype (ffebld_info (b)), b->u.arrter.size, NULL); ! fprintf (dmpout, ">"); break; case FFEBLD_opLABTER: if (b->u.labter == NULL) ! fprintf (dmpout, "<>"); else ! fprintf (dmpout, "<%" ffelabValue_f "u>", ffelab_value (b->u.labter)); break; case FFEBLD_opLABTOK: ! fprintf (dmpout, "<%s>", ffelex_token_text (b->u.labtok)); break; case FFEBLD_opSYMTER: ! fprintf (dmpout, "<"); ffesymbol_dump (b->u.symter.symbol); if ((b->u.symter.generic != FFEINTRIN_genNONE) || (b->u.symter.specific != FFEINTRIN_specNONE)) ! fprintf (dmpout, "{%s:%s:%s}", ffeintrin_name_generic (b->u.symter.generic), ffeintrin_name_specific (b->u.symter.specific), ffeintrin_name_implementation (b->u.symter.implementation)); if (b->u.symter.do_iter) ! fprintf (dmpout, "{/do-iter}"); ! fprintf (dmpout, ">"); break; *************** ffebld_dump (ffebld b) *** 4688,4692 **** /* ffebld_dump_prefix -- Dump the prefix for a constant of a given type ! ffebld_dump_prefix(stdout,FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER1); */ --- 4834,4838 ---- /* ffebld_dump_prefix -- Dump the prefix for a constant of a given type ! ffebld_dump_prefix(dmpout,FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER1); */ diff -rcp2N g77-0.5.17/f/bugs.texi g77-0.5.18/f/bugs.texi *** g77-0.5.17/f/bugs.texi Wed Dec 31 19:00:00 1969 --- g77-0.5.18/f/bugs.texi Mon Mar 25 20:27:20 1996 *************** *** 0 **** --- 1,247 ---- + @c Copyright (C) 1995, 1996 Free Software Foundation, Inc. + @c This is part of the G77 manual. + @c For copying conditions, see the file g77.texi. + + @c The text of this file appears in the file BUGS + @c in the G77 distribution, as well as in the G77 manual. + + @c 1996-03-25 + + @ifclear BUGSONLY + @node Actual Bugs + @section Actual Bugs We Haven't Fixed Yet + @end ifclear + + This section identifies bugs that @code{g77} @emph{users} + might run into. + This includes bugs that are actually in the @code{gcc} + back end (GBE) or in @code{libf2c}, because those + sets of code are at least somewhat under the control + of (and necessarily intertwined with) @code{g77}, so it + isn't worth separating them out. + + For information on bugs that might afflict people who + configure, port, build, and install @code{g77}, + @ref{Problems Installing}. + + @itemize @bullet + @cindex -fugly option + @cindex options, -fugly + @item + When using @samp{-fugly}, @code{g77} assumes an extra + @samp{%VAL(0)} argument is to be passed to intrinsics + taking no arguments, such as @samp{IARGC()}, which in + turn reject such a call. + Although this has been worked around for 0.5.18 due + to changes in the handling of intrinsics, + @code{g77} needs to do the ugly-argument-appending trick + only for external-function invocation, as this would + probably be more consistent with compilers that default + to using that trick. + + @item + Although @code{g77} generally supports @samp{SELECT CASE}, + it doesn't do so for @samp{CHARACTER} types. + Worse, it just crashes with a barely servicable + diagnostic. + If the time can't be taken soon to finish implementing + this feature, at least a better way of diagnosing + the problem should be provided. + + @item + To accept a lot of fine code, @code{g77} needs to + accept @samp{FORMAT} and @samp{ENTRY} before an + @samp{IMPLICIT NONE}. + + @item + Some crashes occur when compiling under Solaris on x86 + machines. + + @item + Something about @code{g77}'s straightforward handling of + label references and definitions sometimes prevents the GBE + from unrolling loops. + Until this is solved, try inserting or removing @samp{CONTINUE} + statements as the terminal statement, using the @samp{END DO} + form instead, and so on. + + @item + The @code{g77} command itself should more faithfully process + options the way the @code{gcc} command does. + For example, @code{gcc} accepts abbreviated forms of long options, + @code{g77} generally doesn't. + + @item + @code{g77} could use a @samp{--help} option of some sort. + + @item + Some confusion in diagnostics concerning failing @samp{INCLUDE} + statements from within @samp{INCLUDE}'d or @samp{#include}'d files. + + @item + Some problems on RS/6000 regarding statement functions and/or + @samp{COMPLEX} arithmetic? + + @cindex integer constants + @cindex constants, integer + @item + @code{g77} assumes that @samp{INTEGER} constants range + from @samp{-2**31} to @samp{2**31-1} (the range for + two's-complement 32-bit values), + instead of determining their range from the actual range of the @samp{INTEGER} + type for the configuration (and, someday, for the constant). + + Further, it generally doesn't implement the handling + of constants very well in that it makes assumptions about the + configuration that it no longer makes regarding variables (types). + + Included with this item is the fact that @code{g77} doesn't recognize + that, on IEEE-754/854-compliant systems, @samp{0./0.} should produce a NaN + and no warning instead of the value @samp{0.} and a warning. + This is to be fixed in version 0.6, when @code{g77} will use the + @code{gcc} back end's constant-handling mechanisms to replace its own. + + @cindex compiler speed + @cindex speed, of compiler + @cindex compiler memory usage + @cindex memory usage, of compiler + @cindex large aggregate areas + @cindex initialization + @cindex DATA statement + @cindex statements, DATA + @item + @code{g77} uses way too much memory and CPU time to process large aggregate + areas having any initialized elements. + + For example, @samp{REAL A(1000000)} followed by @samp{DATA A(1)/1/} + takes up way too much time and space, including + the size of the generated assembler file. + This is to be mitigated somewhat in version 0.6. + + Version 0.5.18 improves cases like this---specifically, + cases of @emph{sparse} initialization that leave large, contiguous + areas uninitialized---significantly. + However, even with the improvements, these cases still + require too much memory and CPU time. + + (Version 0.5.18 also improves cases where the initial values are + zero to a much greater degree, so if the above example + ends with @samp{DATA A(1)/0/}, the compile-time performance + will be about as good as it will ever get, aside from unrelated + improvements to the compiler.) + + Note that @code{g77} does display a warning message to + notify the user before the compiler appears to hang. + @xref{Large Initialization,,Initialization of Large Aggregate Areas}, + for information on how to change the point at which + @code{g77} decides to issue this warning. + + @cindex debugging + @cindex common blocks + @cindex equivalence areas + @cindex local equivalence areas + @item + @code{g77} doesn't emit variable and array members of common blocks for use + with a debugger (the @samp{-g} command-line option). + The code is present to do this, but doesn't work with at least + one debug format---perhaps it works with others. + And it turns out there's a similar bug for + local equivalence areas, so that has been disabled as well. + + @item + @cindex code, displaying main source + @cindex displaying main source code + @cindex debugging main source code + @cindex printing main source + When debugging, after starting up the debugger but before being able + to see the source code for the main program unit, the user must currently + set a breakpoint at @samp{MAIN__} (or @samp{MAIN___} or @samp{MAIN_} if + @samp{MAIN__} doesn't exist) + and run the program until it hits the breakpoint. + At that point, the + main program unit is activated and about to execute its first + executable statement, but that's the state in which the debugger should + start up, as is the case for languages like C. + + @cindex padding + @cindex structures + @cindex common blocks + @cindex equivalence areas + @item + @code{g77} currently inserts needless padding for things like + @samp{COMMON A,IPAD} where @samp{A} is @samp{CHARACTER*1} and @samp{IPAD} + is @samp{INTEGER*4} on machines like x86, because + the back end insists that @samp{IPAD} be aligned to a 4-byte boundary, but + the processor has no such requirement (though it's good for + performance). + + It is possible that this is not a real bug, and could be considered + a performance feature, but it might be important to provide + the ability to Fortran code to specify minimum padding for + aggregate areas such as common blocks---and, certainly, there + is the potential, with the current setup, for interface differences + in the way such areas are laid out between @code{g77} and other + compilers. + + @cindex RS/6000 support + @cindex support, RS/6000 + @item + RS/6000 support is not complete as of the gcc 2.6.3 back end. + The 2.7.0 back end appears to fix this problem, or at least mitigate + it significantly, but there is at least one known problem that is + likely to be a code-generation bug in @file{gcc-2.7.0} plus + @file{g77-0.5.16}. + This problem shows up only when compiling the Fortran program with @samp{-O}. + + @cindex SGI support + @cindex support, SGI + @item + SGI support is known to be a bit buggy. + The known problem shows up only when compiling the Fortran program with + @samp{-O}. + + @cindex Alpha support + @cindex support, Alpha + @item + @code{g77} doesn't work on 64-bit configurations such as the Alpha. + The problem is not yet adequately investigated, and some + Alpha users are having quite a bit of success, so perhaps + it depends on the OS and configuration of @code{gcc} they + are using. + + @cindex COMPLEX support + @cindex support, COMPLEX + @item + Maintainers of gcc report that the back end definitely has ``broken'' + support for @samp{COMPLEX} types. + Based on their input, it seems many of + the problems affect only the more-general facilities for gcc's + @samp{__complex__} type, such as @samp{__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 @samp{__complex__} + support in the back end that @code{g77} uses to implement @samp{COMPLEX} and + @samp{DOUBLE COMPLEX}. + More investigation is needed, but bug reports + are definitely welcome, since that can help speed investigation of + problem areas. + + @cindex ELF support + @cindex support, ELF + @cindex -fPIC option + @cindex options, -fPIC + @item + 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 @samp{-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, and it apparently occurs only when + compiling sufficiently complicated functions @emph{without} the + @samp{-O} option. + + This might be fixed in version 2.7.2 of @code{gcc}. + @end itemize + diff -rcp2N g77-0.5.17/f/bugs0.texi g77-0.5.18/f/bugs0.texi *** g77-0.5.17/f/bugs0.texi Wed Dec 31 19:00:00 1969 --- g77-0.5.18/f/bugs0.texi Wed Mar 6 16:19:26 1996 *************** *** 0 **** --- 1,17 ---- + \input texinfo @c -*-texinfo-*- + @c %**start of header + @setfilename BUGS + @set BUGSONLY + @c %**end of header + + @c The immediately following lines apply to the BUGS file + @c which is generated using this file. + This file lists known bugs in the GNU Fortran compiler. + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + You may copy, distribute, and modify it freely as long as you preserve + this copyright notice and permission notice. + + @node Top,,, (dir) + @chapter Bugs in GNU Fortran + @include bugs.texi + @bye diff -rcp2N g77-0.5.17/f/com-rt.def g77-0.5.18/f/com-rt.def *** g77-0.5.17/f/com-rt.def Wed Aug 30 15:53:37 1995 --- g77-0.5.18/f/com-rt.def Tue Mar 12 14:41:42 1996 *************** the Free Software Foundation, 59 Temple *** 35,38 **** --- 35,52 ---- TYPE -- a code for the tree for the type, assigned when first encountered + ARGS -- a string of codes representing the types of the arguments; the + last type specifies the type for that and all following args, + and the null pointer (0) means the same as "0": + + 0 Not applicable at and beyond this point + & Pointer to type that follows + a char + c complex + d doublereal + e doublecomplex + f real + i integer + j longint + VOLATILE -- TRUE if the function never returns (gen's emit_barrier in g77 back end) *************** the Free Software Foundation, 59 Temple *** 43,202 **** */ ! DEFGFRT (FFECOM_gfrtCAT, "s_cat", FFECOM_rttypeVOID_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtCMP, "s_cmp", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtCOPY, "s_copy", FFECOM_rttypeVOID_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtPAUSE, "s_paus", FFECOM_rttypeVOID_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSTOP, "s_stop", FFECOM_rttypeVOID_, TRUE, FALSE) ! ! DEFGFRT (FFECOM_gfrtSRDUE, "s_rdue", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtERDUE, "e_rdue", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSRSUE, "s_rsue", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtERSUE, "e_rsue", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSRDFE, "s_rdfe", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtERDFE, "e_rdfe", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSRSFI, "s_rsfi", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtERSFI, "e_rsfi", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSRSFE, "s_rsfe", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtERSFE, "e_rsfe", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSRSLI, "s_rsli", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtERSLI, "e_rsli", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSRSLE, "s_rsle", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtERSLE, "e_rsle", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSRSNE, "s_rsne", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! ! DEFGFRT (FFECOM_gfrtSWDUE, "s_wdue", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtEWDUE, "e_wdue", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSWSUE, "s_wsue", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtEWSUE, "e_wsue", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSWDFE, "s_wdfe", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtEWDFE, "e_wdfe", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSWSFI, "s_wsfi", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtEWSFI, "e_wsfi", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSWSFE, "s_wsfe", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtEWSFE, "e_wsfe", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSWSLI, "s_wsli", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtEWSLI, "e_wsli", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSWSLE, "s_wsle", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtEWSLE, "e_wsle", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSWSNE, "s_wsne", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! ! DEFGFRT (FFECOM_gfrtDOFIO, "do_fio", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDOLIO, "do_lio", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDOUIO, "do_uio", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! ! DEFGFRT (FFECOM_gfrtFOPEN, "f_open", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtFCLOS, "f_clos", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtFINQU, "f_inqu", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! ! DEFGFRT (FFECOM_gfrtFBACK, "f_back", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtFEND, "f_end", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtFREW, "f_rew", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! ! DEFGFRT (FFECOM_gfrtABORT, "abort_", FFECOM_rttypeVOID_, TRUE, FALSE) ! DEFGFRT (FFECOM_gfrtABS, "r_abs", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtACOS, "r_acos", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtAIMAG, "r_imag", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtAINT, "r_int", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtALOG, "r_log", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtALOG10, "r_lg10", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtAMOD, "r_mod", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtANINT, "r_nint", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtASIN, "r_asin", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtATAN, "r_atan", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtATAN2, "r_atn2", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtCABS, "c_abs", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtCCOS, "c_cos", FFECOM_rttypeCOMPLEX_, FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtCEXP, "c_exp", FFECOM_rttypeCOMPLEX_, FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtCLOG, "c_log", FFECOM_rttypeCOMPLEX_, FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtCONJG, "r_cnjg", FFECOM_rttypeCOMPLEX_, FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtCOS, "r_cos", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtCOSH, "r_cosh", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtCSIN, "c_sin", FFECOM_rttypeCOMPLEX_, FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtCSQRT, "c_sqrt", FFECOM_rttypeCOMPLEX_, FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtDABS, "d_abs", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDACOS, "d_acos", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDASIN, "d_asin", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDATAN, "d_atan", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDATAN2, "d_atn2", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDCOS, "d_cos", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDCOSH, "d_cosh", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDDIM, "d_dim", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDERF, "derf_", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDERFC, "derfc_", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDEXP, "d_exp", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDIM, "r_dim", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDINT, "d_int", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDLOG, "d_log", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDLOG10, "d_lg10", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDMOD, "d_mod", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDNINT, "d_nint", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDPROD, "d_prod", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDSIGN, "d_sign", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDSIN, "d_sin", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDSINH, "d_sinh", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDSQRT, "d_sqrt", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDTAN, "d_tan", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDTANH, "d_tanh", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtERF, "erf_", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtERFC, "erfc_", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtEXIT, "exit_", FFECOM_rttypeVOID_, TRUE, FALSE) ! DEFGFRT (FFECOM_gfrtEXP, "r_exp", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtFLUSH, "flush_", FFECOM_rttypeVOID_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtGETARG, "getarg_", FFECOM_rttypeVOID_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtGETENV, "getenv_", FFECOM_rttypeVOID_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtIABS, "i_abs", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtIARGC, "iargc_", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtIDIM, "i_dim", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtIDNINT, "i_dnnt", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtINDEX, "i_indx", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtISIGN, "i_sign", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtLEN, "i_len", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtLGE, "l_ge", FFECOM_rttypeLOGICAL_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtLGT, "l_gt", FFECOM_rttypeLOGICAL_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtLLE, "l_le", FFECOM_rttypeLOGICAL_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtLLT, "l_lt", FFECOM_rttypeLOGICAL_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtMOD, "i_mod", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtNINT, "i_nint", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSIGN, "r_sign", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSIGNAL, "signal_", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSIN, "r_sin", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSINH, "r_sinh", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSQRT, "r_sqrt", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSYSTEM, "system_", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtTAN, "r_tan", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtTANH, "r_tanh", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtCDABS, "z_abs", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtCDCOS, "z_cos", FFECOM_rttypeDBLCMPLX_, FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtCDEXP, "z_exp", FFECOM_rttypeDBLCMPLX_, FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtCDLOG, "z_log", FFECOM_rttypeDBLCMPLX_, FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtDCONJG, "d_cnjg", FFECOM_rttypeDBLCMPLX_, FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtCDSIN, "z_sin", FFECOM_rttypeDBLCMPLX_, FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtCDSQRT, "z_sqrt", FFECOM_rttypeDBLCMPLX_, FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtDIMAG, "d_imag", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! ! DEFGFRT (FFECOM_gfrtL_ACOS, "acos", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_ASIN, "asin", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_ATAN, "atan", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_ATAN2, "atan2", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_COS, "__builtin_cos", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_COSH, "cosh", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_ERF, "erf", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_ERFC, "erfc", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_EXP, "exp", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_FLOOR, "floor", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_LOG, "log", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_SIN, "__builtin_sin", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_SINH, "sinh", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_SQRT, "__builtin_fsqrt", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_TAN, "tan", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_TANH, "tanh", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! ! DEFGFRT (FFECOM_gfrtPOW_CI, "pow_ci", FFECOM_rttypeCOMPLEX_, FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtPOW_DD, "pow_dd", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtPOW_DI, "pow_di", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtPOW_II, "pow_ii", FFECOM_rttypeINTEGER_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtPOW_RI, "pow_ri", FFECOM_rttypeDOUBLE_, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtPOW_ZI, "pow_zi", FFECOM_rttypeDBLCMPLX_, FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtPOW_ZZ, "pow_zz", FFECOM_rttypeDBLCMPLX_, FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtDIV_CC, "c_div", FFECOM_rttypeCOMPLEX_, FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtDIV_ZZ, "z_div", FFECOM_rttypeDBLCMPLX_, FALSE, TRUE) --- 57,217 ---- */ ! DEFGFRT (FFECOM_gfrtCAT, "s_cat", FFECOM_rttypeVOID_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtCMP, "s_cmp", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtCOPY, "s_copy", FFECOM_rttypeVOID_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtPAUSE, "s_paus", FFECOM_rttypeVOID_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSTOP, "s_stop", FFECOM_rttypeVOID_, 0, TRUE, FALSE) ! ! DEFGFRT (FFECOM_gfrtSRDUE, "s_rdue", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtERDUE, "e_rdue", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSRSUE, "s_rsue", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtERSUE, "e_rsue", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSRDFE, "s_rdfe", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtERDFE, "e_rdfe", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSRSFI, "s_rsfi", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtERSFI, "e_rsfi", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSRSFE, "s_rsfe", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtERSFE, "e_rsfe", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSRSLI, "s_rsli", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtERSLI, "e_rsli", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSRSLE, "s_rsle", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtERSLE, "e_rsle", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSRSNE, "s_rsne", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! ! DEFGFRT (FFECOM_gfrtSWDUE, "s_wdue", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtEWDUE, "e_wdue", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSWSUE, "s_wsue", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtEWSUE, "e_wsue", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSWDFE, "s_wdfe", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtEWDFE, "e_wdfe", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSWSFI, "s_wsfi", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtEWSFI, "e_wsfi", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSWSFE, "s_wsfe", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtEWSFE, "e_wsfe", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSWSLI, "s_wsli", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtEWSLI, "e_wsli", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSWSLE, "s_wsle", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtEWSLE, "e_wsle", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSWSNE, "s_wsne", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! ! DEFGFRT (FFECOM_gfrtDOFIO, "do_fio", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDOLIO, "do_lio", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDOUIO, "do_uio", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! ! DEFGFRT (FFECOM_gfrtFOPEN, "f_open", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtFCLOS, "f_clos", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtFINQU, "f_inqu", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! ! DEFGFRT (FFECOM_gfrtFBACK, "f_back", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtFEND, "f_end", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtFREW, "f_rew", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! ! DEFGFRT (FFECOM_gfrtABORT, "abort_", FFECOM_rttypeVOID_, 0, TRUE, FALSE) ! DEFGFRT (FFECOM_gfrtABS, "r_abs", FFECOM_rttypeDOUBLE_, "&f", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtACOS, "r_acos", FFECOM_rttypeDOUBLE_, "&f", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtAIMAG, "r_imag", FFECOM_rttypeDOUBLE_, "&f", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtAINT, "r_int", FFECOM_rttypeDOUBLE_, "&f", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtALOG, "r_log", FFECOM_rttypeDOUBLE_, "&f", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtALOG10, "r_lg10", FFECOM_rttypeDOUBLE_, "&f", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtAMOD, "r_mod", FFECOM_rttypeDOUBLE_, "&f", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtANINT, "r_nint", FFECOM_rttypeDOUBLE_, "&f", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtASIN, "r_asin", FFECOM_rttypeDOUBLE_, "&f", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtATAN, "r_atan", FFECOM_rttypeDOUBLE_, "&f", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtATAN2, "r_atn2", FFECOM_rttypeDOUBLE_, "&f", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtCABS, "c_abs", FFECOM_rttypeDOUBLE_, "&c", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtCCOS, "c_cos", FFECOM_rttypeCOMPLEX_, "&c", FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtCEXP, "c_exp", FFECOM_rttypeCOMPLEX_, "&c", FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtCLOG, "c_log", FFECOM_rttypeCOMPLEX_, "&c", FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtCONJG, "r_cnjg", FFECOM_rttypeCOMPLEX_, "&c", FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtCOS, "r_cos", FFECOM_rttypeDOUBLE_, "&f", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtCOSH, "r_cosh", FFECOM_rttypeDOUBLE_, "&f", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtCSIN, "c_sin", FFECOM_rttypeCOMPLEX_, "&c", FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtCSQRT, "c_sqrt", FFECOM_rttypeCOMPLEX_, "&c", FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtDABS, "d_abs", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDACOS, "d_acos", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDASIN, "d_asin", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDATAN, "d_atan", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDATAN2, "d_atn2", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDCOS, "d_cos", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDCOSH, "d_cosh", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDDIM, "d_dim", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDERF, "derf_", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDERFC, "derfc_", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDEXP, "d_exp", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDIM, "r_dim", FFECOM_rttypeDOUBLE_, "&r", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDINT, "d_int", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDLOG, "d_log", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDLOG10, "d_lg10", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDMOD, "d_mod", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDNINT, "d_nint", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDPROD, "d_prod", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDSIGN, "d_sign", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDSIN, "d_sin", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDSINH, "d_sinh", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDSQRT, "d_sqrt", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDTAN, "d_tan", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtDTANH, "d_tanh", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtERF, "erf_", FFECOM_rttypeDOUBLE_, "&r", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtERFC, "erfc_", FFECOM_rttypeDOUBLE_, "&r", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtEXIT, "exit_", FFECOM_rttypeVOID_, "&i", TRUE, FALSE) ! DEFGFRT (FFECOM_gfrtEXP, "r_exp", FFECOM_rttypeDOUBLE_, "&r", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtFLUSH, "flush_", FFECOM_rttypeVOID_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtGETARG, "getarg_", FFECOM_rttypeVOID_, "&i&a", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtGETENV, "getenv_", FFECOM_rttypeVOID_, "&a&a", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtIABS, "i_abs", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtIARGC, "iargc_", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtIDIM, "i_dim", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtIDNINT, "i_dnnt", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtINDEX, "i_indx", FFECOM_rttypeINTEGER_, "&a&a", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtISIGN, "i_sign", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtLEN, "i_len", FFECOM_rttypeINTEGER_, "&a", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtLGE, "l_ge", FFECOM_rttypeLOGICAL_, "&a", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtLGT, "l_gt", FFECOM_rttypeLOGICAL_, "&a", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtLLE, "l_le", FFECOM_rttypeLOGICAL_, "&a", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtLLT, "l_lt", FFECOM_rttypeLOGICAL_, "&a", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtMOD, "i_mod", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtNINT, "i_nint", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSIGN, "r_sign", FFECOM_rttypeDOUBLE_, "&r", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSIGNAL, "signal_", FFECOM_rttypeINTEGER_, "&i0", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSIN, "r_sin", FFECOM_rttypeDOUBLE_, "&r", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSINH, "r_sinh", FFECOM_rttypeDOUBLE_, "&r", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSQRT, "r_sqrt", FFECOM_rttypeDOUBLE_, "&r", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtSYSTEM, "system_", FFECOM_rttypeINTEGER_, "&a", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtTAN, "r_tan", FFECOM_rttypeDOUBLE_, "&r", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtTANH, "r_tanh", FFECOM_rttypeDOUBLE_, "&r", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtCDABS, "z_abs", FFECOM_rttypeDOUBLE_, "&e", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtCDCOS, "z_cos", FFECOM_rttypeDBLCMPLX_, "&e", FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtCDEXP, "z_exp", FFECOM_rttypeDBLCMPLX_, "&e", FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtCDLOG, "z_log", FFECOM_rttypeDBLCMPLX_, "&e", FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtDCONJG, "d_cnjg", FFECOM_rttypeDBLCMPLX_, "&e", FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtCDSIN, "z_sin", FFECOM_rttypeDBLCMPLX_, "&e", FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtCDSQRT, "z_sqrt", FFECOM_rttypeDBLCMPLX_, "&e", FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtDIMAG, "d_imag", FFECOM_rttypeDOUBLE_, "&e", FALSE, FALSE) ! ! DEFGFRT (FFECOM_gfrtL_ACOS, "acos", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_ASIN, "asin", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_ATAN, "atan", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_ATAN2, "atan2", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_COS, "__builtin_cos", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_COSH, "cosh", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_ERF, "erf", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_ERFC, "erfc", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_EXP, "exp", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_FLOOR, "floor", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_LOG, "log", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_SIN, "__builtin_sin", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_SINH, "sinh", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_SQRT, "__builtin_fsqrt", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_TAN, "tan", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtL_TANH, "tanh", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE) ! ! DEFGFRT (FFECOM_gfrtPOW_CI, "pow_ci", FFECOM_rttypeCOMPLEX_, "&c&i", FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtPOW_DD, "pow_dd", FFECOM_rttypeDOUBLE_, "&d&d", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtPOW_DI, "pow_di", FFECOM_rttypeDOUBLE_, "&d&i", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtPOW_II, "pow_ii", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtPOW_QQ, "pow_qq", FFECOM_rttypeLONGINT_, "&j&j", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtPOW_RI, "pow_ri", FFECOM_rttypeDOUBLE_, "&r&i", FALSE, FALSE) ! DEFGFRT (FFECOM_gfrtPOW_ZI, "pow_zi", FFECOM_rttypeDBLCMPLX_, "&e&i", FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtPOW_ZZ, "pow_zz", FFECOM_rttypeDBLCMPLX_, "&e&e", FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtDIV_CC, "c_div", FFECOM_rttypeCOMPLEX_, "&c", FALSE, TRUE) ! DEFGFRT (FFECOM_gfrtDIV_ZZ, "z_div", FFECOM_rttypeDBLCMPLX_, "&e", FALSE, TRUE) diff -rcp2N g77-0.5.17/f/com.c g77-0.5.18/f/com.c *** g77-0.5.17/f/com.c Sat Nov 18 19:44:18 1995 --- g77-0.5.18/f/com.c Mon Mar 25 19:46:58 1996 *************** tree ffecom_f2c_doublereal_type_node; *** 311,314 **** --- 311,315 ---- tree ffecom_f2c_complex_type_node; tree ffecom_f2c_doublecomplex_type_node; + tree ffecom_f2c_longint_type_node; tree ffecom_f2c_logical_type_node; tree ffecom_f2c_flag_type_node; *************** typedef enum *** 343,346 **** --- 344,348 ---- FFECOM_rttypeINT_, /* C's `int' type, for libF77/system_.c? */ FFECOM_rttypeINTEGER_, + FFECOM_rttypeLONGINT_, /* C's `long long int' type. */ FFECOM_rttypeLOGICAL_, FFECOM_rttypeREAL_, *************** struct _ffecom_temp_ *** 390,393 **** --- 392,397 ---- #if FFECOM_targetCURRENT == FFECOM_targetGCC + static tree ffecom_arglist_expr_ (char *argstring, ffebld args); + static tree ffecom_widest_expr_type_ (ffebld list); static bool ffecom_overlap_ (tree dest_decl, tree dest_offset, tree dest_size, tree source_tree, *************** static tree ffecom_gen_sfuncdef_ (ffesym *** 438,443 **** ffeinfoKindtype kt); static ffeinfoKindtype ffecom_gfrt_kind_type_ (ffecomGfrt ix); static tree ffecom_gfrt_tree_ (ffecomGfrt ix); ! static tree ffecom_init_local_zero_ (tree decl); static tree ffecom_intrinsic_ichar_ (tree tree_type, ffebld arg, tree *maybe_tree); --- 442,448 ---- ffeinfoKindtype kt); static ffeinfoKindtype ffecom_gfrt_kind_type_ (ffecomGfrt ix); + static char *ffecom_gfrt_args_ (ffecomGfrt ix); static tree ffecom_gfrt_tree_ (ffecomGfrt ix); ! static tree ffecom_init_zero_ (tree decl); static tree ffecom_intrinsic_ichar_ (tree tree_type, ffebld arg, tree *maybe_tree); *************** static tree ffecom_gfrt_[FFECOM_gfrt] *** 553,557 **** = { ! #define DEFGFRT(CODE,NAME,TYPE,VOLATILE,COMPLEX) NULL_TREE, #include "com-rt.def" #undef DEFGFRT --- 558,562 ---- = { ! #define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX) NULL_TREE, #include "com-rt.def" #undef DEFGFRT *************** static char *ffecom_gfrt_name_[FFECOM_gf *** 563,567 **** = { ! #define DEFGFRT(CODE,NAME,TYPE,VOLATILE,COMPLEX) NAME, #include "com-rt.def" #undef DEFGFRT --- 568,572 ---- = { ! #define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX) NAME, #include "com-rt.def" #undef DEFGFRT *************** static bool ffecom_gfrt_volatile_[FFECOM *** 573,577 **** = { ! #define DEFGFRT(CODE,NAME,TYPE,VOLATILE,COMPLEX) VOLATILE, #include "com-rt.def" #undef DEFGFRT --- 578,582 ---- = { ! #define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX) VOLATILE, #include "com-rt.def" #undef DEFGFRT *************** static bool ffecom_gfrt_complex_[FFECOM_ *** 583,587 **** = { ! #define DEFGFRT(CODE,NAME,TYPE,VOLATILE,COMPLEX) COMPLEX, #include "com-rt.def" #undef DEFGFRT --- 588,592 ---- = { ! #define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX) COMPLEX, #include "com-rt.def" #undef DEFGFRT *************** static ffecomRttype_ ffecom_gfrt_type_[F *** 593,597 **** = { ! #define DEFGFRT(CODE,NAME,TYPE,VOLATILE,COMPLEX) TYPE, #include "com-rt.def" #undef DEFGFRT --- 598,612 ---- = { ! #define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX) TYPE, ! #include "com-rt.def" ! #undef DEFGFRT ! }; ! ! /* String of codes for the function's arguments. */ ! ! static char *ffecom_gfrt_argstring_[FFECOM_gfrt] ! = ! { ! #define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX) ARGS, #include "com-rt.def" #undef DEFGFRT *************** static ffecomRttype_ ffecom_gfrt_type_[F *** 600,604 **** /* Kind type of (complex) function return value. */ ! static ffeinfoBasictype ffecom_gfrt_kt_[FFECOM_gfrt]; #endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */ --- 615,619 ---- /* Kind type of (complex) function return value. */ ! static ffeinfoKindtype ffecom_gfrt_kt_[FFECOM_gfrt]; #endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */ *************** static tree shadowed_labels; *** 733,736 **** --- 748,900 ---- + #if FFECOM_targetCURRENT == FFECOM_targetGCC + static tree + ffecom_arglist_expr_ (char *c, ffebld expr) + { + tree list; + tree *plist = &list; + tree trail = NULL_TREE; /* Append char length args here. */ + tree *ptrail = &trail; + tree length; + ffebld exprh; + tree item; + bool ptr = FALSE; + tree wanted = NULL_TREE; + + while (expr != NULL) + { + if (*c != '\0') + { + ptr = FALSE; + if (*c == '&') + { + ptr = TRUE; + ++c; + } + switch (*(c++)) + { + case '\0': + ptr = TRUE; + wanted = NULL_TREE; + break; + + case 'a': + assert (ptr); + wanted = NULL_TREE; + break; + + case 'c': + wanted = ffecom_f2c_complex_type_node; + break; + + case 'd': + wanted = ffecom_f2c_doublereal_type_node; + break; + + case 'e': + wanted = ffecom_f2c_doublecomplex_type_node; + break; + + case 'f': + wanted = ffecom_f2c_real_type_node; + break; + + case 'i': + wanted = ffecom_f2c_integer_type_node; + break; + + case 'j': + wanted = ffecom_f2c_longint_type_node; + break; + + default: + assert ("bad argstring code" == NULL); + wanted = NULL_TREE; + break; + } + } + + exprh = ffebld_head (expr); + if (exprh == NULL) + wanted = NULL_TREE; + + if ((wanted == NULL_TREE) + || (ptr + && (TYPE_MODE + (ffecom_tree_type[ffeinfo_basictype (ffebld_info (exprh))] + [ffeinfo_kindtype (ffebld_info (exprh))]) + == TYPE_MODE (wanted)))) + *plist + = build_tree_list (NULL_TREE, + ffecom_arg_ptr_to_expr (exprh, + &length)); + else + { + item = ffecom_arg_expr (exprh, &length); + item = convert (wanted, item); + if (ptr) + { + item = ffecom_1 (ADDR_EXPR, + build_pointer_type (TREE_TYPE (item)), + item); + } + *plist + = build_tree_list (NULL_TREE, + item); + } + + plist = &TREE_CHAIN (*plist); + expr = ffebld_trail (expr); + if (length != NULL_TREE) + { + *ptrail = build_tree_list (NULL_TREE, length); + ptrail = &TREE_CHAIN (*ptrail); + } + } + + *plist = trail; + + return list; + } + #endif + + #if FFECOM_targetCURRENT == FFECOM_targetGCC + static tree + ffecom_widest_expr_type_ (ffebld list) + { + ffebld item; + ffebld widest = NULL; + ffetype type; + ffetype widest_type = NULL; + tree t; + + for (; list != NULL; list = ffebld_trail (list)) + { + item = ffebld_head (list); + if (item == NULL) + continue; + if ((widest != NULL) + && (ffeinfo_basictype (ffebld_info (item)) + != ffeinfo_basictype (ffebld_info (widest)))) + continue; + type = ffeinfo_type (ffeinfo_basictype (ffebld_info (item)), + ffeinfo_kindtype (ffebld_info (item))); + if ((widest == FFEINFO_kindtypeNONE) + || (ffetype_size (type) + > ffetype_size (widest_type))) + { + widest = item; + widest_type = type; + } + } + + assert (widest != NULL); + t = ffecom_tree_type[ffeinfo_basictype (ffebld_info (widest))] + [ffeinfo_kindtype (ffebld_info (widest))]; + assert (t != NULL_TREE); + return t; + } + #endif + /* Check whether dest and source might overlap. ffebld versions of these might or might not be passed, will be NULL if not. *************** ffecom_expr_ (ffebld expr, tree dest_tre *** 2045,2054 **** switch (ffebld_op (expr)) { ! case FFEBLD_opARRTER: tree_type = ffecom_tree_type[bt][kt]; { ffetargetOffset i; list = item = NULL; for (i = 0; i < ffebld_arrter_size (expr); ++i) { --- 2209,2282 ---- switch (ffebld_op (expr)) { ! case FFEBLD_opACCTER: tree_type = ffecom_tree_type[bt][kt]; { ffetargetOffset i; + ffebit bits = ffebld_accter_bits (expr); + ffetargetOffset source_offset = 0; + size_t size; + tree purpose; + + size = ffetype_size (ffeinfo_type (bt, kt)); list = item = NULL; + for (;;) + { + ffebldConstantUnion cu; + ffebitCount length; + bool value; + ffebldConstantArray ca = ffebld_accter (expr); + + ffebit_test (bits, source_offset, &value, &length); + if (length == 0) + break; + + if (value) + { + for (i = 0; i < length; ++i) + { + cu = ffebld_constantarray_get (ca, bt, kt, + source_offset + i); + + t = ffecom_constantunion (&cu, bt, kt, tree_type); + + if (i == 0) + purpose = build_int_2 (source_offset, 0); + else + purpose = NULL_TREE; + + if (list == NULL_TREE) + list = item = build_tree_list (purpose, t); + else + { + TREE_CHAIN (item) = build_tree_list (purpose, t); + item = TREE_CHAIN (item); + } + } + } + source_offset += length; + } + } + + item = build_int_2 (ffebld_accter_size (expr), 0); + ffebit_kill (ffebld_accter_bits (expr)); + TREE_TYPE (item) = ffecom_integer_type_node; + item + = build_array_type + (tree_type, + build_range_type (ffecom_integer_type_node, + ffecom_integer_zero_node, + item)); + list = build (CONSTRUCTOR, item, NULL_TREE, list); + TREE_CONSTANT (list) = 1; + TREE_STATIC (list) = 1; + return list; + + case FFEBLD_opARRTER: + tree_type = ffecom_tree_type[bt][kt]; + { + ffetargetOffset i; + + list = item = NULL_TREE; for (i = 0; i < ffebld_arrter_size (expr); ++i) { *************** ffecom_expr_ (ffebld expr, tree dest_tre *** 2058,2062 **** t = ffecom_constantunion (&cu, bt, kt, tree_type); ! if (list == NULL) list = item = build_tree_list (NULL_TREE, t); else --- 2286,2290 ---- t = ffecom_constantunion (&cu, bt, kt, tree_type); ! if (list == NULL_TREE) list = item = build_tree_list (NULL_TREE, t); else *************** ffecom_expr_ (ffebld expr, tree dest_tre *** 2219,2222 **** --- 2447,2451 ---- ffebld right = ffebld_right (expr); ffecomGfrt code; + ffeinfoKindtype rtkt; switch (ffeinfo_basictype (ffebld_info (right))) *************** ffecom_expr_ (ffebld expr, tree dest_tre *** 2224,2233 **** case FFEINFO_basictypeINTEGER: if (1 || optimize) ! return ffecom_expr_power_integer_ (left, right); switch (ffeinfo_basictype (ffebld_info (left))) { case FFEINFO_basictypeINTEGER: ! code = FFECOM_gfrtPOW_II; break; --- 2453,2476 ---- case FFEINFO_basictypeINTEGER: if (1 || optimize) ! { ! item = ffecom_expr_power_integer_ (left, right); ! if (item != NULL_TREE) ! return item; ! } + rtkt = FFEINFO_kindtypeINTEGER1; switch (ffeinfo_basictype (ffebld_info (left))) { case FFEINFO_basictypeINTEGER: ! if ((ffeinfo_kindtype (ffebld_info (left)) ! == FFEINFO_kindtypeINTEGER4) ! || (ffeinfo_kindtype (ffebld_info (right)) ! == FFEINFO_kindtypeINTEGER4)) ! { ! code = FFECOM_gfrtPOW_QQ; ! rtkt = FFEINFO_kindtypeINTEGER4; ! } ! else ! code = FFECOM_gfrtPOW_II; break; *************** ffecom_expr_ (ffebld expr, tree dest_tre *** 2253,2256 **** --- 2496,2511 ---- break; } + if (ffeinfo_kindtype (ffebld_info (left)) != rtkt) + left = ffeexpr_convert (left, NULL, NULL, + FFEINFO_basictypeINTEGER, + rtkt, 0, + FFETARGET_charactersizeNONE, + FFEEXPR_contextLET); + if (ffeinfo_kindtype (ffebld_info (right)) != rtkt) + right = ffeexpr_convert (right, NULL, NULL, + FFEINFO_basictypeINTEGER, + rtkt, 0, + FFETARGET_charactersizeNONE, + FFEEXPR_contextLET); break; *************** ffecom_expr_intrinsic_ (ffebld expr, tre *** 2806,2834 **** return expr_tree; ! The expr_tree has been completely set up and is ready to be returned as is. ! No further actions are taken. Use this when the tree is not in the ! simple form for one of the arity_n labels. */ /* For info on how the switch statement cases were written, see the files enclosed in comments below the switch statement. */ ! switch (ffebld_symter_implementation (ffebld_left (expr))) { ! case FFEINTRIN_impABS: ! /* r__1 = (doublereal)(( r1 ) >= 0 ? ( r1 ) : -( r1 )) ; */ ! return ffecom_1 (ABS_EXPR, tree_type, ffecom_expr (arg1)); ! ! case FFEINTRIN_impACOS: ! /* r__1 = acos(r1); */ ! ix = FFECOM_gfrtL_ACOS; goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impAIMAG: ! case FFEINTRIN_impDIMAG: ! /* r__1 = r_imag(&c1); */ ! return ffecom_1 (IMAGPART_EXPR, tree_type, ffecom_expr (arg1)); ! case FFEINTRIN_impAINT: ! /* r__1 = r_int(&r1); */ #if 0 /* ~~ someday implement FIX_TRUNC_EXPR yielding same type as arg */ --- 3061,3111 ---- return expr_tree; ! The expr_tree has been completely set up and is ready to be returned ! as is. No further actions are taken. Use this when the tree is not ! in the simple form for one of the arity_n labels. */ /* For info on how the switch statement cases were written, see the files enclosed in comments below the switch statement. */ ! switch (ffeintrin_codegen_imp ! (ffebld_symter_implementation (ffebld_left (expr)))) { ! case FFEINTRIN_impABS: /* Plus impCABS, impCDABS, impDABS, impIABS. */ ! if (ffeinfo_basictype (ffebld_info (arg1)) ! == FFEINFO_basictypeCOMPLEX) ! { ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtCABS; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtCDABS; ! else ! { ! assert ("bad ABS COMPLEX kind type" == NULL); ! ix = FFECOM_gfrt; ! } ! goto library; /* :::::::::::::::::::: */ ! } ! return ffecom_1 (ABS_EXPR, tree_type, ! convert (tree_type, ffecom_expr (arg1))); ! ! case FFEINTRIN_impACOS: /* Plus impDACOS. */ ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtL_ACOS; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtL_ACOS; ! else ! { ! assert ("bad ACOS kind type" == NULL); ! ix = FFECOM_gfrt; ! } goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impAIMAG: /* Plus impDIMAG. */ ! return ! convert (tree_type, ! ffecom_1 (IMAGPART_EXPR, TREE_TYPE (arg1_type), ! ffecom_expr (arg1))); ! case FFEINTRIN_impAINT: /* Plus impDINT. */ #if 0 /* ~~ someday implement FIX_TRUNC_EXPR yielding same type as arg */ *************** ffecom_expr_intrinsic_ (ffebld expr, tre *** 2843,2847 **** (ffecom_2 (GE_EXPR, integer_type_node, saved_expr1, ! ffecom_float_zero_)), ffecom_call_gfrt (FFECOM_gfrtL_FLOOR, build_tree_list (NULL_TREE, --- 3120,3125 ---- (ffecom_2 (GE_EXPR, integer_type_node, saved_expr1, ! convert (arg1_type, ! ffecom_float_zero_))), ffecom_call_gfrt (FFECOM_gfrtL_FLOOR, build_tree_list (NULL_TREE, *************** ffecom_expr_intrinsic_ (ffebld expr, tre *** 2853,2943 **** convert (double_type_node, ffecom_1 (NEGATE_EXPR, ! tree_type, ! saved_expr1)))) ! )) ! ); ! #endif ! case FFEINTRIN_impALOG: ! /* r__1 = log(r1); */ ! ix = FFECOM_gfrtL_LOG; ! goto library; /* :::::::::::::::::::: */ ! ! case FFEINTRIN_impALOG10: ! /* r__1 = r_lg10(&r1); */ ! break; ! ! case FFEINTRIN_impAMAX0: ! /* r__1 = (real) (( i1 ) >= ( i2 ) ? ( i1 ) : ( i2 )) ; */ ! expr_tree = ffecom_2 (MAX_EXPR, arg1_type, ! ffecom_expr (arg1), ! ffecom_expr (arg2)); ! while (list != NULL) ! { ! if (ffebld_op (ffebld_head (list)) == FFEBLD_opANY) ! continue; ! expr_tree = ffecom_2 (MAX_EXPR, arg1_type, ! expr_tree, ! ffecom_expr (ffebld_head (list))); ! list = ffebld_trail (list); ! } ! return convert (tree_type, expr_tree); ! ! case FFEINTRIN_impAMAX1: ! /* r__1 = (doublereal)(( r1 ) >= ( r2 ) ? ( r1 ) : ( r2 )) ; */ ! expr_tree = ffecom_2 (MAX_EXPR, tree_type, ! ffecom_expr (arg1), ! ffecom_expr (arg2)); ! while (list != NULL) ! { ! if (ffebld_op (ffebld_head (list)) == FFEBLD_opANY) ! continue; ! expr_tree = ffecom_2 (MAX_EXPR, tree_type, ! expr_tree, ! ffecom_expr (ffebld_head (list))); ! list = ffebld_trail (list); ! } ! return expr_tree; ! ! case FFEINTRIN_impAMIN0: ! /* r__1 = (real) (( i1 ) <= ( i2 ) ? ( i1 ) : ( i2 )) ; */ ! expr_tree = ffecom_2 (MIN_EXPR, arg1_type, ! ffecom_expr (arg1), ! ffecom_expr (arg2)); ! while (list != NULL) ! { ! if (ffebld_op (ffebld_head (list)) == FFEBLD_opANY) ! continue; ! expr_tree = ffecom_2 (MIN_EXPR, arg1_type, ! expr_tree, ! ffecom_expr (ffebld_head (list))); ! list = ffebld_trail (list); ! } ! return convert (tree_type, expr_tree); ! ! case FFEINTRIN_impAMIN1: ! /* r__1 = (doublereal)(( r1 ) <= ( r2 ) ? ( r1 ) : ( r2 )) ; */ ! expr_tree = ffecom_2 (MIN_EXPR, arg1_type, ! ffecom_expr (arg1), ! ffecom_expr (arg2)); ! while (list != NULL) ! { ! if (ffebld_op (ffebld_head (list)) == FFEBLD_opANY) ! continue; ! expr_tree = ffecom_2 (MIN_EXPR, arg1_type, ! expr_tree, ! ffecom_expr (ffebld_head (list))); ! list = ffebld_trail (list); ! } ! return expr_tree; ! ! case FFEINTRIN_impAMOD: ! /* r__1 = r_mod(&r1, &r2); */ ! /* Ideally we'd have a handy operator to do this, but we don't, and we ! don't want to do it in the integer domain or we might lose precision ! or range, so just call the r_mod function. */ ! break; ! case FFEINTRIN_impANINT: ! /* r__1 = r_nint(&r1); */ #if 0 /* This way of doing it won't handle real numbers of large magnitudes. */ --- 3131,3141 ---- convert (double_type_node, ffecom_1 (NEGATE_EXPR, ! arg1_type, ! saved_expr1)))) ! )) ! ); ! #endif ! case FFEINTRIN_impANINT: /* Plus impDNINT. */ #if 0 /* This way of doing it won't handle real numbers of large magnitudes. */ *************** ffecom_expr_intrinsic_ (ffebld expr, tre *** 2969,3029 **** (ffecom_2 (GE_EXPR, integer_type_node, saved_expr1, ! ffecom_float_zero_)), ffecom_call_gfrt (FFECOM_gfrtL_FLOOR, build_tree_list (NULL_TREE, convert (double_type_node, ! ffecom_2 (PLUS_EXPR, tree_type, saved_expr1, ffecom_float_half_)))), ffecom_1 (NEGATE_EXPR, double_type_node, ffecom_call_gfrt (FFECOM_gfrtL_FLOOR, ! build_tree_list (NULL_TREE, ! convert (double_type_node, ! ffecom_2 (MINUS_EXPR, ! tree_type, ! ffecom_float_half_, ! saved_expr1))))) ! ) ! ); ! #endif ! ! case FFEINTRIN_impASIN: ! /* r__1 = asin(r1); */ ! ix = FFECOM_gfrtL_ASIN; goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impATAN: ! /* r__1 = atan(r1); */ ! ix = FFECOM_gfrtL_ATAN; goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impATAN2: ! /* r__1 = atan2(r1, r2); */ ! ix = FFECOM_gfrtL_ATAN2; goto library; /* :::::::::::::::::::: */ - case FFEINTRIN_impCABS: - case FFEINTRIN_impCDABS: - /* r__1 = c_abs(&c1); */ - #if 0 - /* This and other gcc back end ops are not implemented to use - sufficient precision, so don't use gcc's implementation -- - use the run-time library instead. */ - return ffecom_1 (ABS_EXPR, tree_type, ffecom_expr (arg1)); - #else - break; - #endif - - case FFEINTRIN_impCCOS: - case FFEINTRIN_impCDCOS: - /* c_cos(&q__1, &c1); */ - break; - - case FFEINTRIN_impCEXP: - case FFEINTRIN_impCDEXP: - /* c_exp(&q__1, &c1); */ - break; - case FFEINTRIN_impCHAR: case FFEINTRIN_impACHAR: - /* ch__1[0] = i1; */ assert (ffecom_pending_calls_ != 0); tempvar = ffecom_push_tempvar (char_type_node, --- 3167,3231 ---- (ffecom_2 (GE_EXPR, integer_type_node, saved_expr1, ! convert (arg1_type, ! ffecom_float_zero_))), ffecom_call_gfrt (FFECOM_gfrtL_FLOOR, build_tree_list (NULL_TREE, convert (double_type_node, ! ffecom_2 (PLUS_EXPR, ! arg1_type, ! saved_expr1, ! convert (arg1_type, ! ffecom_float_half_))))), ffecom_1 (NEGATE_EXPR, double_type_node, ffecom_call_gfrt (FFECOM_gfrtL_FLOOR, ! build_tree_list (NULL_TREE, ! convert (double_type_node, ! ffecom_2 (MINUS_EXPR, ! arg1_type, ! convert (arg1_type, ! ffecom_float_half_), ! saved_expr1))))) ! ) ! ); ! #endif ! ! case FFEINTRIN_impASIN: /* Plus impDASIN. */ ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtL_ASIN; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtL_ASIN; ! else ! { ! assert ("bad ASIN kind type" == NULL); ! ix = FFECOM_gfrt; ! } goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impATAN: /* Plus impDATAN. */ ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtL_ATAN; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtL_ATAN; ! else ! { ! assert ("bad ATAN kind type" == NULL); ! ix = FFECOM_gfrt; ! } goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impATAN2: /* Plus impDATAN2. */ ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtL_ATAN2; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtL_ATAN2; ! else ! { ! assert ("bad ATAN2 kind type" == NULL); ! ix = FFECOM_gfrt; ! } goto library; /* :::::::::::::::::::: */ case FFEINTRIN_impCHAR: case FFEINTRIN_impACHAR: assert (ffecom_pending_calls_ != 0); tempvar = ffecom_push_tempvar (char_type_node, *************** ffecom_expr_intrinsic_ (ffebld expr, tre *** 3045,3136 **** return expr_tree; ! case FFEINTRIN_impCLOG: ! case FFEINTRIN_impCDLOG: ! /* c_log(&q__1, &c1); */ ! break; ! ! case FFEINTRIN_impCONJG: ! case FFEINTRIN_impDCONJG: ! /* r_cnjg(&q__1, &c1); */ ! break; ! ! case FFEINTRIN_impCOS: ! /* r__1 = cos(r1); */ ! ix = FFECOM_gfrtL_COS; ! goto library; /* :::::::::::::::::::: */ ! ! case FFEINTRIN_impCOSH: ! /* r__1 = cosh(r1); */ ! ix = FFECOM_gfrtL_COSH; ! goto library; /* :::::::::::::::::::: */ ! ! case FFEINTRIN_impCSIN: ! case FFEINTRIN_impCDSIN: ! /* c_sin(&q__1, &c1); */ ! break; ! ! case FFEINTRIN_impCSQRT: ! case FFEINTRIN_impCDSQRT: ! /* c_sqrt(&q__1, &c1); */ ! break; ! ! case FFEINTRIN_impDABS: ! /* d__1 = (( d1 ) >= 0 ? ( d1 ) : -( d1 )) ; */ ! return ffecom_1 (ABS_EXPR, tree_type, ffecom_expr (arg1)); ! ! case FFEINTRIN_impDACOS: ! /* d__1 = acos(d1); */ ! ix = FFECOM_gfrtL_ACOS; ! goto library; /* :::::::::::::::::::: */ ! ! case FFEINTRIN_impDASIN: ! /* d__1 = asin(d1); */ ! ix = FFECOM_gfrtL_ASIN; ! goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impDATAN: ! /* d__1 = atan(d1); */ ! ix = FFECOM_gfrtL_ATAN; ! goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impDATAN2: ! /* d__1 = atan2(d1, d2); */ ! ix = FFECOM_gfrtL_ATAN2; goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impDCOS: ! /* d__1 = cos(d1); */ ! ix = FFECOM_gfrtL_COS; goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impDCOSH: ! /* d__1 = cosh(d1); */ ! ix = FFECOM_gfrtL_COSH; goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impDDIM: ! /* d__1 = d_dim(&d1, &d2); */ ! saved_expr1 = ffecom_save_tree (ffecom_expr (arg1)); ! saved_expr2 = ffecom_save_tree (ffecom_expr (arg2)); ! return ! ffecom_3 (COND_EXPR, tree_type, ! ffecom_truth_value ! (ffecom_2 (GT_EXPR, integer_type_node, ! saved_expr1, ! saved_expr2)), ! ffecom_2 (MINUS_EXPR, tree_type, ! saved_expr1, ! saved_expr2), ! ffecom_double_zero_); ! ! case FFEINTRIN_impDEXP: ! /* d__1 = exp(d1); */ ! ix = FFECOM_gfrtL_EXP; ! goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impDIM: ! /* r__1 = r_dim(&r1, &r2); */ ! saved_expr1 = ffecom_save_tree (ffecom_expr (arg1)); ! saved_expr2 = ffecom_save_tree (ffecom_expr (arg2)); return ffecom_3 (COND_EXPR, tree_type, --- 3247,3321 ---- return expr_tree; ! case FFEINTRIN_impCMPLX: ! real_type = ffecom_tree_type[FFEINFO_basictypeREAL][kt]; ! if (arg2 == NULL) ! return ! convert (tree_type, ffecom_expr (arg1)); ! return ! ffecom_2 (COMPLEX_EXPR, tree_type, ! convert (real_type, ffecom_expr (arg1)), ! convert (real_type, ! ffecom_expr (arg2))); ! case FFEINTRIN_impCONJG: /* Plus impDCONJG. */ ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtCONJG; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtDCONJG; ! else ! { ! assert ("bad CONJG kind type" == NULL); ! ix = FFECOM_gfrt; ! } goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impCOS: /* Plus impCCOS, impCDCOS, impDCOS. */ ! if (bt == FFEINFO_basictypeCOMPLEX) ! { ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtCCOS; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtCDCOS; ! else ! { ! assert ("bad COS COMPLEX kind type" == NULL); ! ix = FFECOM_gfrt; ! } ! } ! else ! { ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtL_COS; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtL_COS; ! else ! { ! assert ("bad COS REAL kind type" == NULL); ! ix = FFECOM_gfrt; ! } ! } goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impCOSH: /* Plus impDCOSH. */ ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtL_COSH; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtL_COSH; ! else ! { ! assert ("bad COSH kind type" == NULL); ! ix = FFECOM_gfrt; ! } goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impDBLE: ! return convert (tree_type, ffecom_expr (arg1)); ! case FFEINTRIN_impDIM: /* Plus impDDIM, impIDIM. */ ! saved_expr1 = ffecom_save_tree (convert (tree_type, ! ffecom_expr (arg1))); ! saved_expr2 = ffecom_save_tree (convert (tree_type, ! ffecom_expr (arg2))); return ffecom_3 (COND_EXPR, tree_type, *************** ffecom_expr_intrinsic_ (ffebld expr, tre *** 3142,3264 **** saved_expr1, saved_expr2), ! ffecom_float_zero_); ! ! case FFEINTRIN_impDINT: ! /* d__1 = d_int(&d1); */ ! #if 0 /* ~~ someday implement FIX_TRUNC_EXPR ! yielding same type as arg */ ! return ffecom_1 (FIX_TRUNC_EXPR, tree_type, ffecom_expr (arg1)); ! #else /* cannot float a fix, or might garbage up a very large number */ ! /* d__1 = d1 > 0 ? floor(d1) : -floor(d1); */ ! saved_expr1 = ffecom_save_tree (ffecom_expr (arg1)); ! return ! ffecom_3 (COND_EXPR, tree_type, ! ffecom_truth_value ! (ffecom_2 (GE_EXPR, integer_type_node, ! saved_expr1, ! ffecom_double_zero_)), ! ffecom_call_gfrt (FFECOM_gfrtL_FLOOR, ! build_tree_list (NULL_TREE, ! saved_expr1)), ! ffecom_1 (NEGATE_EXPR, tree_type, ! ffecom_call_gfrt (FFECOM_gfrtL_FLOOR, ! build_tree_list (NULL_TREE, ! ffecom_1 (NEGATE_EXPR, ! tree_type, ! saved_expr1))) ! )); ! #endif ! ! case FFEINTRIN_impDLOG: ! /* d__1 = log(d1); */ ! ix = FFECOM_gfrtL_LOG; ! goto library; /* :::::::::::::::::::: */ ! ! case FFEINTRIN_impDLOG10: ! /* d__1 = d_lg10(&d1); */ ! break; ! ! case FFEINTRIN_impDMAX1: ! /* d__1 = (( d1 ) >= ( d2 ) ? ( d1 ) : ( d2 )) ; */ ! expr_tree = ffecom_2 (MAX_EXPR, tree_type, ! ffecom_expr (arg1), ! ffecom_expr (arg2)); ! while (list != NULL) ! { ! if (ffebld_op (ffebld_head (list)) == FFEBLD_opANY) ! continue; ! expr_tree = ffecom_2 (MAX_EXPR, tree_type, ! expr_tree, ! ffecom_expr (ffebld_head (list))); ! list = ffebld_trail (list); ! } ! return expr_tree; ! ! case FFEINTRIN_impDMIN1: ! /* d__1 = (( d1 ) <= ( d2 ) ? ( d1 ) : ( d2 )) ; */ ! expr_tree = ffecom_2 (MIN_EXPR, tree_type, ! ffecom_expr (arg1), ! ffecom_expr (arg2)); ! while (list != NULL) ! { ! if (ffebld_op (ffebld_head (list)) == FFEBLD_opANY) ! continue; ! expr_tree = ffecom_2 (MIN_EXPR, tree_type, ! expr_tree, ! ffecom_expr (ffebld_head (list))); ! list = ffebld_trail (list); ! } ! return expr_tree; ! ! case FFEINTRIN_impDMOD: ! /* d__1 = d_mod(&d1, &d2); */ ! break; ! ! case FFEINTRIN_impDNINT: ! /* d__1 = d_nint(&d1); */ ! #if 0 /* This way of doing it won't handle real ! numbers of large magnitudes. */ ! saved_expr1 = ffecom_save_tree (ffecom_expr (arg1)); ! return ! convert (tree_type, ! convert (integer_type_node, ! ffecom_3 (COND_EXPR, tree_type, ! ffecom_truth_value ! (ffecom_2 (GE_EXPR, integer_type_node, ! saved_expr1, ! ffecom_double_zero_)), ! ffecom_2 (PLUS_EXPR, tree_type, ! saved_expr1, ! ffecom_double_half_), ! ffecom_2 (MINUS_EXPR, tree_type, ! saved_expr1, ! ffecom_double_half_)))); ! #else /* So we instead call floor. */ ! /* d__1 = d1 >= 0 ? floor(d1 + .5) : -floor(.5 - d1) */ ! saved_expr1 = ffecom_save_tree (ffecom_expr (arg1)); ! return ! ffecom_3 (COND_EXPR, double_type_node, ! ffecom_truth_value ! (ffecom_2 (GE_EXPR, integer_type_node, ! saved_expr1, ! ffecom_double_zero_)), ! ffecom_call_gfrt (FFECOM_gfrtL_FLOOR, ! build_tree_list (NULL_TREE, ! ffecom_2 (PLUS_EXPR, ! tree_type, ! saved_expr1, ! ffecom_double_half_))), ! ffecom_1 (NEGATE_EXPR, tree_type, ! ffecom_call_gfrt (FFECOM_gfrtL_FLOOR, ! build_tree_list (NULL_TREE, ! ffecom_2 (MINUS_EXPR, ! tree_type, ! ffecom_double_half_, ! saved_expr1)))) ! ); ! #endif case FFEINTRIN_impDPROD: - /* d__1 = (doublereal) r1 * r2; */ return ffecom_2 (MULT_EXPR, tree_type, --- 3327,3333 ---- saved_expr1, saved_expr2), ! convert (tree_type, ffecom_float_zero_)); case FFEINTRIN_impDPROD: return ffecom_2 (MULT_EXPR, tree_type, *************** ffecom_expr_intrinsic_ (ffebld expr, tre *** 3266,3325 **** convert (tree_type, ffecom_expr (arg2))); ! case FFEINTRIN_impDSIGN: ! /* d__1 = d_sign(&d1, &d2); */ ! saved_expr1 = ffecom_save_tree (ffecom_1 (ABS_EXPR, tree_type, ! ffecom_expr (arg1))); ! expr_tree ! = ffecom_3 (COND_EXPR, tree_type, ! ffecom_truth_value ! (ffecom_2 (GE_EXPR, integer_type_node, ! ffecom_expr (arg2), ! ffecom_double_zero_)), ! saved_expr1, ! ffecom_1 (NEGATE_EXPR, tree_type, saved_expr1)); ! /* Make sure SAVE_EXPRs get referenced early enough. */ ! expr_tree ! = ffecom_2 (COMPOUND_EXPR, tree_type, ! convert (void_type_node, saved_expr1), ! expr_tree); ! return expr_tree; ! ! case FFEINTRIN_impDSIN: ! /* d__1 = sin(d1); */ ! ix = FFECOM_gfrtL_SIN; ! goto library; /* :::::::::::::::::::: */ ! ! case FFEINTRIN_impDSINH: ! /* d__1 = sinh(d1); */ ! ix = FFECOM_gfrtL_SINH; ! goto library; /* :::::::::::::::::::: */ ! ! case FFEINTRIN_impDSQRT: ! /* d__1 = sqrt(d1); */ ! ix = FFECOM_gfrtL_SQRT; ! goto library; /* :::::::::::::::::::: */ ! ! case FFEINTRIN_impDTAN: ! /* d__1 = tan(d1); */ ! ix = FFECOM_gfrtL_TAN; ! goto library; /* :::::::::::::::::::: */ ! ! case FFEINTRIN_impDTANH: ! /* d__1 = tanh(d1); */ ! ix = FFECOM_gfrtL_TANH; ! goto library; /* :::::::::::::::::::: */ ! ! case FFEINTRIN_impEXP: ! /* r__1 = exp(r1); */ ! ix = FFECOM_gfrtL_EXP; goto library; /* :::::::::::::::::::: */ - case FFEINTRIN_impIABS: - /* i__1 = (( i1 ) >= 0 ? ( i1 ) : -( i1 )) ; */ - return ffecom_1 (ABS_EXPR, tree_type, ffecom_expr (arg1)); - case FFEINTRIN_impICHAR: case FFEINTRIN_impIACHAR: - /* i__1 = *a1; */ #if 0 /* The simple approach. */ ffecom_char_args_ (&expr_tree, &saved_expr1 /* Ignored */ , arg1); --- 3335,3367 ---- convert (tree_type, ffecom_expr (arg2))); ! case FFEINTRIN_impEXP: /* Plus impCEXP, impCDEXP, impDEXP. */ ! if (bt == FFEINFO_basictypeCOMPLEX) ! { ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtCEXP; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtCDEXP; ! else ! { ! assert ("bad EXP COMPLEX kind type" == NULL); ! ix = FFECOM_gfrt; ! } ! } ! else ! { ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtL_EXP; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtL_EXP; ! else ! { ! assert ("bad EXP REAL kind type" == NULL); ! ix = FFECOM_gfrt; ! } ! } goto library; /* :::::::::::::::::::: */ case FFEINTRIN_impICHAR: case FFEINTRIN_impIACHAR: #if 0 /* The simple approach. */ ffecom_char_args_ (&expr_tree, &saved_expr1 /* Ignored */ , arg1); *************** ffecom_expr_intrinsic_ (ffebld expr, tre *** 3343,3409 **** #endif - case FFEINTRIN_impIDIM: - /* i__1 = i_dim(&i1, &i2); */ - saved_expr1 = ffecom_save_tree (ffecom_expr (arg1)); - saved_expr2 = ffecom_save_tree (ffecom_expr (arg2)); - return - ffecom_3 (COND_EXPR, tree_type, - ffecom_truth_value - (ffecom_2 (GT_EXPR, integer_type_node, - saved_expr1, - saved_expr2)), - ffecom_2 (MINUS_EXPR, tree_type, - saved_expr1, - saved_expr2), - convert (tree_type, integer_zero_node)); - - case FFEINTRIN_impIDNINT: - /* i__1 = i_dnnt(&d1); */ - #if 0 /* ~~ ideally FIX_ROUND_EXPR would be - implemented, but it ain't yet */ - return ffecom_1 (FIX_ROUND_EXPR, tree_type, ffecom_expr (arg1)); - #else - /* i__1 = d1 >= 0 ? floor(d1 + .5) : -floor(.5 - d1); */ - saved_expr1 = ffecom_save_tree (ffecom_expr (arg1)); - return - convert (ffecom_integer_type_node, - ffecom_3 (COND_EXPR, arg1_type, - ffecom_truth_value - (ffecom_2 (GE_EXPR, integer_type_node, - saved_expr1, - ffecom_double_zero_)), - ffecom_2 (PLUS_EXPR, arg1_type, - saved_expr1, - ffecom_double_half_), - ffecom_2 (MINUS_EXPR, arg1_type, - saved_expr1, - ffecom_double_half_))); - #endif - case FFEINTRIN_impINDEX: - /* i__1 = i_indx(a1, a2, 10L, 10L); */ break; ! case FFEINTRIN_impISIGN: ! /* i__1 = i_sign(&i1, &i2); */ ! saved_expr1 = ffecom_save_tree (ffecom_1 (ABS_EXPR, tree_type, ! ffecom_expr (arg1))); ! expr_tree ! = ffecom_3 (COND_EXPR, tree_type, ! ffecom_truth_value ! (ffecom_2 (GE_EXPR, integer_type_node, ! ffecom_expr (arg2), ! convert (tree_type, integer_zero_node))), ! saved_expr1, ! ffecom_1 (NEGATE_EXPR, tree_type, saved_expr1)); ! /* Make sure SAVE_EXPRs get referenced early enough. */ ! expr_tree ! = ffecom_2 (COMPOUND_EXPR, tree_type, ! convert (void_type_node, saved_expr1), ! expr_tree); ! return expr_tree; case FFEINTRIN_impLEN: - /* i__1 = i_len(a1, 10L); */ #if 0 /* The simple approach. */ break; --- 3385,3395 ---- #endif case FFEINTRIN_impINDEX: break; ! case FFEINTRIN_impINT: ! return convert (tree_type, ffecom_expr (arg1)); case FFEINTRIN_impLEN: #if 0 /* The simple approach. */ break; *************** ffecom_expr_intrinsic_ (ffebld expr, tre *** 3413,3736 **** case FFEINTRIN_impLGE: - /* L__1 = l_ge(a1, a2, 10L, 10L); */ break; case FFEINTRIN_impLGT: - /* L__1 = l_gt(a1, a2, 10L, 10L); */ break; case FFEINTRIN_impLLE: - /* L__1 = l_le(a1, a2, 10L, 10L); */ break; case FFEINTRIN_impLLT: - /* L__1 = l_lt(a1, a2, 10L, 10L); */ break; ! case FFEINTRIN_impMAX0: ! /* i__1 = (( i1 ) >= ( i2 ) ? ( i1 ) : ( i2 )) ; */ ! expr_tree = ffecom_2 (MAX_EXPR, tree_type, ! ffecom_expr (arg1), ! ffecom_expr (arg2)); ! while (list != NULL) { ! if (ffebld_op (ffebld_head (list)) == FFEBLD_opANY) ! continue; ! expr_tree = ffecom_2 (MAX_EXPR, tree_type, ! expr_tree, ! ffecom_expr (ffebld_head (list))); ! list = ffebld_trail (list); } ! return expr_tree; ! ! case FFEINTRIN_impMAX1: ! /* i__1 = (integer) (doublereal)(( r1 ) >= ( r2 ) ? ( r1 ) : ( r2 ! )) ; */ ! expr_tree = ffecom_2 (MAX_EXPR, arg1_type, ! ffecom_expr (arg1), ! ffecom_expr (arg2)); ! while (list != NULL) { ! if (ffebld_op (ffebld_head (list)) == FFEBLD_opANY) ! continue; ! expr_tree = ffecom_2 (MAX_EXPR, arg1_type, ! expr_tree, ! ffecom_expr (ffebld_head (list))); ! list = ffebld_trail (list); } ! return convert (tree_type, expr_tree); ! case FFEINTRIN_impMIN0: ! /* i__1 = (( i1 ) <= ( i2 ) ? ( i1 ) : ( i2 )) ; */ ! expr_tree = ffecom_2 (MIN_EXPR, tree_type, ! ffecom_expr (arg1), ! ffecom_expr (arg2)); ! while (list != NULL) { ! if (ffebld_op (ffebld_head (list)) == FFEBLD_opANY) ! continue; ! expr_tree = ffecom_2 (MIN_EXPR, tree_type, ! expr_tree, ! ffecom_expr (ffebld_head (list))); ! list = ffebld_trail (list); } ! return expr_tree; ! case FFEINTRIN_impMIN1: ! /* i__1 = (integer) (doublereal)(( r1 ) <= ( r2 ) ? ( r1 ) : ( r2 ! )) ; */ ! expr_tree = ffecom_2 (MIN_EXPR, arg1_type, ! ffecom_expr (arg1), ! ffecom_expr (arg2)); ! while (list != NULL) { ! if (ffebld_op (ffebld_head (list)) == FFEBLD_opANY) continue; ! expr_tree = ffecom_2 (MIN_EXPR, arg1_type, ! expr_tree, ! ffecom_expr (ffebld_head (list))); ! list = ffebld_trail (list); ! } ! return convert (tree_type, expr_tree); ! ! case FFEINTRIN_impMOD: ! /* i__1 = i1 % i2; */ ! return ffecom_2 (TRUNC_MOD_EXPR, tree_type, ! ffecom_expr (arg1), ! ffecom_expr (arg2)); ! ! case FFEINTRIN_impNINT: ! /* i__1 = i_nint(&r1); */ ! #if 0 /* ~~ ideally FIX_ROUND_EXPR would be ! implemented, but it ain't yet */ ! return ffecom_1 (FIX_ROUND_EXPR, tree_type, ffecom_expr (arg1)); ! #else ! /* i__1 = r1 >= 0 ? floor(r1 + .5) : -floor(.5 - r1); */ ! saved_expr1 = ffecom_save_tree (ffecom_expr (arg1)); ! return ! convert (ffecom_integer_type_node, ! ffecom_3 (COND_EXPR, arg1_type, ! ffecom_truth_value ! (ffecom_2 (GE_EXPR, integer_type_node, ! saved_expr1, ! ffecom_float_zero_)), ! ffecom_2 (PLUS_EXPR, arg1_type, ! saved_expr1, ! ffecom_float_half_), ! ffecom_2 (MINUS_EXPR, arg1_type, ! saved_expr1, ! ffecom_float_half_))); ! #endif ! ! case FFEINTRIN_impSIGN: ! /* r__1 = r_sign(&r1, &r2); */ ! saved_expr1 = ffecom_save_tree (ffecom_1 (ABS_EXPR, tree_type, ! ffecom_expr (arg1))); ! expr_tree ! = ffecom_3 (COND_EXPR, tree_type, ! ffecom_truth_value ! (ffecom_2 (GE_EXPR, integer_type_node, ! ffecom_expr (arg2), ! ffecom_float_zero_)), ! saved_expr1, ! ffecom_1 (NEGATE_EXPR, tree_type, saved_expr1)); ! /* Make sure SAVE_EXPRs get referenced early enough. */ ! expr_tree ! = ffecom_2 (COMPOUND_EXPR, tree_type, ! convert (void_type_node, saved_expr1), ! expr_tree); ! return expr_tree; ! ! case FFEINTRIN_impSIN: ! /* r__1 = sin(r1); */ ! ix = FFECOM_gfrtL_SIN; ! goto library; /* :::::::::::::::::::: */ ! ! case FFEINTRIN_impSINH: ! /* r__1 = sinh(r1); */ ! ix = FFECOM_gfrtL_SINH; ! goto library; /* :::::::::::::::::::: */ ! ! case FFEINTRIN_impSQRT: ! /* r__1 = sqrt(r1); */ ! ix = FFECOM_gfrtL_SQRT; ! goto library; /* :::::::::::::::::::: */ ! ! case FFEINTRIN_impTAN: ! /* r__1 = tan(r1); */ ! ix = FFECOM_gfrtL_TAN; ! goto library; /* :::::::::::::::::::: */ ! ! case FFEINTRIN_impTANH: ! /* r__1 = tanh(r1); */ ! ix = FFECOM_gfrtL_TANH; ! goto library; /* :::::::::::::::::::: */ ! ! case FFEINTRIN_imp_CMPLX_C: ! case FFEINTRIN_imp_DCMPLX_E: ! /* d__1 = c1.r; d__2 = c2.r; q__1.r = d__1, q__1.i = d__2; */ ! if (arg2 == NULL) ! { /* Only one arg, just use it! */ ! expr_tree = ffecom_expr (arg1); ! return expr_tree; ! } ! real_type = ffecom_tree_type[FFEINFO_basictypeREAL][kt]; ! return ! ffecom_2 (COMPLEX_EXPR, tree_type, ! ffecom_1 (REALPART_EXPR, real_type, ! ffecom_expr (arg1)), ! ffecom_1 (REALPART_EXPR, real_type, ! ffecom_expr (arg2))); ! ! case FFEINTRIN_imp_CMPLX_D: ! case FFEINTRIN_imp_DCMPLX_R: ! /* d__1 = d1; d__2 = d2; q__1.r = d__1, q__1.i = d__2; */ ! real_type = ffecom_tree_type[FFEINFO_basictypeREAL][kt]; ! return ! ffecom_2 (COMPLEX_EXPR, tree_type, ! convert (real_type, ffecom_expr (arg1)), ! convert (real_type, ! (arg2 == NULL) ? ffecom_float_zero_ ! : ffecom_expr (arg2))); ! ! case FFEINTRIN_imp_CMPLX_E: ! case FFEINTRIN_imp_DCMPLX_C: ! { ! tree real_part; ! tree imag_part; ! ! real_type = ffecom_tree_type[FFEINFO_basictypeREAL][kt]; ! real_part = ffecom_expr (arg1); ! if (arg2 == NULL) ! imag_part = real_part; ! else ! imag_part = ffecom_expr (arg2); ! real_part = ffecom_1 (REALPART_EXPR, ! TREE_TYPE (TREE_TYPE (real_part)), ! real_part); ! imag_part = ffecom_1 ((arg2 == NULL) ! ? IMAGPART_EXPR : REALPART_EXPR, ! TREE_TYPE (TREE_TYPE (imag_part)), ! imag_part); ! return ! ffecom_2 (COMPLEX_EXPR, tree_type, ! convert (real_type, real_part), ! convert (real_type, imag_part)); ! } ! ! case FFEINTRIN_imp_CMPLX_I: ! case FFEINTRIN_imp_DCMPLX_I: ! /* d__1 = (real) i1; d__2 = (real) i2; q__1.r = d__1, q__1.i = d__2; */ ! real_type = ffecom_tree_type[FFEINFO_basictypeREAL][kt]; ! return ! ffecom_2 (COMPLEX_EXPR, tree_type, ! convert (real_type, ! ffecom_expr (arg1)), ! convert (real_type, ! (arg2 == NULL) ! ? ffecom_float_zero_ ! : ffecom_expr (arg2))); ! ! case FFEINTRIN_imp_CMPLX_R: ! case FFEINTRIN_imp_DCMPLX_D: ! /* q__1.r = r1, q__1.i = r2; */ ! real_type = ffecom_tree_type[FFEINFO_basictypeREAL][kt]; ! return ! ffecom_2 (COMPLEX_EXPR, tree_type, ! ffecom_expr (arg1), ! (arg2 == NULL) ? convert (real_type, ffecom_float_zero_) ! : ffecom_expr (arg2)); ! case FFEINTRIN_imp_DBLE_C: ! case FFEINTRIN_imp_REAL_E: ! /* d__1 = (doublereal) c1.r; */ ! expr_tree = ffecom_expr (arg1); ! return ! convert (tree_type, ! ffecom_1 (REALPART_EXPR, TREE_TYPE (TREE_TYPE (expr_tree)), ! expr_tree)); ! case FFEINTRIN_imp_DBLE_D: ! /* */ ! return ffecom_expr (arg1); ! case FFEINTRIN_imp_DBLE_I: ! /* d__1 = (doublereal) i1; */ ! return convert (tree_type, ffecom_expr (arg1)); ! case FFEINTRIN_imp_DBLE_R: ! /* d__1 = (doublereal) r1; */ return convert (tree_type, ffecom_expr (arg1)); ! case FFEINTRIN_imp_INT_C: ! case FFEINTRIN_imp_INT_E: ! /* i__1 = (integer) c1.r; */ ! real_type = ffecom_tree_type[FFEINFO_basictypeREAL] ! [ffeinfo_kindtype (ffebld_info (arg1))]; ! return convert (tree_type, ! ffecom_1 (REALPART_EXPR, real_type, ! ffecom_expr (arg1))); ! ! case FFEINTRIN_imp_INT_D: ! /* i__1 = (integer) d1; */ ! return convert (tree_type, ffecom_expr (arg1)); ! case FFEINTRIN_imp_INT_I: ! /* */ ! return ffecom_expr (arg1); ! case FFEINTRIN_imp_INT_R: ! /* i__1 = (integer) r1; */ ! return convert (tree_type, ffecom_expr (arg1)); ! case FFEINTRIN_imp_REAL_C: ! case FFEINTRIN_imp_DBLE_E: ! /* r__1 = c1.r; */ ! return ffecom_1 (REALPART_EXPR, tree_type, ffecom_expr (arg1)); ! case FFEINTRIN_imp_REAL_D: ! /* r__1 = d1; */ ! return convert (tree_type, ffecom_expr (arg1)); ! case FFEINTRIN_imp_REAL_I: ! /* r__1 = (real) i1; */ ! return convert (tree_type, ffecom_expr (arg1)); ! case FFEINTRIN_imp_REAL_R: ! /* */ ! return ffecom_expr (arg1); case FFEINTRIN_impIAND: - case FFEINTRIN_imp_AND_L: return ffecom_2 (BIT_AND_EXPR, tree_type, ! ffecom_expr (arg1), ! ffecom_expr (arg2)); case FFEINTRIN_impIOR: - case FFEINTRIN_imp_OR_L: return ffecom_2 (BIT_IOR_EXPR, tree_type, ! ffecom_expr (arg1), ! ffecom_expr (arg2)); case FFEINTRIN_impIEOR: - case FFEINTRIN_imp_XOR_L: return ffecom_2 (BIT_XOR_EXPR, tree_type, ! ffecom_expr (arg1), ! ffecom_expr (arg2)); ! case FFEINTRIN_imp_LSHIFT_I: ! case FFEINTRIN_imp_LSHIFT_L: return ffecom_2 (LSHIFT_EXPR, tree_type, ffecom_expr (arg1), ! ffecom_expr (arg2)); ! case FFEINTRIN_imp_RSHIFT_I: ! case FFEINTRIN_imp_RSHIFT_L: return ffecom_2 (RSHIFT_EXPR, tree_type, ffecom_expr (arg1), ! ffecom_expr (arg2)); case FFEINTRIN_impNOT: - case FFEINTRIN_imp_NOT_L: return ffecom_1 (BIT_NOT_EXPR, tree_type, ffecom_expr (arg1)); --- 3399,3690 ---- case FFEINTRIN_impLGE: break; case FFEINTRIN_impLGT: break; case FFEINTRIN_impLLE: break; case FFEINTRIN_impLLT: break; ! case FFEINTRIN_impLOG: /* For impALOG, impCLOG, impCDLOG, impDLOG. */ ! if (bt == FFEINFO_basictypeCOMPLEX) { ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtCLOG; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtCDLOG; ! else ! { ! assert ("bad LOG COMPLEX kind type" == NULL); ! ix = FFECOM_gfrt; ! } } ! else { ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtL_LOG; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtL_LOG; ! else ! { ! assert ("bad LOG REAL kind type" == NULL); ! ix = FFECOM_gfrt; ! } } ! goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impLOG10: /* For impALOG10, impDLOG10. */ ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtALOG10; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtDLOG10; ! else { ! assert ("bad LOG10 kind type" == NULL); ! ix = FFECOM_gfrt; } ! goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impMAX: /* Plus impAMAX0, impAMAX1, impDMAX1, ! impMAX0, impMAX1. */ ! if (bt != ffeinfo_basictype (ffebld_info (arg1))) ! arg1_type = ffecom_widest_expr_type_ (ffebld_right (expr)); ! else ! arg1_type = tree_type; ! expr_tree = ffecom_2 (MAX_EXPR, arg1_type, ! convert (arg1_type, ffecom_expr (arg1)), ! convert (arg1_type, ffecom_expr (arg2))); ! for (; list != NULL; list = ffebld_trail (list)) { ! if ((ffebld_head (list) == NULL) ! || (ffebld_op (ffebld_head (list)) == FFEBLD_opANY)) continue; ! expr_tree = ffecom_2 (MAX_EXPR, arg1_type, ! expr_tree, ! convert (arg1_type, ! ffecom_expr (ffebld_head (list)))); ! } ! return convert (tree_type, expr_tree); ! case FFEINTRIN_impMIN: /* Plus impAMIN0, impAMIN1, impDMIN1, ! impMIN0, impMIN1. */ ! if (bt != ffeinfo_basictype (ffebld_info (arg1))) ! arg1_type = ffecom_widest_expr_type_ (ffebld_right (expr)); ! else ! arg1_type = tree_type; ! expr_tree = ffecom_2 (MIN_EXPR, arg1_type, ! convert (arg1_type, ffecom_expr (arg1)), ! convert (arg1_type, ffecom_expr (arg2))); ! for (; list != NULL; list = ffebld_trail (list)) ! { ! if ((ffebld_head (list) == NULL) ! || (ffebld_op (ffebld_head (list)) == FFEBLD_opANY)) ! continue; ! expr_tree = ffecom_2 (MIN_EXPR, arg1_type, ! expr_tree, ! convert (arg1_type, ! ffecom_expr (ffebld_head (list)))); ! } ! return convert (tree_type, expr_tree); ! case FFEINTRIN_impMOD: ! if (bt == FFEINFO_basictypeREAL) ! { ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtAMOD; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtDMOD; ! else ! { ! assert ("bad DMOD REAL kind type" == NULL); ! ix = FFECOM_gfrt; ! } ! goto library; /* :::::::::::::::::::: */ ! } ! return ffecom_2 (TRUNC_MOD_EXPR, tree_type, ! convert (tree_type, ffecom_expr (arg1)), ! convert (tree_type, ffecom_expr (arg2))); ! case FFEINTRIN_impNINT: /* Plus IDNINT. */ ! #if 0 /* ~~ ideally FIX_ROUND_EXPR would be ! implemented, but it ain't yet */ ! return ffecom_1 (FIX_ROUND_EXPR, tree_type, ffecom_expr (arg1)); ! #else ! /* i__1 = r1 >= 0 ? floor(r1 + .5) : -floor(.5 - r1); */ ! saved_expr1 = ffecom_save_tree (ffecom_expr (arg1)); ! return ! convert (ffecom_integer_type_node, ! ffecom_3 (COND_EXPR, arg1_type, ! ffecom_truth_value ! (ffecom_2 (GE_EXPR, integer_type_node, ! saved_expr1, ! convert (arg1_type, ! ffecom_float_zero_))), ! ffecom_2 (PLUS_EXPR, arg1_type, ! saved_expr1, ! convert (arg1_type, ! ffecom_float_half_)), ! ffecom_2 (MINUS_EXPR, arg1_type, ! saved_expr1, ! convert (arg1_type, ! ffecom_float_half_)))); ! #endif ! case FFEINTRIN_impREAL: return convert (tree_type, ffecom_expr (arg1)); ! case FFEINTRIN_impSIGN: /* Plus impDSIGN, impISIGN. */ ! { ! tree arg2_tree = ffecom_expr (arg2); ! saved_expr1 ! = ffecom_save_tree ! (ffecom_1 (ABS_EXPR, tree_type, ! convert (tree_type, ! ffecom_expr (arg1)))); ! expr_tree ! = ffecom_3 (COND_EXPR, tree_type, ! ffecom_truth_value ! (ffecom_2 (GE_EXPR, integer_type_node, ! arg2_tree, ! convert (TREE_TYPE (arg2_tree), ! integer_zero_node))), ! saved_expr1, ! ffecom_1 (NEGATE_EXPR, tree_type, saved_expr1)); ! /* Make sure SAVE_EXPRs get referenced early enough. */ ! expr_tree ! = ffecom_2 (COMPOUND_EXPR, tree_type, ! convert (void_type_node, saved_expr1), ! expr_tree); ! } ! return expr_tree; ! case FFEINTRIN_impSIN: /* Plus impCSIN, impCDSIN, impDSIN. */ ! if (bt == FFEINFO_basictypeCOMPLEX) ! { ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtCSIN; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtCDSIN; ! else ! { ! assert ("bad SIN COMPLEX kind type" == NULL); ! ix = FFECOM_gfrt; ! } ! } ! else ! { ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtL_SIN; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtL_SIN; ! else ! { ! assert ("bad SIN REAL kind type" == NULL); ! ix = FFECOM_gfrt; ! } ! } ! goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impSINH: /* Plus impDSINH. */ ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtL_SINH; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtL_SINH; ! else ! { ! assert ("bad SINH kind type" == NULL); ! ix = FFECOM_gfrt; ! } ! goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impSQRT: /* Plus impCSQRT, impCDSQRT, impDSQRT. */ ! if (bt == FFEINFO_basictypeCOMPLEX) ! { ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtCSQRT; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtCDSQRT; ! else ! { ! assert ("bad SQRT COMPLEX kind type" == NULL); ! ix = FFECOM_gfrt; ! } ! } ! else ! { ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtL_SQRT; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtL_SQRT; ! else ! { ! assert ("bad SQRT REAL kind type" == NULL); ! ix = FFECOM_gfrt; ! } ! } ! goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impTAN: /* Plus impDTAN. */ ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtL_TAN; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtL_TAN; ! else ! { ! assert ("bad TAN kind type" == NULL); ! ix = FFECOM_gfrt; ! } ! goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impTANH: /* Plus impDTANH. */ ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtL_TANH; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtL_TANH; ! else ! { ! assert ("bad TANH kind type" == NULL); ! ix = FFECOM_gfrt; ! } ! goto library; /* :::::::::::::::::::: */ case FFEINTRIN_impIAND: return ffecom_2 (BIT_AND_EXPR, tree_type, ! convert (tree_type, ! ffecom_expr (arg1)), ! convert (tree_type, ! ffecom_expr (arg2))); case FFEINTRIN_impIOR: return ffecom_2 (BIT_IOR_EXPR, tree_type, ! convert (tree_type, ! ffecom_expr (arg1)), ! convert (tree_type, ! ffecom_expr (arg2))); case FFEINTRIN_impIEOR: return ffecom_2 (BIT_XOR_EXPR, tree_type, ! convert (tree_type, ! ffecom_expr (arg1)), ! convert (tree_type, ! ffecom_expr (arg2))); ! case FFEINTRIN_impLSHIFT: return ffecom_2 (LSHIFT_EXPR, tree_type, ffecom_expr (arg1), ! convert (integer_type_node, ! ffecom_expr (arg2))); ! case FFEINTRIN_impRSHIFT: return ffecom_2 (RSHIFT_EXPR, tree_type, ffecom_expr (arg1), ! convert (integer_type_node, ! ffecom_expr (arg2))); case FFEINTRIN_impNOT: return ffecom_1 (BIT_NOT_EXPR, tree_type, ffecom_expr (arg1)); *************** ffecom_expr_intrinsic_ (ffebld expr, tre *** 3765,3769 **** convert (arg1_type, integer_one_node), ! ffecom_expr (arg2))), convert (arg1_type, integer_zero_node))), --- 3719,3724 ---- convert (arg1_type, integer_one_node), ! convert (integer_type_node, ! ffecom_expr (arg2)))), convert (arg1_type, integer_zero_node))), *************** ffecom_expr_intrinsic_ (ffebld expr, tre *** 3794,3798 **** ffecom_2 (RSHIFT_EXPR, tree_type, ffecom_expr (arg1), ! ffecom_expr (arg2)), convert (tree_type, ffecom_2 (RSHIFT_EXPR, uns_type, --- 3749,3754 ---- ffecom_2 (RSHIFT_EXPR, tree_type, ffecom_expr (arg1), ! convert (integer_type_node, ! ffecom_expr (arg2))), convert (tree_type, ffecom_2 (RSHIFT_EXPR, uns_type, *************** ffecom_expr_intrinsic_ (ffebld expr, tre *** 4116,4127 **** return expr_tree; ! case FFEINTRIN_impERF: ! case FFEINTRIN_impDERF: ! ix = FFECOM_gfrtL_ERF; goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impERFC: ! case FFEINTRIN_impDERFC: ! ix = FFECOM_gfrtL_ERFC; goto library; /* :::::::::::::::::::: */ --- 4072,4097 ---- return expr_tree; ! case FFEINTRIN_impERF: /* Plus impDERF. */ ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtL_ERF; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtL_ERF; ! else ! { ! assert ("bad ERF kind type" == NULL); ! ix = FFECOM_gfrt; ! } goto library; /* :::::::::::::::::::: */ ! case FFEINTRIN_impERFC: /* Plus impDERFC. */ ! if (kt == FFEINFO_kindtypeREAL1) ! ix = FFECOM_gfrtL_ERFC; ! else if (kt == FFEINFO_kindtypeREAL2) ! ix = FFECOM_gfrtL_ERFC; ! else ! { ! assert ("bad ERFC kind type" == NULL); ! ix = FFECOM_gfrt; ! } goto library; /* :::::::::::::::::::: */ *************** ffecom_expr_intrinsic_ (ffebld expr, tre *** 4142,4146 **** ffecom_push_calltemps (); ! arg1_tree = ffecom_ptr_to_expr (arg1); /* Pass procedure as a pointer to it, anything else by value. */ --- 4112,4120 ---- ffecom_push_calltemps (); ! arg1_tree = convert (ffecom_f2c_integer_type_node, ! ffecom_expr (arg1)); ! arg1_tree = ffecom_1 (ADDR_EXPR, ! build_pointer_type (TREE_TYPE (arg1_tree)), ! arg1_tree); /* Pass procedure as a pointer to it, anything else by value. */ *************** ffecom_expr_intrinsic_ (ffebld expr, tre *** 4241,4247 **** case FFEINTRIN_impFLUSH: - if (arg1 == NULL) - break; - /* Ignore the arg, since the library has no use for it yet. */ return --- 4215,4218 ---- *************** ffecom_expr_intrinsic_ (ffebld expr, tre *** 4259,4302 **** default: assert ("unimplemented intrinsic" == NULL); return error_mark_node; } - ffecom_push_calltemps (); - expr_tree = ffecom_list_ptr_to_expr (ffebld_right (expr)); - ffecom_pop_calltemps (); - ix = ffeintrin_gfrt (ffebld_symter_implementation (ffebld_left (expr))); - assert (ix != FFECOM_gfrt); /* Must have an implementation! */ - return ffecom_call_ (ffecom_gfrt_tree_ (ix), ffecom_gfrt_kind_type_ (ix), - (ffe_is_f2c_library () && ffecom_gfrt_complex_[ix]), - tree_type, - expr_tree, dest_tree, dest, dest_used, - NULL_TREE, TRUE); library: /* :::::::::::::::::::: */ ! /* First promote all REAL arguments to DOUBLE PRECISION, since all args to ! C library functions are double. */ ! ! for (list = ffebld_right (expr); list != NULL; list = ffebld_trail (list)) ! { ! ffebld arg = ffebld_head (list); ! ! if ((arg == NULL) ! || (ffeinfo_basictype (ffebld_info (arg)) != FFEINFO_basictypeREAL)) ! continue; ! if (ffeinfo_kindtype (ffebld_info (arg)) != FFEINFO_kindtypeREAL1) ! continue; ! ffebld_set_head (list, ! ffeexpr_convert (arg, NULL, NULL, ! FFEINFO_basictypeREAL, ! FFEINFO_kindtypeREALDOUBLE, 0, ! FFETARGET_charactersizeNONE, ! FFEEXPR_contextLET)); ! } ffecom_push_calltemps (); ! expr_tree = ffecom_list_expr (ffebld_right (expr)); ffecom_pop_calltemps (); --- 4230,4249 ---- default: + fprintf (stderr, "No %s implementation.\n", + ffeintrin_name_implementation (ffeintrin_codegen_imp + (ffebld_symter_implementation (ffebld_left (expr))))); assert ("unimplemented intrinsic" == NULL); return error_mark_node; } ix = ffeintrin_gfrt (ffebld_symter_implementation (ffebld_left (expr))); library: /* :::::::::::::::::::: */ ! assert (ix != FFECOM_gfrt); /* Must have an implementation! */ ffecom_push_calltemps (); ! expr_tree = ffecom_arglist_expr_ (ffecom_gfrt_args_ (ix), ! ffebld_right (expr)); ffecom_pop_calltemps (); *************** ffecom_expr_power_integer_ (ffebld left, *** 5211,5218 **** or not do optimally), don't bother with any multiplying. */ ! return ffecom_tree_divide_ (ltype, ! convert (ltype, integer_one_node), ! l, ! NULL_TREE, NULL, NULL); } --- 5158,5171 ---- or not do optimally), don't bother with any multiplying. */ ! result = ffecom_tree_divide_ (ltype, ! convert (ltype, integer_one_node), ! l, ! NULL_TREE, NULL, NULL); ! r = ffecom_1 (NEGATE_EXPR, ! rtype, ! r); ! if ((TREE_INT_CST_LOW (r) & 1) == 0) ! result = ffecom_1 (ABS_EXPR, rtype, ! result); } *************** ffecom_expr_power_integer_ (ffebld left, *** 5271,5301 **** } if (ffecom_transform_only_dummies_) ! { ! /* Though rhs isn't a constant, in-line code cannot be expanded ! here because the back end cannot be easily convinced to generate ! stores (MODIFY_EXPR), handle temporaries, and so on before ! all the appropriate rtx's have been generated for things like ! dummy args referenced in rhs -- which doesn't happen until ! store_parm_decls() is called (expand_function_start, I believe, ! does the actual rtx-stuffing of PARM_DECLs). ! ! So, in this case, generate the call to the run-time-library ! function to evaluate the power for us. */ ! ! assert (ffeinfo_kindtype (ffebld_info (left)) ! == FFEINFO_kindtypeINTEGER1); ! assert (ffeinfo_kindtype (ffebld_info (right)) ! == FFEINFO_kindtypeINTEGER1); ! ! l = build_tree_list (NULL_TREE, l); ! r = build_tree_list (NULL_TREE, r); ! TREE_CHAIN (l) = r; ! ! return ffecom_call_ (ffecom_gfrt_tree_ (FFECOM_gfrtPOW_II), ! ffecom_gfrt_kind_type_ (FFECOM_gfrtPOW_II), ! FALSE, ltype, l, ! NULL_TREE, NULL, NULL, NULL_TREE, TRUE); ! } /* Right-hand operand not a constant, expand in-line code to figure --- 5224,5241 ---- } + /* Though rhs isn't a constant, in-line code cannot be expanded + while transforming dummies + because the back end cannot be easily convinced to generate + stores (MODIFY_EXPR), handle temporaries, and so on before + all the appropriate rtx's have been generated for things like + dummy args referenced in rhs -- which doesn't happen until + store_parm_decls() is called (expand_function_start, I believe, + does the actual rtx-stuffing of PARM_DECLs). + + So, in this case, let the caller generate the call to the + run-time-library function to evaluate the power for us. */ + if (ffecom_transform_only_dummies_) ! return NULL_TREE; /* Right-hand operand not a constant, expand in-line code to figure *************** ffecom_expr_power_integer_ (ffebld left, *** 5315,5319 **** if ((basetypeof (l) == basetypeof (int)) && (rtmp < 0)) ! result = ((typeof (l)) 1) / ltmp; else { --- 5255,5263 ---- if ((basetypeof (l) == basetypeof (int)) && (rtmp < 0)) ! { ! result = ((typeof (l)) 1) / ltmp; ! if ((ltmp < 0) && (((-rtmp) & 1) == 0)) ! result = -result; ! } else { *************** ffecom_expr_power_integer_ (ffebld left, *** 5387,5406 **** convert (ltype, integer_one_node))); expand_start_else (); ! expand_start_cond (ffecom_truth_value ! (ffecom_2 (TRUTH_ANDIF_EXPR, integer_type_node, ! basetypeof_l_is_int, ! ffecom_2 (LT_EXPR, integer_type_node, ! rtmp, ! convert (rtype, ! integer_zero_node)))), ! 0); ! expand_expr_stmt (ffecom_modify (void_type_node, ! result, ! ffecom_tree_divide_ ! (ltype, ! convert (ltype, integer_one_node), ! ltmp, ! NULL_TREE, NULL, NULL))); ! expand_start_else (); expand_expr_stmt (ffecom_modify (void_type_node, result, --- 5331,5373 ---- convert (ltype, integer_one_node))); expand_start_else (); ! if (!integer_zerop (basetypeof_l_is_int)) ! { ! expand_start_cond (ffecom_2 (LT_EXPR, integer_type_node, ! rtmp, ! convert (rtype, ! integer_zero_node)), ! 0); ! expand_expr_stmt (ffecom_modify (void_type_node, ! result, ! ffecom_tree_divide_ ! (ltype, ! convert (ltype, integer_one_node), ! ltmp, ! NULL_TREE, NULL, NULL))); ! expand_start_cond (ffecom_truth_value ! (ffecom_2 (TRUTH_ANDIF_EXPR, integer_type_node, ! ffecom_2 (LT_EXPR, integer_type_node, ! ltmp, ! convert (ltype, ! integer_zero_node)), ! ffecom_2 (EQ_EXPR, integer_type_node, ! ffecom_2 (BIT_AND_EXPR, ! rtype, ! ffecom_1 (NEGATE_EXPR, ! rtype, ! rtmp), ! convert (rtype, ! integer_one_node)), ! convert (rtype, ! integer_zero_node)))), ! 0); ! expand_expr_stmt (ffecom_modify (void_type_node, ! result, ! ffecom_1 (NEGATE_EXPR, ! ltype, ! result))); ! expand_end_cond (); ! expand_start_else (); ! } expand_expr_stmt (ffecom_modify (void_type_node, result, *************** ffecom_expr_power_integer_ (ffebld left, *** 5472,5476 **** expand_end_loop (); expand_end_cond (); ! expand_end_cond (); expand_expr_stmt (result); --- 5439,5444 ---- expand_end_loop (); expand_end_cond (); ! if (!integer_zerop (basetypeof_l_is_int)) ! expand_end_cond (); expand_expr_stmt (result); *************** ffecom_f2c_make_type_ (tree *type, int t *** 5599,5602 **** --- 5567,5571 ---- *type = make_node (COMPLEX_TYPE); TREE_TYPE (*type) = ffecom_f2c_real_type_node; + layout_type (*type); break; *************** ffecom_f2c_make_type_ (tree *type, int t *** 5604,5607 **** --- 5573,5577 ---- *type = make_node (COMPLEX_TYPE); TREE_TYPE (*type) = ffecom_f2c_doublereal_type_node; + layout_type (*type); break; *************** ffecom_get_external_identifier_ (ffesymb *** 5785,5789 **** return get_identifier (name); ! us = FFETARGET_defaultUNDERSCORED_EXTERNAL_UNDERSCORED ? (strchr (name, '_') != NULL) : 0; --- 5755,5759 ---- return get_identifier (name); ! us = ffe_is_second_underscore () ? (strchr (name, '_') != NULL) : 0; *************** ffecom_get_identifier_ (char *name) *** 5815,5822 **** if (!ffe_is_underscoring () ! || (strchr (name, '_') != NULL) == 0) return get_identifier (name); ! return ffecom_get_appended_identifier_ (FFETARGET_defaultUNDERSCORED_EXTERNAL_UNDERSCORED, name); } --- 5785,5792 ---- if (!ffe_is_underscoring () ! || (strchr (name, '_') == NULL)) return get_identifier (name); ! return ffecom_get_appended_identifier_ (ffe_is_second_underscore (), name); } *************** ffecom_gfrt_kind_type_ (ffecomGfrt ix) *** 5982,5985 **** --- 5952,5963 ---- #endif #if FFECOM_targetCURRENT == FFECOM_targetGCC + static char * + ffecom_gfrt_args_ (ffecomGfrt ix) + { + return ffecom_gfrt_argstring_[ix]; + } + + #endif + #if FFECOM_targetCURRENT == FFECOM_targetGCC static tree ffecom_gfrt_tree_ (ffecomGfrt ix) *************** ffecom_gfrt_tree_ (ffecomGfrt ix) *** 5998,6002 **** #if FFECOM_targetCURRENT == FFECOM_targetGCC static tree ! ffecom_init_local_zero_ (tree decl) { tree init; --- 5976,5980 ---- #if FFECOM_targetCURRENT == FFECOM_targetGCC static tree ! ffecom_init_zero_ (tree decl) { tree init; *************** ffecom_init_local_zero_ (tree decl) *** 6014,6019 **** if (TREE_PERMANENT (decl)) end_temporary_allocation (); ! make_decl_rtl (decl, NULL, 0); ! assemble_variable (decl, 0, 0, 1); pop_obstacks (); resume_momentary (momentary); --- 5992,5997 ---- if (TREE_PERMANENT (decl)) end_temporary_allocation (); ! make_decl_rtl (decl, NULL, TREE_PUBLIC (decl) ? 1 : 0); ! assemble_variable (decl, TREE_PUBLIC (decl) ? 1 : 0, 0, 1); pop_obstacks (); resume_momentary (momentary); *************** ffecom_make_gfrt_ (ffecomGfrt ix) *** 6546,6549 **** --- 6524,6532 ---- break; + case FFECOM_rttypeLONGINT_: + ttype = ffecom_f2c_longint_type_node; + kt = FFEINFO_kindtypeINTEGER4; + break; + case FFECOM_rttypeLOGICAL_: ttype = ffecom_f2c_logical_type_node; *************** ffecom_sym_transform_ (ffesymbol s) *** 7066,7071 **** tree type; ! assert (st != NULL); ! if (ffestorag_size (st) == 0) { t = error_mark_node; --- 7049,7054 ---- tree type; ! if ((st != NULL) ! && (ffestorag_size (st) == 0)) { t = error_mark_node; *************** ffecom_sym_transform_ (ffesymbol s) *** 7077,7081 **** resume_momentary (yes); ! if (ffestorag_parent (st) != NULL) { /* Child of EQUIVALENCE parent. */ ffestorag est; --- 7060,7065 ---- resume_momentary (yes); ! if ((st != NULL) ! && (ffestorag_parent (st) != NULL)) { /* Child of EQUIVALENCE parent. */ ffestorag est; *************** ffecom_sym_transform_ (ffesymbol s) *** 7117,7122 **** { tree initexpr; ! bool init = (ffesymbol_init (s) != NULL) ! && (ffebld_op (ffesymbol_init (s)) != FFEBLD_opANY); yes = suspend_momentary (); --- 7101,7105 ---- { tree initexpr; ! bool init = ffesymbol_is_init (s); yes = suspend_momentary (); *************** ffecom_sym_transform_ (ffesymbol s) *** 7129,7138 **** || ffesymbol_namelisted (s) #ifdef FFECOM_sizeMAXSTACKITEM ! || (ffestorag_size (st) > FFECOM_sizeMAXSTACKITEM) #endif || ((ffecom_primary_entry_kind_ != FFEINFO_kindPROGRAM) && (ffecom_primary_entry_kind_ != FFEINFO_kindBLOCKDATA) ! && (ffesymbol_save (s) || ffe_is_saveall ()))) TREE_STATIC (t) = 1; /* SAVEd in proc, make static. */ else --- 7112,7122 ---- || ffesymbol_namelisted (s) #ifdef FFECOM_sizeMAXSTACKITEM ! || ((st != NULL) ! && (ffestorag_size (st) > FFECOM_sizeMAXSTACKITEM)) #endif || ((ffecom_primary_entry_kind_ != FFEINFO_kindPROGRAM) && (ffecom_primary_entry_kind_ != FFEINFO_kindBLOCKDATA) ! && (ffesymbol_is_save (s) || ffe_is_saveall ()))) TREE_STATIC (t) = 1; /* SAVEd in proc, make static. */ else *************** ffecom_sym_transform_ (ffesymbol s) *** 7150,7156 **** if (init) ! initexpr = ffecom_expr (ffesymbol_init (s)); else if (ffe_is_init_local_zero ()) ! initexpr = ffecom_init_local_zero_ (t); else initexpr = NULL_TREE; /* Not ref'd if !init. */ --- 7134,7145 ---- if (init) ! { ! if (ffesymbol_init (s) != NULL) ! initexpr = ffecom_expr (ffesymbol_init (s)); ! else ! initexpr = ffecom_init_zero_ (t); ! } else if (ffe_is_init_local_zero ()) ! initexpr = ffecom_init_zero_ (t); else initexpr = NULL_TREE; /* Not ref'd if !init. */ *************** ffecom_sym_transform_ (ffesymbol s) *** 7158,7164 **** finish_decl (t, initexpr, FALSE); ! assert (ffestorag_size (st) * BITS_PER_UNIT ! == (unsigned long int) ! TREE_INT_CST_LOW (DECL_SIZE (t))); resume_momentary (yes); --- 7147,7154 ---- finish_decl (t, initexpr, FALSE); ! if (st != NULL) ! assert (ffestorag_size (st) * BITS_PER_UNIT ! == (unsigned long int) ! TREE_INT_CST_LOW (DECL_SIZE (t))); resume_momentary (yes); *************** ffecom_sym_transform_assign_ (ffesymbol *** 7961,7968 **** 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 --- 7951,7957 ---- K even given "EQUIVALENCE (J,K)"), there's no size issue to worry about, etc. */ ! if ((ffesymbol_is_save (s) || ffe_is_saveall ()) && (ffecom_primary_entry_kind_ != FFEINFO_kindPROGRAM) ! && (ffecom_primary_entry_kind_ != FFEINFO_kindBLOCKDATA)) TREE_STATIC (t) = 1; /* SAVEd in proc, make static. */ else *************** ffecom_transform_common_ (ffesymbol s) *** 8040,8045 **** tree cbtype; tree init; ! bool is_init = (ffestorag_init (st) != NULL) ! && (ffebld_op (ffestorag_init (st)) != FFEBLD_opANY); assert (st != NULL); --- 8029,8033 ---- tree cbtype; tree init; ! bool is_init = ffestorag_is_init (st); assert (st != NULL); *************** ffecom_transform_common_ (ffesymbol s) *** 8068,8078 **** if (is_init) { ! init = ffecom_expr (ffestorag_init (st)); ! if (init == error_mark_node) ! { /* Hopefully the back end complained! */ ! init = NULL_TREE; ! if (cbt != NULL_TREE) ! return; } } else --- 8056,8071 ---- if (is_init) { ! if (ffestorag_init (st) != NULL) ! { ! init = ffecom_expr (ffestorag_init (st)); ! if (init == error_mark_node) ! { /* Hopefully the back end complained! */ ! init = NULL_TREE; ! if (cbt != NULL_TREE) ! return; ! } } + else + init = error_mark_node; } else *************** ffecom_transform_common_ (ffesymbol s) *** 8100,8117 **** ffecom_get_external_identifier_ (s), cbtype); - DECL_EXTERNAL (cbt) = init ? 0 : 1; TREE_STATIC (cbt) = 1; TREE_PUBLIC (cbt) = 1; - if (init) - DECL_INITIAL (cbt) = error_mark_node; } else { ! assert (init); ! TREE_TYPE (cbt) = cbtype; - DECL_EXTERNAL (cbt) = 0; - DECL_INITIAL (cbt) = error_mark_node; } cbt = start_decl (cbt, TRUE); --- 8093,8106 ---- ffecom_get_external_identifier_ (s), cbtype); TREE_STATIC (cbt) = 1; TREE_PUBLIC (cbt) = 1; } else { ! assert (is_init); TREE_TYPE (cbt) = cbtype; } + DECL_EXTERNAL (cbt) = init ? 0 : 1; + DECL_INITIAL (cbt) = init ? error_mark_node : NULL_TREE; cbt = start_decl (cbt, TRUE); *************** ffecom_transform_common_ (ffesymbol s) *** 8128,8131 **** --- 8117,8123 ---- DECL_ALIGN (cbt) = BIGGEST_ALIGNMENT; + if (is_init && (ffestorag_init (st) == NULL)) + init = ffecom_init_zero_ (cbt); + finish_decl (cbt, init, TRUE); *************** ffecom_transform_equiv_ (ffestorag eqst) *** 8161,8166 **** tree init; tree high; ! bool is_init = (ffestorag_init (eqst) != NULL) ! && (ffebld_op (ffestorag_init (eqst)) != FFEBLD_opANY); int yes; --- 8153,8157 ---- tree init; tree high; ! bool is_init = ffestorag_is_init (eqst); int yes; *************** ffecom_transform_equiv_ (ffestorag eqst) *** 8176,8182 **** if (is_init) { ! init = ffecom_expr (ffestorag_init (eqst)); ! if (init == error_mark_node) ! init = NULL_TREE; /* Hopefully the back end complained! */ } else if (ffe_is_init_local_zero ()) --- 8167,8178 ---- if (is_init) { ! if (ffestorag_init (eqst) != NULL) ! { ! init = ffecom_expr (ffestorag_init (eqst)); ! if (init == error_mark_node) ! init = NULL_TREE; /* Hopefully the back end complained! */ ! } ! else ! init = error_mark_node; } else if (ffe_is_init_local_zero ()) *************** ffecom_transform_equiv_ (ffestorag eqst) *** 8215,8219 **** || ((ffecom_primary_entry_kind_ != FFEINFO_kindPROGRAM) && (ffecom_primary_entry_kind_ != FFEINFO_kindBLOCKDATA) ! && (ffestorag_save (eqst) || ffe_is_saveall ()))) TREE_STATIC (eqt) = 1; else --- 8211,8215 ---- || ((ffecom_primary_entry_kind_ != FFEINFO_kindPROGRAM) && (ffecom_primary_entry_kind_ != FFEINFO_kindBLOCKDATA) ! && (ffestorag_is_save (eqst) || ffe_is_saveall ()))) TREE_STATIC (eqt) = 1; else *************** ffecom_transform_equiv_ (ffestorag eqst) *** 8235,8240 **** DECL_ALIGN (eqt) = BIGGEST_ALIGNMENT; ! if (!is_init && ffe_is_init_local_zero ()) ! init = ffecom_init_local_zero_ (eqt); finish_decl (eqt, init, FALSE); --- 8231,8237 ---- DECL_ALIGN (eqt) = BIGGEST_ALIGNMENT; ! if ((!is_init && ffe_is_init_local_zero ()) ! || (is_init && (ffestorag_init (eqst) == NULL))) ! init = ffecom_init_zero_ (eqt); finish_decl (eqt, init, FALSE); *************** ffecom_type_localvar_ (ffesymbol s, ffei *** 8670,8677 **** ffebld dl; ffebld dim; - ffetargetInteger1 low; - ffetargetInteger1 lowh; - ffetargetInteger1 high; - ffetargetInteger1 highh; tree lowt; tree hight; --- 8667,8670 ---- *************** ffecom_type_localvar_ (ffesymbol s, ffei *** 8695,8718 **** dim = ffebld_head (dl); assert (ffebld_op (dim) == FFEBLD_opBOUNDS); if (ffebld_left (dim) == NULL) ! low = 1, lowh = 0; else ! { ! assert (ffebld_op (ffebld_left (dim)) == FFEBLD_opCONTER); ! low = ffebld_constant_integer1 (ffebld_conter ! (ffebld_left (dim))); ! lowh = (low < 0) ? -1 : 0; ! } ! assert (ffebld_right (dim) != NULL); ! assert (ffebld_op (ffebld_right (dim)) == FFEBLD_opCONTER); ! high = ffebld_constant_integer1 (ffebld_conter ! (ffebld_right (dim))); ! highh = (high < 0) ? -1 : 0; ! lowt = build_int_2 (low, lowh); ! TREE_TYPE (lowt) = ffecom_integer_type_node; ! hight = build_int_2 (high, highh); ! TREE_TYPE (hight) = ffecom_integer_type_node; type = build_array_type (type, --- 8688,8705 ---- dim = ffebld_head (dl); assert (ffebld_op (dim) == FFEBLD_opBOUNDS); + if (ffebld_left (dim) == NULL) ! lowt = integer_one_node; else ! lowt = ffecom_expr (ffebld_left (dim)); ! ! if (TREE_CODE (lowt) != INTEGER_CST) ! lowt = variable_size (lowt); ! assert (ffebld_right (dim) != NULL); ! hight = ffecom_expr (ffebld_right (dim)); ! if (TREE_CODE (hight) != INTEGER_CST) ! hight = variable_size (hight); type = build_array_type (type, *************** ffecom_end_transition () *** 10042,10046 **** if (ffe_is_ffedebug ()) ! fprintf (stdout, "; end_stmt_transition\n"); #if FFECOM_targetCURRENT == FFECOM_targetGCC --- 10029,10033 ---- if (ffe_is_ffedebug ()) ! fprintf (dmpout, "; end_stmt_transition\n"); #if FFECOM_targetCURRENT == FFECOM_targetGCC *************** ffecom_exec_transition () *** 10127,10131 **** if (ffe_is_ffedebug ()) ! fprintf (stdout, "; exec_stmt_transition\n"); inhibited = ffebad_inhibit (); --- 10114,10118 ---- if (ffe_is_ffedebug ()) ! fprintf (dmpout, "; exec_stmt_transition\n"); inhibited = ffebad_inhibit (); *************** ffecom_init_0 () *** 10577,10586 **** type); ffetype_set_kind (base_type, 1, type); ffecom_tree_type[FFEINFO_basictypeHOLLERITH][FFEINFO_kindtypeINTEGER1] = t = make_unsigned_type (FLOAT_TYPE_SIZE); /* HOLLERITH means unsigned. */ ! pushdecl (build_decl (TYPE_DECL, get_identifier ("hollerith"), t)); ffecom_tree_type[FFEINFO_basictypeLOGICAL][FFEINFO_kindtypeLOGICAL1] = t = make_signed_type (FLOAT_TYPE_SIZE); --- 10564,10646 ---- type); ffetype_set_kind (base_type, 1, type); + assert (ffetype_size (type) == sizeof (ffetargetInteger1)); ffecom_tree_type[FFEINFO_basictypeHOLLERITH][FFEINFO_kindtypeINTEGER1] = t = make_unsigned_type (FLOAT_TYPE_SIZE); /* HOLLERITH means unsigned. */ ! pushdecl (build_decl (TYPE_DECL, get_identifier ("unsigned"), ! t)); ! ! ffecom_tree_type[FFEINFO_basictypeINTEGER][FFEINFO_kindtypeINTEGER2] ! = t = make_signed_type (CHAR_TYPE_SIZE); ! pushdecl (build_decl (TYPE_DECL, get_identifier ("byte"), ! t)); ! type = ffetype_new (); ! ffeinfo_set_type (FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER2, ! type); ! ffetype_set_ams (type, ! TYPE_ALIGN (t) / BITS_PER_UNIT, 0, ! TREE_INT_CST_LOW (TYPE_SIZE (t)) / BITS_PER_UNIT); ! ffetype_set_star (base_type, ! TREE_INT_CST_LOW (TYPE_SIZE (t)) / CHAR_TYPE_SIZE, ! type); ! ffetype_set_kind (base_type, 2, type); ! assert (ffetype_size (type) == sizeof (ffetargetInteger2)); ! ! ffecom_tree_type[FFEINFO_basictypeHOLLERITH][FFEINFO_kindtypeINTEGER2] ! = t = make_unsigned_type (CHAR_TYPE_SIZE); ! pushdecl (build_decl (TYPE_DECL, get_identifier ("unsigned byte"), ! t)); ! ! ffecom_tree_type[FFEINFO_basictypeINTEGER][FFEINFO_kindtypeINTEGER3] ! = t = make_signed_type (SHORT_TYPE_SIZE); ! pushdecl (build_decl (TYPE_DECL, get_identifier ("word"), ! t)); ! type = ffetype_new (); ! ffeinfo_set_type (FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER3, ! type); ! ffetype_set_ams (type, ! TYPE_ALIGN (t) / BITS_PER_UNIT, 0, ! TREE_INT_CST_LOW (TYPE_SIZE (t)) / BITS_PER_UNIT); ! ffetype_set_star (base_type, ! TREE_INT_CST_LOW (TYPE_SIZE (t)) / CHAR_TYPE_SIZE, ! type); ! ffetype_set_kind (base_type, 3, type); ! assert (ffetype_size (type) == sizeof (ffetargetInteger3)); ! ! ffecom_tree_type[FFEINFO_basictypeHOLLERITH][FFEINFO_kindtypeINTEGER3] ! = t = make_unsigned_type (SHORT_TYPE_SIZE); ! pushdecl (build_decl (TYPE_DECL, get_identifier ("unsigned word"), ! t)); ! ! ffecom_tree_type[FFEINFO_basictypeINTEGER][FFEINFO_kindtypeINTEGER4] ! = t = make_signed_type (LONG_LONG_TYPE_SIZE); ! pushdecl (build_decl (TYPE_DECL, get_identifier ("integer4"), ! t)); ! type = ffetype_new (); ! ffeinfo_set_type (FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER4, ! type); ! ffetype_set_ams (type, ! TYPE_ALIGN (t) / BITS_PER_UNIT, 0, ! TREE_INT_CST_LOW (TYPE_SIZE (t)) / BITS_PER_UNIT); ! ffetype_set_star (base_type, ! TREE_INT_CST_LOW (TYPE_SIZE (t)) / CHAR_TYPE_SIZE, ! type); ! ffetype_set_kind (base_type, 4, type); ! assert (ffetype_size (type) == sizeof (ffetargetInteger4)); ! ! ffecom_tree_type[FFEINFO_basictypeHOLLERITH][FFEINFO_kindtypeINTEGER4] ! = t = make_unsigned_type (LONG_LONG_TYPE_SIZE); ! pushdecl (build_decl (TYPE_DECL, get_identifier ("unsigned4"), t)); + if (LONG_TYPE_SIZE != FLOAT_TYPE_SIZE + && LONG_TYPE_SIZE != CHAR_TYPE_SIZE + && LONG_TYPE_SIZE != SHORT_TYPE_SIZE + && LONG_TYPE_SIZE != LONG_LONG_TYPE_SIZE) + { + fprintf (stderr, "Sorry, no g77 support for LONG_TYPE_SIZE (%d bits) yet.\n", + LONG_TYPE_SIZE); + } + ffecom_tree_type[FFEINFO_basictypeLOGICAL][FFEINFO_kindtypeLOGICAL1] = t = make_signed_type (FLOAT_TYPE_SIZE); *************** ffecom_init_0 () *** 10598,10601 **** --- 10658,10710 ---- type); ffetype_set_kind (base_type, 1, type); + assert (ffetype_size (type) == sizeof (ffetargetLogical1)); + + ffecom_tree_type[FFEINFO_basictypeLOGICAL][FFEINFO_kindtypeLOGICAL2] + = t = make_signed_type (CHAR_TYPE_SIZE); + pushdecl (build_decl (TYPE_DECL, get_identifier ("logical2"), + t)); + type = ffetype_new (); + ffeinfo_set_type (FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL2, + type); + ffetype_set_ams (type, + TYPE_ALIGN (t) / BITS_PER_UNIT, 0, + TREE_INT_CST_LOW (TYPE_SIZE (t)) / BITS_PER_UNIT); + ffetype_set_star (base_type, + TREE_INT_CST_LOW (TYPE_SIZE (t)) / CHAR_TYPE_SIZE, + type); + ffetype_set_kind (base_type, 2, type); + assert (ffetype_size (type) == sizeof (ffetargetLogical2)); + + ffecom_tree_type[FFEINFO_basictypeLOGICAL][FFEINFO_kindtypeLOGICAL3] + = t = make_signed_type (SHORT_TYPE_SIZE); + pushdecl (build_decl (TYPE_DECL, get_identifier ("logical3"), + t)); + type = ffetype_new (); + ffeinfo_set_type (FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL3, + type); + ffetype_set_ams (type, + TYPE_ALIGN (t) / BITS_PER_UNIT, 0, + TREE_INT_CST_LOW (TYPE_SIZE (t)) / BITS_PER_UNIT); + ffetype_set_star (base_type, + TREE_INT_CST_LOW (TYPE_SIZE (t)) / CHAR_TYPE_SIZE, + type); + ffetype_set_kind (base_type, 3, type); + assert (ffetype_size (type) == sizeof (ffetargetLogical3)); + + ffecom_tree_type[FFEINFO_basictypeLOGICAL][FFEINFO_kindtypeLOGICAL4] + = t = make_signed_type (LONG_LONG_TYPE_SIZE); + pushdecl (build_decl (TYPE_DECL, get_identifier ("logical4"), + t)); + type = ffetype_new (); + ffeinfo_set_type (FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL4, + type); + ffetype_set_ams (type, + TYPE_ALIGN (t) / BITS_PER_UNIT, 0, + TREE_INT_CST_LOW (TYPE_SIZE (t)) / BITS_PER_UNIT); + ffetype_set_star (base_type, + TREE_INT_CST_LOW (TYPE_SIZE (t)) / CHAR_TYPE_SIZE, + type); + ffetype_set_kind (base_type, 4, type); + assert (ffetype_size (type) == sizeof (ffetargetLogical4)); ffecom_tree_type[FFEINFO_basictypeREAL][FFEINFO_kindtypeREAL1] *************** ffecom_init_0 () *** 10618,10621 **** --- 10727,10731 ---- ffecom_f2c_typecode_[FFEINFO_basictypeREAL][FFEINFO_kindtypeREAL1] = FFETARGET_f2cTYREAL; + assert (ffetype_size (type) == sizeof (ffetargetReal1)); ffecom_tree_type[FFEINFO_basictypeREAL][FFEINFO_kindtypeREALDOUBLE] *************** ffecom_init_0 () *** 10637,10640 **** --- 10747,10751 ---- ffecom_f2c_typecode_[FFEINFO_basictypeREAL][FFEINFO_kindtypeREAL2] = FFETARGET_f2cTYDREAL; + assert (ffetype_size (type) == sizeof (ffetargetReal2)); ffecom_tree_type[FFEINFO_basictypeCOMPLEX][FFEINFO_kindtypeREAL1] *************** ffecom_init_0 () *** 10658,10661 **** --- 10769,10773 ---- ffecom_f2c_typecode_[FFEINFO_basictypeCOMPLEX][FFEINFO_kindtypeREAL1] = FFETARGET_f2cTYCOMPLEX; + assert (ffetype_size (type) == sizeof (ffetargetComplex1)); ffecom_tree_type[FFEINFO_basictypeCOMPLEX][FFEINFO_kindtypeREALDOUBLE] *************** ffecom_init_0 () *** 10679,10682 **** --- 10791,10795 ---- ffecom_f2c_typecode_[FFEINFO_basictypeCOMPLEX][FFEINFO_kindtypeREAL2] = FFETARGET_f2cTYDCOMPLEX; + assert (ffetype_size (type) == sizeof (ffetargetComplex2)); /* Make function and ptr-to-function types for non-CHARACTER types. */ *************** ffecom_init_0 () *** 10751,10754 **** --- 10864,10869 ---- TREE_INT_CST_LOW (TYPE_SIZE (t)) / BITS_PER_UNIT); ffetype_set_kind (base_type, 1, type); + assert (ffetype_size (type) + == sizeof (((ffetargetCharacter1) { 0, NULL }).text[0])); ffecom_tree_fun_type[FFEINFO_basictypeCHARACTER] *************** ffecom_init_0 () *** 10843,10846 **** --- 10958,10964 ---- FFECOM_f2cDOUBLECOMPLEX, "doublecomplex"); + ffecom_f2c_make_type_ (&ffecom_f2c_longint_type_node, + FFECOM_f2cLONGINT, + "longint"); ffecom_f2c_make_type_ (&ffecom_f2c_logical_type_node, FFECOM_f2cLOGICAL, *************** ffecom_list_expr (ffebld expr) *** 10976,10980 **** plist = &TREE_CHAIN (*plist); expr = ffebld_trail (expr); ! if (length != NULL) { *ptrail = build_tree_list (NULL_TREE, length); --- 11094,11098 ---- plist = &TREE_CHAIN (*plist); expr = ffebld_trail (expr); ! if (length != NULL_TREE) { *ptrail = build_tree_list (NULL_TREE, length); *************** ffecom_notify_init_storage (ffestorag st *** 11163,11167 **** { ffebld init; /* The initialization expression. */ ! #if FFECOM_targetCURRENT == FFECOM_targetGCC ffetargetOffset size; /* The size of the entity. */ #endif --- 11281,11285 ---- { ffebld init; /* The initialization expression. */ ! #if 0 && FFECOM_targetCURRENT == FFECOM_targetGCC ffetargetOffset size; /* The size of the entity. */ #endif *************** ffecom_notify_init_storage (ffestorag st *** 11174,11178 **** ffestorag_set_accretes (st, 0); ! #if FFECOM_targetCURRENT == FFECOM_targetGCC /* For GNU backend, just turn ACCTER into ARRTER and proceed. */ size = ffebld_accter_size (init); --- 11292,11296 ---- ffestorag_set_accretes (st, 0); ! #if 0 && FFECOM_targetCURRENT == FFECOM_targetGCC /* For GNU backend, just turn ACCTER into ARRTER and proceed. */ size = ffebld_accter_size (init); *************** ffecom_notify_init_storage (ffestorag st *** 11207,11214 **** s = ffestorag_typesymbol (st); ! fprintf (stdout, "= initialize_storage \"%s\" ", (s != NULL) ? ffesymbol_text (s) : "(unnamed)"); ffebld_dump (init); ! fputc ('\n', stdout); } #endif --- 11325,11332 ---- s = ffestorag_typesymbol (st); ! fprintf (dmpout, "= initialize_storage \"%s\" ", (s != NULL) ? ffesymbol_text (s) : "(unnamed)"); ffebld_dump (init); ! fputc ('\n', dmpout); } #endif *************** ffecom_notify_init_symbol (ffesymbol s) *** 11249,11253 **** { ffebld init; /* The initialization expression. */ ! #if FFECOM_targetCURRENT == FFECOM_targetGCC ffetargetOffset size; /* The size of the entity. */ #endif --- 11367,11371 ---- { ffebld init; /* The initialization expression. */ ! #if 0 && FFECOM_targetCURRENT == FFECOM_targetGCC ffetargetOffset size; /* The size of the entity. */ #endif *************** ffecom_notify_init_symbol (ffesymbol s) *** 11257,11268 **** possibilities checked. */ ! if (ffesymbol_init (s) == NULL) { - init = ffesymbol_accretion (s); - assert (init != NULL); ffesymbol_set_accretion (s, NULL); ffesymbol_set_accretes (s, 0); ! #if FFECOM_targetCURRENT == FFECOM_targetGCC /* For GNU backend, just turn ACCTER into ARRTER and proceed. */ size = ffebld_accter_size (init); --- 11375,11385 ---- possibilities checked. */ ! if ((ffesymbol_init (s) == NULL) ! && ((init = ffesymbol_accretion (s)) != NULL)) { ffesymbol_set_accretion (s, NULL); ffesymbol_set_accretes (s, 0); ! #if 0 && FFECOM_targetCURRENT == FFECOM_targetGCC /* For GNU backend, just turn ACCTER into ARRTER and proceed. */ size = ffebld_accter_size (init); *************** ffecom_notify_init_symbol (ffesymbol s) *** 11289,11295 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "= initialize_symbol \"%s\" ", ffesymbol_text (s)); ffebld_dump (init); ! fputc ('\n', stdout); #endif --- 11406,11412 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "= initialize_symbol \"%s\" ", ffesymbol_text (s)); ffebld_dump (init); ! fputc ('\n', dmpout); #endif *************** ffecom_return_expr (ffebld expr) *** 11710,11714 **** } rtn = ffecom_func_result_; ! /* used to "assert(rtn != NULL_TREE);" here, but it's kind of a valid situation; if the return value has never been referenced, it won't have a tree under 2pass mode. */ --- 11827,11840 ---- } rtn = ffecom_func_result_; ! #if 0 ! /* Spurious error if RETURN happens before first reference! So elide ! this code. In particular, for debugging registry, rtn should always ! be non-null after all, but TREE_USED won't be set until we encounter ! a reference in the code. Perfectly okay (but weird) code that, ! e.g., has "GOTO 20;10 RETURN;20 RTN=0;GOTO 10", would result in ! this diagnostic for no reason. Have people use -O -Wuninitialized ! and leave it to the back end to find obviously weird cases. */ ! ! /* Used to "assert(rtn != NULL_TREE);" here, but it's kind of a valid situation; if the return value has never been referenced, it won't have a tree under 2pass mode. */ *************** ffecom_return_expr (ffebld expr) *** 11723,11726 **** --- 11849,11853 ---- ffebad_finish (); } + #endif break; *************** ffecom_initialize_char_syntax_ () *** 14458,14463 **** static void ! ffecom_close_include_ (FILE *f UNUSED) { indepth--; input_file_stack_tick++; --- 14585,14592 ---- static void ! ffecom_close_include_ (FILE *f) { + fclose (f); + indepth--; input_file_stack_tick++; diff -rcp2N g77-0.5.17/f/com.h g77-0.5.18/f/com.h *** g77-0.5.17/f/com.h Fri Oct 27 08:20:49 1995 --- g77-0.5.18/f/com.h Tue Mar 12 15:37:43 1996 *************** the Free Software Foundation, 59 Temple *** 165,169 **** typedef enum { ! #define DEFGFRT(CODE,NAME,TYPE,VOLATILE,COMPLEX) CODE, #include "com-rt.def" #undef DEFGFRT --- 165,169 ---- typedef enum { ! #define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX) CODE, #include "com-rt.def" #undef DEFGFRT *************** extern tree ffecom_f2c_doublereal_type_n *** 239,242 **** --- 239,243 ---- extern tree ffecom_f2c_complex_type_node; extern tree ffecom_f2c_doublecomplex_type_node; + extern tree ffecom_f2c_longint_type_node; extern tree ffecom_f2c_logical_type_node; extern tree ffecom_f2c_flag_type_node; diff -rcp2N g77-0.5.17/f/config-lang.in g77-0.5.18/f/config-lang.in *** g77-0.5.17/f/config-lang.in Wed Aug 30 15:53:37 1995 --- g77-0.5.18/f/config-lang.in Tue Dec 26 11:54:27 1995 *************** case "$arguments" in *** 48,52 **** esac ! diff_excludes="" # Create the runtime library directory tree if necessary. --- 48,52 ---- esac ! diff_excludes="-x \"f/g77.info*\"" # Create the runtime library directory tree if necessary. diff -rcp2N g77-0.5.17/f/data.c g77-0.5.18/f/data.c *** g77-0.5.17/f/data.c Wed Aug 30 15:53:37 1995 --- g77-0.5.18/f/data.c Tue Mar 19 16:08:03 1996 *************** the Free Software Foundation, 59 Temple *** 41,44 **** --- 41,45 ---- #include "st.h" #include "storag.h" + #include "top.h" /* Externals defined here. */ *************** the Free Software Foundation, 59 Temple *** 54,60 **** a large uninitialized array in it, while BIG-1.f does. The size of the array is this many elements, as long as they all are INTEGER ! type. */ #ifndef FFEDATA_sizeTOO_BIG_INIT_ ! #define FFEDATA_sizeTOO_BIG_INIT_ 25*1024 #endif --- 55,63 ---- a large uninitialized array in it, while BIG-1.f does. The size of the array is this many elements, as long as they all are INTEGER ! type. Note that, as of 0.5.18, sparse cases are better handled, ! so BIG-2.f now is used; it provides nonzero initial ! values for all elements of the same array BIG-0 has. */ #ifndef FFEDATA_sizeTOO_BIG_INIT_ ! #define FFEDATA_sizeTOO_BIG_INIT_ 75*1024 #endif *************** struct _ffedata_impdo_ *** 93,96 **** --- 96,100 ---- static ffedataImpdo_ ffedata_stack_ = NULL; static ffebld ffedata_list_ = NULL; + static bool ffedata_reinit_; /* value_ should report REINIT error. */ static bool ffedata_reported_error_; /* Error has been reported. */ static ffesymbol ffedata_symbol_ = NULL; /* Symbol being initialized. */ *************** ffedata_begin (ffebld list) *** 152,155 **** --- 156,160 ---- ffedata_symbol_ = NULL; ffedata_reported_error_ = FALSE; + ffedata_reinit_ = FALSE; ffedata_advance_ (); } *************** ffedata_value (ffetargetIntegerDefault r *** 250,253 **** --- 255,276 ---- ffetargetIntegerDefault i; + /* Maybe ignore zero values, to speed up compiling, even though we lose + checking for multiple initializations for now. */ + + if (!ffe_is_zeros () + && (value != NULL) + && (ffebld_op (value) == FFEBLD_opCONTER) + && ffebld_constant_is_zero (ffebld_conter (value))) + value = NULL; + else if ((value != NULL) + && (ffebld_op (value) == FFEBLD_opANY)) + value = NULL; + else + { + /* Must be a constant. */ + assert (value != NULL); + assert (ffebld_op (value) == FFEBLD_opCONTER); + } + /* Later we can optimize certain cases by seeing that the target array can take some number of values, and provide this number to _value_. */ *************** ffedata_value (ffetargetIntegerDefault r *** 259,264 **** for (i = 0; i < rpt; ++i) ! if (!ffedata_value_ (value, token)) ! return FALSE; return TRUE; --- 282,303 ---- for (i = 0; i < rpt; ++i) ! { ! if ((ffedata_symbol_ != NULL) ! && !ffesymbol_is_init (ffedata_symbol_)) ! { ! ffesymbol_signal_change (ffedata_symbol_); ! ffesymbol_update_init (ffedata_symbol_); ! if (ffe_is_90 ()) ! ffesymbol_update_save (ffedata_symbol_); ! #if FFEGLOBAL_ENABLED ! if (ffesymbol_common (ffedata_symbol_) != NULL) ! ffeglobal_init_common (ffesymbol_common (ffedata_symbol_), ! token); ! #endif ! ffesymbol_signal_unreported (ffedata_symbol_); ! } ! if (!ffedata_value_ (value, token)) ! return FALSE; ! } return TRUE; *************** tail_recurse: /* :::::::::::::::::::: *** 340,346 **** case FFEBLD_opSYMTER: /* Simple reference to scalar or array. */ ffedata_symbol_ = ffebld_symter (next); - #if 0 /* Fortran 90 only, someday.... */ - ffesymbol_update_save (ffedata_symbol_); - #endif ffedata_storage_ = (ffesymbol_storage (ffedata_symbol_) == NULL) ? NULL : ffestorag_parent (ffesymbol_storage (ffedata_symbol_)); --- 379,382 ---- *************** tail_recurse: /* :::::::::::::::::::: *** 361,364 **** --- 397,401 ---- && (ffestorag_init (ffedata_storage_) != NULL))) { + #if 0 ffebad_start (FFEBAD_DATA_REINIT); ffest_ffebad_here_current_stmt (0); *************** tail_recurse: /* :::::::::::::::::::: *** 367,370 **** --- 404,411 ---- ffedata_reported_error_ = TRUE; return FALSE; + #else + ffedata_reinit_ = TRUE; + return TRUE; + #endif } ffedata_basictype_ = ffesymbol_basictype (ffedata_symbol_); *************** tail_recurse: /* :::::::::::::::::::: *** 398,404 **** case FFEBLD_opARRAYREF: /* Reference to element of array. */ ffedata_symbol_ = ffebld_symter (ffebld_left (next)); - #if 0 /* Fortran 90 only, someday.... */ - ffesymbol_update_save (ffedata_symbol_); - #endif ffedata_storage_ = (ffesymbol_storage (ffedata_symbol_) == NULL) ? NULL : ffestorag_parent (ffesymbol_storage (ffedata_symbol_)); --- 439,442 ---- *************** tail_recurse: /* :::::::::::::::::::: *** 418,421 **** --- 456,460 ---- && (ffestorag_init (ffedata_storage_) != NULL))) { + #if 0 ffebad_start (FFEBAD_DATA_REINIT); ffest_ffebad_here_current_stmt (0); *************** tail_recurse: /* :::::::::::::::::::: *** 424,427 **** --- 463,470 ---- ffedata_reported_error_ = TRUE; return FALSE; + #else + ffedata_reinit_ = TRUE; + return TRUE; + #endif } ffedata_basictype_ = ffesymbol_basictype (ffedata_symbol_); *************** tail_recurse: /* :::::::::::::::::::: *** 464,470 **** ffedata_symbol_ = ffebld_symter (ffebld_left (arrayref ? ffebld_left (next) : next)); - #if 0 /* Fortran 90 only, someday.... */ - ffesymbol_update_save (ffedata_symbol_); - #endif ffedata_storage_ = (ffesymbol_storage (ffedata_symbol_) == NULL) ? NULL : ffestorag_parent (ffesymbol_storage (ffedata_symbol_)); --- 507,510 ---- *************** tail_recurse: /* :::::::::::::::::::: *** 484,487 **** --- 524,528 ---- && (ffestorag_init (ffedata_storage_) != NULL))) { + #if 0 ffebad_start (FFEBAD_DATA_REINIT); ffest_ffebad_here_current_stmt (0); *************** tail_recurse: /* :::::::::::::::::::: *** 490,493 **** --- 531,538 ---- ffedata_reported_error_ = TRUE; return FALSE; + #else + ffedata_reinit_ = TRUE; + return TRUE; + #endif } ffedata_basictype_ = ffesymbol_basictype (ffedata_symbol_); *************** ffedata_value_ (ffebld value, ffelexToke *** 1396,1402 **** else. */ ! assert (value != NULL); ! ! if (ffebld_op (value) == FFEBLD_opANY) { ffedata_reported_error_ = TRUE; --- 1441,1446 ---- else. */ ! if ((value != NULL) ! && (ffebld_op (value) == FFEBLD_opANY)) { ffedata_reported_error_ = TRUE; *************** ffedata_value_ (ffebld value, ffelexToke *** 1416,1419 **** --- 1460,1478 ---- } + /* If ffedata_advance_ wanted to register a complaint, do it now + that we have the token to point at instead of just the start + of the whole statement. */ + + if (ffedata_reinit_) + { + ffebad_start (FFEBAD_DATA_REINIT); + ffebad_here (0, ffelex_token_where_line (token), + ffelex_token_where_column (token)); + ffebad_string (ffesymbol_text (ffedata_symbol_)); + ffebad_finish (); + ffedata_reported_error_ = TRUE; + return FALSE; + } + #if FFEGLOBAL_ENABLED if (ffesymbol_common (ffedata_symbol_) != NULL) *************** ffedata_value_ (ffebld value, ffelexToke *** 1421,1445 **** #endif - /* Must be a constant. */ - - assert (ffebld_op (value) == FFEBLD_opCONTER); - /* Convert value to desired type. */ ! if (ffedata_convert_cache_use_ == -1) ! value = ffeexpr_convert (value, token, NULL, ffedata_basictype_, ! ffedata_kindtype_, 0, ! (ffedata_basictype_ == FFEINFO_basictypeCHARACTER) ! ? ffedata_charexpected_ : FFETARGET_charactersizeNONE, ! FFEEXPR_contextDATA); ! else /* Use the cache. */ ! value = ffedata_convert_ (value, token, NULL, ffedata_basictype_, ! ffedata_kindtype_, 0, ! (ffedata_basictype_ == FFEINFO_basictypeCHARACTER) ! ? ffedata_charexpected_ : FFETARGET_charactersizeNONE); /* If we couldn't, bug out. */ ! if ((value == NULL) || (ffebld_op (value) == FFEBLD_opANY)) { ffedata_reported_error_ = TRUE; --- 1480,1505 ---- #endif /* Convert value to desired type. */ ! if (value != NULL) ! { ! if (ffedata_convert_cache_use_ == -1) ! value = ffeexpr_convert ! (value, token, NULL, ffedata_basictype_, ! ffedata_kindtype_, 0, ! (ffedata_basictype_ == FFEINFO_basictypeCHARACTER) ! ? ffedata_charexpected_ : FFETARGET_charactersizeNONE, ! FFEEXPR_contextDATA); ! else /* Use the cache. */ ! value = ffedata_convert_ ! (value, token, NULL, ffedata_basictype_, ! ffedata_kindtype_, 0, ! (ffedata_basictype_ == FFEINFO_basictypeCHARACTER) ! ? ffedata_charexpected_ : FFETARGET_charactersizeNONE); ! } /* If we couldn't, bug out. */ ! if ((value != NULL) && (ffebld_op (value) == FFEBLD_opANY)) { ffedata_reported_error_ = TRUE; *************** ffedata_value_ (ffebld value, ffelexToke *** 1508,1588 **** /* Does an accretion array exist? If not, create it. */ ! if (ffestorag_accretion (ffedata_storage_) == NULL) { #if FFEDATA_sizeTOO_BIG_INIT_ != 0 ! if (ffedata_storage_size_ >= FFEDATA_sizeTOO_BIG_INIT_) { ! char bignum[40]; ! sprintf (&bignum[0], "%ld", (long) ffedata_storage_size_); ! ffebad_start (FFEBAD_TOO_BIG_INIT); ffebad_here (0, ffelex_token_where_line (token), ffelex_token_where_column (token)); ffebad_string (ffesymbol_text (ffedata_symbol_)); - ffebad_string (bignum); ffebad_finish (); } ! #endif ! array = ffebld_constantarray_new (ffedata_storage_bt_, ! ffedata_storage_kt_, ffedata_storage_size_); ! accter = ffebld_new_accter (array, ffebit_new (ffe_pool_program_unit (), ! ffedata_storage_size_)); ! ffebld_set_info (accter, ffeinfo_new ! (ffedata_storage_bt_, ! ffedata_storage_kt_, ! 1, ! FFEINFO_kindENTITY, ! FFEINFO_whereCONSTANT, ! (ffedata_basictype_ == FFEINFO_basictypeCHARACTER) ! ? 1 : FFETARGET_charactersizeNONE)); ! ffestorag_set_accretion (ffedata_storage_, accter); ! ffestorag_set_accretes (ffedata_storage_, ffedata_storage_size_); ! } ! else ! { ! accter = ffestorag_accretion (ffedata_storage_); ! assert (ffedata_storage_size_ == ffebld_accter_size (accter)); ! array = ffebld_accter (accter); ! } ! ! /* Put value in accretion array at desired offset. */ ! ! fn = ffetarget_aggregate_ptr_memcpy (ffedata_storage_bt_, ! ffedata_storage_kt_, ffedata_basictype_, ffedata_kindtype_); ! ffebld_constantarray_prepare (&ptr1, &ptr2, &size, array, ffedata_storage_bt_, ! ffedata_storage_kt_, offset, ! ffebld_constant_ptr_to_union (ffebld_conter (value)), ! ffedata_basictype_, ffedata_kindtype_); ! (*fn) (ptr1, ptr2, size); /* Does the appropriate memcpy-like ! operation. */ ! ffebit_count (ffebld_accter_bits (accter), ! offset, FALSE, units_expected, &actual); /* How many FALSE? */ ! if (actual != units_expected) ! { ! ffebad_start (FFEBAD_DATA_MULTIPLE); ! ffebad_here (0, ffelex_token_where_line (token), ! ffelex_token_where_column (token)); ! ffebad_string (ffesymbol_text (ffedata_symbol_)); ! ffebad_finish (); ! } ! ffestorag_set_accretes (ffedata_storage_, ! ffestorag_accretes (ffedata_storage_) ! - actual); /* Decrement # of values actually accreted. */ ! ffebit_set (ffebld_accter_bits (accter), offset, 1, units_expected); ! /* If done accreting for this storage area, establish as initialized. */ ! if (ffestorag_accretes (ffedata_storage_) == 0) ! { ! ffestorag_set_init (ffedata_storage_, accter); ! ffestorag_set_accretion (ffedata_storage_, NULL); ! ffebit_kill (ffebld_accter_bits (ffestorag_init (ffedata_storage_))); ! ffebld_set_op (ffestorag_init (ffedata_storage_), FFEBLD_opARRTER); ! ffebld_set_arrter (ffestorag_init (ffedata_storage_), ! ffebld_accter (ffestorag_init (ffedata_storage_))); ! ffebld_arrter_set_size (ffestorag_init (ffedata_storage_), ! ffedata_storage_size_); ! ffecom_notify_init_storage (ffedata_storage_); } --- 1568,1662 ---- /* Does an accretion array exist? If not, create it. */ ! if (value != NULL) { + if (ffestorag_accretion (ffedata_storage_) == NULL) + { #if FFEDATA_sizeTOO_BIG_INIT_ != 0 ! if (ffedata_storage_size_ >= FFEDATA_sizeTOO_BIG_INIT_) ! { ! char bignum[40]; ! ! sprintf (&bignum[0], "%ld", (long) ffedata_storage_size_); ! ffebad_start (FFEBAD_TOO_BIG_INIT); ! ffebad_here (0, ffelex_token_where_line (token), ! ffelex_token_where_column (token)); ! ffebad_string (ffesymbol_text (ffedata_symbol_)); ! ffebad_string (bignum); ! ffebad_finish (); ! } ! #endif ! array = ffebld_constantarray_new ! (ffedata_storage_bt_, ffedata_storage_kt_, ! ffedata_storage_size_); ! accter = ffebld_new_accter (array, ! ffebit_new (ffe_pool_program_unit (), ! ffedata_storage_size_)); ! ffebld_set_info (accter, ffeinfo_new ! (ffedata_storage_bt_, ! ffedata_storage_kt_, ! 1, ! FFEINFO_kindENTITY, ! FFEINFO_whereCONSTANT, ! (ffedata_basictype_ ! == FFEINFO_basictypeCHARACTER) ! ? 1 : FFETARGET_charactersizeNONE)); ! ffestorag_set_accretion (ffedata_storage_, accter); ! ffestorag_set_accretes (ffedata_storage_, ffedata_storage_size_); ! } ! else { ! accter = ffestorag_accretion (ffedata_storage_); ! assert (ffedata_storage_size_ == ffebld_accter_size (accter)); ! array = ffebld_accter (accter); ! } ! ! /* Put value in accretion array at desired offset. */ ! fn = ffetarget_aggregate_ptr_memcpy ! (ffedata_storage_bt_, ffedata_storage_kt_, ! ffedata_basictype_, ffedata_kindtype_); ! ffebld_constantarray_prepare ! (&ptr1, &ptr2, &size, array, ffedata_storage_bt_, ! ffedata_storage_kt_, offset, ! ffebld_constant_ptr_to_union (ffebld_conter (value)), ! ffedata_basictype_, ffedata_kindtype_); ! (*fn) (ptr1, ptr2, size); /* Does the appropriate memcpy-like ! operation. */ ! ffebit_count (ffebld_accter_bits (accter), ! offset, FALSE, units_expected, ! &actual); /* How many FALSE? */ ! if (actual != units_expected) ! { ! ffebad_start (FFEBAD_DATA_MULTIPLE); ffebad_here (0, ffelex_token_where_line (token), ffelex_token_where_column (token)); ffebad_string (ffesymbol_text (ffedata_symbol_)); ffebad_finish (); } ! ffestorag_set_accretes (ffedata_storage_, ! ffestorag_accretes (ffedata_storage_) ! - actual); /* Decrement # of values actually accreted. */ ! ffebit_set (ffebld_accter_bits (accter), offset, ! 1, units_expected); ! /* If done accreting for this storage area, establish as ! initialized. */ ! if (ffestorag_accretes (ffedata_storage_) == 0) ! { ! ffestorag_set_init (ffedata_storage_, accter); ! ffestorag_set_accretion (ffedata_storage_, NULL); ! ffebit_kill (ffebld_accter_bits ! (ffestorag_init (ffedata_storage_))); ! ffebld_set_op (ffestorag_init (ffedata_storage_), ! FFEBLD_opARRTER); ! ffebld_set_arrter ! (ffestorag_init (ffedata_storage_), ! ffebld_accter (ffestorag_init (ffedata_storage_))); ! ffebld_arrter_set_size (ffestorag_init (ffedata_storage_), ! ffedata_storage_size_); ! ffecom_notify_init_storage (ffedata_storage_); ! } } *************** ffedata_value_ (ffebld value, ffelexToke *** 1601,1611 **** into the final initial-value slot for the symbol. */ ! if ((ffedata_number_ != 0) || (ffedata_arraysize_ > 1) ! || (ffedata_charnumber_ != 0) || (ffedata_size_ > ffedata_charexpected_)) { /* Accrete this value. */ ffetargetOffset offset; ffebitCount actual; ffebldConstantArray array; ! ffebld accter; /* Calculate offset. */ --- 1675,1687 ---- into the final initial-value slot for the symbol. */ ! if ((ffedata_number_ != 0) ! || (ffedata_arraysize_ > 1) ! || (ffedata_charnumber_ != 0) ! || (ffedata_size_ > ffedata_charexpected_)) { /* Accrete this value. */ ffetargetOffset offset; ffebitCount actual; ffebldConstantArray array; ! ffebld accter = NULL; /* Calculate offset. */ *************** ffedata_value_ (ffebld value, ffelexToke *** 1627,1689 **** /* Does an accretion array exist? If not, create it. */ ! if (ffesymbol_accretion (ffedata_symbol_) == NULL) { #if FFEDATA_sizeTOO_BIG_INIT_ != 0 ! if (ffedata_symbolsize_ >= FFEDATA_sizeTOO_BIG_INIT_ ) { ! char bignum[40]; ! sprintf (&bignum[0], "%ld", (long) ffedata_symbolsize_); ! ffebad_start (FFEBAD_TOO_BIG_INIT); ffebad_here (0, ffelex_token_where_line (token), ffelex_token_where_column (token)); ffebad_string (ffesymbol_text (ffedata_symbol_)); - ffebad_string (bignum); ffebad_finish (); } ! #endif ! array = ffebld_constantarray_new (ffedata_basictype_, ffedata_kindtype_, ! ffedata_symbolsize_); ! accter = ffebld_new_accter (array, ffebit_new (ffe_pool_program_unit (), ! ffedata_symbolsize_)); ! ffebld_set_info (accter, ffeinfo_new ! (ffedata_basictype_, ! ffedata_kindtype_, ! 1, ! FFEINFO_kindENTITY, ! FFEINFO_whereCONSTANT, ! (ffedata_basictype_ == FFEINFO_basictypeCHARACTER) ! ? 1 : FFETARGET_charactersizeNONE)); ! ffesymbol_set_accretion (ffedata_symbol_, accter); ! ffesymbol_set_accretes (ffedata_symbol_, ffedata_symbolsize_); ! } ! else ! { ! accter = ffesymbol_accretion (ffedata_symbol_); ! assert (ffedata_symbolsize_ ! == ffebld_accter_size (accter)); ! array = ffebld_accter (accter); ! } ! ! /* Put value in accretion array at desired offset. */ ! ! ffebld_constantarray_put (array, ffedata_basictype_, ffedata_kindtype_, ! offset, ffebld_constant_union (ffebld_conter (value))); ! ffebit_count (ffebld_accter_bits (accter), ! offset, FALSE, ffedata_charexpected_, &actual); /* How many FALSE? */ ! if (actual != (unsigned long int) ffedata_charexpected_) ! { ! ffebad_start (FFEBAD_DATA_MULTIPLE); ! ffebad_here (0, ffelex_token_where_line (token), ! ffelex_token_where_column (token)); ! ffebad_string (ffesymbol_text (ffedata_symbol_)); ! ffebad_finish (); ! } ! ffesymbol_set_accretes (ffedata_symbol_, ffesymbol_accretes (ffedata_symbol_) ! - actual); /* Decrement # of values actually accreted. */ ! ffebit_set (ffebld_accter_bits (accter), offset, ! 1, ffedata_charexpected_); ! ffesymbol_signal_unreported (ffedata_symbol_); /* If still accreting, adjust specs accordingly and return. */ --- 1703,1774 ---- /* Does an accretion array exist? If not, create it. */ ! if (value != NULL) { + if (ffesymbol_accretion (ffedata_symbol_) == NULL) + { #if FFEDATA_sizeTOO_BIG_INIT_ != 0 ! if (ffedata_symbolsize_ >= FFEDATA_sizeTOO_BIG_INIT_ ) ! { ! char bignum[40]; ! ! sprintf (&bignum[0], "%ld", (long) ffedata_symbolsize_); ! ffebad_start (FFEBAD_TOO_BIG_INIT); ! ffebad_here (0, ffelex_token_where_line (token), ! ffelex_token_where_column (token)); ! ffebad_string (ffesymbol_text (ffedata_symbol_)); ! ffebad_string (bignum); ! ffebad_finish (); ! } ! #endif ! array = ffebld_constantarray_new ! (ffedata_basictype_, ffedata_kindtype_, ! ffedata_symbolsize_); ! accter = ffebld_new_accter (array, ! ffebit_new (ffe_pool_program_unit (), ! ffedata_symbolsize_)); ! ffebld_set_info (accter, ffeinfo_new ! (ffedata_basictype_, ! ffedata_kindtype_, ! 1, ! FFEINFO_kindENTITY, ! FFEINFO_whereCONSTANT, ! (ffedata_basictype_ ! == FFEINFO_basictypeCHARACTER) ! ? 1 : FFETARGET_charactersizeNONE)); ! ffesymbol_set_accretion (ffedata_symbol_, accter); ! ffesymbol_set_accretes (ffedata_symbol_, ffedata_symbolsize_); ! } ! else { ! accter = ffesymbol_accretion (ffedata_symbol_); ! assert (ffedata_symbolsize_ ! == ffebld_accter_size (accter)); ! array = ffebld_accter (accter); ! } ! /* Put value in accretion array at desired offset. */ ! ! ffebld_constantarray_put ! (array, ffedata_basictype_, ffedata_kindtype_, ! offset, ffebld_constant_union (ffebld_conter (value))); ! ffebit_count (ffebld_accter_bits (accter), offset, FALSE, ! ffedata_charexpected_, ! &actual); /* How many FALSE? */ ! if (actual != (unsigned long int) ffedata_charexpected_) ! { ! ffebad_start (FFEBAD_DATA_MULTIPLE); ffebad_here (0, ffelex_token_where_line (token), ffelex_token_where_column (token)); ffebad_string (ffesymbol_text (ffedata_symbol_)); ffebad_finish (); } ! ffesymbol_set_accretes (ffedata_symbol_, ! ffesymbol_accretes (ffedata_symbol_) ! - actual); /* Decrement # of values actually accreted. */ ! ffebit_set (ffebld_accter_bits (accter), offset, ! 1, ffedata_charexpected_); ! ffesymbol_signal_unreported (ffedata_symbol_); ! } /* If still accreting, adjust specs accordingly and return. */ *************** ffedata_value_ (ffebld value, ffelexToke *** 1697,1701 **** /* Else, if done accreting for this symbol, establish as initialized. */ ! if (ffesymbol_accretes (ffedata_symbol_) == 0) { ffesymbol_set_init (ffedata_symbol_, accter); --- 1782,1787 ---- /* Else, if done accreting for this symbol, establish as initialized. */ ! if ((value != NULL) ! && (ffesymbol_accretes (ffedata_symbol_) == 0)) { ffesymbol_set_init (ffedata_symbol_, accter); *************** ffedata_value_ (ffebld value, ffelexToke *** 1709,1717 **** ffecom_notify_init_symbol (ffedata_symbol_); } - } ! else ! /* Simple, direct, one-shot assignment. */ { ffesymbol_set_init (ffedata_symbol_, value); ffecom_notify_init_symbol (ffedata_symbol_); --- 1795,1802 ---- ffecom_notify_init_symbol (ffedata_symbol_); } } ! else if (value != NULL) { + /* Simple, direct, one-shot assignment. */ ffesymbol_set_init (ffedata_symbol_, value); ffecom_notify_init_symbol (ffedata_symbol_); diff -rcp2N g77-0.5.17/f/equiv.c g77-0.5.18/f/equiv.c *** g77-0.5.17/f/equiv.c Thu Nov 2 03:57:42 1995 --- g77-0.5.18/f/equiv.c Mon Mar 18 18:46:56 1996 *************** ffeequiv_layout_local_ (ffeequiv eq) *** 195,201 **** ffestorag_set_kindtype (st, ffesymbol_kindtype (sr)); ffestorag_set_typesymbol (st, sr); ! ffestorag_set_save (st, ffeequiv_save (eq)); ! if (ffesymbol_save (sr)) ffestorag_update_save (st); /* Make the EQUIV storage object for the root symbol. */ --- 195,204 ---- ffestorag_set_kindtype (st, ffesymbol_kindtype (sr)); ffestorag_set_typesymbol (st, sr); ! ffestorag_set_is_save (st, ffeequiv_is_save (eq)); ! if (ffesymbol_is_save (sr)) ffestorag_update_save (st); + ffestorag_set_is_init (st, ffeequiv_is_init (eq)); + if (ffesymbol_is_init (sr)) + ffestorag_update_init (st); /* Make the EQUIV storage object for the root symbol. */ *************** ffeequiv_layout_local_ (ffeequiv eq) *** 227,237 **** ffestorag_set_kindtype (rst, ffesymbol_kindtype (sr)); ffestorag_set_typesymbol (rst, sr); ! ffestorag_set_save (rst, FALSE); /* Assume FALSE, then... */ ! if (ffestorag_save (st)) /* ...update to TRUE if needed. */ ffestorag_update_save (rst); ffestorag_set_size (st, size); ffesymbol_set_storage (sr, rst); ffesymbol_signal_unreported (sr); ! init = (ffesymbol_init (sr) != NULL) || (ffesymbol_accretion (sr) != NULL); /* Now that we know the root (offset=0) symbol, revisit all the lists and --- 230,243 ---- ffestorag_set_kindtype (rst, ffesymbol_kindtype (sr)); ffestorag_set_typesymbol (rst, sr); ! ffestorag_set_is_save (rst, FALSE); /* Assume FALSE, then... */ ! if (ffestorag_is_save (st)) /* ...update to TRUE if needed. */ ffestorag_update_save (rst); + ffestorag_set_is_init (rst, FALSE); /* Assume FALSE, then... */ + if (ffestorag_is_init (st)) /* ...update to TRUE if needed. */ + ffestorag_update_init (rst); ffestorag_set_size (st, size); ffesymbol_set_storage (sr, rst); ffesymbol_signal_unreported (sr); ! init = ffesymbol_is_init (sr); /* Now that we know the root (offset=0) symbol, revisit all the lists and *************** ffeequiv_layout_local_ (ffeequiv eq) *** 377,383 **** ffestorag_set_kindtype (vst, ffesymbol_kindtype (sv)); ffestorag_set_typesymbol (vst, sv); ! ffestorag_set_save (vst, FALSE); /* Assume FALSE... */ ! if (ffestorag_save (st)) /* ...update TRUE */ ffestorag_update_save (vst); /* if needed. */ if (!ffetarget_offset_add (&size, var_offset, size)) /* Find one size of equiv area, complain if overflow. */ --- 383,392 ---- ffestorag_set_kindtype (vst, ffesymbol_kindtype (sv)); ffestorag_set_typesymbol (vst, sv); ! ffestorag_set_is_save (vst, FALSE); /* Assume FALSE... */ ! if (ffestorag_is_save (st)) /* ...update TRUE */ ffestorag_update_save (vst); /* if needed. */ + ffestorag_set_is_init (vst, FALSE); /* Assume FALSE... */ + if (ffestorag_is_init (st)) /* ...update TRUE */ + ffestorag_update_init (vst); /* if needed. */ if (!ffetarget_offset_add (&size, var_offset, size)) /* Find one size of equiv area, complain if overflow. */ *************** ffeequiv_layout_local_ (ffeequiv eq) *** 390,395 **** ffestorag_update (st, sv, ffesymbol_basictype (sv), ffesymbol_kindtype (sv)); ! if ((ffesymbol_init (sv) != NULL) ! || (ffesymbol_accretion (sv) != NULL)) init = TRUE; } --- 399,403 ---- ffestorag_update (st, sv, ffesymbol_basictype (sv), ffesymbol_kindtype (sv)); ! if (ffesymbol_is_init (sv)) init = TRUE; } *************** ffeequiv_add (ffeequiv eq, ffebld list, *** 696,716 **** area? */ { /* No (at least not yet). */ ! if ((ffesymbol_init (symbol) != NULL) ! || (ffesymbol_accretion (symbol) != NULL)) ! eq->init = TRUE; ! if (ffesymbol_save (symbol)) ffeequiv_update_save (eq); /* EQUIVALENCE has >=1 SAVEd entity. */ continue; /* Nothing more to do here. */ } #if FFEGLOBAL_ENABLED ! if ((ffesymbol_init (symbol) != NULL) ! || (ffesymbol_accretion (symbol) != NULL)) ffeglobal_init_common (ffesymbol_common (symbol), t); #endif ! if (ffesymbol_save (ffesymbol_common (symbol))) ffeequiv_update_save (eq); /* EQUIVALENCE is in a SAVEd COMMON block. */ if (ffeequiv_common (eq) == NULL) /* Is COMMON involved already? */ --- 704,725 ---- area? */ { /* No (at least not yet). */ ! if (ffesymbol_is_save (symbol)) ffeequiv_update_save (eq); /* EQUIVALENCE has >=1 SAVEd entity. */ + if (ffesymbol_is_init (symbol)) + ffeequiv_update_init (eq); /* EQUIVALENCE has >=1 init'd entity. */ continue; /* Nothing more to do here. */ } #if FFEGLOBAL_ENABLED ! if (ffesymbol_is_init (symbol)) ffeglobal_init_common (ffesymbol_common (symbol), t); #endif ! if (ffesymbol_is_save (ffesymbol_common (symbol))) ffeequiv_update_save (eq); /* EQUIVALENCE is in a SAVEd COMMON block. */ + if (ffesymbol_is_init (ffesymbol_common (symbol))) + ffeequiv_update_init (eq); /* EQUIVALENCE is in a init'd COMMON + block. */ if (ffeequiv_common (eq) == NULL) /* Is COMMON involved already? */ *************** ffeequiv_dump (ffeequiv eq) *** 741,745 **** { if (ffeequiv_common (eq) != NULL) ! fprintf (stdout, "(common %s) ", ffesymbol_text (ffeequiv_common (eq))); ffebld_dump (ffeequiv_list (eq)); } --- 750,754 ---- { if (ffeequiv_common (eq) != NULL) ! fprintf (dmpout, "(common %s) ", ffesymbol_text (ffeequiv_common (eq))); ffebld_dump (ffeequiv_list (eq)); } *************** ffeequiv_layout_cblock (ffestorag st) *** 954,960 **** ffestorag_set_kindtype (vst, ffesymbol_kindtype (sv)); ffestorag_set_typesymbol (vst, sv); ! ffestorag_set_save (vst, FALSE); /* Assume FALSE... */ ! if (ffestorag_save (st)) /* ...update TRUE */ ffestorag_update_save (vst); /* if needed. */ if (!ffetarget_offset_add (&size, var_offset, size)) /* Find one size of common block, complain if --- 963,972 ---- ffestorag_set_kindtype (vst, ffesymbol_kindtype (sv)); ffestorag_set_typesymbol (vst, sv); ! ffestorag_set_is_save (vst, FALSE); /* Assume FALSE... */ ! if (ffestorag_is_save (st)) /* ...update TRUE */ ffestorag_update_save (vst); /* if needed. */ + ffestorag_set_is_init (vst, FALSE); /* Assume FALSE... */ + if (ffestorag_is_init (st)) /* ...update TRUE */ + ffestorag_update_init (vst); /* if needed. */ if (!ffetarget_offset_add (&size, var_offset, size)) /* Find one size of common block, complain if *************** ffeequiv_layout_cblock (ffestorag st) *** 969,974 **** ffestorag_update (st, sv, ffesymbol_basictype (sv), ffesymbol_kindtype (sv)); ! if ((ffesymbol_init (sv) != NULL) ! || (ffesymbol_accretion (sv) != NULL)) init = TRUE; } --- 981,985 ---- ffestorag_update (st, sv, ffesymbol_basictype (sv), ffesymbol_kindtype (sv)); ! if (ffesymbol_is_init (sv)) init = TRUE; } *************** ffeequiv_merge (ffeequiv eq1, ffeequiv e *** 1041,1049 **** /* If the victim object has any init'ed entities, so does the new object. */ ! if (eq2->init) ! eq1->init = TRUE; #if FFEGLOBAL_ENABLED ! if (eq1->init && (ffeequiv_common (eq1) != NULL)) ffeglobal_init_common (ffeequiv_common (eq1), t); #endif --- 1052,1060 ---- /* If the victim object has any init'ed entities, so does the new object. */ ! if (eq2->is_init) ! eq1->is_init = TRUE; #if FFEGLOBAL_ENABLED ! if (eq1->is_init && (ffeequiv_common (eq1) != NULL)) ffeglobal_init_common (ffeequiv_common (eq1), t); #endif *************** ffeequiv_merge (ffeequiv eq1, ffeequiv e *** 1052,1058 **** some. */ ! if (ffeequiv_save (eq2)) ffeequiv_update_save (eq1); /* Adjust all the symbols in the list of lists of equivalences for the victim equivalence object so they point to the new merged object --- 1063,1075 ---- some. */ ! if (ffeequiv_is_save (eq2)) ffeequiv_update_save (eq1); + /* If the victim object has any init'd entities, then the new object has + some. */ + + if (ffeequiv_is_init (eq2)) + ffeequiv_update_init (eq1); + /* Adjust all the symbols in the list of lists of equivalences for the victim equivalence object so they point to the new merged object *************** ffeequiv_new () *** 1111,1116 **** ffeequiv_set_common (eq, NULL); /* No COMMON area yet. */ ffeequiv_set_list (eq, NULL); /* No list of lists of equivalences yet. */ ! ffeequiv_set_save (eq, FALSE); ! eq->init = FALSE; eq->next->previous = eq; eq->previous->next = eq; --- 1128,1133 ---- ffeequiv_set_common (eq, NULL); /* No COMMON area yet. */ ffeequiv_set_list (eq, NULL); /* No list of lists of equivalences yet. */ ! ffeequiv_set_is_save (eq, FALSE); ! ffeequiv_set_is_init (eq, FALSE); eq->next->previous = eq; eq->previous->next = eq; *************** again: /* :::::::::::::::::::: */ *** 1154,1157 **** --- 1171,1233 ---- } + /* ffeequiv_update_init -- Update the INIT flag for the area to TRUE + + ffeequiv eq; + ffeequiv_update_init(eq); + + If the INIT flag for the object is already set, return. Else, + set it TRUE and call ffe*_update_init for all objects contained in + this one. */ + + void + ffeequiv_update_init (ffeequiv eq) + { + ffebld list; /* Current list in list of lists. */ + ffebld item; /* Current item in current list. */ + ffebld expr; /* Expression in head of current item. */ + + if (eq->is_init) + return; + + eq->is_init = TRUE; + + if ((eq->common != NULL) + && !ffesymbol_is_init (eq->common)) + ffesymbol_update_init (eq->common); /* Shouldn't be needed. */ + + for (list = eq->list; list != NULL; list = ffebld_trail (list)) + { + for (item = ffebld_head (list); item != NULL; item = ffebld_trail (item)) + { + expr = ffebld_head (item); + + again: /* :::::::::::::::::::: */ + + switch (ffebld_op (expr)) + { + case FFEBLD_opANY: + break; + + case FFEBLD_opSYMTER: + if (!ffesymbol_is_init (ffebld_symter (expr))) + ffesymbol_update_init (ffebld_symter (expr)); + break; + + case FFEBLD_opARRAYREF: + expr = ffebld_left (expr); + goto again; /* :::::::::::::::::::: */ + + case FFEBLD_opSUBSTR: + expr = ffebld_left (expr); + goto again; /* :::::::::::::::::::: */ + + default: + assert ("bad op for ffeequiv_update_init" == NULL); + break; + } + } + } + } + /* ffeequiv_update_save -- Update the SAVE flag for the area to TRUE *************** ffeequiv_update_save (ffeequiv eq) *** 1170,1179 **** ffebld expr; /* Expression in head of current item. */ ! if (eq->save) return; ! eq->save = TRUE; ! if (eq->common != NULL) ffesymbol_update_save (eq->common); /* Shouldn't be needed. */ --- 1246,1256 ---- ffebld expr; /* Expression in head of current item. */ ! if (eq->is_save) return; ! eq->is_save = TRUE; ! if ((eq->common != NULL) ! && !ffesymbol_is_save (eq->common)) ffesymbol_update_save (eq->common); /* Shouldn't be needed. */ *************** ffeequiv_update_save (ffeequiv eq) *** 1192,1196 **** case FFEBLD_opSYMTER: ! ffesymbol_update_save (ffebld_symter (expr)); break; --- 1269,1274 ---- case FFEBLD_opSYMTER: ! if (!ffesymbol_is_save (ffebld_symter (expr))) ! ffesymbol_update_save (ffebld_symter (expr)); break; diff -rcp2N g77-0.5.17/f/equiv.h g77-0.5.18/f/equiv.h *** g77-0.5.17/f/equiv.h Wed Aug 30 15:53:37 1995 --- g77-0.5.18/f/equiv.h Mon Mar 18 18:35:15 1996 *************** struct _ffeequiv_ *** 53,58 **** ffesymbol common; /* Common area for this equiv, if any. */ ffebld list; /* List of lists of equiv exprs. */ ! bool save; /* Any SAVEd members? */ ! bool init; /* Any initialized members? */ }; --- 53,58 ---- ffesymbol common; /* Common area for this equiv, if any. */ ffebld list; /* List of lists of equiv exprs. */ ! bool is_save; /* Any SAVEd members? */ ! bool is_init; /* Any initialized members? */ }; *************** ffeequiv ffeequiv_merge (ffeequiv eq1, f *** 71,74 **** --- 71,75 ---- ffeequiv ffeequiv_new (void); ffesymbol ffeequiv_symbol (ffebld expr); + void ffeequiv_update_init (ffeequiv eq); void ffeequiv_update_save (ffeequiv eq); *************** void ffeequiv_update_save (ffeequiv eq); *** 76,92 **** #define ffeequiv_common(e) ((e)->common) - #define ffeequiv_init(e) ((e)->init) #define ffeequiv_init_0() #define ffeequiv_init_1() #define ffeequiv_init_3() #define ffeequiv_init_4() #define ffeequiv_list(e) ((e)->list) #define ffeequiv_next(e) ((e)->next) #define ffeequiv_previous(e) ((e)->previous) - #define ffeequiv_save(e) ((e)->save) #define ffeequiv_set_common(e,c) ((e)->common = (c)) #define ffeequiv_set_init(e,i) ((e)->init = (i)) #define ffeequiv_set_list(e,l) ((e)->list = (l)) - #define ffeequiv_set_save(e,s) ((e)->save = (s)) #define ffeequiv_terminate_0() #define ffeequiv_terminate_1() --- 77,94 ---- #define ffeequiv_common(e) ((e)->common) #define ffeequiv_init_0() #define ffeequiv_init_1() #define ffeequiv_init_3() #define ffeequiv_init_4() + #define ffeequiv_is_init(e) ((e)->is_init) + #define ffeequiv_is_save(e) ((e)->is_save) #define ffeequiv_list(e) ((e)->list) #define ffeequiv_next(e) ((e)->next) #define ffeequiv_previous(e) ((e)->previous) #define ffeequiv_set_common(e,c) ((e)->common = (c)) #define ffeequiv_set_init(e,i) ((e)->init = (i)) + #define ffeequiv_set_is_init(e,in) ((e)->is_init = (in)) + #define ffeequiv_set_is_save(e,sa) ((e)->is_save = (sa)) #define ffeequiv_set_list(e,l) ((e)->list = (l)) #define ffeequiv_terminate_0() #define ffeequiv_terminate_1() diff -rcp2N g77-0.5.17/f/expr.c g77-0.5.18/f/expr.c *** g77-0.5.17/f/expr.c Thu Nov 2 07:40:08 1995 --- g77-0.5.18/f/expr.c Mon Mar 25 20:57:34 1996 *************** typedef enum *** 112,115 **** --- 112,116 ---- FFEEXPR_operatorprecedenceADD_ = 3, FFEEXPR_operatorprecedenceSUBTRACT_ = 3, + FFEEXPR_operatorprecedenceLOWARITH_ = 3, FFEEXPR_operatorprecedenceCONCATENATE_ = 3, FFEEXPR_operatorprecedenceLT_ = 4, *************** static ffesymbol ffeexpr_declare_parenth *** 424,431 **** ffeexprParenType_ *paren_type); static ffesymbol ffeexpr_paren_rhs_let_ (ffesymbol s, ffelexToken t); - static void ffeexpr_type_combine_ (ffeinfoBasictype *nbt, ffeinfoKindtype *nkt, - ffeinfoBasictype lbt, ffeinfoKindtype lkt, - ffeinfoBasictype rbt, ffeinfoKindtype rkt, - ffeexprExpr_ op); /* Internal macros. */ --- 425,428 ---- *************** ffeexpr_collapse_convert (ffebld expr, f *** 3057,3060 **** --- 3054,3058 ---- && ffebad_start (error)) { + assert (t != NULL); ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); ffebad_finish (); *************** ffeexpr_convert (ffebld source, ffelexTo *** 6950,6956 **** || (rk != 0) /* Can't convert from or to arrays yet. */ || (ffeinfo_rank (info) != 0) ! || (sz != ffebld_size_known (source)) ! || ((bt == FFEINFO_basictypeCHARACTER) && (sz == FFETARGET_charactersizeNONE))) { switch (ffeinfo_basictype (info)) --- 6948,6957 ---- || (rk != 0) /* Can't convert from or to arrays yet. */ || (ffeinfo_rank (info) != 0) ! || (sz != ffebld_size_known (source))) ! #if 0 /* Nobody seems to need this spurious CONVERT node. */ ! || ((context != FFEEXPR_contextLET) ! && (bt == FFEINFO_basictypeCHARACTER) && (sz == FFETARGET_charactersizeNONE))) + #endif { switch (ffeinfo_basictype (info)) *************** ffeexpr_convert (ffebld source, ffelexTo *** 7036,7040 **** bad = ffe_is_pedantic () || !(ffe_is_ugly_init () ! || (context == FFEEXPR_contextDATA)); break; --- 7037,7042 ---- bad = ffe_is_pedantic () || !(ffe_is_ugly_init () ! && ((context == FFEEXPR_contextDATA) ! || (context == FFEEXPR_contextLET))); break; *************** ffeexpr_convert (ffebld source, ffelexTo *** 7060,7063 **** --- 7062,7066 ---- ffebad_here (0, ffelex_token_where_line (dest_token), ffelex_token_where_column (dest_token)); + assert (source_token != NULL); ffebad_here (1, ffelex_token_where_line (source_token), ffelex_token_where_column (source_token)); *************** ffeexpr_cb_comma_c_ (ffelexToken ft, ffe *** 7503,7507 **** ffebad_here (0, ffelex_token_where_line (ffeexpr_stack_->tokens[1]), ffelex_token_where_column (ffeexpr_stack_->tokens[1])); ! ffebad_string ("real"); ffebad_finish (); } --- 7506,7510 ---- ffebad_here (0, ffelex_token_where_line (ffeexpr_stack_->tokens[1]), ffelex_token_where_column (ffeexpr_stack_->tokens[1])); ! ffebad_string ("Real"); ffebad_finish (); } *************** ffeexpr_cb_comma_c_ (ffelexToken ft, ffe *** 7522,7526 **** ffebad_here (0, ffelex_token_where_line (ft), ffelex_token_where_column (ft)); ! ffebad_string ("imaginary"); ffebad_finish (); } --- 7525,7529 ---- ffebad_here (0, ffelex_token_where_line (ft), ffelex_token_where_column (ft)); ! ffebad_string ("Imaginary"); ffebad_finish (); } *************** ffeexpr_percent_ (ffelexToken t) *** 8672,8676 **** } ! /* ffeexpr_type_combine_ -- Binop combine types, check for mythical new COMPLEX See prototype. --- 8675,8679 ---- } ! /* ffeexpr_type_combine -- Binop combine types, check for mythical new COMPLEX See prototype. *************** ffeexpr_percent_ (ffelexToken t) *** 8680,8697 **** COMPLEX. */ ! static void ! ffeexpr_type_combine_ (ffeinfoBasictype *nbt, ffeinfoKindtype *nkt, ! ffeinfoBasictype lbt, ffeinfoKindtype lkt, ffeinfoBasictype rbt, ! ffeinfoKindtype rkt, ffeexprExpr_ op) ! { ! *nbt = ffeinfo_basictype_combine (lbt, rbt); ! if ((*nbt == FFEINFO_basictypeCOMPLEX) ! && ((lbt == *nbt) || (lbt == FFEINFO_basictypeREAL)) ! && ((rbt == *nbt) || (rbt == FFEINFO_basictypeREAL))) ! { ! *nkt = ffeinfo_kindtype_max (*nbt, lkt, rkt); ! if (ffe_is_pedantic_not_90 () && (*nkt == FFEINFO_kindtypeREALDOUBLE)) ! *nkt = FFEINFO_kindtypeNONE; /* Force error. */ ! switch (*nkt) { #if FFETARGET_okCOMPLEX1 --- 8683,8704 ---- COMPLEX. */ ! void ! ffeexpr_type_combine (ffeinfoBasictype *xnbt, ffeinfoKindtype *xnkt, ! ffeinfoBasictype lbt, ffeinfoKindtype lkt, ! ffeinfoBasictype rbt, ffeinfoKindtype rkt, ! ffelexToken t) ! { ! ffeinfoBasictype nbt; ! ffeinfoKindtype nkt; ! ! nbt = ffeinfo_basictype_combine (lbt, rbt); ! if ((nbt == FFEINFO_basictypeCOMPLEX) ! && ((lbt == nbt) || (lbt == FFEINFO_basictypeREAL)) ! && ((rbt == nbt) || (rbt == FFEINFO_basictypeREAL))) ! { ! nkt = ffeinfo_kindtype_max (nbt, lkt, rkt); ! if (ffe_is_pedantic_not_90 () && (nkt == FFEINFO_kindtypeREALDOUBLE)) ! nkt = FFEINFO_kindtypeNONE; /* Force error. */ ! switch (nkt) { #if FFETARGET_okCOMPLEX1 *************** ffeexpr_type_combine_ (ffeinfoBasictype *** 8710,8720 **** default: ! ffebad_start ((*nkt == FFEINFO_kindtypeREALDOUBLE) ! ? FFEBAD_BAD_DBLCMPLX : FFEBAD_BAD_COMPLEX); ! ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); ! ffebad_finish (); ! /* Fall through. */ case FFEINFO_kindtypeANY: ! *nkt = FFEINFO_kindtypeREALDEFAULT; break; } --- 8717,8733 ---- default: ! if (t != NULL) ! { ! ffebad_start ((nkt == FFEINFO_kindtypeREALDOUBLE) ! ? FFEBAD_BAD_DBLCMPLX : FFEBAD_BAD_COMPLEX); ! ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); ! ffebad_finish (); ! } ! nbt = FFEINFO_basictypeNONE; ! nkt = FFEINFO_kindtypeNONE; ! break; ! case FFEINFO_kindtypeANY: ! nkt = FFEINFO_kindtypeREALDEFAULT; break; } *************** ffeexpr_type_combine_ (ffeinfoBasictype *** 8722,8738 **** else { /* The normal stuff. */ ! if (*nbt == lbt) ! if (*nbt == rbt) ! *nkt = ffeinfo_kindtype_max (*nbt, lkt, rkt); else ! *nkt = lkt; ! else if (*nbt == rbt) ! *nkt = rkt; else { /* Let the caller do the complaining. */ ! *nbt = FFEINFO_basictypeNONE; ! *nkt = FFEINFO_kindtypeNONE; } } } --- 8735,8756 ---- else { /* The normal stuff. */ ! if (nbt == lbt) ! if (nbt == rbt) ! nkt = ffeinfo_kindtype_max (nbt, lkt, rkt); else ! nkt = lkt; ! else if (nbt == rbt) ! nkt = rkt; else { /* Let the caller do the complaining. */ ! nbt = FFEINFO_basictypeNONE; ! nkt = FFEINFO_kindtypeNONE; } } + + /* Always a good idea to avoid aliasing problems. */ + + *xnbt = nbt; + *xnkt = nkt; } *************** ffeexpr_exprstack_push_unary_ (ffeexprEx *** 9486,9491 **** && (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", --- 9504,9510 ---- && (ffeexpr_stack_->exprstack != NULL) && (ffeexpr_stack_->exprstack->type != FFEEXPR_exprtypeOPERAND_) ! && (ffeexpr_stack_->exprstack->u.operator.prec ! <= FFEEXPR_operatorprecedenceLOWARITH_) ! && (e->u.operator.prec <= FFEEXPR_operatorprecedenceLOWARITH_)) { ffebad_start_msg ("Two arithmetic operators in a row at %0 and %1 -- use parentheses", *************** ffeexpr_reduced_bool2_ (ffebld reduced, *** 9991,9995 **** rwh = ffeinfo_where (rinfo); ! ffeexpr_type_combine_ (&nbt, &nkt, lbt, lkt, rbt, rkt, op); if (((nbt == FFEINFO_basictypeLOGICAL) --- 10010,10014 ---- rwh = ffeinfo_where (rinfo); ! ffeexpr_type_combine (&nbt, &nkt, lbt, lkt, rbt, rkt, op->token); if (((nbt == FFEINFO_basictypeLOGICAL) *************** ffeexpr_reduced_eqop2_ (ffebld reduced, *** 10331,10335 **** rsz = ffebld_size_known (ffebld_right (reduced)); ! ffeexpr_type_combine_ (&nbt, &nkt, lbt, lkt, rbt, rkt, op); if (((nbt == FFEINFO_basictypeINTEGER) || (nbt == FFEINFO_basictypeREAL) --- 10350,10354 ---- rsz = ffebld_size_known (ffebld_right (reduced)); ! ffeexpr_type_combine (&nbt, &nkt, lbt, lkt, rbt, rkt, op->token); if (((nbt == FFEINFO_basictypeINTEGER) || (nbt == FFEINFO_basictypeREAL) *************** ffeexpr_reduced_math2_ (ffebld reduced, *** 10588,10592 **** rwh = ffeinfo_where (rinfo); ! ffeexpr_type_combine_ (&nbt, &nkt, lbt, lkt, rbt, rkt, op); if (((nbt == FFEINFO_basictypeINTEGER) || (nbt == FFEINFO_basictypeREAL) --- 10607,10611 ---- rwh = ffeinfo_where (rinfo); ! ffeexpr_type_combine (&nbt, &nkt, lbt, lkt, rbt, rkt, op->token); if (((nbt == FFEINFO_basictypeINTEGER) || (nbt == FFEINFO_basictypeREAL) *************** ffeexpr_reduced_power_ (ffebld reduced, *** 10751,10755 **** if ((rbt == FFEINFO_basictypeINTEGER) ! && ((lbt == FFEINFO_basictypeREAL) || (lbt == FFEINFO_basictypeCOMPLEX))) { nbt = lbt; --- 10770,10775 ---- if ((rbt == FFEINFO_basictypeINTEGER) ! && ((lbt == FFEINFO_basictypeREAL) ! || (lbt == FFEINFO_basictypeCOMPLEX))) { nbt = lbt; *************** ffeexpr_reduced_power_ (ffebld reduced, *** 10761,10764 **** --- 10781,10791 ---- nkt = FFEINFO_kindtypeREALDOUBLE; /* Highest kt we can power! */ } + if (rkt == FFEINFO_kindtypeINTEGER4) + { + ffebad_start_msg ("Unsupported operand for ** at %1 -- converting to default INTEGER", + FFEBAD_severityWARNING); + ffebad_here (0, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); + ffebad_finish (); + } if (rkt != FFEINFO_kindtypeINTEGERDEFAULT) { *************** ffeexpr_reduced_power_ (ffebld reduced, *** 10773,10784 **** else { ! ffeexpr_type_combine_ (&nbt, &nkt, lbt, lkt, rbt, rkt, op); if ((nbt == FFEINFO_basictypeINTEGER) && (nkt != FFEINFO_kindtypeINTEGERDEFAULT)) nkt = FFEINFO_kindtypeINTEGERDEFAULT; /* Highest kt we can power! */ ! else if (((nbt == FFEINFO_basictypeREAL) ! || (nbt == FFEINFO_basictypeCOMPLEX)) ! && (nkt != FFEINFO_kindtypeREALDEFAULT)) { nkt = ffeinfo_kindtype_max (nbt, nkt, FFEINFO_kindtypeREALDOUBLE); --- 10800,10813 ---- else { ! ffeexpr_type_combine (&nbt, &nkt, lbt, lkt, rbt, rkt, op->token); + #if 0 /* INTEGER4**INTEGER4 works now. */ if ((nbt == FFEINFO_basictypeINTEGER) && (nkt != FFEINFO_kindtypeINTEGERDEFAULT)) nkt = FFEINFO_kindtypeINTEGERDEFAULT; /* Highest kt we can power! */ ! #endif ! if (((nbt == FFEINFO_basictypeREAL) ! || (nbt == FFEINFO_basictypeCOMPLEX)) ! && (nkt != FFEINFO_kindtypeREALDEFAULT)) { nkt = ffeinfo_kindtype_max (nbt, nkt, FFEINFO_kindtypeREALDOUBLE); *************** ffeexpr_reduced_relop2_ (ffebld reduced, *** 10950,10954 **** rsz = ffebld_size_known (ffebld_right (reduced)); ! ffeexpr_type_combine_ (&nbt, &nkt, lbt, lkt, rbt, rkt, op); if (((nbt == FFEINFO_basictypeINTEGER) || (nbt == FFEINFO_basictypeREAL) --- 10979,10983 ---- rsz = ffebld_size_known (ffebld_right (reduced)); ! ffeexpr_type_combine (&nbt, &nkt, lbt, lkt, rbt, rkt, op->token); if (((nbt == FFEINFO_basictypeINTEGER) || (nbt == FFEINFO_basictypeREAL) *************** again: /* :::::::::::::::::::: */ *** 12180,12195 **** { case FFEINFO_basictypeLOGICAL: ! error = FALSE; if (!ffeexpr_stack_->is_rhs) ! { ! if (!ffe_is_ugly ()) ! error = TRUE; ! break; /* Don't convert lhs variable. */ ! } ! expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeLOGICAL, ! FFEINFO_kindtypeLOGICALDEFAULT, 0, FFETARGET_charactersizeNONE, ! FFEEXPR_contextLET); expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, ! FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, FFEEXPR_contextLET); break; --- 12209,12218 ---- { case FFEINFO_basictypeLOGICAL: ! error = !ffe_is_ugly (); if (!ffeexpr_stack_->is_rhs) ! break; /* Don't convert lhs variable. */ expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, ! ffeinfo_kindtype (ffebld_info (expr)), 0, ! FFETARGET_charactersizeNONE, FFEEXPR_contextLET); break; *************** again: /* :::::::::::::::::::: */ *** 12197,12201 **** case FFEINFO_basictypeHOLLERITH: case FFEINFO_basictypeTYPELESS: - error = FALSE; if (!ffeexpr_stack_->is_rhs) { --- 12220,12223 ---- *************** again: /* :::::::::::::::::::: */ *** 12203,12209 **** break; /* Don't convert lhs variable. */ } - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); break; --- 12225,12228 ---- *************** again: /* :::::::::::::::::::: */ *** 12552,12581 **** if ((error = (expr == NULL) || (ffeinfo_rank (info) != 0))) break; switch (ffeinfo_basictype (info)) { case FFEINFO_basictypeLOGICAL: ! error = (ffeinfo_kindtype (info) != FFEINFO_kindtypeLOGICALDEFAULT); if (!ffeexpr_stack_->is_rhs) break; /* Don't convert lhs variable. */ expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, ! FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, FFEEXPR_contextLET); break; case FFEINFO_basictypeINTEGER: - error = (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT); - break; - case FFEINFO_basictypeHOLLERITH: case FFEINFO_basictypeTYPELESS: - error = FALSE; - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); break; case FFEINFO_basictypeREAL: ! error = !ffe_is_pedantic () && !ffe_is_ugly (); ! /* Only pedantic/ugly ALLOWED to use REAL! */ break; --- 12571,12605 ---- if ((error = (expr == NULL) || (ffeinfo_rank (info) != 0))) break; + if (!ffeexpr_stack_->is_rhs + && (ffebld_op (expr) != FFEBLD_opSYMTER)) + error = TRUE; switch (ffeinfo_basictype (info)) { case FFEINFO_basictypeLOGICAL: ! error = error && !ffe_is_ugly (); if (!ffeexpr_stack_->is_rhs) break; /* Don't convert lhs variable. */ expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, ! ffeinfo_kindtype (ffebld_info (expr)), 0, ! FFETARGET_charactersizeNONE, FFEEXPR_contextLET); break; case FFEINFO_basictypeINTEGER: case FFEINFO_basictypeHOLLERITH: case FFEINFO_basictypeTYPELESS: break; case FFEINFO_basictypeREAL: ! if (!ffeexpr_stack_->is_rhs ! && ffe_is_warn_surprising () ! && !error) ! { ! ffebad_start (FFEBAD_DO_REAL); /* See error message!!! */ ! ffebad_here (0, ffelex_token_where_line (ft), ! ffelex_token_where_column (ft)); ! ffebad_string (ffelex_token_text (ft)); ! ffebad_finish (); ! } break; *************** again: /* :::::::::::::::::::: */ *** 12584,12590 **** break; } - if (!ffeexpr_stack_->is_rhs - && (ffebld_op (expr) != FFEBLD_opSYMTER)) - error = TRUE; break; --- 12608,12611 ---- *************** again: /* :::::::::::::::::::: */ *** 12592,12599 **** if ((error = (expr == NULL) || (ffeinfo_rank (info) != 0))) break; switch (ffeinfo_basictype (info)) { case FFEINFO_basictypeLOGICAL: ! error = (ffeinfo_kindtype (info) != FFEINFO_kindtypeLOGICALDEFAULT); if (!ffeexpr_stack_->is_rhs) break; /* Don't convert lhs variable. */ --- 12613,12630 ---- if ((error = (expr == NULL) || (ffeinfo_rank (info) != 0))) break; + if (ffeexpr_stack_->is_rhs) + { + if ((ffebld_op (expr) != FFEBLD_opCONTER) + && (ffeinfo_where (info) != FFEINFO_whereIMMEDIATE)) + error = TRUE; + } + else if ((ffebld_op (expr) != FFEBLD_opSYMTER) + || (ffeinfo_where (info) != FFEINFO_whereIMMEDIATE)) + error = TRUE; switch (ffeinfo_basictype (info)) { case FFEINFO_basictypeLOGICAL: ! error = error ! && (ffeinfo_kindtype (info) != FFEINFO_kindtypeLOGICALDEFAULT); if (!ffeexpr_stack_->is_rhs) break; /* Don't convert lhs variable. */ *************** again: /* :::::::::::::::::::: */ *** 12604,12613 **** case FFEINFO_basictypeINTEGER: ! error = (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT); break; case FFEINFO_basictypeHOLLERITH: case FFEINFO_basictypeTYPELESS: - error = FALSE; expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, --- 12635,12644 ---- case FFEINFO_basictypeINTEGER: ! error = error && ! (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT); break; case FFEINFO_basictypeHOLLERITH: case FFEINFO_basictypeTYPELESS: expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, *************** again: /* :::::::::::::::::::: */ *** 12616,12621 **** case FFEINFO_basictypeREAL: ! error = !ffe_is_pedantic () && !ffe_is_ugly (); ! /* Only pedantic/ugly ALLOWED to use REAL! */ break; --- 12647,12660 ---- case FFEINFO_basictypeREAL: ! if (!ffeexpr_stack_->is_rhs ! && ffe_is_warn_surprising () ! && !error) ! { ! ffebad_start (FFEBAD_DO_REAL); /* See error message!!! */ ! ffebad_here (0, ffelex_token_where_line (ft), ! ffelex_token_where_column (ft)); ! ffebad_string (ffelex_token_text (ft)); ! ffebad_finish (); ! } break; *************** again: /* :::::::::::::::::::: */ *** 12624,12636 **** break; } - if (ffeexpr_stack_->is_rhs) - { - if ((ffebld_op (expr) != FFEBLD_opCONTER) - && (ffeinfo_where (info) != FFEINFO_whereIMMEDIATE)) - error = TRUE; - } - else if ((ffebld_op (expr) != FFEBLD_opSYMTER) - || (ffeinfo_where (info) != FFEINFO_whereIMMEDIATE)) - error = TRUE; break; --- 12663,12666 ---- *************** ffeexpr_token_name_rhs_ (ffelexToken t) *** 15295,15300 **** of the intrinsic. */ ffebld_set_info (e->u.operand, ffeinfo_new ! (ffeintrin_basictype (ffesymbol_implementation (s)), ! ffeintrin_kindtype (ffesymbol_implementation (s)), 0, ffesymbol_kind (s), --- 15325,15330 ---- of the intrinsic. */ ffebld_set_info (e->u.operand, ffeinfo_new ! (ffeintrin_basictype (ffesymbol_specific (s)), ! ffeintrin_kindtype (ffesymbol_specific (s)), 0, ffesymbol_kind (s), *************** ffeexpr_declare_unadorned_ (ffelexToken *** 15625,15628 **** --- 15655,15683 ---- s = ffesymbol_declare_local (t, maybe_intrin); + switch (ffeexpr_context_outer_ (ffeexpr_stack_)) + /* Special-case these since they can involve a different concept + of "state" (in the stmtfunc name space). */ + { + case FFEEXPR_contextDATAIMPDOINDEX_: + case FFEEXPR_contextDATAIMPDOCTRL_: + if (ffeexpr_context_outer_ (ffeexpr_stack_) + == FFEEXPR_contextDATAIMPDOINDEX_) + s = ffeexpr_sym_impdoitem_ (s, t); + else + if (ffeexpr_stack_->is_rhs) + s = ffeexpr_sym_impdoitem_ (s, t); + else + s = ffeexpr_sym_lhs_impdoctrl_ (s, t); + bad = (ffesymbol_kind (s) != FFEINFO_kindENTITY) + || ((ffesymbol_where (s) != FFEINFO_whereCONSTANT) + && (ffesymbol_where (s) != FFEINFO_whereIMMEDIATE)); + if (bad && (ffesymbol_kind (s) != FFEINFO_kindANY)) + ffesymbol_error (s, t); + return s; + + default: + break; + } + switch ((ffesymbol_sfdummyparent (s) == NULL) ? ffesymbol_state (s) *************** ffeexpr_declare_unadorned_ (ffelexToken *** 15665,15673 **** break; - case FFEEXPR_contextDATAIMPDOINDEX_: - case FFEEXPR_contextDATAIMPDOCTRL_: - break; /* UNDERSTOOD case still needs to call fns, - let it do this. */ - case FFEEXPR_contextSFUNCDEF: case FFEEXPR_contextSFUNCDEFINDEX_: --- 15720,15723 ---- *************** ffeexpr_declare_unadorned_ (ffelexToken *** 15808,15830 **** break; - case FFEEXPR_contextDATAIMPDOINDEX_: - s = ffeexpr_sym_impdoitem_ (s, t); - k = ffesymbol_kind (s); - bad = (k != FFEINFO_kindENTITY) - || ((ffesymbol_where (s) != FFEINFO_whereCONSTANT) - && (ffesymbol_where (s) != FFEINFO_whereIMMEDIATE)); - break; - - case FFEEXPR_contextDATAIMPDOCTRL_: - if (ffeexpr_stack_->is_rhs) - s = ffeexpr_sym_impdoitem_ (s, t); - else - s = ffeexpr_sym_lhs_impdoctrl_ (s, t); - k = ffesymbol_kind (s); - bad = (k != FFEINFO_kindENTITY) - || ((ffesymbol_where (s) != FFEINFO_whereCONSTANT) - && (ffesymbol_where (s) != FFEINFO_whereIMMEDIATE)); - break; - case FFEEXPR_contextSFUNCDEF: case FFEEXPR_contextSFUNCDEFINDEX_: --- 15858,15861 ---- *************** ffeexpr_declare_unadorned_ (ffelexToken *** 15928,15948 **** goto understood; /* :::::::::::::::::::: */ - case FFEEXPR_contextDATAIMPDOINDEX_: - s = ffecom_sym_exec_transition (s); - if (ffesymbol_state (s) == FFESYMBOL_stateUNDERSTOOD) - goto understood; /* :::::::::::::::::::: */ - s = ffeexpr_sym_impdoitem_ (s, t); - goto understood; /* :::::::::::::::::::: */ - - case FFEEXPR_contextDATAIMPDOCTRL_: - s = ffecom_sym_exec_transition (s); - if (ffesymbol_state (s) == FFESYMBOL_stateUNDERSTOOD) - goto understood; /* :::::::::::::::::::: */ - if (ffeexpr_stack_->is_rhs) - s = ffeexpr_sym_impdoitem_ (s, t); - else - s = ffeexpr_sym_lhs_impdoctrl_ (s, t); - goto understood; /* :::::::::::::::::::: */ - case FFEEXPR_contextEQUIVALENCE: s = ffeexpr_sym_lhs_equivalence_ (s, t); --- 15959,15962 ---- *************** ffeexpr_sym_impdoitem_ (ffesymbol sp, ff *** 16149,16152 **** --- 16163,16167 ---- assert (!(sa & ~(FFESYMBOL_attrsACTUALARG + | FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY *************** ffeexpr_sym_impdoitem_ (ffesymbol sp, ff *** 16177,16180 **** --- 16192,16196 ---- { assert (!(sa & ~(FFESYMBOL_attrsARRAY + | FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsTYPE))); *************** ffeexpr_sym_impdoitem_ (ffesymbol sp, ff *** 16194,16207 **** | FFESYMBOL_attrsEXTERNAL | FFESYMBOL_attrsSFARG))); /* Handled above. */ ! assert (!(sa & ~(FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY | FFESYMBOL_attrsDUMMY | FFESYMBOL_attrsEXTERNAL ! | FFESYMBOL_attrsSFARG ! | FFESYMBOL_attrsTYPE))); kind = FFEINFO_kindENTITY; ! if (sa & FFESYMBOL_attrsANYLEN) na = FFESYMBOL_attrsetNONE; else if (ffest_is_entry_valid ()) --- 16210,16224 ---- | FFESYMBOL_attrsEXTERNAL | FFESYMBOL_attrsSFARG))); /* Handled above. */ ! assert (!(sa & ~(FFESYMBOL_attrsTYPE ! | FFESYMBOL_attrsADJUSTABLE ! | FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY | FFESYMBOL_attrsDUMMY | FFESYMBOL_attrsEXTERNAL ! | FFESYMBOL_attrsSFARG))); kind = FFEINFO_kindENTITY; ! if (sa & (FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsANYLEN)) na = FFESYMBOL_attrsetNONE; else if (ffest_is_entry_valid ()) *************** ffeexpr_sym_lhs_call_ (ffesymbol s, ffel *** 16292,16295 **** --- 16309,16313 ---- assert (!(sa & ~(FFESYMBOL_attrsACTUALARG + | FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY *************** ffeexpr_sym_lhs_call_ (ffesymbol s, ffel *** 16342,16345 **** --- 16360,16364 ---- { assert (!(sa & ~(FFESYMBOL_attrsARRAY + | FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsTYPE))); *************** ffeexpr_sym_lhs_call_ (ffesymbol s, ffel *** 16359,16368 **** | FFESYMBOL_attrsEXTERNAL | FFESYMBOL_attrsSFARG))); /* Handled above. */ ! assert (!(sa & ~(FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY | FFESYMBOL_attrsDUMMY | FFESYMBOL_attrsEXTERNAL ! | FFESYMBOL_attrsSFARG ! | FFESYMBOL_attrsTYPE))); error = TRUE; --- 16378,16388 ---- | FFESYMBOL_attrsEXTERNAL | FFESYMBOL_attrsSFARG))); /* Handled above. */ ! assert (!(sa & ~(FFESYMBOL_attrsTYPE ! | FFESYMBOL_attrsADJUSTABLE ! | FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY | FFESYMBOL_attrsDUMMY | FFESYMBOL_attrsEXTERNAL ! | FFESYMBOL_attrsSFARG))); error = TRUE; *************** ffeexpr_sym_lhs_data_ (ffesymbol s, ffel *** 16446,16449 **** --- 16466,16470 ---- assert (!(sa & ~(FFESYMBOL_attrsACTUALARG + | FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY *************** ffeexpr_sym_lhs_data_ (ffesymbol s, ffel *** 16480,16485 **** --- 16501,16509 ---- { assert (!(sa & ~(FFESYMBOL_attrsARRAY + | FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsTYPE))); + if (sa & FFESYMBOL_attrsADJUSTABLE) + error = TRUE; where = FFEINFO_whereLOCAL; } *************** ffeexpr_sym_lhs_data_ (ffesymbol s, ffel *** 16497,16508 **** | FFESYMBOL_attrsEXTERNAL | FFESYMBOL_attrsSFARG))); /* Handled above. */ ! assert (!(sa & ~(FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY | FFESYMBOL_attrsDUMMY | FFESYMBOL_attrsEXTERNAL ! | FFESYMBOL_attrsSFARG ! | FFESYMBOL_attrsTYPE))); ! if (sa & FFESYMBOL_attrsANYLEN) error = TRUE; else --- 16521,16533 ---- | FFESYMBOL_attrsEXTERNAL | FFESYMBOL_attrsSFARG))); /* Handled above. */ ! assert (!(sa & ~(FFESYMBOL_attrsTYPE ! | FFESYMBOL_attrsADJUSTABLE ! | FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY | FFESYMBOL_attrsDUMMY | FFESYMBOL_attrsEXTERNAL ! | FFESYMBOL_attrsSFARG))); ! if (sa & (FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsANYLEN)) error = TRUE; else *************** ffeexpr_sym_lhs_extfunc_ (ffesymbol s, f *** 16645,16648 **** --- 16670,16674 ---- assert (!(sa & ~(FFESYMBOL_attrsACTUALARG + | FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY *************** ffeexpr_sym_lhs_extfunc_ (ffesymbol s, f *** 16695,16698 **** --- 16721,16725 ---- { assert (!(sa & ~(FFESYMBOL_attrsARRAY + | FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsTYPE))); *************** ffeexpr_sym_lhs_extfunc_ (ffesymbol s, f *** 16712,16723 **** | FFESYMBOL_attrsEXTERNAL | FFESYMBOL_attrsSFARG))); /* Handled above. */ ! assert (!(sa & ~(FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY | FFESYMBOL_attrsDUMMY | FFESYMBOL_attrsEXTERNAL ! | FFESYMBOL_attrsSFARG ! | FFESYMBOL_attrsTYPE))); ! if (sa & FFESYMBOL_attrsANYLEN) error = TRUE; else --- 16739,16751 ---- | FFESYMBOL_attrsEXTERNAL | FFESYMBOL_attrsSFARG))); /* Handled above. */ ! assert (!(sa & ~(FFESYMBOL_attrsTYPE ! | FFESYMBOL_attrsADJUSTABLE ! | FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY | FFESYMBOL_attrsDUMMY | FFESYMBOL_attrsEXTERNAL ! | FFESYMBOL_attrsSFARG))); ! if (sa & (FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsANYLEN)) error = TRUE; else *************** ffeexpr_sym_rhs_actualarg_ (ffesymbol s, *** 16923,16926 **** --- 16951,16955 ---- assert (!(sa & ~(FFESYMBOL_attrsACTUALARG + | FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY *************** ffeexpr_sym_rhs_actualarg_ (ffesymbol s, *** 16979,16982 **** --- 17008,17012 ---- { assert (!(sa & ~(FFESYMBOL_attrsARRAY + | FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsTYPE))); *************** ffeexpr_sym_rhs_actualarg_ (ffesymbol s, *** 16996,17005 **** | FFESYMBOL_attrsEXTERNAL | FFESYMBOL_attrsSFARG))); /* Handled above. */ ! assert (!(sa & ~(FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY | FFESYMBOL_attrsDUMMY | FFESYMBOL_attrsEXTERNAL ! | FFESYMBOL_attrsSFARG ! | FFESYMBOL_attrsTYPE))); if (sa & FFESYMBOL_attrsANYLEN) --- 17026,17036 ---- | FFESYMBOL_attrsEXTERNAL | FFESYMBOL_attrsSFARG))); /* Handled above. */ ! assert (!(sa & ~(FFESYMBOL_attrsTYPE ! | FFESYMBOL_attrsADJUSTABLE ! | FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY | FFESYMBOL_attrsDUMMY | FFESYMBOL_attrsEXTERNAL ! | FFESYMBOL_attrsSFARG))); if (sa & FFESYMBOL_attrsANYLEN) *************** ffeexpr_sym_rhs_let_ (ffesymbol s, ffele *** 17148,17151 **** --- 17179,17183 ---- assert (!(sa & ~(FFESYMBOL_attrsACTUALARG + | FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY *************** ffeexpr_sym_rhs_let_ (ffesymbol s, ffele *** 17182,17192 **** { assert (!(sa & ~(FFESYMBOL_attrsARRAY | FFESYMBOL_attrsTYPE))); ! where = FFEINFO_whereLOCAL; /* Actually an error, but at least we ! know it's a local array, and since ! this is the only difference wrt ! _paren_lhs_let_, this function ! does that too. */ } else if (sa & FFESYMBOL_attrsSFARG) --- 17214,17221 ---- { assert (!(sa & ~(FFESYMBOL_attrsARRAY + | FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsTYPE))); ! where = FFEINFO_whereLOCAL; } else if (sa & FFESYMBOL_attrsSFARG) *************** ffeexpr_sym_rhs_let_ (ffesymbol s, ffele *** 17203,17212 **** | FFESYMBOL_attrsEXTERNAL | FFESYMBOL_attrsSFARG))); /* Handled above. */ ! assert (!(sa & ~(FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY | FFESYMBOL_attrsDUMMY | FFESYMBOL_attrsEXTERNAL ! | FFESYMBOL_attrsSFARG ! | FFESYMBOL_attrsTYPE))); if (sa & FFESYMBOL_attrsANYLEN) --- 17232,17242 ---- | FFESYMBOL_attrsEXTERNAL | FFESYMBOL_attrsSFARG))); /* Handled above. */ ! assert (!(sa & ~(FFESYMBOL_attrsTYPE ! | FFESYMBOL_attrsADJUSTABLE ! | FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY | FFESYMBOL_attrsDUMMY | FFESYMBOL_attrsEXTERNAL ! | FFESYMBOL_attrsSFARG))); if (sa & FFESYMBOL_attrsANYLEN) *************** ffeexpr_declare_parenthesized_ (ffelexTo *** 17361,17364 **** --- 17391,17416 ---- s = ffesymbol_declare_local (t, maybe_intrin); + switch (ffeexpr_context_outer_ (ffeexpr_stack_)) + /* Special-case these since they can involve a different concept + of "state" (in the stmtfunc name space). */ + { + case FFEEXPR_contextDATAIMPDOINDEX_: + case FFEEXPR_contextDATAIMPDOCTRL_: + if (ffeexpr_context_outer_ (ffeexpr_stack_) + == FFEEXPR_contextDATAIMPDOINDEX_) + s = ffeexpr_sym_impdoitem_ (s, t); + else + if (ffeexpr_stack_->is_rhs) + s = ffeexpr_sym_impdoitem_ (s, t); + else + s = ffeexpr_sym_lhs_impdoctrl_ (s, t); + if (ffesymbol_kind (s) != FFEINFO_kindANY) + ffesymbol_error (s, t); + return s; + + default: + break; + } + switch ((ffesymbol_sfdummyparent (s) == NULL) ? ffesymbol_state (s) *************** ffeexpr_declare_parenthesized_ (ffelexTo *** 17389,17397 **** break; - case FFEEXPR_contextDATAIMPDOINDEX_: - case FFEEXPR_contextDATAIMPDOCTRL_: - break; /* UNDERSTOOD case still needs to call fns, - let it do this. */ - case FFEEXPR_contextSFUNCDEF: case FFEEXPR_contextSFUNCDEFINDEX_: --- 17441,17444 ---- *************** ffeexpr_declare_parenthesized_ (ffelexTo *** 17497,17510 **** break; - case FFEEXPR_contextDATAIMPDOINDEX_: - s = ffeexpr_sym_impdoitem_ (s, t); - bad = TRUE; - break; - - case FFEEXPR_contextDATAIMPDOCTRL_: - s = ffeexpr_sym_lhs_impdoctrl_ (s, t); - bad = TRUE; - break; - case FFEEXPR_contextSFUNCDEF: case FFEEXPR_contextSFUNCDEFINDEX_: --- 17544,17547 ---- *************** ffeexpr_declare_parenthesized_ (ffelexTo *** 17684,17701 **** goto understood; /* :::::::::::::::::::: */ - case FFEEXPR_contextDATAIMPDOINDEX_: - s = ffecom_sym_exec_transition (s); - if (ffesymbol_state (s) == FFESYMBOL_stateUNDERSTOOD) - goto understood; /* :::::::::::::::::::: */ - s = ffeexpr_sym_impdoitem_ (s, t); - goto understood; /* :::::::::::::::::::: */ - - case FFEEXPR_contextDATAIMPDOCTRL_: - s = ffecom_sym_exec_transition (s); - if (ffesymbol_state (s) == FFESYMBOL_stateUNDERSTOOD) - goto understood; /* :::::::::::::::::::: */ - s = ffeexpr_sym_lhs_impdoctrl_ (s, t); - goto understood; /* :::::::::::::::::::: */ - case FFEEXPR_contextEQUIVALENCE: s = ffeexpr_sym_lhs_equivalence_ (s, t); --- 17721,17724 ---- *************** ffeexpr_paren_rhs_let_ (ffesymbol s, ffe *** 17824,17827 **** --- 17847,17851 ---- assert (!(sa & ~(FFESYMBOL_attrsACTUALARG + | FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY *************** ffeexpr_paren_rhs_let_ (ffesymbol s, ffe *** 17873,17876 **** --- 17897,17901 ---- { assert (!(sa & ~(FFESYMBOL_attrsARRAY + | FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsTYPE))); *************** ffeexpr_paren_rhs_let_ (ffesymbol s, ffe *** 17891,17900 **** | FFESYMBOL_attrsEXTERNAL | FFESYMBOL_attrsSFARG))); /* Handled above. */ ! assert (!(sa & ~(FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY | FFESYMBOL_attrsDUMMY | FFESYMBOL_attrsEXTERNAL ! | FFESYMBOL_attrsSFARG ! | FFESYMBOL_attrsTYPE))); if (ffeintrin_is_intrinsic (ffesymbol_text (s), t, FALSE, --- 17916,17926 ---- | FFESYMBOL_attrsEXTERNAL | FFESYMBOL_attrsSFARG))); /* Handled above. */ ! assert (!(sa & ~(FFESYMBOL_attrsTYPE ! | FFESYMBOL_attrsADJUSTABLE ! | FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY | FFESYMBOL_attrsDUMMY | FFESYMBOL_attrsEXTERNAL ! | FFESYMBOL_attrsSFARG))); if (ffeintrin_is_intrinsic (ffesymbol_text (s), t, FALSE, *************** ffeexpr_paren_rhs_let_ (ffesymbol s, ffe *** 17931,17934 **** --- 17957,17965 ---- arg or constant, but it can't become either now. */ + else if (sa & FFESYMBOL_attrsADJUSTABLE) + { + kind = FFEINFO_kindENTITY; + where = FFEINFO_whereLOCAL; + } else { *************** ffeexpr_token_funsubstr_ (ffelexToken ft *** 18994,18997 **** --- 19025,19029 ---- ffebld_symter_set_generic (symter, gen); ffebld_symter_set_specific (symter, spec); + ffebld_symter_set_implementation (symter, imp); ffesymbol_set_generic (s, gen); ffesymbol_set_specific (s, spec); diff -rcp2N g77-0.5.17/f/expr.h g77-0.5.18/f/expr.h *** g77-0.5.17/f/expr.h Wed Aug 30 15:53:37 1995 --- g77-0.5.18/f/expr.h Mon Mar 25 12:44:29 1996 *************** ffelexHandler ffeexpr_lhs (mallocPool po *** 174,177 **** --- 174,181 ---- ffeexprCallback callback); void ffeexpr_terminate_2 (void); + void ffeexpr_type_combine (ffeinfoBasictype *nbt, ffeinfoKindtype *nkt, + ffeinfoBasictype lbt, ffeinfoKindtype lkt, + ffeinfoBasictype rbt, ffeinfoKindtype rkt, + ffelexToken t); /* Define macros. */ diff -rcp2N g77-0.5.17/f/g77.1 g77-0.5.18/f/g77.1 *** g77-0.5.17/f/g77.1 Sat Nov 18 20:48:35 1995 --- g77-0.5.18/f/g77.1 Fri Mar 1 00:24:30 1996 *************** *** 1,6 **** ! .\" Copyright (c) 1995 Free Software Foundation -*-Text-*- .\" See section COPYING for conditions for redistribution .\" FIXME: no info here on predefines. Should there be? extra for F77... ! .TH G77 1 "18nov1995" "GNU Tools" "GNU Tools" .de BP .sp --- 1,6 ---- ! .\" Copyright (c) 1995, 1996 Free Software Foundation -*-Text-*- .\" See section COPYING for conditions for redistribution .\" FIXME: no info here on predefines. Should there be? extra for F77... ! .TH G77 1 "1996-03-01" "GNU Tools" "GNU Tools" .de BP .sp *************** *** 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; --- 9,65 ---- .. .SH NAME ! g77 \- GNU project F77 Compiler (v0.5.18) .SH SYNOPSIS .RB g77 " [" \c .IR option " | " "filename " ].\|.\|. + .SH WARNING + The information in this man page is an extract from the full + documentation of the GNU Fortran compiler, and is limited to the meaning of + the options. + .PP + This man page is not kept up to date except when volunteers want to + maintain it. If you find a discrepancy between the man page and the + software, please check the Info file, which is the authoritative + documentation. + .PP + If we find that the things in this man page that are out of date cause + significant confusion or complaints, we will stop distributing the man + page. The alternative, updating the man page when we update the Info + file, is impractical because the rest of the work of maintaining GNU Fortran + leaves us no time for that. The GNU project regards man pages as + obsolete and should not let them take time away from other things. + .PP + For complete and current documentation, refer to the Info file `\|\c + .B g77\c + \&\|' or the manual + .I + Using and Porting GNU Fortran (for version 0.5.18)\c + \&. Both are made from the Texinfo source file + .BR g77.texi . + .PP + If your system has the `\|\c + .B info\c + \&\|' command installed, the command `\|\c + .B info g77\c + \&\|' should work, unless + .B g77 + has not been properly installed. + If your system lacks `\|\c + .B info\c + \&\|', or you wish to avoid using it for now, + the command `\|\c + .B more /usr/info/g77.info*\c + \&\|' should work, unless + .B g77 + has not been properly installed. + .PP + If + .B g77 + has not been properly installed, so that you + cannot easily access the Info file for it, + ask your system administrator, or the installer + of + .B g77 + (if you know who that is) to fix the problem. .SH DESCRIPTION The C and F77 compilers are integrated; *************** of the compiler, see *** 28,31 **** --- 77,83 ---- .BR gcc ( 1 ). + For complete documentation on GNU Fortran, type + .BR info g77 + F77 source files use the suffix `\|\c .B .f\c *************** with macros. *** 200,214 **** .SH FILES .ta \w'LIBDIR/g77\-include 'u ! file.h C header (preprocessor) file .br ! file.f preprocessed C source file .br ! file.F F77 source file .br ! file.s assembly language file .br ! file.o object file .br ! a.out link edited output .br \fITMPDIR\fR/cc\(** temporary files --- 252,270 ---- .SH FILES .ta \w'LIBDIR/g77\-include 'u ! file.h C header (preprocessor) file ! .br ! file.f Fortran source file ! .br ! file.for Fortran source file .br ! file.F preprocessed Fortran source file .br ! file.fpp preprocessed Fortran source file .br ! file.s assembly language file .br ! file.o object file .br ! a.out link edited output .br \fITMPDIR\fR/cc\(** temporary files *************** a.out link edited output *** 218,221 **** --- 274,279 ---- \fILIBDIR\fR/f771 compiler .br + \fILIBDIR\fR/libf2c.a Fortran run-time library + .br \fILIBDIR\fR/libgcc.a GCC subroutine library .br *************** if available, else *** 246,256 **** \&). .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 ! .RB "`\|" gcc "\|', `\|" cpp \|', .RB `\| as \|', `\| ld \|', and --- 304,310 ---- \&). .SH "SEE ALSO" gcc(1), cpp(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1). .br ! .RB "`\|" g77 "\|', `\|" gcc "\|', `\|" cpp \|', .RB `\| as \|', `\| ld \|', and *************** entries in *** 261,264 **** --- 315,321 ---- .br .I + Using and Porting GNU Fortran (for version 0.5.18)\c + , James Craig Burley; + .I Using and Porting GNU CC (for version 2.0)\c , Richard M. Stallman; *************** in the g77 distribution. *** 282,286 **** .SH COPYING ! Copyright (c) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of --- 339,343 ---- .SH COPYING ! Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of *************** the original English. *** 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. --- 357,360 ---- .SH AUTHORS See the GNU CC Manual for the contributors to GNU CC. ! See the GNU Fortran Manual for the contributors to ! GNU Fortran. diff -rcp2N g77-0.5.17/f/g77.info g77-0.5.18/f/g77.info *** g77-0.5.17/f/g77.info Wed Dec 31 19:00:00 1969 --- g77-0.5.18/f/g77.info Mon Apr 1 10:20:51 1996 *************** *** 0 **** --- 1,164 ---- + This is Info file g77.info, produced by Makeinfo-1.64 from the input + file g77.texi. + + This file explains how to use the GNU Fortran system. + + Published by the Free Software Foundation 59 Temple Place - Suite 330 + Boston, MA 02111-1307 USA + + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of this + manual provided the copyright notice and this permission notice are + preserved on all copies. + + Permission is granted to copy and distribute modified versions of + this manual under the conditions for verbatim copying, provided also + that the sections entitled "GNU General Public License," "Funding for + Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are + included exactly as in the original, and provided that the entire + resulting derived work is distributed under the terms of a permission + notice identical to this one. + + Permission is granted to copy and distribute translations of this + manual into another language, under the above conditions for modified + versions, except that the sections entitled "GNU General Public + License," "Funding for Free Software," and "Protect Your Freedom--Fight + `Look And Feel'", and this permission notice, may be included in + translations approved by the Free Software Foundation instead of in the + original English. + + Contributed by James Craig Burley (`burley@gnu.ai.mit.edu'). + Inspired by a first pass at translating `g77-0.5.16/f/DOC' that was + contributed to Craig by David Ronis (`ronis@onsager.chem.mcgill.ca'). + +  + Indirect: + g77.info-1: 1548 + g77.info-2: 50373 + g77.info-3: 82640 + g77.info-4: 129737 + g77.info-5: 178815 + g77.info-6: 225545 + g77.info-7: 272677 + g77.info-8: 321177 + g77.info-9: 362647 +  + Tag Table: + (Indirect) + Node: Top1548 + Node: Copying3235 + Node: Contributors22417 + Node: Funding25254 + Node: Funding GNU Fortran27757 + Node: Look and Feel30561 + Node: Getting Started31063 + Node: What is GNU Fortran?33381 + Node: G77 and GCC42918 + Node: Invoking G7744269 + Node: Option Summary46343 + Node: Overall Options50373 + Node: Fortran Dialect Options53695 + Node: Warning Options61426 + Node: Debugging Options70047 + Node: Optimize Options70880 + Node: Preprocessor Options73127 + Node: Directory Options73862 + Node: Code Gen Options75096 + Node: Environment Variables82182 + Node: News82640 + Node: Changes107165 + Node: Language113422 + Node: Standard Support114940 + Node: Extensions117336 + Node: Types120281 + Node: Constants124751 + Node: Source Form125905 + Node: Pedantic Compilation129737 + Node: Case Sensitivity133114 + Node: Intrinsics141681 + Node: Dialects144945 + Node: Object Compatibility146590 + Node: Dropping f2c Compatibility148901 + Node: Other Compilers151667 + Node: Distensions153439 + Node: Installation155769 + Node: Prerequisites156907 + Node: Problems Installing161444 + Node: General Problems162073 + Node: Cross-compiler Problems165145 + Node: Quick Start167162 + Node: Complete Installation175136 + Node: Unpacking175716 + Node: Merging Distributions178815 + Node: Installing f77184045 + Node: Installing f2c185390 + Node: Patching GNU Fortran188315 + Node: Where to Install189550 + Node: Configuring gcc192786 + Node: Building gcc194558 + Node: Bootstrap Build196565 + Node: Straight Build198473 + Node: Pre-installation Checks199862 + Node: Installation of Binaries203071 + Node: Updating Documentation204416 + Node: Missing bison?205237 + Node: Missing makeinfo?206589 + Node: Distributing Binaries207114 + Node: Settings212809 + Node: Maximum Stackable Size213641 + Node: Floating-point Bit Patterns214207 + Node: Large Initialization214953 + Node: Alpha Problems216535 + Node: Debugging and Interfacing217599 + Node: Names220157 + Node: Main Program Unit223203 + Node: Arrays225545 + Node: Procedures228872 + Node: Adjustable Arrays231233 + Node: Alternate Returns234091 + Node: Functions234963 + Node: Common Blocks236583 + Node: Local Equivalence Areas237743 + Node: Alternate Entry Points239247 + Node: Assigned Statement Labels246013 + Node: Collected Fortran Wisdom247852 + Node: Overly Convenient Options249288 + Node: Block Data and Libraries252273 + Node: Faster Programs254672 + Node: Working Programs256280 + Node: Loops258948 + Node: Advantages Over f2c264152 + Node: Language Extensions265042 + Node: Compiler Options265549 + Node: Compiler Speed266001 + Node: Program Speed266710 + Node: Ease of Debugging267993 + Node: Character and Hollerith Constants270431 + Node: Trouble271225 + Node: But-bugs272677 + Node: Actual Bugs277795 + Node: Missing Features285801 + Node: Disappointments299831 + Node: Non-bugs302230 + Node: Warnings and Errors313799 + Node: Open Questions315483 + Node: Bugs316771 + Node: Bug Criteria318161 + Node: Bug Lists320407 + Node: Bug Reporting321177 + Node: Sending Patches334589 + Node: Service340071 + Node: Adding Options340539 + Node: Projects344498 + Node: Efficiency345337 + Node: Better Optimization348234 + Node: Simplify Porting352050 + Node: More Extensions353805 + Node: Machine Model356513 + Node: Internals Documentation357799 + Node: Internals Improvements358031 + Node: Better Diagnostics361577 + Node: Index362647 +  + End Tag Table diff -rcp2N g77-0.5.17/f/g77.info-1 g77-0.5.18/f/g77.info-1 *** g77-0.5.17/f/g77.info-1 Wed Dec 31 19:00:00 1969 --- g77-0.5.18/f/g77.info-1 Mon Apr 1 10:20:50 1996 *************** *** 0 **** --- 1,1045 ---- + This is Info file g77.info, produced by Makeinfo-1.64 from the input + file g77.texi. + + This file explains how to use the GNU Fortran system. + + Published by the Free Software Foundation 59 Temple Place - Suite 330 + Boston, MA 02111-1307 USA + + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of this + manual provided the copyright notice and this permission notice are + preserved on all copies. + + Permission is granted to copy and distribute modified versions of + this manual under the conditions for verbatim copying, provided also + that the sections entitled "GNU General Public License," "Funding for + Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are + included exactly as in the original, and provided that the entire + resulting derived work is distributed under the terms of a permission + notice identical to this one. + + Permission is granted to copy and distribute translations of this + manual into another language, under the above conditions for modified + versions, except that the sections entitled "GNU General Public + License," "Funding for Free Software," and "Protect Your Freedom--Fight + `Look And Feel'", and this permission notice, may be included in + translations approved by the Free Software Foundation instead of in the + original English. + + Contributed by James Craig Burley (`burley@gnu.ai.mit.edu'). + Inspired by a first pass at translating `g77-0.5.16/f/DOC' that was + contributed to Craig by David Ronis (`ronis@onsager.chem.mcgill.ca'). + +  + File: g77.info, Node: Top, Next: Copying, Up: (DIR) + + Introduction + ************ + + This manual documents how to run, install and port the GNU Fortran + compiler, as well as its new features and incompatibilities, and how to + report bugs. It corresponds to GNU Fortran version 0.5.18. + + * Menu: + + * Copying:: GNU General Public License says + how you can copy and share GNU Fortran. + * Contributors:: People who have contributed to GNU Fortran. + * Funding:: How to help assure continued work for free software. + * Funding GNU Fortran:: How to help assure continued work on GNU Fortran. + * Look and Feel:: Protect your freedom--fight "look and feel". + + * Getting Started:: Finding your way around this manual. + * What is GNU Fortran?:: How `g77' fits into the universe. + * G77 and GCC:: You can compile Fortran, C, or other programs. + * Invoking G77:: Command options supported by `g77'. + * News:: News about recent releases of `g77'. + * Changes:: User-visible changes to recent releases of `g77'. + * Language:: The GNU Fortran language. + * Installation:: How to configure, compile and install GNU Fortran. + * Debugging and Interfacing:: How `g77' generates code. + * Collected Fortran Wisdom:: How to avoid Trouble. + * Trouble:: If you have trouble with GNU Fortran. + * Open Questions:: Things we'd like to know. + * Bugs:: How, why, and where to report bugs. + * Service:: How to find suppliers of support for GNU Fortran. + + * Adding Options:: Guidance on teaching `g77' about new options. + * Projects:: Projects for `g77' internals hackers. + + * Index:: Index of concepts and symbol names. + +  + File: g77.info, Node: Copying, Next: Contributors, Prev: Top, Up: Top + + GNU GENERAL PUBLIC LICENSE + ************************** + + Version 2, June 1991 + + 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. + + Preamble + ======== + + The licenses for most software are designed to take away your + freedom to share and change it. By contrast, the GNU General Public + License is intended to guarantee your freedom to share and change free + software--to make sure the software is free for all its users. This + General Public License applies to most of the Free Software + Foundation's software and to any other program whose authors commit to + using it. (Some other Free Software Foundation software is covered by + the GNU Library General Public License instead.) You can apply it to + your programs, too. + + When we speak of free software, we are referring to freedom, not + price. Our General Public Licenses are designed to make sure that you + have the freedom to distribute copies of free software (and charge for + this service if you wish), that you receive source code or can get it + if you want it, that you can change the software or use pieces of it in + new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid + anyone to deny you these rights or to ask you to surrender the rights. + These restrictions translate to certain responsibilities for you if you + distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether + gratis or for a fee, you must give the recipients all the rights that + you have. You must make sure that they, too, receive or can get the + source code. And you must show them these terms so they know their + rights. + + We protect your rights with two steps: (1) copyright the software, + and (2) offer you this license which gives you legal permission to copy, + distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain + that everyone understands that there is no warranty for this free + software. If the software is modified by someone else and passed on, we + want its recipients to know that what they have is not the original, so + that any problems introduced by others will not reflect on the original + authors' reputations. + + Finally, any free program is threatened constantly by software + patents. We wish to avoid the danger that redistributors of a free + program will individually obtain patent licenses, in effect making the + program proprietary. To prevent this, we have made it clear that any + patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and + modification follow. + + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains a + notice placed by the copyright holder saying it may be distributed + under the terms of this General Public License. The "Program", + below, refers to any such program or work, and a "work based on + the Program" means either the Program or any derivative work under + copyright law: that is to say, a work containing the Program or a + portion of it, either verbatim or with modifications and/or + translated into another language. (Hereinafter, translation is + included without limitation in the term "modification".) Each + licensee is addressed as "you". + + Activities other than copying, distribution and modification are + not covered by this License; they are outside its scope. The act + of running the Program is not restricted, and the output from the + Program is covered only if its contents constitute a work based on + the Program (independent of having been made by running the + Program). Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's + source code as you receive it, in any medium, provided that you + conspicuously and appropriately publish on each copy an appropriate + copyright notice and disclaimer of warranty; keep intact all the + notices that refer to this License and to the absence of any + warranty; and give any other recipients of the Program a copy of + this License along with the Program. + + You may charge a fee for the physical act of transferring a copy, + and you may at your option offer warranty protection in exchange + for a fee. + + 2. You may modify your copy or copies of the Program or any portion + of it, thus forming a work based on the Program, and copy and + distribute such modifications or work under the terms of Section 1 + above, provided that you also meet all of these conditions: + + a. You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b. You must cause any work that you distribute or publish, that + in whole or in part contains or is derived from the Program + or any part thereof, to be licensed as a whole at no charge + to all third parties under the terms of this License. + + c. If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display + an announcement including an appropriate copyright notice and + a notice that there is no warranty (or else, saying that you + provide a warranty) and that users may redistribute the + program under these conditions, and telling the user how to + view a copy of this License. (Exception: if the Program + itself is interactive but does not normally print such an + announcement, your work based on the Program is not required + to print an announcement.) + + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the + Program, and can be reasonably considered independent and separate + works in themselves, then this License, and its terms, do not + apply to those sections when you distribute them as separate + works. But when you distribute the same sections as part of a + whole which is a work based on the Program, the distribution of + the whole must be on the terms of this License, whose permissions + for other licensees extend to the entire whole, and thus to each + and every part regardless of who wrote it. + + Thus, it is not the intent of this section to claim rights or + contest your rights to work written entirely by you; rather, the + intent is to exercise the right to control the distribution of + derivative or collective works based on the Program. + + In addition, mere aggregation of another work not based on the + Program with the Program (or with a work based on the Program) on + a volume of a storage or distribution medium does not bring the + other work under the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, + under Section 2) in object code or executable form under the terms + of Sections 1 and 2 above provided that you also do one of the + following: + + a. Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Sections 1 and 2 above on a medium customarily used for + software interchange; or, + + b. Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a + medium customarily used for software interchange; or, + + c. Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with + such an offer, in accord with Subsection b above.) + + The source code for a work means the preferred form of the work for + making modifications to it. For an executable work, complete + source code means all the source code for all modules it contains, + plus any associated interface definition files, plus the scripts + used to control compilation and installation of the executable. + However, as a special exception, the source code distributed need + not include anything that is normally distributed (in either + source or binary form) with the major components (compiler, + kernel, and so on) of the operating system on which the executable + runs, unless that component itself accompanies the executable. + + If distribution of executable or object code is made by offering + access to copy from a designated place, then offering equivalent + access to copy the source code from the same place counts as + distribution of the source code, even though third parties are not + compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense or distribute the Program is + void, and will automatically terminate your rights under this + License. However, parties who have received copies, or rights, + from you under this License will not have their licenses + terminated so long as such parties remain in full compliance. + + 5. You are not required to accept this License, since you have not + signed it. However, nothing else grants you permission to modify + or distribute the Program or its derivative works. These actions + are prohibited by law if you do not accept this License. + Therefore, by modifying or distributing the Program (or any work + based on the Program), you indicate your acceptance of this + License to do so, and all its terms and conditions for copying, + distributing or modifying the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the + Program), the recipient automatically receives a license from the + original licensor to copy, distribute or modify the Program + subject to these terms and conditions. You may not impose any + further restrictions on the recipients' exercise of the rights + granted herein. You are not responsible for enforcing compliance + by third parties to this License. + + 7. If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent + issues), conditions are imposed on you (whether by court order, + agreement or otherwise) that contradict the conditions of this + License, they do not excuse you from the conditions of this + License. If you cannot distribute so as to satisfy simultaneously + your obligations under this License and any other pertinent + obligations, then as a consequence you may not distribute the + Program at all. For example, if a patent license would not permit + royalty-free redistribution of the Program by all those who + receive copies directly or indirectly through you, then the only + way you could satisfy both it and this License would be to refrain + entirely from distribution of the Program. + + If any portion of this section is held invalid or unenforceable + under any particular circumstance, the balance of the section is + intended to apply and the section as a whole is intended to apply + in other circumstances. + + It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of + any such claims; this section has the sole purpose of protecting + the integrity of the free software distribution system, which is + implemented by public license practices. Many people have made + generous contributions to the wide range of software distributed + through that system in reliance on consistent application of that + system; it is up to the author/donor to decide if he or she is + willing to distribute software through any other system and a + licensee cannot impose that choice. + + This section is intended to make thoroughly clear what is believed + to be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in + certain countries either by patents or by copyrighted interfaces, + the original copyright holder who places the Program under this + License may add an explicit geographical distribution limitation + excluding those countries, so that distribution is permitted only + in or among countries not thus excluded. In such case, this + License incorporates the limitation as if written in the body of + this License. + + 9. The Free Software Foundation may publish revised and/or new + versions of the General Public License from time to time. Such + new versions will be similar in spirit to the present version, but + may differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the + Program specifies a version number of this License which applies + to it and "any later version", you have the option of following + the terms and conditions either of that version or of any later + version published by the Free Software Foundation. If the Program + does not specify a version number of this License, you may choose + any version ever published by the Free Software Foundation. + + 10. If you wish to incorporate parts of the Program into other free + programs whose distribution conditions are different, write to the + author to ask for permission. For software which is copyrighted + by the Free Software Foundation, write to the Free Software + Foundation; we sometimes make exceptions for this. Our decision + will be guided by the two goals of preserving the free status of + all derivatives of our free software and of promoting the sharing + and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO + WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE + LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT + HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT + WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT + NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE + QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE + PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY + SERVICING, REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN + WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY + MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE + LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, + INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR + INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF + DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU + OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY + OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + ============================================= + + If you develop a new program, and you want it to be of the greatest + possible use to the public, the best way to achieve this is to make it + free software which everyone can redistribute and change under these + terms. + + To do so, attach the following notices to the program. It is safest + to attach them to the start of each source file to most effectively + convey the exclusion of warranty; and each file should have at least + the "copyright" line and a pointer to where the full notice is found. + + ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES. + Copyright (C) 19YY NAME OF AUTHOR + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + 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. + + If the program is interactive, make it output a short notice like + this when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details + type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + + The hypothetical commands `show w' and `show c' should show the + appropriate parts of the General Public License. Of course, the + commands you use may be called something other than `show w' and `show + c'; they could even be mouse-clicks or menu items--whatever suits your + program. + + You should also get your employer (if you work as a programmer) or + your school, if any, to sign a "copyright disclaimer" for the program, + if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + SIGNATURE OF TY COON, 1 April 1989 + Ty Coon, President of Vice + + This General Public License does not permit incorporating your + program into proprietary programs. If your program is a subroutine + library, you may consider it more useful to permit linking proprietary + applications with the library. If this is what you want to do, use the + GNU Library General Public License instead of this License. + +  + File: g77.info, Node: Contributors, Next: Funding, Prev: Copying, Up: Top + + Contributors to GNU Fortran + *************************** + + In addition to James Craig Burley, who wrote the front end, many + people have helped create and improve GNU Fortran. + + * The packaging and compiler portions of GNU Fortran are based + largely on the GNU CC compiler. *Note Contributors to GNU CC: + (gcc)Contributors, for more information. + + * The run-time library used by GNU Fortran is a minor repackaging of + the `libf2c' library (combined from the `libF77' and `libI77' + libraries) provided as part of `f2c', available for free from + `netlib' sites on the Internet. + + * Cygnus Support and The Free Software Foundation contributed + significant money and/or equipment to Craig's efforts. + + * The following individuals served as alpha testers prior to `g77''s + public release. This work consisted of testing, researching, + sometimes debugging, and occasionally providing small amounts of + code and fixes for `g77', plus offering plenty of helpful advice + to Craig: + + Jonathan Corbet + + Dr. Mark Fernyhough + + Takafumi Hayashi (The University of + AIzu)--`takafumi@u-aizu.ac.jp' + + Kate Hedstrom + + Michel Kern (INRIA and Rice + University)--`Michel.Kern@inria.fr' + + Dr. A. O. V. Le Blanc + + Dave Love + + Rick Lutowski + + Toon Moene + + Rick Niles + + Derk Reefman + + Wayne K. Schroll + + Bill Thorson + + Pedro A. M. Vazquez + + Ian Watson + + * Scott Snyder (`snyder@d0sgif.fnal.gov') provided the patch to add + rudimentary support for `INTEGER*1', `INTEGER*2', and `LOGICAL*1'. + This inspired Craig to add further support, even though the + resulting support would still be incomplete, because version 0.6 + is still a ways off. + + * David Ronis (`ronis@onsager.chem.mcgill.ca') inspired and + encouraged Craig to rewrite the documentation in texinfo format by + contributing a first pass at a translation of the old + `g77-0.5.16/f/DOC' file. + + * Toon Moene (`toon@moene.indiv.nluug.nl') performed some analysis + of generated code as part of an overall project to improve `g77' + code generation to at least be as good as `f2c' used in + conjunction with `gcc'. So far, this has resulted in the three, + somewhat experimental, options added by `g77' to the `gcc' + compiler and its back end. + + * Many other individuals have helped debug, test, and improve `g77' + over the past several years, and undoubtedly more people will be + doing so in the future. If you have done so, and would like to + see your name listed in the above list, please ask! The default + is that people wish to remain anonymous. + +  + File: g77.info, Node: Funding, Next: Funding GNU Fortran, Prev: Contributors, Up: Top + + Funding Free Software + ********************* + + If you want to have more free software a few years from now, it makes + sense for you to help encourage people to contribute funds for its + development. The most effective approach known is to encourage + commercial redistributors to donate. + + Users of free software systems can boost the pace of development by + encouraging for-a-fee distributors to donate part of their selling price + to free software developers--the Free Software Foundation, and others. + + The way to convince distributors to do this is to demand it and + expect it from them. So when you compare distributors, judge them + partly by how much they give to free software development. Show + distributors they must compete to be the one who gives the most. + + To make this approach work, you must insist on numbers that you can + compare, such as, "We will donate ten dollars to the Frobnitz project + for each disk sold." Don't be satisfied with a vague promise, such as + "A portion of the profits are donated," since it doesn't give a basis + for comparison. + + Even a precise fraction "of the profits from this disk" is not very + meaningful, since creative accounting and unrelated business decisions + can greatly alter what fraction of the sales price counts as profit. + If the price you pay is $50, ten percent of the profit is probably less + than a dollar; it might be a few cents, or nothing at all. + + Some redistributors do development work themselves. This is useful + too; but to keep everyone honest, you need to inquire how much they do, + and what kind. Some kinds of development make much more long-term + difference than others. For example, maintaining a separate version of + a program contributes very little; maintaining the standard version of a + program for the whole community contributes much. Easy new ports + contribute little, since someone else would surely do them; difficult + ports such as adding a new CPU to the GNU C compiler contribute more; + major new features or packages contribute the most. + + By establishing the idea that supporting further development is "the + proper thing to do" when distributing free software for a fee, we can + assure a steady flow of resources into making more free software. + + Copyright (C) 1994 Free Software Foundation, Inc. + Verbatim copying and redistribution of this section is permitted + without royalty; alteration is not permitted. + +  + File: g77.info, Node: Funding GNU Fortran, Next: Look and Feel, Prev: Funding, Up: Top + + Funding GNU Fortran + ******************* + + Work on GNU Fortran is still being done mostly by its author, James + Craig Burley (`burley@gnu.ai.mit.edu'), who is a volunteer for, not an + employee of, the Free Software Foundation (FSF). As with other GNU + software, funding is important because it can pay for needed equipment, + personnel, and so on. + + The FSF provides information on the best way to fund ongoing + development of GNU software (such as GNU Fortran) in documents such as + the "GNUS Bulletin". Email `gnu@prep.ai.mit.edu' for information on + funding the FSF. + + To fund specific GNU Fortran work in particular, the FSF might + provide a means for that, but the FSF does not provide direct funding + to the author of GNU Fortran to continue his work. The FSF has + employee salary restrictions that can be incompatible with the + financial needs of some volunteers, who therefore choose to remain + volunteers and thus be able to be free to do contract work and + otherwise make their own schedules for doing GNU work. + + Still, funding the FSF at least indirectly benefits work on specific + projects like GNU Fortran because it ensures the continuing operation + of the FSF offices, their workstations, their network connections, and + so on, which are invaluable to volunteers. (Similarly, hiring Cygnus + Support can help a project like GNU Fortran--Cygnus has been a + long-time donor of equipment usage to the author of GNU Fortran, and + this too has been invaluable--*Note Contributors::.) + + Currently, the only way to directly fund the author of GNU Fortran + in his work on that project is to hire him for the work you want him to + do, or donate money to him. Several people have done this already, + with the result that he has not needed to immediately find contract + work on a few occasions. If more people did this, he would be able to + plan on not doing contract work for many months and could thus devote + that time to work on projects (such as the planned changes for + `g77-0.6') that require longer timeframes to complete. For the latest + information on the status of the author, do `finger -l + burley@gnu.ai.mit.edu', i.e. access `burley''s `.plan' file just as you + would `fortran''s to get `g77' status (except there's no public `ftp' + access to `burley''s `.plan' file--you can email him asking for it). + + Another important way to support work on GNU Fortran is to volunteer + to help out. Work is needed on documentation, testing, porting to + various machines, and in some cases, coding (although major changes + planned for version 0.6 make it difficult to add manpower to this area). + Email `fortran@gnu.ai.mit.edu' to volunteer for this work. + + *Note Funding Free Software: Funding, for more information. + +  + File: g77.info, Node: Look and Feel, Next: Getting Started, Prev: Funding GNU Fortran, Up: Top + + Protect Your Freedom--Fight "Look And Feel" + ******************************************* + + To preserve the ability to write free software, including + replacements for proprietary software, authors must be free to + replicate the user interface to which users of existing software have + become accustomed. + + *Note Protect Your Freedom--Fight "Look And Feel": (gcc)Look and + Feel, for more information. + +  + File: g77.info, Node: Getting Started, Next: What is GNU Fortran?, Prev: Look and Feel, Up: Top + + Getting Started + *************** + + If you don't need help getting started reading the portions of this + manual that are most important to you, you should skip this portion of + the manual. + + If you are new to compilers, especially Fortran compilers, or new to + how compilers are structured under UNIX and UNIX-like systems, you'll + want to see *Note What is GNU Fortran?::. + + If you are new to GNU compilers, or have used only one GNU compiler + in the past and not had to delve into how it lets you manage various + versions and configurations of `gcc', you should see *Note G77 and + GCC::. + + Everyone except experienced `g77' users should see *Note Invoking + G77::. + + If you're acquainted with previous versions of `g77', you should see + *Note News::. Further, if you've actually used previous versions of + `g77', especially if you've written or modified Fortran code to be + compiled by previous versions of `g77', you should see *Note Changes::. + + If you intend to write or otherwise compile code that is not already + strictly conforming ANSI FORTRAN 77--and this is probably everyone--you + should see *Note Language::. + + If you don't already have `g77' installed on your system, you must + see *Note Installation::. + + If you run into trouble getting Fortran code to compile, link, run, + or work properly, you might find answers if you see *Note Debugging and + Interfacing::, see *Note Collected Fortran Wisdom::, and see *Note + Trouble::. You might also find that the problems you are encountering + are bugs in `g77'--see *Note Bugs::, for information on reporting them, + after reading the other material. + + If you need further help with `g77', or with freely redistributable + software in general, see *Note Service::. + + If you would like to help the `g77' project, see *Note Funding GNU + Fortran::, for information on helping financially, and see *Note + Projects::, for information on helping in other ways. + + If you're generally curious about the future of `g77', see *Note + Projects::. If you're curious about its past, see *Note Contributors::, + and see *Note Funding GNU Fortran::. + + To see a few of the questions maintainers of `g77' have, and that + you might be able to answer, see *Note Open Questions::. + +  + File: g77.info, Node: What is GNU Fortran?, Next: G77 and GCC, Prev: Getting Started, Up: Top + + What is GNU Fortran? + ******************** + + GNU Fortran, or `g77', is designed initially as a free replacement + for, or alternative to, the UNIX `f77' command. (Similarly, `gcc' is + designed as a replacement for the UNIX `cc' command.) + + `g77' also is designed to fit in well with the other fine GNU + compilers and tools. + + Sometimes these design goals conflict--in such cases, resolution + often is made in favor of fitting in well with Project GNU. These + cases are usually identified in the appropriate sections of this manual. + + As compilers, `g77', `gcc', and `f77' share the following + characteristics: + + * They read a user's program, stored in a file and containing + instructions written in the appropriate language (Fortran, C, and + so on). This file contains "source code". + + * They translate the user's program into instructions a computer can + carry out more quickly than it takes to translate the instructions + in the first place. These instructions are called "machine + code"--code designed to be efficiently translated and processed by + a machine such as a computer. Humans usually aren't as good + writing machine code as they are at writing Fortran or C, because + it is easy to make tiny mistakes writing machine code. When + writing Fortran or C, it is easy to make big mistakes. + + * They provide information in the generated machine code that can + make it easier to find bugs in the program (using a debugging + tool, called a "debugger", such as `gdb'). + + * They locate and gather machine code already generated to perform + actions requested by statements in the user's program. This + machine code is organized into "libraries" and is located and + gathered during the "link" phase of the compilation process. + (Linking often is thought of as a separate step, because it can be + directly invoked via the `ld' command. However, the `g77' and + `gcc' commands, as with most compiler commands, automatically + perform the linking step by calling on `ld' directly, unless asked + to not do so by the user.) + + * They attempt to diagnose cases where the user's program contains + incorrect usages of the language. The "diagnostics" produced by + the compiler indicate the problem and the location in the user's + source file where the problem was first noticed. The user can use + this information to locate and fix the problem. (Sometimes an + incorrect usage of the language leads to a situation where the + compiler can no longer make any sense of what follows--while a + human might be able to--and thus ends up complaining about many + "problems" it encounters that, in fact, stem from just one + problem, usually the first one reported.) + + * They attempt to diagnose cases where the user's program contains a + correct usage of the language, but instructs the computer to do + something questionable. These diagnostics often are in the form + of "warnings", instead of the "errors" that indicate incorrect + usage of the language. + + How these actions are performed is generally under the control of + the user. Using command-line options, the user can specify how + persnickety the compiler is to be regarding the program (whether to + diagnose questionable usage of the language), how much time to spend + making the generated machine code run faster, and so on. + + `g77' consists of several components: + + * A modified version of the `gcc' command, which also might be + installed as the system's `cc' command. (In many cases, `cc' + refers to the system's "native" C compiler, which might be a + non-GNU compiler, or an older version of `gcc' considered more + stable or that is used to build the operating system kernel.) + + * The `g77' command itself, which also might be installed as the + system's `f77' command. + + * The `libf2c' run-time library. This library contains the machine + code needed to support capabilities of the Fortran language that + are not directly provided by the machine code generated by the + `g77' compilation phase. + + * The compiler itself, internally named `f771'. + + Note that `f771' does not generate machine code directly--it + generates "assembly code" that is a more readable form of machine + code, leaving the conversion to actual machine code to an + "assembler", usually named `as'. + + `gcc' is often thought of as "the C compiler" only, but it does more + than that. Based on command-line options and the names given for files + on the command line, `gcc' determines which actions to perform, + including preprocessing, compiling (in a variety of possible + languages), assembling, and linking. + + For example, the command `gcc foo.c' "drives" the file `foo.c' + through the preprocessor `cpp', then the C compiler (internally named + `cc1'), then the assembler (usually `as'), then the linker (`ld'), + producing an executable program named `a.out' (on UNIX systems). + + As another example, the command `gcc foo.cc' would do much the same + as `gcc foo.c', but instead of using the C compiler named `cc1', `gcc' + would use the C++ compiler (named `cc1plus'). + + In a GNU Fortran installation, `gcc' recognizes Fortran source files + by name just like it does C and C++ source files. It knows to use the + Fortran compiler named `f771', instead of `cc1' or `cc1plus', to + compile Fortran files. + + Non-Fortran-related operation of `gcc' is generally unaffected by + installing the GNU Fortran version of `gcc'. However, without the + installed version of `gcc' being the GNU Fortran version, `gcc' will + not be able to compile and link Fortran programs--and since `g77' uses + `gcc' to do most of the actual work, neither will `g77'! + + The `g77' command is essentially just a front-end for the `gcc' + command. Fortran users will normally use `g77' instead of `gcc', + because `g77' knows how to specify the libraries needed to link with + Fortran programs (`libf2c' and `lm'). `g77' can still compile and link + programs and source files written in other languages, just like `gcc'. + + The command `g77 -v' is a quick way to display lots of version + information for the various programs used to compile a typical + preprocessed Fortran source file--this produces much more output than + `gcc -v' currently does. (It also produces an error message near the + end of the output, a diagnostic from the linker, usually `ld'--you can + safely ignore this error, but do include the entire output with any bug + report you submit.) In the output of this command, the line beginning + `GNU Fortran Front End' identifies the version number of GNU Fortran; + immediately preceding that line is a line identifying the version of + `gcc' with which that version of `g77' was built. + + 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. + + For example, while code generated by `g77' is likely to do + additions, subtractions, and multiplications "in line"--in the actual + compiled code--it is not likely to do trigonometric functions this way. + + Instead, operations like trigonometric functions are compiled by the + `f771' compiler (invoked by `g77' when compiling Fortran code) into + machine code that, when run, calls on functions in `libf2c', so + `libf2c' must be linked with almost every useful program having any + component compiled by GNU Fortran. (As mentioned above, the `g77' + command takes care of all this for you.) + + The `f771' program represents most of what is unique to GNU Fortran. + While the `libf2c' component is really part of `f2c', a free + Fortran-to-C converter distributed by Bellcore (AT&T), and the `g77' + command is just a small front-end to `gcc', `f771' is a combination of + two rather large chunks of code. + + One chunk is the so-called "GNU Back End", or GBE, which knows how + to generate fast code for a wide variety of processors. The same GBE + is used by the C, C++, and Fortran compiler programs `cc1', `cc1plus', + and `f771', plus others. Often the GBE is referred to as the "gcc back + end" or even just "gcc"--in this manual, the term GBE is used whenever + the distinction is important. + + The other chunk of `f771' is the majority of what is unique about + GNU Fortran--the code that knows how to interpret Fortran programs to + determine what they are intending to do, and then communicate that + knowledge to the GBE for actual compilation of those programs. This + chunk is called the "Fortran Front End" (FFE). The `cc1' and `cc1plus' + programs have their own front ends, for the C and C++ languages, + respectively. These fronts ends are responsible for diagnosing + incorrect usage of their respective languages by the programs the + process, and are responsible for most of the warnings about + questionable constructs as well. (The GBE handles producing some + warnings, like those concerning possible references to undefined + variables.) + + Because so much is shared among the compilers for various languages, + much of the behavior and many of the user-selectable options for these + compilers are similar. For example, diagnostics (error messages and + warnings) are similar in appearance; command-line options like `-Wall' + have generally similar effects; and the quality of generated code (in + terms of speed and size) is roughly similar (since that work is done by + the shared GBE). + +  + File: g77.info, Node: G77 and GCC, Next: Invoking G77, Prev: What is GNU Fortran?, Up: Top + + Compile Fortran, C, or Other Programs + ************************************* + + A GNU Fortran installation includes a modified version of the `gcc' + command. + + In a non-Fortran installation, `gcc' recognizes C, C++, and + Objective-C source files. + + In a GNU Fortran installation, `gcc' also recognizes Fortran source + files and accepts Fortran-specific command-line options, plus some + command-line options that are designed to cater to Fortran users but + apply to other languages as well. + + *Note Compile C; C++; or Objective-C: (gcc)G++ and GCC, for + information on the way different languages are handled by the GNU CC + compiler (`gcc'). + + Also provided as part of GNU Fortran is the `g77' command. The + `g77' command is designed to make compiling and linking Fortran + programs somewhat easier than when using the `gcc' command for these + tasks. It does this by analyzing the command line somewhat and + changing it appropriately before submitting it to the `gcc' command. + + Use the `-v' option with `g77' to see what is going on--the first + line of output is the invocation of the `gcc' command. Use + `--driver=true' to disable actual invocation of `gcc' (this works + because `true' is the name of a UNIX command that simply returns + success status). + +  + File: g77.info, Node: Invoking G77, Next: News, Prev: G77 and GCC, Up: Top + + GNU Fortran Command Options + *************************** + + The `g77' command supports all the options supported by the `gcc' + command. *Note GNU CC Command Options: (gcc)Invoking GCC, for + information on the non-Fortran-specific aspects of the `gcc' command + (and, therefore, the `g77' command). + + The `g77' command supports one option not supported by the `gcc' + command: + + `--driver=COMMAND' + Specifies that COMMAND, rather than `gcc', is to be invoked by + `g77' to do its job. For example, within the gcc build directory + after building GNU Fortran (but without having to install it), + `./g77 --driver=./xgcc foo.f -B./'. + + All other options are supported both by `g77' and by `gcc' as + modified (and reinstalled) by the `g77' distribution. In some cases, + options have positive and negative forms; the negative form of `-ffoo' + would be `-fno-foo'. This manual documents only one of these two + forms, whichever one is not the default. + + * Menu: + + * Option Summary:: Brief list of all `g77' options, + without explanations. + * Overall Options:: Controlling the kind of output: + an executable, object files, assembler files, + or preprocessed source. + * Fortran Dialect Options:: Controlling the variant of Fortran language + compiled. + * Warning Options:: How picky should the compiler be? + * Debugging Options:: Symbol tables, measurements, and debugging dumps. + * Optimize Options:: How much optimization? + * Preprocessor Options:: Controlling header files and macro definitions. + Also, getting dependency information for Make. + * Directory Options:: Where to find header files and libraries. + Where to find the compiler executable files. + * Code Gen Options:: Specifying conventions for function calls, data layout + and register usage. + * Environment Variables:: Env vars that affect GNU Fortran. + +  + File: g77.info, Node: Option Summary, Next: Overall Options, Up: Invoking G77 + + Option Summary + ============== + + Here is a summary of all the options specific to GNU Fortran, grouped + by type. Explanations are in the following sections. + + *Overall Options* + *Note Options Controlling the Kind of Output: Overall Options. + --driver -fversion -fset-g77-defaults + + *Fortran Language Options* + *Note Options Controlling Fortran Dialect: Fortran Dialect Options. + -ffree-form -fno-fixed-form -ff90 -fvxt-not-f90 + -ff90-not-vxt -fdollar-ok -fno-backslash + -fintrin-case-initcap -fintrin-case-upper + -fintrin-case-lower -fintrin-case-any + -fmatch-case-initcap -fmatch-case-upper + -fmatch-case-lower -fmatch-case-any + -fsource-case-upper -fsource-case-lower -fsource-case-preserve + -fsymbol-case-initcap -fsymbol-case-upper + -fsymbol-case-lower -fsymbol-case-any + -fcase-strict-upper -fcase-strict-lower + -fcase-initcap -fcase-upper -fcase-lower -fcase-preserve + -fdcp-intrinsics-delete -fdcp-intrinsics-hide + -fdcp-intrinsics-disable -fdcp-intrinsics-enable + -ff2c-intrinsics-delete -ff2c-intrinsics-hide + -ff2c-intrinsics-disable -ff2c-intrinsics-enable + -ff90-intrinsics-delete -ff90-intrinsics-hide + -ff90-intrinsics-disable -ff90-intrinsics-enable + -fmil-intrinsics-delete -fmil-intrinsics-hide + -fmil-intrinsics-disable -fmil-intrinsics-enable + -funix-intrinsics-delete -funix-intrinsics-hide + -funix-intrinsics-disable -funix-intrinsics-enable + -fvxt-intrinsics-delete -fvxt-intrinsics-hide + -fvxt-intrinsics-disable -fvxt-intrinsics-enable + -ffixed-line-length-N -ffixed-line-length-none + + *Warning Options* + *Note Options to Request or Suppress Warnings: Warning Options. + -fsyntax-only -pedantic -pedantic-errors -fpedantic + -fugly -fno-ugly-args -fno-ugly-init -w -Wimplicit + -Wunused -Wuninitialized -Wall -Wsurprising -Werror + -W + + *Debugging Options* + *Note Options for Debugging Your Program or GCC: Debugging Options. + -g + + *Optimization Options* + *Note Options that Control Optimization: Optimize Options. + -ffloat-store -fforce-mem -fforce-addr -fno-inline + -ffast-math -fstrength-reduce -frerun-cse-after-loop + -fexpensive-optimizations -fdelayed-branch + -fschedule-insns -fschedule-insn2 -fcaller-saves + -funroll-loops -funroll-all-loops + -fno-move-all-movables -fno-reduce-all-givs + -fno-rerun-loop-opt + + *Directory Options* + *Note Options for Directory Search: Directory Options. + -IDIR -I- + + *Code Generation Options* + *Note Options for Code Generation Conventions: Code Gen Options. + -fno-automatic -finit-local-zero -fno-f2c + -ff2c-library -fno-underscoring -fno-ident + -fpcc-struct-return -freg-struct-return + -fshort-double -fno-common -fpack-struct + -fzeros + + * Menu: + + * Overall Options:: Controlling the kind of output: + an executable, object files, assembler files, + or preprocessed source. + * Fortran Dialect Options:: Controlling the variant of Fortran language + compiled. + * Warning Options:: How picky should the compiler be? + * Debugging Options:: Symbol tables, measurements, and debugging dumps. + * Optimize Options:: How much optimization? + * Preprocessor Options:: Controlling header files and macro definitions. + Also, getting dependency information for Make. + * Directory Options:: Where to find header files and libraries. + Where to find the compiler executable files. + * Code Gen Options:: Specifying conventions for function calls, data layout + and register usage. + diff -rcp2N g77-0.5.17/f/g77.info-2 g77-0.5.18/f/g77.info-2 *** g77-0.5.17/f/g77.info-2 Wed Dec 31 19:00:00 1969 --- g77-0.5.18/f/g77.info-2 Mon Apr 1 10:20:50 1996 *************** *** 0 **** --- 1,846 ---- + This is Info file g77.info, produced by Makeinfo-1.64 from the input + file g77.texi. + + This file explains how to use the GNU Fortran system. + + Published by the Free Software Foundation 59 Temple Place - Suite 330 + Boston, MA 02111-1307 USA + + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of this + manual provided the copyright notice and this permission notice are + preserved on all copies. + + Permission is granted to copy and distribute modified versions of + this manual under the conditions for verbatim copying, provided also + that the sections entitled "GNU General Public License," "Funding for + Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are + included exactly as in the original, and provided that the entire + resulting derived work is distributed under the terms of a permission + notice identical to this one. + + Permission is granted to copy and distribute translations of this + manual into another language, under the above conditions for modified + versions, except that the sections entitled "GNU General Public + License," "Funding for Free Software," and "Protect Your Freedom--Fight + `Look And Feel'", and this permission notice, may be included in + translations approved by the Free Software Foundation instead of in the + original English. + + Contributed by James Craig Burley (`burley@gnu.ai.mit.edu'). + Inspired by a first pass at translating `g77-0.5.16/f/DOC' that was + contributed to Craig by David Ronis (`ronis@onsager.chem.mcgill.ca'). + +  + File: g77.info, Node: Overall Options, Next: Fortran Dialect Options, Prev: Option Summary, Up: Invoking G77 + + Options Controlling the Kind of Output + ====================================== + + Compilation can involve as many as four stages: preprocessing, + compilation proper, assembly, and linking, always in that order. The + first three stages apply to an individual source file, and end by + producing an object file; linking combines all the object files (those + newly compiled, and those specified as input) into an executable file. + + For any given input file, the file name suffix determines what kind + of compilation is done. Suffixes specific to GNU Fortran are listed + below. *Note gcc: (Using and Porting GNU CC)Overall Options, for + information on suffixes recognized by GNU CC. + + `FILE.f' + `FILE.for' + Fortran source code that should not be preprocessed. + + `FILE.F' + `FILE.fpp' + Fortran source code that must be preprocessed (by the C + preprocessor `cpp', which is part of GNU CC). + + UNIX users typically use the `FILE.f' and `FILE.F' nomenclature. + Users of other operating systems, especially those that cannot + distinguish upper-case letters from lower-case letters in their file + names, typically use the `FILE.for' and `FILE.fpp' nomenclature. + + Use of the preprocessor `cpp' allows use of C-like constructs such + as `#define' and `#include', but can lead to unexpected, even mistaken, + results due to Fortran's source file format. It is recommended that + use of the C preprocessor be limited to `#include' and, in conjunction + with `#define', only `#if' and related directives, thus avoiding + in-line macro expansion entirely. This recommendation applies + especially when using the traditional fixed source form. With free + source form, fewer unexpected transformations are likely to happen, but + use of Hollerith and things like continued character constants can + nevertheless present problems. + + The following options that affect overall processing are recognized + by the `g77' and `gcc' commands in a GNU Fortran installation: + + `--driver=COMMAND' + This works only when invoking the `g77' command, not when invoking + the `gcc' command. *Note GNU Fortran Command Options: Invoking + G77, for information on this option. + + `-fversion' + Ensure that the `g77'-specific version of the compiler phase is + reported, if run. (This is supplied automatically when `-v' or + `--version' is specified as a command-line option for `g77' or + `gcc' and when the resulting commands compile Fortran source + files.) + + `-fset-g77-defaults' + Set up whatever `gcc' options are to apply to Fortran compilations. + For version 0.5.18, this is equivalent to `-fmove-all-movables + -freduce-all-givs -frerun-loop-opt'. (This is supplied + automatically when compiling Fortran code. The description of + this option is here so that users seeing it in the output of, say, + `g77 -v' understand why it is there. Also, developers who run + `f771' directly might want to specify it by hand to get the same + defaults as they would running `f771' via `g77' or `gcc'.) + + *Note Options Controlling the Kind of Output: (gcc)Overall Options, + for information on more options that control the overall operation of + the `gcc' command (and, by extension, the `g77' command). + +  + File: g77.info, Node: Fortran Dialect Options, Next: Warning Options, Prev: Overall Options, Up: Invoking G77 + + Options Controlling Fortran Dialect + =================================== + + The following options control the dialect of Fortran that the + compiler accepts: + + `-ffree-form' + `-fno-fixed-form' + Specify that the source file is written in free form (introduced + in Fortran 90) instead of the more-traditional fixed form. + + `-ff90' + Allow certain Fortran-90 constructs. + + This option controls whether certain Fortran 90 constructs are + recognized. (Other Fortran 90 constructs might or might not be + recognized depending on other options such as `-fvxt-not-f90', + `-ff90-intrinsics-enable', and the current level of support for + Fortran 90.) + + *Note GNU Fortran Extensions: Extensions, for more information. + + `-fvxt-not-f90' + `-ff90-not-vxt' + Specify whether Fortran 90 or other popular extensions are to be + assumed for ambiguous constructs. The default is -fvxt-not-f90. + + For example, with `-ff90-not-vxt', `PRINT *,"double-quoted + string"' is valid, while with `-fvxt-not-f90', `PRINT *,"2000' is + valid. + + (There is no way to allow both constructs in the general case, + since statements like `PRINT *,"2000 !comment?"' would be + ambiguous.) + + *Note GNU Fortran Dialects: Dialects, for more information. + + `-fdollar-ok' + Allow `$' as a valid character in a symbol name. + + `-fno-backslash' + Specify that `\' is not to be specially interpreted in character + and Hollerith constants a la C and many UNIX Fortran compilers. + + For example, with `-fbackslash' in effect, `A\nB' specifies three + characters, with the second one being newline. With + `-fno-backslash', it specifies four characters, `A', `\', `n', and + `B'. + + Note that `g77' implements a fairly general form of backslash + processing that is incompatible with the narrower forms supported + by some other compilers. For example, `'A\003B'' is a + three-character string in `g77', whereas other compilers that + support backslash might not support the three-octal-digit form, + and thus treat that string as longer than three characters. + + *Note Certain Changes We Don't Want to Make: Non-bugs, for + information on why `-fbackslash' is the default instead of + `-fno-backslash'. + + `-fintrin-case-initcap' + `-fintrin-case-upper' + `-fintrin-case-lower' + `-fintrin-case-any' + Specify expected case for intrinsic names. `-fintrin-case-lower' + is the default. + + `-fmatch-case-initcap' + `-fmatch-case-upper' + `-fmatch-case-lower' + `-fmatch-case-any' + Specify expected case for keywords. `-fmatch-case-lower' is the + default. + + `-fsource-case-upper' + `-fsource-case-lower' + `-fsource-case-preserve' + Specify whether source text other than character and Hollerith + constants is to be translated to uppercase, to lowercase, or + preserved as is. `-fsource-case-lower' is the default. + + `-fsymbol-case-initcap' + `-fsymbol-case-upper' + `-fsymbol-case-lower' + `-fsymbol-case-any' + Specify valid cases for user-defined symbol names. + `-fsymbol-case-any' is the default. + + `-fcase-strict-upper' + Same as `-fintrin-case-upper -fmatch-case-upper + -fsource-case-preserve -fsymbol-case-upper'. (Requires all + pertinent source to be in uppercase.) + + `-fcase-strict-lower' + Same as `-fintrin-case-lower -fmatch-case-lower + -fsource-case-preserve -fsymbol-case-lower'. (Requires all + pertinent source to be in lowercase.) + + `-fcase-initcap' + Same as `-fintrin-case-initcap -fmatch-case-initcap + -fsource-case-preserve -fsymbol-case-initcap'. (Requires all + pertinent source to be in initial capitals, as in `Print + *,SqRt(Value)'.) + + `-fcase-upper' + Same as `-fintrin-case-any -fmatch-case-any -fsource-case-upper + -fsymbol-case-any'. (Maps all pertinent source to uppercase.) + + `-fcase-lower' + Same as `-fintrin-case-any -fmatch-case-any -fsource-case-lower + -fsymbol-case-any'. (Maps all pertinent source to lowercase.) + + `-fcase-preserve' + Same as `-fintrin-case-any -fmatch-case-any -fsource-case-preserve + -fsymbol-case-any'. (Preserves all case in user-defined symbols, + while allowing any-case matching of intrinsics and keywords. For + example, `call Foo(i,I)' would pass two *different* variables + named `i' and `I' to a procedure named `Foo'.) + + `-fdcp-intrinsics-delete' + `-fdcp-intrinsics-hide' + `-fdcp-intrinsics-disable' + `-fdcp-intrinsics-enable' + Specify status of Digital's COMPLEX-related intrinsics. + `-fdcp-intrinsics-enable' is the default. + + `-ff2c-intrinsics-delete' + `-ff2c-intrinsics-hide' + `-ff2c-intrinsics-disable' + `-ff2c-intrinsics-enable' + Specify status of f2c-specific intrinsics. + `-ff2c-intrinsics-enable' is the default. + + `-ff90-intrinsics-delete' + `-ff90-intrinsics-hide' + `-ff90-intrinsics-disable' + `-ff90-intrinsics-enable' + Specify status of F90-specific intrinsics. + `-ff90-intrinsics-delete' is the default. + + `-fmil-intrinsics-delete' + `-fmil-intrinsics-hide' + `-fmil-intrinsics-disable' + `-fmil-intrinsics-enable' + Specify status of MIL-STD-1753-specific intrinsics. + `-fmil-intrinsics-enable' is the default. + + `-funix-intrinsics-delete' + `-funix-intrinsics-hide' + `-funix-intrinsics-disable' + `-funix-intrinsics-enable' + Specify status of UNIX intrinsics. `-funix-intrinsics-enable' is + the default. + + For example, if your code invokes `FLUSH' as a library function + and thus works with other UNIX Fortran compilers or earlier + version of `g77', either add the `EXTERNAL FLUSH' statement or, + perhaps more convenient for you, compile with the + -funix-intrinsics-hide or -funix-intrinsics-delete option. + + Note that `ABORT', `EXIT', `FLUSH', `SIGNAL', and `SYSTEM' are + intrinsic subroutines, not functions (since they have side + effects), so to get the return values from `SIGNAL' and `SYSTEM', + append a final argument specifying an `INTEGER' variable or array + element to receive the returned status. (For example, `CALL + SYSTEM('rm foo',ISTAT)'.) + + `FLUSH()' accepts an optional single `INTEGER' argument, since + many Fortran implementations allow or require a unit number. + Currently, since `libf2c' does not flush a given unit number, this + argument is not used--all units are flushed by `libf2c''s + implementation of `FLUSH()'. Do not depend on this behavior--if + you want to flush all units, use `CALL FLUSH' (that is, specify no + arguments to `FLUSH'). + + `EXIT()' accepts an optional single `INTEGER' argument. If + omitted, zero is the default (as in `CALL EXIT(0)'). The default + might change on configurations where the "normal return status" is + not zero, however. If you want to return a "success" status, it + is best to call `EXIT' with no arguments in your code, and let + `g77' choose the appropriate default. + + `-fvxt-intrinsics-delete' + `-fvxt-intrinsics-hide' + `-fvxt-intrinsics-disable' + `-fvxt-intrinsics-enable' + Specify status of VXT intrinsics. `-fvxt-intrinsics-delete' is + the default. + + `-ffixed-line-length-N' + Set column after which characters are ignored in typical fixed-form + lines in the source file. + + Popular values for N include 72 (the standard and the default), 80 + (card image), and 132 (corresponds to "extended-source" options in + some popular compilers). N may be `none', meaning that the entire + line is meaningful and that continued character constants never + have implicit spaces appended to them to fill out the line. + `-ffixed-line-length-0' means the same thing as + `-ffixed-line-length-none'. + +  + File: g77.info, Node: Warning Options, Next: Debugging Options, Prev: Fortran Dialect Options, Up: Invoking G77 + + Options to Request or Suppress Warnings + ======================================= + + Warnings are diagnostic messages that report constructions which are + not inherently erroneous but which are risky or suggest there might + have been an error. + + You can request many specific warnings with options beginning `-W', + for example `-Wimplicit' to request warnings on implicit declarations. + Each of these specific warning options also has a negative form + beginning `-Wno-' to turn off warnings; for example, `-Wno-implicit'. + This manual lists only one of the two forms, whichever is not the + default. + + These options control the amount and kinds of warnings produced by + GNU Fortran: + + `-fsyntax-only' + Check the code for syntax errors, but don't do anything beyond + that. + + `-pedantic' + Issue warnings for uses of extensions to ANSI FORTRAN 77. + `-pedantic' also applies to C-language constructs where they occur + in GNU Fortran source files, such as use of `\e' in a character + constant within a directive like `#include'. + + Valid ANSI FORTRAN 77 programs should compile properly with or + without this option. However, without this option, certain GNU + extensions and traditional Fortran features are supported as well. + With this option, many of them are rejected. + + Some users try to use `-pedantic' to check programs for strict ANSI + conformance. They soon find that it does not do quite what they + want: it finds some non-ANSI practices, but not all--however, + improvements to `g77' in this area are welcome. + + `-pedantic-errors' + Like `-pedantic', except that errors are produced rather than + warnings. + + `-fpedantic' + Like `-pedantic', but applies only to Fortran constructs. + + `-fugly' + Specify that certain "ugly" constructs are to be quietly accepted. + Implies `-fugly-args' and `-fugly-init' as well. + + For example, with `-fno-ugly', `CALL FOO(,)' means to pass one + null argument, whereas with `-fugly', it means to pass two null + arguments. + + `-fno-ugly-args' + Disallow passing Hollerith and typeless constants as actual + arguments (for example, `CALL FOO(4HABCD)'). + + `-fno-ugly-init' + Disallow use of Hollerith and typeless constants as initial values + (in `PARAMETER' and `DATA' statements), and use of character + constants to initialize numeric types and vice versa. + + For example, `DATA I/'F'/, CHRVAR/65/, J/4HABCD/' is disallowed by + `-fno-ugly-init'. + + `-w' + Inhibit all warning messages. + + `-Wimplicit' + Warn whenever a variable, array, or function is implicitly + declared. Has an effect similar to using the `IMPLICIT NONE' + statement in every program unit. (Some Fortran compilers provide + this feature by an option named `-u' or `/WARNINGS=DECLARATIONS'.) + + `-Wunused' + Warn whenever a variable is unused aside from its declaration. + + `-Wuninitialized' + Warn whenever an automatic variable is used without first being + initialized. + + These warnings are possible only in optimizing compilation, + because they require data flow information that is computed only + when optimizing. If you don't specify `-O', you simply won't get + these warnings. + + These warnings occur only for variables that are candidates for + register allocation. Therefore, they do not occur for a variable + that is declared `volatile', or whose address is taken, or whose + size is other than 1, 2, 4 or 8 bytes. Also, they do not occur for + arrays, even when they are in registers. + + Note that there may be no warning about a variable that is used + only to compute a value that itself is never used, because such + computations may be deleted by data flow analysis before the + warnings are printed. + + These warnings are made optional because GNU Fortran is not smart + enough to see all the reasons why the code might be correct + despite appearing to have an error. Here is one example of how + this can happen: + + SUBROUTINE DISPAT(J) + IF (J.EQ.1) I=1 + IF (J.EQ.2) I=4 + IF (J.EQ.3) I=5 + CALL FOO(I) + END + + If the value of `J' is always 1, 2 or 3, then `I' is always + initialized, but GNU Fortran doesn't know this. Here is another + common case: + + SUBROUTINE MAYBE(FLAG) + LOGICAL FLAG + IF (FLAG) VALUE = 3.14 + ... + IF (FLAG) PRINT *, VALUE + END + + This has no bug because `VALUE' is used only if it is set. + + `-Wall' + The `-Wunused' and `-Wuninitialized' options combined. These are + all the options which pertain to usage that we recommend avoiding + and that we believe is easy to avoid. (As more warnings are added + to `g77', some might be added to the list enabled by `-Wall'.) + + The remaining `-W...' options are not implied by `-Wall' because + they warn about constructions that we consider reasonable to use, on + occasion, in clean programs. + + `-Wsurprising' + Warn about "suspicious" constructs that are interpreted by the + compiler in a way that might well be surprising to someone reading + the code. 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', along with many other compilers, interprets + this example differently than many programmers, and a few + other compilers. Specifically, `g77' interprets `X**-Y*Z' as + `(X**(-Y))*Z', while others might think it should be + interpreted as `X**(-(Y*Z))'. + + A revealing example is the constant expression `2**-2*1.', + which `g77' evaluates to .25, while others might evaluate it + to 0., the difference being the way precedence affects 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', which yields 4, and + which might represent what a programmer expects. Even cases + such as `-I*J' produce warnings, even though, in most + configurations and situations, there is no computational + difference between the results of the two + interpretations--the purpose of this warning is to warn about + differing interpretations and encourage a better style of + coding, not to identify only those places where bugs might + exist in the user's code. + + * `DO' loops with `DO' variables that are not of integral + type--that is, using `REAL' or `DOUBLE PRECISION' variables + as loop control variables. Although such loops can be + written to work in the "obvious" way, the way `g77' is + required by the Fortran standard to interpret such code is + likely to be quite different from the way many programmers + expect. (This is true of all `DO' loops, but the differences + are pronounced for non-integral loop control variables.) + + *Note Loops::, for more information. + + `-Werror' + Make all warnings into errors. + + `-W' + Turns on "extra warnings" and the `uninitialized' option. (This + might change in future versions of `g77'.) + + "Extra warnings" are issued for: + + * Unused parameters to a procedure (when `-Wunused' also is + specified). + + * Overflows involving floating-point constants (not available + for certain configurations?). + + *Note Options to Request or Suppress Warnings: (gcc)Warning Options, + for information on more options offered by the GBE shared by `g77', + `gcc', and other GNU compilers. + + Some of these have no effect when compiling programs written in + Fortran: + + `-Wcomment' + `-Wformat' + `-Wparentheses' + `-Wswitch' + `-Wtraditional' + `-Wshadow' + `-Wid-clash-LEN' + `-Wlarger-than-LEN' + `-Wconversion' + `-Waggregate-return' + `-Wredundant-decls' + These options all could have some relevant meaning for GNU Fortran + programs, but are not yet supported. + +  + File: g77.info, Node: Debugging Options, Next: Optimize Options, Prev: Warning Options, Up: Invoking G77 + + Options for Debugging Your Program or GNU Fortran + ================================================= + + GNU Fortran has various special options that are used for debugging + either your program or `g77'. + + `-g' + Produce debugging information in the operating system's native + format (stabs, COFF, XCOFF, or DWARF). GDB can work with this + debugging information. + + Support for this option in Fortran programs is incomplete. In + particular, names of variables and arrays in common blocks or that + are storage-associated via `EQUIVALENCE' are unavailable to the + debugger. + + *Note Options for Debugging Your Program or GNU CC: (gcc)Debugging + Options, for more information on debugging options. + +  + File: g77.info, Node: Optimize Options, Next: Preprocessor Options, Prev: Debugging Options, Up: Invoking G77 + + Options That Control Optimization + ================================= + + Most Fortran users will want to use no optimization when developing + and testing programs, and use `-O' or `-O2' when compiling programs for + late-cycle testing and for production use. + + The following flags have particular applicability when compiling + Fortran programs: + + `-ffloat-store' + Might help a Fortran program that depends on exact IEEE conformance + on some machines, but might slow down a program that doesn't. + + `-fforce-mem' + `-fforce-addr' + Might improve optimization of loops. + + `-fno-inline' + Don't compile statement functions inline. Might reduce the size + of a program unit--which might be at expense of some speed (though + it should compile faster). Note that if you are not optimizing, + no functions can be expanded inline. + + `-ffast-math' + Might allow some programs designed to not be too dependent on IEEE + behavior for floating-point to run faster, or die trying. + + `-fstrength-reduce' + Might make some loops run faster. + + `-frerun-cse-after-loop' + `-fexpensive-optimizations' + `-fdelayed-branch' + `-fschedule-insns' + `-fschedule-insns2' + `-fcaller-saves' + Might improve performance on some code. + + `-funroll-loops' + Definitely improves performance on some code. + + `-funroll-all-loops' + Definitely improves performance on some code. + + `-fno-move-all-movables' + `-fno-reduce-all-givs' + `-fno-rerun-loop-opt' + Each of these might improve performance on some code. + + Analysis of Fortran code optimization and the resulting + optimizations triggered by the above options were contributed by + Toon Moene (`toon@moene.indiv.nluug.nl'). + + Please let us know how use of these options affects the + performance of your production code. We're particularly + interested in code that runs faster when these options are + *disabled*, and in non-Fortran code that benefits when they are + *enabled* via the above `gcc' command-line options. + + *Note Options That Control Optimization: (gcc)Optimize Options, for + more information on options to optimize the generated machine code. + +  + File: g77.info, Node: Preprocessor Options, Next: Directory Options, Prev: Optimize Options, Up: Invoking G77 + + Options Controlling the Preprocessor + ==================================== + + These options control the C preprocessor, which is run on each C + source file before actual compilation. + + *Note Options Controlling the Preprocessor: (gcc)Preprocessor + Options, for information on C preprocessor options. + + Some of these options also affect how `g77' processes the `INCLUDE' + statement. Since this statement is processed even when preprocessing + is not requested, it is not described in this section. *Note Options + for Directory Search: Directory Options, for information on how `g77' + processes the `INCLUDE' statement. + +  + File: g77.info, Node: Directory Options, Next: Code Gen Options, Prev: Preprocessor Options, Up: Invoking G77 + + Options for Directory Search + ============================ + + These options affect how the `cpp' preprocessor searches for files + specified via the `#include' directive. Therefore, when compiling + Fortran programs, they are meaningful when the preproecssor is used. + + Some of these options also affect how `g77' searches for files + specified via the `INCLUDE' statement. These options are: + + `-I-' + `-IDIR' + These affect interpretation of the `INCLUDE' statement (as well as + of the `#include' directive of the `cpp' preprocessor). + + Note that `-IDIR' must be specified *without* any spaces between + `-I' and the directory name--that is, `-Ifoo/bar' is valid, but + `-I foo/bar' is rejected by the `g77' compiler (though the + preprocessor supports the latter form). Also note that the + general behavior of `-I' and `INCLUDE' is pretty much the same as + of `-I' with `#include' in the `cpp' preprocessor, with regard to + looking for `header.gcc' files and other such things. + + *Note Options for Directory Search: (gcc)Directory Optoins, for + information on the `-I' option. + +  + File: g77.info, Node: Code Gen Options, Next: Environment Variables, Prev: Directory Options, Up: Invoking G77 + + Options for Code Generation Conventions + ======================================= + + These machine-independent options control the interface conventions + used in code generation. + + Most of them have both positive and negative forms; the negative form + of `-ffoo' would be `-fno-foo'. In the table below, only one of the + forms is listed--the one which is not the default. You can figure out + the other form by either removing `no-' or adding it. + + `-fno-automatic' + Treat each program unit as if the `SAVE' statement was specified + for every local variable and array referenced in it. Does not + affect common blocks. (Some Fortran compilers provide this option + under the name `-static'.) + + `-finit-local-zero' + Specify that variables and arrays that are local to a program unit + (not in a common block and not passed as an argument) are to be + initialized to binary zeros. + + Since there is a run-time penalty for initialization of variables + that are not given the `SAVE' attribute, it might be a good idea + to also use `-fno-automatic' with `-finit-local-zero'. + + `-fno-f2c' + Do not generate code designed to be compatible with code generated + by `f2c'. + + This does not affect the generation of code that interfaces with + the `libf2c' library. + + *Caution:* If `-fno-f2c' is used when compiling any source file + used in a program, it must be used when compiling *all* Fortran + source files used in that program. + + `-ff2c-library' + Specify that use of `libf2c' is required. This is the default for + the current version of `g77'. + + Currently it is not valid to specify `-fno-f2c-library'. This + option is provided so users can specify it in shell scripts that + build programs and libraries that require the `libf2c' library, + even when being compiled by future versions of `g77' that might + otherwise default to generating code for an incompatible library. + + `-fno-underscoring' + Do not transform names of entities specified in the Fortran source + file by appending underscores to them. + + With `-funderscoring' in effect, `g77' appends two underscores to + names with underscores and one underscore to external names with + no underscores. (`g77' also appends two underscores to internal + names with underscores to avoid naming collisions with external + names.) + + This is done to ensure compatibility with code produced by many + UNIX Fortran compilers, including `f2c', which perform the same + transformations. + + Use of `-fno-underscoring' is not recommended unless you are + experimenting with issues such as integration of (GNU) Fortran into + existing system environments (vis-a-vis existing libraries, tools, + and so on). + + For example, with `-funderscoring', and assuming other defaults + like `-fcase-lower' and that `j()' and `max_count()' are external + functions while `my_var' and `lvar' are local variables, a + statement like + + I = J() + MAX_COUNT (MY_VAR, LVAR) + + is implemented as something akin to: + + i = j_() + max_count__(&my_var__, &lvar); + + With `-fno-underscoring', the same statement is implemented as: + + i = j() + max_count(&my_var, &lvar); + + Use of `-fno-underscoring' allows direct specification of + user-defined names while debugging and when interfacing + `g77'-compiled code with other languages. + + Note that just because the names match does *not* mean that the + interface implemented by `g77' for an external name matches the + interface implemented by some other language for that same name. + That is, getting code produced by `g77' to link to code produced + by some other compiler using this or any other method can be only a + small part of the overall solution--getting the code generated by + both compilers to agree on issues other than naming can require + significant effort, and, unlike naming disagreements, linkers + normally cannot detect disagreements in these other areas. + + Also, note that with `-fno-underscoring', the lack of appended + underscores introduces the very real possibility that a + user-defined external name will conflict with a name in a system + library, which could make finding unresolved-reference bugs quite + difficult in some cases--they might occur at program run time, and + show up only as buggy behavior at run time. + + In future versions of `g77', we hope to improve naming and linking + issues so that debugging always involves using the names as they + appear in the source, even if the names as seen by the linker are + mangled to prevent accidental linking between procedures with + incompatible interfaces. + + `-fno-second-underscore' + Do not append a second underscore to names of entities specified + in the Fortran source file. + + This option has no effect if `-fno-underscoring' is not in effect. + + Otherwise, with this option, an external name such as `MAX_COUNT' + is implemented as a reference to the link-time external symbol + `max_count_', instead of `max_count__'. + + `-fno-ident' + Ignore the `#ident' directive. + + `-fzeros' + Treat initial values of zero as if they were any other value. + + As of version 0.5.18, `g77' normally treats `DATA' and other + statements that are used specify initial values of zero for + variables and arrays as if no values were actually specified, in + the sense that no diagnostics regarding multiple initializations + are produced. + + This is done to speed up compiling of programs that initialize + large arrays to zeros. + + Use `-fzeros' to revert to the simpler, slower behavior that can + catch multiple initializations by keeping track of all + initializations, zero or otherwise. + + *Caution:* Future versions of `g77' might disregard this option + (and its negative form, the default) or interpret it somewhat + differently. The interpretation changes will affect only + non-standard programs; standard-conforming programs should not be + affected. + + *Note Options for Code Generation Conventions: (gcc)Code Gen + Options, for information on more options offered by the GBE shared by + `g77', `gcc', and other GNU compilers. + + Some of these do *not* work when compiling programs written in + Fortran: + + `-fpcc-struct-return' + `-freg-struct-return' + You should not use these except strictly the same way as you used + them to build the version of `libf2c' with which you will be + linking all code compiled by `g77' with the same option. + + `-fshort-double' + This probably either has no effect on Fortran programs, or makes + them act loopy. + + `-fno-common' + Do not use this when compiling Fortran programs, or there will be + Trouble. + + `-fpack-struct' + This probably will break any calls to the `libf2c' library, at the + very least, even if it is built with the same option. + +  + File: g77.info, Node: Environment Variables, Prev: Code Gen Options, Up: Invoking G77 + + Environment Variables Affecting GNU Fortran + =========================================== + + GNU Fortran currently does not make use of any environment variables + to control its operation above and beyond those that affect the + operation of `gcc'. + + *Note Environment Variables Affecting GNU CC: (gcc)Environment + Variables, for information on environment variables. + diff -rcp2N g77-0.5.17/f/g77.info-3 g77-0.5.18/f/g77.info-3 *** g77-0.5.17/f/g77.info-3 Wed Dec 31 19:00:00 1969 --- g77-0.5.18/f/g77.info-3 Mon Apr 1 10:20:51 1996 *************** *** 0 **** --- 1,1151 ---- + This is Info file g77.info, produced by Makeinfo-1.64 from the input + file g77.texi. + + This file explains how to use the GNU Fortran system. + + Published by the Free Software Foundation 59 Temple Place - Suite 330 + Boston, MA 02111-1307 USA + + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of this + manual provided the copyright notice and this permission notice are + preserved on all copies. + + Permission is granted to copy and distribute modified versions of + this manual under the conditions for verbatim copying, provided also + that the sections entitled "GNU General Public License," "Funding for + Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are + included exactly as in the original, and provided that the entire + resulting derived work is distributed under the terms of a permission + notice identical to this one. + + Permission is granted to copy and distribute translations of this + manual into another language, under the above conditions for modified + versions, except that the sections entitled "GNU General Public + License," "Funding for Free Software," and "Protect Your Freedom--Fight + `Look And Feel'", and this permission notice, may be included in + translations approved by the Free Software Foundation instead of in the + original English. + + Contributed by James Craig Burley (`burley@gnu.ai.mit.edu'). + Inspired by a first pass at translating `g77-0.5.16/f/DOC' that was + contributed to Craig by David Ronis (`ronis@onsager.chem.mcgill.ca'). + +  + File: g77.info, Node: News, Next: Changes, Prev: Invoking G77, Up: Top + + News About GNU Fortran + ********************** + + In 0.5.18: + ========== + + * Add some rudimentary support for `INTEGER*1', `INTEGER*2', + `INTEGER*8', and their `LOGICAL' equivalents. (This support works + on most, maybe all, `gcc' targets.) + + Thanks to Scott Snyder (`snyder@d0sgif.fnal.gov') for providing + the patch for this! + + Among the missing elements from the support for these features are + full intrinsic support and constants. + + * Add some rudimentary support for the `BYTE' and `WORD' + type-declaration statements. `BYTE' corresponds to `INTEGER*1', + while `WORD' corresponds to `INTEGER*2'. + + Thanks to Scott Snyder (`snyder@d0sgif.fnal.gov') for providing + the patch for this! + + * The compiler code handling intrinsics has been largely rewritten + to accommodate the new types. No new intrinsics or arguments for + existing intrinsics have been added, so there is, at this point, + no intrinsic to convert to `INTEGER*8', for example. + + * Support automatic arrays in procedures. + + * Reduce space/time requirements for handling large *sparsely* + initialized aggregate arrays. This improvement applies to only a + subset of the general problem to be addressed in 0.6. + + * Treat initial values of zero as if they weren't specified (in DATA + and type-declaration statements). The initial values will be set + to zero anyway, but the amount of compile time processing them + will be reduced, in some cases significantly (though, again, this + is only a subset of the general problem to be addressed in 0.6). + + A new option, `-fzeros', is introduced to enable the traditional + treatment of zeros as any other value. + + * With `-ff90' in force, `g77' incorrectly interpreted `REAL(Z)' as + returning a `REAL' result, instead of as a `DOUBLE PRECISION' + result. (Here, `Z' is `DOUBLE COMPLEX'.) + + With `-fno-f90' in force, the interpretation remains unchanged, + since this appears to be how at least some F77 code using the + `DOUBLE COMPLEX' extension expected it to work. + + Essentially, `REAL(Z)' in F90 is the same as `DBLE(Z)', while in + extended F77, it appears to be the same as `REAL(REAL(Z))'. + + * An expression involving exponentiation, where both operands were + type `INTEGER' and the right-hand operand was negative, was + erroneously evaluated. + + * Fix bugs involving `DATA' implied-`DO' constructs (these involved + an errant diagnostic and a crash, both on good code, one involving + subsequent statement-function definition). + + * Close `INCLUDE' files after processing them, so compiling source + files with lots of `INCLUDE' statements does not result in being + unable to open `INCLUDE' files after all the available file + descriptors are used up. + + * Speed up compiling, especially of larger programs, and perhaps + slightly reduce memory utilization while compiling (this is *not* + the improvement planned for 0.6 involving large aggregate + areas)--these improvements result from simply turning off some + low-level code to do self-checking that hasn't been triggered in a + long time. + + * Introduce three new options that implement optimizations in the + `gcc' back end (GBE). These options are `-fmove-all-movables', + `-freduce-all-givs', and `-frerun-loop-opt', which are enabled, by + default, for Fortran compilations. These optimizations are + intended to help toon Fortran programs. + + * Patch the GBE to do a better job optimizing certain kinds of + references to array elements. + + * Due to patches to the GBE, the version number of `gcc' also is + patched to make it easier to manage installations, especially + useful if it turns out a `g77' change to the GBE has a bug. + + The `g77'-modified version number is the `gcc' version number with + the string `.f.N' appended, where `f' identifies the version as + enhanced for Fortran, and N is `1' for the first Fortran patch for + that version of `gcc', `2' for the second, and so on. + + So, this introduces version `2.7.2.f.1' of `gcc'. + + * Make several improvements and fixes to diagnostics, including the + removal of two that were inappropriate or inadequate. + + * Warning about two successive arithmetic operators, produced by + `-Wsurprising', now produced *only* when both operators are, + indeed, arithmetic (not relational/boolean). + + * `-Wsurprising' now warns about the remaining cases of using + non-integral variables for implied-`DO' loops, instead of these + being rejected unless `-fpedantic' or `-fugly' specified. + + * Allow `SAVE' of a local variable or array, even after it has been + given an initial value via `DATA', for example. + + * Introduce an Info version of `g77' documentation, which supercedes + `gcc/f/CREDITS', `gcc/f/DOC', and `gcc/f/PROJECTS'. These files + will be removed in a future release. The files `gcc/f/BUGS', + `gcc/f/INSTALL', and `gcc/f/NEWS' now are automatically built from + the texinfo source when distributions are made. + + This effort was inspired by a first pass at translating + `g77-0.5.16/f/DOC' that was contributed to Craig by David Ronis + (`ronis@onsager.chem.mcgill.ca'). + + * New `-fno-second-underscore' option to specify that, when + `-funderscoring' is in effect, a second underscore is not to be + appended to Fortran names already containing an underscore. + + * Change the way iterative `DO' loops work to follow the F90 + standard. In particular, calculation of the iteration count is + still done by converting the start, end, and increment parameters + to the type of the `DO' variable, but the result of the + calculation is always converted to the default `INTEGER' type. + + (This should have no effect on existing code compiled by `g77', + but code written to assume that use of a *wider* type for the `DO' + variable will result in an iteration count being fully calculated + using that wider type (wider than default `INTEGER') must be + rewritten.) + + * Upgrade to `libf2c' as of 1996-03-23, and fix up some of the build + procedures. + + Note that the email addresses related to `f2c' have changed--the + distribution site now is named `netlib.bell-labs.com', and the + maintainer's new address is `dmg@bell-labs.com'. + + In 0.5.17: + ========== + + * *Fix serious bug* in `g77 -v' command that can cause removal of a + system's `/dev/null' special file if run by user `root'. + + *All users* of version 0.5.16 should ensure that they have not + removed `/dev/null' or replaced it with an ordinary file (e.g. by + comparing the output of `ls -l /dev/null' with `ls -l /dev/zero'. + If the output isn't basically the same, contact your system + administrator about restoring `/dev/null' to its proper status). + + This bug is particularly insidious because removing `/dev/null' as + a special file can go undetected for quite a while, aside from + various applications and programs exhibiting sudden, strange + behaviors. + + I sincerely apologize for not realizing the implications of the + fact that when `g77 -v' runs the `ld' command with `-o /dev/null' + that `ld' tries to *remove* the executable it is supposed to build + (especially if it reports unresolved references, which it should + in this case)! + + * Fix crash on `CHARACTER*(*) FOO' in a main or block data program + unit. + + * Fix crash that can occur when diagnostics given outside of any + program unit (such as when input file contains `@foo'). + + * Fix crashes, infinite loops (hangs), and such involving diagnosed + code. + + * Fix `ASSIGN''ed variables so they can be `SAVE''d or dummy + arguments, and issue clearer error message in cases where target + of `ASSIGN' or `ASSIGN'ed `GOTO'/`FORMAT' is too small (which + should never happen). + + * Make `libf2c' build procedures work on more systems again by + eliminating unnecessary invocations of `ld -r -x' and `mv'. + + * Fix omission of `-funix-intrinsics-...' options in list of + permitted options to compiler. + + * Fix failure to always diagnose missing type declaration for + `IMPLICIT NONE'. + + * Fix compile-time performance problem (which could sometimes crash + the compiler, cause a hang, or whatever, due to a bug in the back + end) involving exponentiation with a large `INTEGER' constant for + the right-hand operator (e.g. `I**32767'). + + * Fix build procedures so cross-compiling `g77' (the `fini' utility + in particular) is properly built using the host compiler. + + * Add new `-Wsurprising' option to warn about constructs that are + interpreted by the Fortran standard (and `g77') in ways that are + surprising to many programmers. + + * Add `ERF()' and `ERFC()' as generic intrinsics mapping to existing + `ERF'/`DERF' and `ERFC'/`DERFC' specific intrinsics. + + *Note:* You should specify `INTRINSIC ERF,ERFC' in any code where + you might use these as generic intrinsics, to improve likelihood + of diagnostics (instead of subtle run-time bugs) when using a + compiler that doesn't support these as intrinsics (e.g. `f2c'). + + * Remove from `-fno-pedantic' the diagnostic about `DO' with + non-`INTEGER' index variable; issue that under `-Wsurprising' + instead. + + * Clarify some diagnostics that say things like "ignored" when that's + misleading. + + * Clarify diagnostic on use of `.EQ.'/`.NE.' on `LOGICAL' operands. + + * Minor improvements to code generation for various operations on + `LOGICAL' operands. + + * Minor improvement to code generation for some `DO' loops on some + machines. + + * Support `gcc' version 2.7.1. + + * Upgrade to `libf2c' as of 1995-11-15. + + In 0.5.16: + ========== + + * Fix a code-generation bug involving complicated `EQUIVALENCE' + statements not involving `COMMON' + + * Fix code-generation bugs involving invoking "gratis" library + procedures in `libf2c' from code compiled with `-fno-f2c' by + making these procedures known to `g77' as intrinsics (not affected + by -fno-f2c). This is known to fix code invoking `ERF()', + `ERFC()', `DERF()', and `DERFC()'. + + * Update `libf2c' to include netlib patches through 1995-08-16, and + `#define' `WANT_LEAD_0' to 1 to make `g77'-compiled code more + consistent with other Fortran implementations by outputting + leading zeros in formatted and list-directed output. + + * Fix a code-generation bug involving adjustable dummy arrays with + high bounds whose primaries are changed during procedure + execution, and which might well improve code-generation + performance for such arrays compared to `f2c' plus `gcc' (but + apparently only when using `gcc-2.7.0' or later). + + * Fix a code-generation bug involving invocation of `COMPLEX' and + `DOUBLE COMPLEX' `FUNCTION's and doing `COMPLEX' and `DOUBLE + COMPLEX' divides, when the result of the invocation or divide is + assigned directly to a variable that overlaps one or more of the + arguments to the invocation or divide. + + * Fix crash by not generating new optimal code for `X**I' if `I' is + nonconstant and the expression is used to dimension a dummy array, + since the `gcc' back end does not support the necessary mechanics + (and the `gcc' front end rejects the equivalent construct, as it + turns out). + + * Fix crash on expressions like `COMPLEX**INTEGER'. + + * Fix crash on expressions like `(1D0,2D0)**2', i.e. raising a + `DOUBLE COMPLEX' constant to an `INTEGER' constant power. + + * Fix crashes and such involving diagnosed code. + + * Diagnose, instead of crashing on, statement function definitions + having duplicate dummy argument names. + + * Fix bug causing rejection of good code involving statement function + definitions. + + * Fix bug resulting in debugger not knowing size of local equivalence + area when any member of area has initial value (via `DATA', for + example). + + * Fix installation bug that prevented installation of `g77' driver. + Provide for easy selection of whether to install copy of `g77' as + `f77' to replace the broken code. + + * Fix `gcc' driver (affects `g77' thereby) to not gratuitously + invoke the `f771' program (e.g. when `-E' is specified). + + * Fix diagnostic to point to correct source line when it immediately + follows an `INCLUDE' statement. + + * Support more compiler options in `gcc'/`g77' when compiling + Fortran files. These options include `-p', `-pg', `-aux-info', + `-P', correct setting of version-number macros for preprocessing, + full recognition of `-O0', and automatic insertion of + configuration-specific linker specs. + + * Add new intrinsics that interface to existing routines in `libf2c': + `ABORT', `DERF', `DERFC', `ERF', `ERFC', `EXIT', `FLUSH', + `GETARG', `GETENV', `IARGC', `SIGNAL', and `SYSTEM'. Note that + `ABORT', `EXIT', `FLUSH', `SIGNAL', and `SYSTEM' are intrinsic + subroutines, not functions (since they have side effects), so to + get the return values from `SIGNAL' and `SYSTEM', append a final + argument specifying an `INTEGER' variable or array element (e.g. + `CALL SYSTEM('rm foo',ISTAT)'). + + * Add new intrinsic group named `unix' to contain the new intrinsics, + and by default enable this new group. + + * Move `LOC()' intrinsic out of the `vxt' group to the new `unix' + group. + + * Improve `g77' so that `g77 -v' by itself (or with certain other + options, including `-B', `-b', `-i', `-nostdlib', and `-V') + reports lots more useful version info, and so that long-form + options `gcc' accepts are understood by `g77' as well (even in + truncated, unambiguous forms). + + * Add new `g77' option `--driver=name' to specify driver when + default, `gcc', isn't appropriate. + + * Add support for `#' directives (as output by the preprocessor) in + the compiler, and enable generation of those directives by the + preprocessor (when compiling `.F' files) so diagnostics and + debugging info are more useful to users of the preprocessor. + + * Produce better diagnostics, more like `gcc', with info such as `In + function `foo':' and `In file included from...:'. + + * Support `gcc''s `-fident' and `-fno-ident' options. + + * When `-Wunused' in effect, don't warn about local variables used as + statement-function dummy arguments or `DATA' implied-`DO' iteration + variables, even though, strictly speaking, these are not uses of + the variables themselves. + + * When `-W -Wunused' in effect, don't warn about unused dummy + arguments at all, since there's no way to turn this off for + individual cases (`g77' might someday start warning about + these)--applies to `gcc' versions 2.7.0 and later, since earlier + versions didn't warn about unused dummy arguments. + + * New option `-fno-underscoring' that inhibits transformation of + names (by appending one or two underscores) so users may experiment + with implications of such an environment. + + * Minor improvement to `gcc/f/info' module to make it easier to build + `g77' using the native (non-`gcc') compiler on certain machines + (but definitely not all machines nor all non-`gcc' compilers). + Please do not report bugs showing problems compilers have with + macros defined in `gcc/f/target.h' and used in places like + `gcc/f/expr.c'. + + * Add warning to be printed for each invocation of the compiler if + the target machine `INTEGER', REAL, or `LOGICAL' size is not 32 + bits, since `g77' is known to not work well for such cases (to be + fixed in Version 0.6--*note Actual Bugs We Haven't Fixed Yet: + Actual Bugs.). + + * Lots of new documentation (though work is still needed to put it + into canonical GNU format). + + * Build `libf2c' with `-g0', not `-g2', in effect (by default), to + produce smaller library without lots of debugging clutter. + + In 0.5.15: + ========== + + * Fix bad code generation involving `X**I' and temporary, internal + variables generated by `g77' and the back end (such as for `DO' + loops). + + * Fix crash given `CHARACTER A;DATA A/.TRUE./'. + + * Replace crash with diagnostic given `CHARACTER A;DATA A/1.0/'. + + * Fix crash or other erratic behavior when null character constant + (`''') is encountered. + + * Fix crash or other erratic behavior involving diagnosed code. + + * Fix code generation for external functions returning type `REAL' + when the `-ff2c' option is in force (which it is by default) so + that `f2c' compatibility is indeed provided. + + * Disallow `COMMON I(10)' if `I' has previously been specified with + an array declarator. + + * New `-ffixed-line-length-N' option, where N is the maximum length + of a typical fixed-form line, defaulting to 72 columns, such that + characters beyond column N are ignored, or N is `none', meaning no + characters are ignored. does not affect lines with `&' in column + 1, which are always processed as if `-ffixed-line-length-none' was + in effect. + + * No longer generate better code for some kinds of array references, + as `gcc' back end is to be fixed to do this even better, and it + turned out to slow down some code in some cases after all. + + * In `COMMON' and `EQUIVALENCE' areas with any members given initial + values (e.g. via `DATA'), uninitialized members now always + initialized to binary zeros (though this is not required by the + standard, and might not be done in future versions of `g77'). + Previously, in some `COMMON'/`EQUIVALENCE' areas (essentially + those with members of more than one type), the uninitialized + members were initialized to spaces, to cater to `CHARACTER' types, + but it seems no existing code expects that, while much existing + code expects binary zeros. + + In 0.5.14: + ========== + + * Don't emit bad code when low bound of adjustable array is + nonconstant and thus might vary as an expression at run time. + + * Emit correct code for calculation of number of trips in `DO' loops + for cases where the loop should not execute at all. (This bug + affected cases where the difference between the begin and end + values was less than the step count, though probably not for + floating-point cases.) + + * Fix crash when extra parentheses surround item in `DATA' + implied-`DO' list. + + * Fix crash over minor internal inconsistencies in handling + diagnostics, just substitute dummy strings where necessary. + + * Fix crash on some systems when compiling call to `MVBITS()' + intrinsic. + + * Fix crash on array assignment `TYPEDDD(...)=...', where DDD is a + string of one or more digits. + + * Fix crash on `DCMPLX()' with a single `INTEGER' argument. + + * Fix various crashes involving code with diagnosed errors. + + * Support `-I' option for `INCLUDE' statement, plus `gcc''s + `header.gcc' facility for handling systems like MS-DOS. + + * Allow `INCLUDE' statement to be continued across multiple lines, + even allow it to coexist with other statements on the same line. + + * Incorporate Bellcore fixes to `libf2c' through 1995-03-15--this + fixes a bug involving infinite loops reading EOF with empty + list-directed I/O list. + + * Remove all the `g77'-specific auto-configuration scripts, code, + and so on, except for temporary substitutes for bsearch() and + strtoul(), as too many configure/build problems were reported in + these areas. People will have to fix their systems' problems + themselves, or at least somewhere other than `g77', which expects + a working ANSI C environment (and, for now, a GNU C compiler to + compile `g77' itself). + + * Complain if initialized common redeclared as larger in subsequent + program unit. + + * Warn if blank common initialized, since its size can vary and hence + related warnings that might be helpful won't be seen. + + * New `-fbackslash' option, on by default, that causes `\' within + `CHARACTER' and Hollerith constants to be interpreted a la GNU C. + Note that this behavior is somewhat different from `f2c''s, which + supports only a limited subset of backslash (escape) sequences. + + * Make `-fugly-args' the default. + + * New `-fugly-init' option, on by default, that allows + typeless/Hollerith to be specified as initial values for variables + or named constants (`PARAMETER'), and also allows + character<->numeric conversion in those contexts--turn off via + `-fno-ugly-init'. + + * New `-finit-local-zero' option to initialize local variables to + binary zeros. This does not affect whether they are `SAVE'd, i.e. + made automatic or static. + + * New `-Wimplicit' option to warn about implicitly typed variables, + arrays, and functions. (Basically causes all program units to + default to `IMPLICIT NONE'.) + + * `-Wall' now implies `-Wuninitialized' as with `gcc' (i.e. unless + `-O' not specified, since `-Wuninitialized' requires `-O'), and + implies `-Wunused' as well. + + * `-Wunused' no longer gives spurious messages for unused `EXTERNAL' + names (since they are assumed to refer to block data program + units, to make use of libraries more reliable). + + * Support `%LOC()' and `LOC()' of character arguments. + + * Support null (zero-length) character constants and expressions. + + * Support `f2c''s `IMAG()' generic intrinsic. + + * Support `ICHAR()', `IACHAR()', and `LEN()' of character + expressions that are valid in assignments but not normally as + actual arguments. + + * Support `f2c'-style `&' in column 1 to mean continuation line. + + * Allow `NAMELIST', `EXTERNAL', `INTRINSIC', and `VOLATILE' in + `BLOCK DATA', even though these are not allowed by the standard. + + * Allow `RETURN' in main program unit. + + * Changes to Hollerith-constant support to obey Appendix C of the + standard: + + - Now padded on the right with zeros, not spaces. + + - Hollerith "format specifications" in the form of arrays of + non-character allowed. + + - Warnings issued when non-blank truncation occurs when + converting to another type. + + - When specified as actual argument, now passed by reference to + `INTEGER' (padded on right with spaces if constant too small, + otherwise fully intact if constant wider the `INTEGER' type) + instead of by value. + + *Warning:* `f2c' differs on the interpretation of `CALL FOO(1HX)', + which it treats exactly the same as `CALL FOO('X')', but which the + standard and `g77' treat as `CALL FOO(%REF('X '))' (padded with + as many blanks as necessary to widen to `INTEGER'), essentially. + + * Changes and fixes to typeless-constant support: + + - Now treated as a typeless double-length `INTEGER' value. + + - Warnings issued when overflow occurs. + + - Padded on the left with zeros when converting to a larger + type. + + - Should be properly aligned and ordered on the target machine + for whatever type it is turned into. + + - When specified as actual argument, now passed as reference to + a default `INTEGER' constant. + + * `%DESCR()' of a non-`CHARACTER' expression now passes a pointer to + the expression plus a length for the expression just as if it were + a `CHARACTER' expression. For example, `CALL FOO(%DESCR(D))', + where `D' is `REAL*8', is the same as `CALL FOO(D,%VAL(8)))'. + + * Name of multi-entrypoint master function changed to incorporate + the name of the primary entry point instead of a decimal value, so + the name of the master function for `SUBROUTINE X' with alternate + entry points is now `__g77_masterfun_x'. + + * Remove redundant message about zero-step-count `DO' loops. + + * Clean up diagnostic messages, shortening many of them. + + * Fix typo in `g77' man page. + + * Clarify implications of constant-handling bugs in `f/BUGS'. + + * Generate better code for `**' operator with a right-hand operand of + type `INTEGER'. + + * Generate better code for `SQRT()' and `DSQRT()', also when + `-ffast-math' specified, enable better code generation for `SIN()' + and `COS()'. + + * Generate better code for some kinds of array references. + + * Speed up lexing somewhat (this makes the compilation phase + noticably faster). + +  + File: g77.info, Node: Changes, Next: Language, Prev: News, Up: Top + + User-visible Changes + ******************** + + To find out about existing bugs and ongoing plans for GNU Fortran, + on Internet do `finger -l fortran@gnu.ai.mit.edu' or whatever is the + equivalent on your system. (You might need to use the address + `fortran@gate-1.gnu.ai.mit.edu' instead, or use `gate-2', `gate-3', + `gate-4', and so on, instead of `gate-1'.) + + Alternatively, retrieve `gnu.ai.mit.edu:/g77.plan' via anonymous + ftp, or if you cannot do that, email `fortran@gnu.ai.mit.edu' asking + for a recent copy of the GNU Fortran `.plan' file. (The `finger' + command shown above obtains the most recent copy of all these methods.) + + In 0.5.18: + ========== + + * The `BYTE' and `WORD' statements now are supported, to a limited + extent. + + * `INTEGER*1', `INTEGER*2', `INTEGER*8', and their `LOGICAL' + equivalents, now are supported to a limited extent. Among the + missing elements are complete intrinsic and constant support. + + * Support automatic arrays in procedures. For example, `REAL A(N)', + where `A' is not a dummy argument, specifies that `A' is an + automatic array. The size of `A' is calculated from the value of + `N' each time the procedure is called, that amount of space is + allocated, and that space is freed when the procedure returns to + its caller. + + * Add `-fno-zeros' option, enabled by default, to reduce + compile-time CPU and memory usage for code that provides initial + zero values for variables and arrays. + + * Introduce three new options that apply to all compilations by + `g77'-aware GNU compilers--`-fmove-all-movables', + `-freduce-all-givs', and `-frerun-loop-opt'--which can improve the + run-time performance of some programs. + + * Replace much of the existing documentation with a single Info + document. + + * New option `-fno-second-underscore'. + + In 0.5.17: + ========== + + * The `ERF()' and `ERFC()' intrinsics now are 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, this was diagnosed *unless* + `-fpedantic' or `-fugly' was specified. + + In 0.5.16: + ========== + + * `libf2c' changed to output a leading zero (0) digit for + floating-point values output via list-directed and formatted + output (to bring `g77' more in line with many existing Fortran + implementations--the ANSI FORTRAN 77 standard leaves this choice + to the implementation). + + * `libf2c' no longer built with debugging information intact, making + it much smaller. + + * Automatic installation of the `g77' command now works. + + * Diagnostic messages now more informative, a la `gcc', including + messages like `In function `foo':' and `In file included from...:'. + + * New group of intrinsics called `unix', including `ABORT', `DERF', + `DERFC', `ERF', `ERFC', `EXIT', `FLUSH', `GETARG', `GETENV', + `SIGNAL', and `SYSTEM'. + + * `-funix-intrinsics-{delete,hide,disable,enable}' options added. + + * `-fno-underscoring' option added. + + * `--driver' option added to the `g77' command. + + * Support for the `gcc' options `-fident' and `-fno-ident' added. + + * `g77 -v' returns much more version info, making the submission of + better bug reports easily. + + * Many improvements to the `g77' command to better fulfill its role + as a front-end to the `gcc' driver. For example, `g77' now + recognizes `--version' as a verbose way of specifying `-v'. + + * Compiling preprocessed (`*.F' and `*.fpp') files now results in + better diagnostics and debugging information, as the + source-location info now is passed all the way through the + compilation process instead of being lost. + + In 0.5.15: + ========== + + * `-ffixed-line-length-N' option introduced. + + In 0.5.14: + ========== + + * Support for gcc's `-I' option added. + + * `-fbackslash' option added. + + * `-fugly-args' option enabled by default (allows `CALL + FOO(4HABCD)'). + + * `-fugly-init' option added. + + * `-finit-local-zero' option added. + + * Support for the `gcc' option `-Wimplicit' added. + + * `-Wall' now implies `-Wunused' and, when `-O' is specified, + `-Wuninitialized'. + + * Hollerith constants as actual arguments now are passed by reference + instead of by value--so `CALL FOO(4HABCD)' now is compiled exactly + the same as `CALL FOO(%REF('ABCD'))', instead of as `CALL + FOO(%VAL('ABCD'))'. + + * Hollerith constants converted to larger types now are padded on the + right with spaces. When converted to smaller types, warnings are + issued if non-spaces are truncated on the right. + + * Format specifications of arrays of types other than `CHARACTER' are + allowed in I/O statements, such as when they contain Hollerith + data. + + * Typeless constants as actual arguments now are passed by reference + to an `INTEGER' version of the constant instead of by value. + + * Typeless constants converted to larger types are padded on the left + with zeros. When converted to smaller types, warnings are issued + if non-zero bits are truncated on the left. + + * `%DESCR()' of a non-`CHARACTER' expression treats the expression + as if it were `CHARACTER', passing both a pointer to the expression + and the length of the type of the expression in bytes, by value, + in the "hidden" list of lengths used for `CHARACTER' arguments. + + * The `ICHAR()', `IACHAR()', and `LEN()' intrinsics now accept + character expressions involving concatenation of assumed-length + dummy arguments. + + * Block data program units now may contain `NAMELIST', `EXTERNAL', + `INTRINSIC', and `VOLATILE' statements. + + * Zero-length character expressions now supported. + + * Support for the `f2c' intrinsic `IMAG()' added. + + * `INCLUDE' statement restrictions, such as no continuation lines + allowed, now lifted. + +  + File: g77.info, Node: Language, Next: Installation, Prev: Changes, Up: Top + + The GNU Fortran Language + ************************ + + GNU Fortran supports a variety of extensions to, and dialects of, + the Fortran language. Its primary base is the ANSI FORTRAN 77 standard. + It offers some extensions that are popular among users of UNIX `f77' + and `f2c' compilers, some that are popular among users of other + compilers (such as Digital products), some that are popular among users + of the newer Fortran 90 standard, and some that are introduced by GNU + Fortran. + + Part of what defines a particular implementation of a Fortran + system, such as `g77', is the particular characteristics of how it + supports types, constants, and so on. Much of this is left up to the + implementation by the various Fortran standards and accepted practice + in the industry. + + * Menu: + + * Standard Support:: Degree of support for the ANSI FORTRAN 77 standard. + * Extensions:: Extensions to GNU Fortran. + * Types:: Data types. + * Constants:: Constants and their types. + * Source Form:: Form of source files (fixed, free, and so on). + * Pedantic Compilation:: Warnings about non-standard constructs. + * Case Sensitivity:: Uppercase and lowercase in source files. + * Intrinsics:: How intrinsics are grouped for easy management. + * Dialects:: Dialects supported by GNU Fortran. + * Object Compatibility:: Compatibility issues for code generated by `g77'. + * Distensions:: Misfeatures supported by GNU Fortran. + +  + File: g77.info, Node: Standard Support, Next: Extensions, Up: Language + + ANSI FORTRAN 77 Standard Support + ================================ + + GNU Fortran supports ANSI FORTRAN 77 with the following caveats: + + * No passing of an external procedure as an actual argument if the + procedure's type is declared `CHARACTER*(*)'. For example: + + CHARACTER*(*) CFUNC + EXTERNAL CFUNC + CALL FOO(CFUNC) + END + + It isn't clear whether the standard considers this conforming. + + Note that it is unlikely that any production Fortran code tries to + use this unsupported construct. + + * No passing of a dummy procedure as an actual argument if the + procedure's type is declared `CHARACTER*(*)'. + + SUBROUTINE BAR(CFUNC) + CHARACTER*(*) CFUNC + EXTERNAL CFUNC + CALL FOO(CFUNC) + END + + It isn't clear whether the standard considers this conforming. + + Note that it is unlikely that any production Fortran code tries to + use this unsupported construct. + + * The `DO' variable for an implied-`DO' construct in a `DATA' + statement may not be used as the `DO' variable for an outer + implied-`DO' construct. For example, this fragment is disallowed + by `g77': + + DATA ((A(I, I), I= 1, 10), I= 1, 10)/.../ + + This also is disallowed by Fortran 90, as it offers no additional + capabilities and would have a variety of possible meanings. + + Note that it is *very* unlikely that any production Fortran code + tries to use this unsupported construct. + + * An array element initializer in an implied-`DO' construct in a + `DATA' statement must contain at least one reference to the `DO' + variables of each outer implied-`DO' construct. For example, this + fragment is disallowed by `g77': + + DATA (A, I= 1, 1)/1./ + + This also is disallowed by Fortran 90, as FORTRAN 77's more + permissive requirements offer no additional capabilities. + However, `g77' doesn't necessarily diagnose all cases where this + requirement is not met. + + Note that it is *very* unlikely that any production Fortran code + tries to use this unsupported construct. + + In summary, the only ANSI FORTRAN 77 features `g77' doesn't support + are those that are probably rarely used in actual code, some of which + are explicitly disallowed by the Fortran 90 standard. + +  + File: g77.info, Node: Extensions, Next: Types, Prev: Standard Support, Up: Language + + GNU Fortran Extensions + ====================== + + GNU Fortran supports ANSI FORTRAN 77 plus: + + * `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 were a + `CHARACTER' variable (with the phantom length argument appended to + the argument list). + + * MIL-STD 1753 features (`IAND', `IOR', `MVBITS', `DO WHILE', `END + DO', and so on). + + * `NAMELIST'. + + * Most `f2c' intrinsics (`AND', `OR', `LSHIFT', `RSHIFT', and so on). + + * `DOUBLE COMPLEX' and related intrinsics (standard and `f2c' + varieties). + + * Various Fortran 90 features, such as `CYCLE', `EXIT', `SELECT + CASE' (except for `CHARACTER' types). + + * Various DEC VAX/VMS FORTRAN v4.0 features (loosely called VXT + extensions). + + * Various `f2c' features. + + * Source files that are uppercase-only (enforced), lowercase-only + (enforced), caseless, and various other combinations as chosen via + command-line options. + + * Arbitrary (limited only by available memory) number of + continuation lines. + + * Use of `&' in column 1 to indicate a continuation line (as + supported by `f2c'). + + * Dollar signs (`$') in identifiers (other than as the first + character) when the `-fdollar-ok' option is specified. + + When `-ff90' is specified, the language dialect changes as follows: + + * The type of `REAL(Z)', where `Z' is type `DOUBLE COMPLEX', is + `DOUBLE PRECISION' instead of `REAL'. + + * Zero-length `CHARACTER' entities are accepted, even when + `-fpedantic' is specified. + + * Zero-size array dimensions (as in `INTEGER I(10,20,4:2)') are + accepted, although these are not supported by `libf2c', so + diagnostics are nevertheless produced for `g77'. + + * `DOUBLE COMPLEX' (explicit or implicit) is accepted, even when + `-fpedantic' is specified. + + * Substrings of constants (as in `'hello'(3:5)') are accepted, even + when `-fpedantic' is specified. + + * `DATA' statements are allowed to precede executable statements, + even when `-fpedantic' specified. + + Note that this does not allow all possible means of specifying + further attributes via specification statements for a variable + after it has been given an initial value via `DATA' or a + type-declaration statement. For example, after `DATA I/1/', + `INTEGER I' is not permitted, but `INTEGER J' is permitted. + + * Use of a semicolon (`;') as a statement separator is accepted, + even when `-fpedantic' specified (so `CALL FOO; CALL BAR' works). + + * Underscores (`_') are accepted in symbol names (except as the + first character, since Fortran 90 provides a different + interpretation for certain cases where that would occur--though + `g77' does not yet support that interpretation). + +  + File: g77.info, Node: Types, Next: Constants, Prev: Extensions, Up: Language + + Types + ===== + + Fortran implementations have a fair amount of freedom given them by + the standard as far as how much storage space is used and how much + precision is offered by the various types such as `LOGICAL', `INTEGER', + `REAL', `DOUBLE PRECISION', `COMPLEX', and `CHARACTER'. Further, many + compilers offer so-called `*N' notation, but the interpretation of N + varies across compilers and target architectures. + + The standard requires that `LOGICAL', `INTEGER', and `REAL' occupy + the same amount of storage space, and that `COMPLEX' and `DOUBLE + PRECISION' take twice as much storage space as `REAL'. Further, it + requires that `COMPLEX' entities be ordered such that when a `COMPLEX' + variable is storage-associated (such as via `EQUIVALENCE') with a + two-element `REAL' array named `R', `R(1)' corresponds to the real + element and `R(2)' to the imaginary element of the `COMPLEX' variable. + No particular requirements as to precision of any of these are placed on + the implementation, nor is the relationship of storage sizes of these + types to the `CHARACTER' type specified by the standard. + + `g77' follows the above requirements, warning when compiling a + program requires placement of items in memory that contradict the + requirements of the target architecture. (For example, a program can + require placement of a `DOUBLE PRECISION' on a boundary that is not an + even multiple of its size, but still an even multiple of the size of a + `REAL' variable. On some target architectures, using the canonical + mapping of Fortran types to underlying architectural types, such + placement is prohibited by the machine definition or the Application + Binary Interface (ABI) in force for the configuration defined for + building `gcc' and `g77'. `g77' warns about such situations when it + encounters them.) + + `g77' follows consistent rules for configuring the mapping between + Fortran types, including the `*N' notation, and the underlying + architectural types as accessed by a similarly-configured applicable + version of the `gcc' compiler. These rules offer a widely portable, + consistent Fortran/C environment, although they might well conflict + with the expectations of users of Fortran compilers designed and + written for particular architectures. + + These rules are based on the configuration that is in force for the + version of `gcc' built in the same release as `g77' (and which was + therefore used to build both the `g77' compiler components and the + `libf2c' run-time library): + + `REAL' + Same as `float' type. + + `DOUBLE PRECISION' + Same as whatever floating-point type that is twice the size of a + `float'--usually, this is a `double'. + + `INTEGER' + Same as an integral type that is occupies the same amount of + memory storage `float'--usually, this is either an `int' or a + `long int'. + + `LOGICAL' + Same `gcc' type as `INTEGER'. + + `COMPLEX' + Two `REAL' scalars (one for the real part followed by one for the + imaginary part). + + `DOUBLE COMPLEX' + Two `DOUBLE PRECISION' scalars. + + `NUMERIC-TYPE*N' + (Where NUMERIC-TYPE is any type other than `CHARACTER'.) Same as + whatever `gcc' type occupies N times the storage space of a `gcc' + `char' item. + + `NUMERIC-TYPE(KIND=N)' + N=1 corresponds to `REAL', `INTEGER', `LOGICAL', `COMPLEX'. N=2 + corresponds to `DOUBLE PRECISION', `DOUBLE COMPLEX', and, for + integral types, `char' (usually `INTEGER*1' and `LOGICAL*1'). N=3 + corresponds to `short' for integral types (usually `INTEGER*2' and + `LOGICAL*2'). N=4 corresponds to `long long' for integral types + (this usually means `INTEGER*8' and `LOGICAL*8'). + + Note that these are proposed correspondences and might change in + future versions of `g77'--avoid writing code depending on them. + + For now, `g77' does not support numeric types other than the ones + listed above. So, on a typical 32-bit machine, only `INTEGER*4', + `REAL*4', `LOGICAL*4', `COMPLEX*8', and so on, will work. Other types + supported by `g77' are derived from gcc types such as `char', `short', + `int', `long int', `long long int', `long double', and so on. That is, + whatever types `gcc' already supports, `g77' probably will support in a + future version. The rules for the `NUMERIC-TYPE*N' notation will apply + to the new types, and new values for `NUMERIC-TYPE(KIND=N)' will be + assigned in a way that encourages clarity, consistency, and portability. + +  + File: g77.info, Node: Constants, Next: Source Form, Prev: Types, Up: Language + + Constants + ========= + + `g77' strictly assigns types to all constants not documented as + "typeless" (the typeless constants include things like `Z'1''). + Context is never a determining factor for the type, and hence the + interpretation, of a typed constant. Examples: `1' is always type + `INTEGER', `3.141592653545256234' is always type `REAL' (even if the + additional precision specified is lost, and even when used in a `DOUBLE + PRECISION' context), `1E0' is always type `REAL', and `1D0' is always + type `DOUBLE PRECISION'. + + Many other Fortran compilers attempt to assign types to typed + constants based on their context. This results in hard-to-find bugs, + nonportable code, and is not in the spirit (though it strictly follows + the letter) of the 77 and 90 standards. `g77' will not support these + dangerous semantics, but might offer, in a future release, explicit + constructs by which a wider variety of typeless constants may be + specified, and/or user-requested warnings indicating places where `g77' + might differ from how other compilers assign types to constants. + +  + File: g77.info, Node: Source Form, Next: Pedantic Compilation, Prev: Constants, Up: Language + + Source Form + =========== + + The `-ffree-form' (aka `-fno-fixed-form') and `-ffixed-form' (aka + `-fno-free-form') command-line options govern how the source file is + interpreted. Fixed form corresponds to classic ANSI FORTRAN 77 (plus + popular extensions, such as allowing tabs) and Fortran 90's fixed form. + Free form corresponds to Fortran 90's free form (though possibly not + entirely up-to-date, and without complaining about some things that for + which Fortran 90 requires diagnostics, such as `R = 3 . 1'). + + The way a Fortran compiler views source files depends entirely on the + implementation choices made for the compiler. GNU Fortran currently + tries to be somewhat like a few popular compilers (`f2c', DEC Fortran, + and so on), though a cleaner default definition along with more + flexibility offered by command-line options is likely to be offered in + version 0.6. + + Here are some facts regarding the way `g77' interprets source lines: + + * Carriage returns (`\r') in source lines are ignored. This is + somewhat different from `f2c', which seems to treat them as spaces + outside character/Hollerith constants, and encodes them as `\r' + inside such constants. + + * A source line with a TAB character anywhere in it is treated as + entirely significant--however long it is--instead of ending in + column 72 (for fixed-form source) or 132 (for free-form source). + This also is different from `f2c', which encodes tabs as `\t' (the + ASCII TAB character) inside character and Hollerith constants, but + nevertheless seems to treat the column position as if it had been + affected by the canonical tab positioning. + + `g77' effectively translates tabs to the appropriate number of + spaces (a la the default for the UNIX `expand' command) before + doing any other processing, other than (currently) noting whether + a tab was found on a line and using this info to decide how to + interpret the length of the line and continued constants. + + Note that this default behavior probably will change for version + 0.6, when it will presumably be available via a command-line + option. The default as of version 0.6 is planned to be a "pure + visual" model, where tabs are immediately converted to spaces and + otherwise have no effect, so the way a typical user sees source + lines produces a consistent result no matter how the spacing in + those source lines is actually implemented via tabs, spaces, and + trailing tabs/spaces before newline. Command-line options are + likely to be added to specify whether all or just-tabbed lines are + to be extended to 132 or full input-line length, and perhaps even + an option will be added to specify the truncated-line behavior to + which some Digital compilers default (and which affects the way + continued character/Hollerith constants are interpreted). + + * Source lines shorter than the applicable fixed length are treated + as if they were padded with spaces to that length. + + This affects only continued character and Hollerith constants, and + is a different interpretation than provided by some other popular + compilers (although a bit more consistent with the traditional + punched-card basis of Fortran and the way the Fortran standard + expressed fixed source form). + + `g77' might someday offer an option to warn about cases where + differences might be seen as a result of this treatment, and + perhaps an option to specify the alternate behavior as well. + + Note that this padding cannot apply to lines that are effectively + of infinite length--such lines are specified using command-line + options like `-ffixed-line-length-none', for example. + diff -rcp2N g77-0.5.17/f/g77.info-4 g77-0.5.18/f/g77.info-4 *** g77-0.5.17/f/g77.info-4 Wed Dec 31 19:00:00 1969 --- g77-0.5.18/f/g77.info-4 Mon Apr 1 10:20:51 1996 *************** *** 0 **** --- 1,1230 ---- + This is Info file g77.info, produced by Makeinfo-1.64 from the input + file g77.texi. + + This file explains how to use the GNU Fortran system. + + Published by the Free Software Foundation 59 Temple Place - Suite 330 + Boston, MA 02111-1307 USA + + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of this + manual provided the copyright notice and this permission notice are + preserved on all copies. + + Permission is granted to copy and distribute modified versions of + this manual under the conditions for verbatim copying, provided also + that the sections entitled "GNU General Public License," "Funding for + Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are + included exactly as in the original, and provided that the entire + resulting derived work is distributed under the terms of a permission + notice identical to this one. + + Permission is granted to copy and distribute translations of this + manual into another language, under the above conditions for modified + versions, except that the sections entitled "GNU General Public + License," "Funding for Free Software," and "Protect Your Freedom--Fight + `Look And Feel'", and this permission notice, may be included in + translations approved by the Free Software Foundation instead of in the + original English. + + Contributed by James Craig Burley (`burley@gnu.ai.mit.edu'). + Inspired by a first pass at translating `g77-0.5.16/f/DOC' that was + contributed to Craig by David Ronis (`ronis@onsager.chem.mcgill.ca'). + +  + File: g77.info, Node: Pedantic Compilation, Next: Case Sensitivity, Prev: Source Form, Up: Language + + Pedantic Compilation + ==================== + + The `-fpedantic' command-line option specifies that `g77' is to warn + about certain non-standard constructs. This is useful for finding some + extensions `g77' accepts that other compilers might not accept. (Note + that the `-pedantic' and `-pedantic-errors' options always imply + `-fpedantic'.) + + With `-ff90' in force along with `-fpedantic', some constructs are + accepted that result in diagnostics when `-fno-f90' and `-fpedantic' + are both in force. *Note GNU Fortran Extensions: Extensions, for + information on those constructs. + + The constructs for which `g77' issues diagnostics when `-fpedantic' + and `-fno-f90' are in force are: + + * Automatic arrays, as in `REAL A(N)', where `A' is not a dummy + argument. + + * `READ (5), I' and `WRITE (10), J'--the standard disallows the + comma in each case, while allowing it in `READ 10, I', but many + compilers (including `f2c') allow the superfluous comma. + + * `DOUBLE COMPLEX', either explicitly (via explicit or `IMPLICIT' + statement) or implicitly (as in `C*D', where `C' is `COMPLEX' and + `D' is `DOUBLE PRECISION', which is prohibited by the standard + because it should produce a non-standard `DOUBLE COMPLEX' result). + + * Automatic conversion of numeric expressions to `INTEGER' in + contexts such as: + - Array-reference indexes. + + - Alternate-return values. + + - Computed `GOTO'. + + - `FORMAT' run-time expressions (not yet supported). + + - Dimension lists in specification statements. + + - Numbers for I/O statements (such as `READ (UNIT=3.2), I') + + - Sizes of `CHARACTER' entities in specification statements. + + - Kind types in specification entities (a Fortran 90 feature). + + - Initial, terminal, and incrementation parameters for + implied-`DO' constructs in `DATA' statements. + + * Automatic conversion of `LOGICAL' expressions to `INTEGER' in + contexts such as arithmetic `IF' (where `COMPLEX' expressions are + disallowed anyway). + + * Substring operators applied to character constants and named + constants (such as `PRINT *,'hello'(3:5)', which would print + `llo'). + + * Null argument passed to statement function (as in `PRINT + *,FOO(,3)'). + + * Differences between program units regarding whether a given + `COMMON' area is `SAVE'd (for targets where program units in a + single source file are "glued" together as they typically are for + UNIX development environments). + + * Differences between named-`COMMON'-block sizes between program + units. + + * Specification statements following first `DATA' statement (normally + `DATA I/1/' may be followed by `INTEGER J', though not `INTEGER + I', but `-fpedantic' disables use of both cases. + + * Semicolon as statement separator (as in `CALL FOO; CALL BAR'). + + * Use of `&' in column 1 of fixed-form source (indicates + continuation). + + * Use of `CHARACTER' constants to initialize numeric entities, and + vice versa. + + * Expressions having two arithmetic operators in a row, such as + `X*-Y'. + + If `-fpedantic' is specified along with `-ff90', the following + constructs result in diagnostics: + + * Use of semicolons on line with INCLUDE statement. + +  + File: g77.info, Node: Case Sensitivity, Next: Intrinsics, Prev: Pedantic Compilation, Up: Language + + Case Sensitivity + ================ + + GNU Fortran offers the programmer way too much flexibility in + deciding how source files are to be treated vis-a-vis uppercase and + lowercase characters. There are 66 useful settings that affect case + sensitivity, plus 10 settings that are nearly useless, with the + remaining 116 settings being either redundant or useless. + + None of these settings have any effect on the contents of comments + (the text after a `c' or `C' in Column 1, for example) or of character + or Hollerith constants. Note that things like the `E' in the statement + `CALL FOO(3.2E10)' and the `TO' in `ASSIGN 10 TO LAB' are considered + built-in keywords. + + Low-level switches are identified in this discussion thusly: + + A Source Case Conversion + 0 Preserve (see Note 1) + + 1 Convert to Upper Case + + 2 Convert to Lower Case + + B Built-in Keyword Matching: + 0 Match Any Case (per-character basis) + + 1 Match Upper Case Only + + 2 Match Lower Case Only + + 3 Match InitialCaps Only (see tables for spellings) + + C Built-in Intrinsic Matching: + 0 Match Any Case (per-character basis) + + 1 Match Upper Case Only + + 2 Match Lower Case Only + + 3 Match InitialCaps Only (see tables for spellings) + + D User-defined Symbol Possibilities (warnings only) + 0 Allow Any Case (per-character basis) + + 1 Allow Upper Case Only + + 2 Allow Lower Case Only + + 3 Allow InitialCaps Only (see Note 2) + + Note 1: `g77' eventually will support `NAMELIST' in a manner that is + consistent with these source switches--in the sense that input will be + expected to meet the same requirements as source code in terms of + matching symbol names and keywords (for the exponent letters). + + Currently, however, `NAMELIST' is supported `libf2c', which + uppercases `NAMELIST' input and symbol names for matching. This means + not only that `NAMELIST' output currently shows symbol (and keyword) + names in uppercase even if lower-case source conversion (option A2) is + selected, but that `NAMELIST' cannot be adequately supported when + source case preservation (option A0) is selected. + + If A0 is selected, a warning message will be output for each + `NAMELIST' statement to this effect. The behavior of the program is + undefined at run time if two or more symbol names appear in a given + `NAMELIST' such that the names are identical when converted to upper + case (e.g. `NAMELIST /X/ VAR, Var, var'). For complete and total + elegance, perhaps there should be a warning when option A2 is selected, + since the output of NAMELIST is currently in uppercase but will someday + be lowercase (when a `libg77' is written), but that seems to be + overkill for a product in beta test. + + Note 2: Rules for InitialCaps names are: + - Must be a single uppercase letter, *or* + + - Must start with an uppercase letter and contain at least one + lowercase letter. + + So `A', `Ab', `ABc', `AbC', and `Abc' are valid InitialCaps names, + but `AB', `A2', and `ABC' are not. Note that most, but not all, + built-in names meet these requirements--the exceptions are some of the + two-letter format specifiers, such as `BN' and `BZ'. + + Here are the names of the corresponding command-line options: + + A0: -fsource-case-preserve + A1: -fsource-case-upper + A2: -fsource-case-lower + + B0: -fmatch-case-any + B1: -fmatch-case-upper + B2: -fmatch-case-lower + B3: -fmatch-case-initcap + + C0: -fintrin-case-any + C1: -fintrin-case-upper + C2: -fintrin-case-lower + C3: -fintrin-case-initcap + + D0: -fsymbol-case-any + D1: -fsymbol-case-upper + D2: -fsymbol-case-lower + D3: -fsymbol-case-initcap + + Useful combinations of the above settings, along with abbreviated + option names that set some of these combinations all at once: + + 1: A0-- B0--- C0--- D0--- -fcase-preserve + 2: A0-- B0--- C0--- D-1-- + 3: A0-- B0--- C0--- D--2- + 4: A0-- B0--- C0--- D---3 + 5: A0-- B0--- C-1-- D0--- + 6: A0-- B0--- C-1-- D-1-- + 7: A0-- B0--- C-1-- D--2- + 8: A0-- B0--- C-1-- D---3 + 9: A0-- B0--- C--2- D0--- + 10: A0-- B0--- C--2- D-1-- + 11: A0-- B0--- C--2- D--2- + 12: A0-- B0--- C--2- D---3 + 13: A0-- B0--- C---3 D0--- + 14: A0-- B0--- C---3 D-1-- + 15: A0-- B0--- C---3 D--2- + 16: A0-- B0--- C---3 D---3 + 17: A0-- B-1-- C0--- D0--- + 18: A0-- B-1-- C0--- D-1-- + 19: A0-- B-1-- C0--- D--2- + 20: A0-- B-1-- C0--- D---3 + 21: A0-- B-1-- C-1-- D0--- + 22: A0-- B-1-- C-1-- D-1-- -fcase-strict-upper + 23: A0-- B-1-- C-1-- D--2- + 24: A0-- B-1-- C-1-- D---3 + 25: A0-- B-1-- C--2- D0--- + 26: A0-- B-1-- C--2- D-1-- + 27: A0-- B-1-- C--2- D--2- + 28: A0-- B-1-- C--2- D---3 + 29: A0-- B-1-- C---3 D0--- + 30: A0-- B-1-- C---3 D-1-- + 31: A0-- B-1-- C---3 D--2- + 32: A0-- B-1-- C---3 D---3 + 33: A0-- B--2- C0--- D0--- + 34: A0-- B--2- C0--- D-1-- + 35: A0-- B--2- C0--- D--2- + 36: A0-- B--2- C0--- D---3 + 37: A0-- B--2- C-1-- D0--- + 38: A0-- B--2- C-1-- D-1-- + 39: A0-- B--2- C-1-- D--2- + 40: A0-- B--2- C-1-- D---3 + 41: A0-- B--2- C--2- D0--- + 42: A0-- B--2- C--2- D-1-- + 43: A0-- B--2- C--2- D--2- -fcase-strict-lower + 44: A0-- B--2- C--2- D---3 + 45: A0-- B--2- C---3 D0--- + 46: A0-- B--2- C---3 D-1-- + 47: A0-- B--2- C---3 D--2- + 48: A0-- B--2- C---3 D---3 + 49: A0-- B---3 C0--- D0--- + 50: A0-- B---3 C0--- D-1-- + 51: A0-- B---3 C0--- D--2- + 52: A0-- B---3 C0--- D---3 + 53: A0-- B---3 C-1-- D0--- + 54: A0-- B---3 C-1-- D-1-- + 55: A0-- B---3 C-1-- D--2- + 56: A0-- B---3 C-1-- D---3 + 57: A0-- B---3 C--2- D0--- + 58: A0-- B---3 C--2- D-1-- + 59: A0-- B---3 C--2- D--2- + 60: A0-- B---3 C--2- D---3 + 61: A0-- B---3 C---3 D0--- + 62: A0-- B---3 C---3 D-1-- + 63: A0-- B---3 C---3 D--2- + 64: A0-- B---3 C---3 D---3 -fcase-initcap + 65: A-1- B01-- C01-- D01-- -fcase-upper + 66: A--2 B0-2- C0-2- D0-2- -fcase-lower + + Number 22 is the "strict" ANSI FORTRAN 77 model wherein all input + (except comments, character constants, and Hollerith strings) must be + entered in uppercase. Use `-fcase-strict-upper' to specify this + combination. + + Number 43 is like Number 22 except all input must be lowercase. Use + `-fcase-strict-lower' to specify this combination. + + Number 65 is the "classic" ANSI FORTRAN 77 model as implemented on + many non-UNIX machines whereby all the source is translated to + uppercase. Use `-fcase-upper' to specify this combination. + + Number 66 is the "canonical" UNIX model whereby all the source is + translated to lowercase. Use `-fcase-lower' to specify this + combination. + + There are a few nearly useless combinations: + + 67: A-1- B01-- C01-- D--2- + 68: A-1- B01-- C01-- D---3 + 69: A-1- B01-- C--23 D01-- + 70: A-1- B01-- C--23 D--2- + 71: A-1- B01-- C--23 D---3 + 72: A--2 B01-- C0-2- D-1-- + 73: A--2 B01-- C0-2- D---3 + 74: A--2 B01-- C-1-3 D0-2- + 75: A--2 B01-- C-1-3 D-1-- + 76: A--2 B01-- C-1-3 D---3 + + The above allow some programs to be compiled but with restrictions + that make most useful programs impossible: Numbers 67 and 72 warn about + *any* user-defined symbol names (such as `SUBROUTINE FOO'); Numbers 68 + and 73 warn about any user-defined symbol names longer than one + character that don't have at least one non-alphabetic character after + the first; Numbers 69 and 74 disallow any references to intrinsics; and + Numbers 70, 71, 75, and 76 are combinations of the restrictions in + 67+69, 68+69, 72+74, and 73+74, respectively. + + All redundant combinations are shown in the above tables anyplace + where more than one setting is shown for a low-level switch. For + example, `B0-2-' means either setting 0 or 2 is valid for switch B. + The "proper" setting in such a case is the one that copies the setting + of switch A--any other setting might slightly reduce the speed of the + compiler, though possibly to an unmeasurable extent. + + All remaining combinations are useless in that they prevent + successful compilation of non-null source files (source files with + something other than comments). + +  + File: g77.info, Node: Intrinsics, Next: Dialects, Prev: Case Sensitivity, Up: Language + + Intrinsics + ========== + + A given specific intrinsic belongs in one or more groups. Each group + is deleted, disabled, hidden, or enabled by default or a command-line + option. The meaning of each term follows. + + Deleted + No intrinsics are recognized as belonging to that group. + + Disabled + Intrinsics are recognized as belonging to the group, but + references to them (other than via the `INTRINSIC' statement) are + disallowed through that group. + + Hidden + Intrinsics in that group are recognized and enabled (if + implemented) *only* if the first mention of the actual name of an + intrinsic in a program unit is in an `INTRINSIC' statement. + + Enabled + Intrinsics in that group are recognized and enabled (if + implemented). + + The distinction between deleting and disabling a group is illustrated + by the following example. Assume intrinsic `FOO' belongs only to group + `FGR'. If group `FGR' is deleted, the following program unit will + successfully compile, because `FOO()' will be seen as a reference to an + external function named `FOO': + + PRINT *, FOO() + END + + If group `FGR' is disabled, compiling the above program will produce + diagnostics, either because the `FOO' intrinsic is improperly invoked + or, if properly invoked, it is not enabled. To change the above + program so it references an external function `FOO' instead of the + disabled `FOO' intrinsic, add the following line to the top: + + EXTERNAL FOO + + So, deleting a group tells `g77' to pretend as though the intrinsics in + that group do not exist at all, whereas disabling it tells `g77' to + recognize them as (disabled) intrinsics in intrinsic-like contexts. + + Hiding a group is like enabling it, but the intrinsic must be first + named in an `INTRINSIC' statement to be considered a reference to the + intrinsic rather than to an external procedure. This might be the + "safest" way to treat a new group of intrinsics when compiling old + code, because it allows the old code to be generally written as if + those new intrinsics never existed, but to be changed to use them by + inserting `INTRINSIC' statements in the appropriate places. However, + it should be the goal of development to use `EXTERNAL' for all names of + external procedures that might be intrinsic names. + + If an intrinsic is in more than one group, it is enabled if any of + its containing groups are enabled; if not so enabled, it is hidden if + any of its containing groups are hidden; if not so hidden, it is + disabled if any of its containing groups are disabled; if not so + disabled, it is deleted. This extra complication is necessary because + some intrinsics, such as `IBITS', belong to more than one group, and + hence should be enabled if any of the groups to which they belong are + enabled, and so on. + + The groups are: + + `dcp' + `DOUBLE COMPLEX' intrinsics from the standards (F77, F90). + + `f2c' + Intrinsics supported by AT&T's `f2c' converter and/or `libf2c'. + + `f90' + Fortran 90 intrinsics. + + `mil' + MIL-STD 1753 intrinsics (`MVBITS', `IAND', `BTEST', and so on). + + `unix' + UNIX intrinsics (`IARGC', `EXIT', `ERF', and so on). + + `vxt' + VAX/VMS FORTRAN (current as of v4) intrinsics. + +  + File: g77.info, Node: Dialects, Next: Object Compatibility, Prev: Intrinsics, Up: Language + + GNU Fortran Dialects + ==================== + + The `-fvxt-not-f90' and `-ff90-not-vxt' command-line options control + how `g77' interprets certain tokens and constructs that have different + meanings in VAX FORTRAN (circa v4) and Fortran 90. (Generally, this + manual uses the invented acronym VXT to refer to many popular VAX + FORTRAN extensions, though not necessarily those that are specific to + the VAX processor architecture or the VMS operating system. An + extension offered by a Digital Fortran product that also is offered by + several other Fortran products for different kinds of systems is + probably going to be considered for inclusion in `g77' someday, and is + considered a VXT extension.) + + When `-ff90-not-vxt' is specified, the following interpretations are + made (and, when `-fvxt-not-f90' is in effect, the opposite + interpretations are made): + + * Double-quote character (`"') delimits character constant just as + does apostrophe (`''), rather than beginning an octal constant of + `INTEGER' type. + + * An exclamation point (`!') in column 5 of fixed-form source file + treated as a continuation character rather than the beginning of a + comment (as it does in any other column). + + * `TYPE FOO' and `TYPE (FOO), BAR' statements are recognized as the + Fortran 90 variety, not I/O statements. (However, the F90 variety + is *not* supported, so this really just ensures that `g77' will + produce a diagnostic instead of trying to implement the VXT `TYPE' + statement--which currently is not supported either.) + +  + File: g77.info, Node: Object Compatibility, Next: Distensions, Prev: Dialects, Up: Language + + Object Compatibility + ==================== + + An individual Fortran source file can be compiled to an object + (`*.o') file instead of to the final program executable. This allows + several portions of a program to be compiled at different times and + linked together whenever a new version of the program is needed. + However, it introduces the issue of "object compatibility" across the + various object files (and libraries, or `*.a' files) that are linked + together to produce any particular exectable file. + + Object compatibility is an issue when combining, in one program, + Fortran code compiled by more than one compiler (or more than one + configuration of a compiler). If the compilers disagree on how to + transform the names of procedures, there will normally be errors when + linking such programs. Worse, if the compilers agree on naming, but + disagree on issues like how to pass parameters, return arguments, and + lay out `COMMON' areas, the earliest detected errors might be the + incorrect results produced by the program (and that assumes these + errors are detected, which is not always the case). + + Normally, `g77' generates code that is object-compatible with code + generated by a version of `f2c' configured (with, for example, `f2c.h' + definitions) to be generally compatible with `g77' as built by `gcc'. + (Normally, `f2c' will, by default, conform to the appropriate + configuration, but it is possible that older or perhaps even newer + versions of `f2c', or versions having certain configuration changes to + `f2c' internals, will produce object files that are incompatible with + `g77'.) + + For example, a Fortran string subroutine argument will become two + arguments on the C side: a `char *' and an `int' length. + + Much of this compatibility results from the fact that `g77' uses the + same run-time library, `libf2c', used by `f2c'. + + Other compilers might or might not generate code that is + object-compatible with `libf2c' and current `g77', and some might offer + such compatibility only when explicitly selected via a command-line + option to the compiler. + + * Menu: + + * Dropping f2c Compatibility:: When speed is more important. + * Other Compilers:: Interoperation with code from other compilers. + +  + File: g77.info, Node: Dropping f2c Compatibility, Next: Other Compilers, Up: Object Compatibility + + Dropping f2c Compatibility + -------------------------- + + Specifying `-fno-f2c' allows `g77' to generate, in some cases, + faster code, by not needing to allow to the possibility of linking with + code compiled by `f2c'. + + For example, this affects how `REAL', `COMPLEX', and `DOUBLE + COMPLEX' functions are called. With `-fno-f2c', they are compiled as + returning the appropriate `gcc' type (`float', `__complex__ float', + `__complex__ double', in many configurations). + + With `-ff2c' in force, they are compiled differently (with perhaps + slower run-time performance) to accommodate the restrictions inherent + in `f2c''s use of K&R C as an intermediate language--`REAL' functions + return double, while `COMPLEX' functions return `void' and use an extra + argument pointing to a place for the functions to return their values. + + It is possible that, in some cases, leaving `-ff2c' in force might + produce faster code than using `-fno-f2c'. Feel free to experiment, + but remember to experiment with changing the way *entire programs and + their Fortran libraries are compiled* at a time, since this sort of + experimentation affects the interface of code generated for a Fortran + source file--that is, it affects object compatibility. + + Note that `f2c' compatibility is a fairly static target to achieve, + though not necessarily perfectly so, since, like `g77', it is still + being improved. However, specifying `-fno-f2c' causes `g77' to + generate code that will probably be incompatible with code generated by + future versions of `g77' when the same option is in force. You should + make sure you are always able to recompile complete programs from + source code when upgrading to new versions of `g77' or `f2c', + especially when using options such as `-fno-f2c'. + + Therefore, if you are using `g77' to compile libraries and other + object files for possible future use and you don't want to require + recompilation for future use with subsequent versions of `g77', you + might want to stick with `f2c' compatibility for now, and carefully + watch for any announcements about changes to the `f2c'/`libf2c' + interface that might affect existing programs (thus requiring + recompilation). + + It is probable that a future version of `g77' will not, by default, + generate object files compatible with `f2c' and not use `libf2c'. If + you expect to depend on this compatibility in the long term, use the + options `-ff2c -ff2c-library' when compiling all of the applicable code. + This should either cause `g77' to produce compatible code (at the + expense of the availability of some features and performance), or at + the very least trigger compiler warning messages, in future versions of + `g77'. + +  + File: g77.info, Node: Other Compilers, Prev: Dropping f2c Compatibility, Up: Object Compatibility + + Other Compilers + --------------- + + On systems with Fortran compilers other than `f2c' and `g77', code + compiled by `g77' is not expected to work well with code compiled by + the native compiler. (This is true for `f2c'-compiled objects as well.) + Libraries compiled with the native compiler probably will have to be + recompiled with `g77' to be used with `g77'-compiled code. + + Reasons for such incompatibilities include: + + * There might be differences in the way names of Fortran procedures + are translated for use in the system's object-file format. For + example, the statement `CALL FOO' might be compiled by `g77' to + call a procedure the linker `ld' sees given the name `_foo_', + while the apparently corresponding statement `SUBROUTINE FOO' + might be compiled by the native compiler to define the + linker-visible name `_foo', or `_FOO_', and so on. + + * There might be subtle type mismatches which cause subroutine + arguments and function return values to get corrupted. + + This is why simply getting `g77' to transform procedure names the + same way a native compiler does is not usually a good idea--unless + some effort has been made to ensure that, aside from the way the + two compilers transform procedure names, everything else about the + way they generate code for procedure interfaces is identical. + + * Native compilers use libraries of private I/O routines which will + not be available at link time unless you have the native + compiler--and you would have to explicitly ask for them. + + For example, on the Sun you would have to add `-L/usr/lang/SCx.x + -lF77 -lV77' to the link command. + +  + File: g77.info, Node: Distensions, Prev: Object Compatibility, Up: Language + + Distensions + =========== + + The `-fugly' command-line options determine whether certain features + supported by VAX FORTRAN and other such compilers, but considered too + ugly to be in code that can be changed to use safer and/or more + portable constructs, are accepted. These are humorously referred to as + "distensions", extensions that just plain look ugly in the harsh light + of day. + + The constructs enabled via `-fugly' include: + + * Automatic conversion between `INTEGER' and `LOGICAL' as dictated by + context (typically implies nonportable dependencies on how a + particular implementation encodes `.TRUE.' and `.FALSE.'). + + * Use of typeless and Hollerith constants in non-standard places + (the "standard" here being the appendix in ANSI FORTRAN 77 and the + descriptions in MIL-STD 1753), plus in places controlled by + `-fugly-args' and `-fugly-init'. + + * Use of a `LOGICAL' variable in `ASSIGN' and assigned-`GOTO' + statements. + + * Use of a single trailing comma to mean "pass an extra trailing null + argument" in a list of actual arguments to a procedure other than a + statement function. + + For example, `CALL FOO(,)' means "pass two null arguments" when + `-fugly' is used, rather than "pass one null argument". + + The construct disabled via `-fno-ugly-args' is: + + * Passing of typeless and Hollerith constants as actual arguments in + procedure invocations. + + For example, `CALL FOO(4HABCD)'. + + The constructs disabled by `-fno-ugly-init' are: + + * Use of Hollerith and typeless constants in contexts where they set + initial (compile-time) values for variables, arrays, and named + constants--that is, `DATA' and `PARAMETER' statements, plus + type-declaration statements specifying initial values. + + * In the same contexts as above, use of character constants to + initialize numeric items and vice versa (one constant per item). + + * Use of Hollerith and typeless constants on the right-hand side of + assignment statements to numeric types, and in other contexts + (such as passing arguments to in invocations of intrinsic + procedures and statement functions) that are treated as + assignments to known types (the dummy arguments, in these cases). + +  + File: g77.info, Node: Installation, Next: Debugging and Interfacing, Prev: Language, Up: Top + + Installing GNU Fortran + ********************** + + * Menu: + + * Prerequisites:: Make sure your system is ready for `g77'. + * Problems Installing:: Known trouble areas. + * Quick Start:: The easier procedure for non-experts. + * Complete Installation:: For experts, or those who want to be: the details. + * Distributing Binaries:: If you plan on distributing your `g77'. + * Settings:: Some notes on `g77' internals. + + The following information describes how to install `g77'. + + The information in this file generally pertains to dealing with + *source* distributions of `g77' and `gcc'. It is possible that some of + this information will be applicable to some *binary* distributions of + these products--however, since these distributions are not made by the + maintainers of `g77', responsibility for binary distributions rests with + whoever built and first distributed them. + + Nevertheless, efforts to make `g77' easier to both build and install + from source and package up as a binary distribution are ongoing. + +  + File: g77.info, Node: Prerequisites, Next: Problems Installing, Up: Installation + + Prerequisites + ============= + + The procedures described to unpack, configure, build, and install + `g77' assume your system has certain programs already installed. + + The following prerequisites should be met by your system before you + follow the `g77' installation instructions: + + `gzip' + To unpack the `gcc' and `g77' distributions, you'll need the + `gunzip' utility in the `gzip' distribution. Most UNIX systems + already have `gzip' installed. If yours doesn't, you can get it + from the FSF. + + Note that you'll need `tar' and other utilities as well, but all + UNIX systems have these. There are GNU versions of all these + available--in fact, a complete GNU UNIX system can be put together + on most systems, if desired. + + `gcc-2.7.2.tar.gz' + You need to have this, or some other applicable, version of `gcc' + on your system. The version should be an exact copy of a + distribution from the FSF. It is approximately 7MB large. + + If you've already unpacked `gcc-2.7.2.tar.gz' into a directory + (named `gcc-2.7.2') called the "source tree" for `gcc', you can + delete the distribution itself, but you'll need to remember to + skip any instructions to unpack this distribution. + + Without an applicable `gcc' source tree, you cannot build `g77'. + You can obtain an FSF distribution of `gcc' from the FSF. + + `g77-0.5.18.tar.gz' + You probably have already unpacked this distribution, or you are + reading an advanced copy of this manual, which is contained in + this distribution. This distribution approximately 1MB large. + + You can obtain an FSF distribution of `g77' from the FSF, the same + way you obtained `gcc'. + + 100MB disk space + For a complete "bootstrap" build, about 100MB of disk space is + required for `g77' by the author's current Linux system. + + Some juggling can reduce the amount of space needed; during the + bootstrap process, once Stage 3 starts, during which the version + of `gcc' that has been copied into the `stage2/' directory is used + to rebuild the system, you can delete the `stage1/' directory to + free up some space. + + It is likely that many systems don't require the complete + bootstrap build, as they already have a recent version of `gcc' + installed. Such systems might be able to build `g77' with only + about 75MB of free space. + + `patch' + Although you can do everything `patch' does yourself, by hand, + without much trouble, having `patch' installed makes installation + of new versions of GNU utilities such as `g77' so much easier that + it is worth getting. You can obtain `patch' the same way you + obtained `gcc' and `g77'. + + In any case, you can apply patches by hand--patch files are + designed for humans to read them. + + `make' + Your system must have `make', and you will probably save yourself + a lot of trouble if it is GNU `make' (sometimes referred to as + `gmake'). + + `cc' + Your system must have a working C compiler. + + *Note Installing GNU CC: (gcc)Installation, for more information + on prerequisites for installing `gcc'. + + `bison' + If you do not have `bison' installed, you can usually work around + any need for it, since `g77' itself does not use it, and `gcc' + normally includes all files generated by running it in its + distribution. You can obtain `bison' the same way you obtained + `gcc' and `g77'. + + *Note Missing bison?::, for information on how to work around not + having `bison'. + + `makeinfo' + If you are missing `makeinfo', you can usually work around any + need for it. You can obtain `makeinfo' the same way you obtained + `gcc' and `g77'. + + *Note Missing makeinfo?::, for information on getting around the + lack of `makeinfo'. + + `root' access + To perform the complete installation procedures on a system, you + need to have `root' access to that system, or equivalent access. + + Portions of the procedure (such as configuring and building `g77') + can be performed by any user with enough disk space and virtual + memory. + + However, these instructions are oriented towards less-experienced + users who want to install `g77' on their own personal systems. + + System administrators with more experience will want to determine + for themselves how they want to modify the procedures described + below to suit the needs of their installation. + +  + File: g77.info, Node: Problems Installing, Next: Quick Start, Prev: Prerequisites, Up: Installation + + Problems Installing + =================== + + This is a list of problems (and some apparent problems which don't + really mean anything is wrong) that show up when configuring, building, + installing, or porting GNU Fortran. + + *Note Installation Problems: (gcc)Installation Problems, for more + information on installation problems that can afflict either `gcc' or + `g77'. + + * Menu: + + * General Problems:: Problems afflicting most or all systems. + * Cross-compiler Problems:: Problems afflicting cross-compilation setups. + +  + File: g77.info, Node: General Problems, Next: Cross-compiler Problems, Up: Problems Installing + + General Problems + ---------------- + + * On SunOS systems, linking the `f771' program produces an error + message concerning an undefined symbol named `_strtoul'. + + This is not a `g77' bug. *Note Patching GNU Fortran::, for + information on a workaround provided by `g77'. + + The proper fix is either to upgrade your system to one that + provides a complete ANSI C environment, or improve `gcc' so that + it provides one for all the languages and configurations it + supports. + + *Note:* In earlier versions of `g77', an automated workaround for + this problem was attempted. It worked for systems without + `_strtoul', substituting the incomplete-yet-sufficient version + supplied with `g77' for those systems. However, the automated + workaround failed mysteriously for systems that appeared to have + conforming ANSI C environments, and it was decided that, lacking + resources to more fully investigate the problem, it was better to + not punish users of those systems either by requiring them to work + around the problem by hand or by always substituting an incomplete + `strtoul()' implementation when their systems had a complete, + working one. Unfortunately, this meant inconveniencing users of + systems not having `strtoul()', but they're using obsolete (and + generally unsupported) systems anyway. + + * It'd be helpful if `g77''s `Makefile.in' or `Make-lang.in' would + create the various `stageN' directories and their subdirectories, + so expert installers wouldn't have to reconfigure after cleaning + up. + + * Improvements to the way `libf2c' is built could make building + `g77' as a cross-compiler easier--for example, passing and using + `LD' and `AR' in the appropriate ways. + + * `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. + These patch files might contain unnecessary, but possibly helpful, + patches. As a result, it is possible this issue might never be + resolved, except by eliminating the need for the person + configuring `g77' to apply a patch by hand, by going to a more + automated approach (such as configure-time patching). + + * It should be possible to build the runtime without building `cc1' + and other non-Fortran items, but, for now, an easy way to do that + is not yet established. + + * Compiling `g77' requires GNU C, not just ANSI C. Fixing this + wouldn't be very hard (just tedious), but the code using GNU + extensions to the C language is expected to be rewritten for 0.6 + anyway, so there are no plans for an interim fix. + +  + File: g77.info, Node: Cross-compiler Problems, Prev: General Problems, Up: Problems Installing + + Cross-compiler Problems + ----------------------- + + `g77' has been in alpha testing since September of 1992, and in + public beta testing since February of 1995. Alpha testing was done by + a small number of people worldwide on a fairly wide variety of + machines, involving self-compilation in most or all cases. Beta + testing has been done primarily via self-compilation, but in more and + more cases, cross-compilation (and "criss-cross compilation", where a + version of a compiler is built on one machine to run on a second and + generate code that runs on a third) has been tried and has succeeded, + to varying extents. + + Generally, `g77' can be ported to any configuration to which `gcc', + `f2c', and `libf2c' can be ported and made to work together, aside from + the known problems described in this manual. If you want to port `g77' + to a particular configuration, you should first make sure `gcc' and + `libf2c' can be ported to that configuration before focusing on `g77', + because `g77' is so dependent on them. + + Even for cases where `gcc' and `libf2c' work, you might run into + problems with cross-compilation on certain machines, for several + reasons. + + * There is one known bug (a design bug to be fixed in 0.6) that + prevents configuration of `g77' as a cross-compiler in some cases, + though there are assumptions made during configuration that + probably make doing non-self-hosting builds a hassle, requiring + manual intervention. + + * `gcc' might still have some trouble being configured for certain + combinations of machines. For example, it might not know how to + handle floating-point constants. + + * There are still some challenges putting together the right + run-time libraries (needed by `libf2c') for a target system, + depending on the systems involved in the configuration. (This is + a general problem with cross-compilation, and with `gcc' in + particular.) + +  + File: g77.info, Node: Quick Start, Next: Complete Installation, Prev: Problems Installing, Up: Installation + + Quick Start + =========== + + This procedure configures, builds, and installs `g77' "out of the + box" and works on most UNIX systems. Each command is identified by a + unique number, used in the explanatory text that follows. For the most + part, the output of each command is not shown, though indications of + the types of responses are given in a few cases. + + To perform this procedure, the installer must be logged in as user + `root'. Much of it can be done while not logged in as `root', and + users experienced with UNIX administration should be able to modify the + procedure properly to do so. + + Following traditional UNIX conventions, it is assumed that the + source trees for `g77' and `gcc' will be placed in `/usr/src'. It also + is assumed that the source distributions themselves already reside in + `/usr/FSF', a naming convention used by the author of `g77' on his own + system: + + /usr/FSF/gcc-2.7.2.tar.gz + /usr/FSF/g77-0.5.18.tar.gz + + Users of the following systems should not blindly follow these + quick-start instructions, because of problems their systems have coping + with straightforward installation of `g77': + + * SunOS + + * Alpha + + Instead, see *Note Complete Installation::, for detailed information + on how to configure, build, and install `g77' for your particular + system. Also, see *Note Known Causes of Trouble with GNU Fortran: + Trouble, for information on bugs and other problems known to afflict the + installation process, and how to report newly discovered ones. + + If your system is *not* on the above list, and *is* a UNIX system or + one of its variants, you should be able to follow the instructions + below. If you vary *any* of the steps below, you might run into + trouble, including possibly breaking existing programs for other users + of your system. Before doing so, it is wise to review the explanations + of some of the steps. These explanations follow this list of steps. + + sh[ 1]# `cd /usr/src' + + sh[ 2]# `gunzip -c < /usr/FSF/gcc-2.7.2.tar.gz | tar xf -' + + [Might say "Broken pipe"...that is normal on some systems.] + sh[ 3]# `gunzip -c < /usr/FSF/g77-0.5.18.tar.gz | tar xf -' + + ["Broken pipe" again possible.] + sh[ 4]# `ln -s gcc-2.7.2 gcc' + + sh[ 5]# `ln -s g77-0.5.18 g77' + + sh[ 6]# `mv -i g77/* gcc' + + [No questions should be asked by mv here; or, you made a mistake.] + sh[ 7]# `patch -p1 -V t -d gcc-2.7.2 < gcc-2.7.2/f/gbe/2.7.2.diff' + + [Unless patch complains about rejected patches, this step worked.] + sh[ 8]# `cd gcc' + sh[ 9]# `touch f77-install-ok' + + [Do not do the above if your system already has an f77 + command, unless you've checked that overwriting it + is okay.] + sh[10]# `touch f2c-install-ok' + + [Do not do the above if your system already has an f2c + command, unless you've checked that overwriting it + is okay. Else, `touch f2c-exists-ok'.] + sh[11]# `./configure --prefix=/usr' + + [Do not do the above if gcc is not installed in /usr/bin. + You might need a different `--prefix=...', as + described below.] + sh[12]# `make bootstrap' + + [This takes a long time, and is where most problems occur.] + sh[13]# `rm -fr stage1' + + sh[14]# `make -k install' + + [The actual installation.] + sh[15]# `g77 -v' + + [Verify that g77 is installed, obtain version info.] + sh[16]# + + *Note Updating Your Info Directory: Updating Documentation, for + information on how to update your system's top-level `info' directory + to contain a reference to this manual, so that users of `g77' can + easily find documentation instead of having to ask you for it. + + Elaborations of many of the above steps follows: + + Step 1: `cd /usr/src' + You can build `g77' pretty much anyplace. By convention, this + manual assumes `/usr/src'. It might be helpful if other users on + your system knew where to look for the source code for the + installed version of `g77' and `gcc' in any case. + + Step 4: `ln -s gcc-2.7.2 gcc' + Step 5: `ln -s g77-0.5.18 g77' + These commands mainly help reduce typing, and help reduce visual + clutter in examples in this manual showing what to type to install + `g77'. + + *Note Unpacking::, for information on using distributions of `g77' + made by organizations other than the FSF. + + Step 6: `mv -i g77/* gcc' + After doing this, you can, if you like, type `rm g77' and `rmdir + g77-0.5.18' to remove the empty directory and the symbol link to + it. But, it might be helpful to leave them around as quick + reminders of which version(s) of `g77' are installed on your + system. + + *Note Unpacking::, for information on the contents of the `g77' + directory (as merged into the `gcc' directory). + + Step 7: `patch -p1 ...' + This can produce a wide variety of printed output, from `Hmm, I + can't seem to find a patch in there anywhere...' to long lists of + messages indicated that patches are being found, applied + successfully, and so on. + + If messages about "fuzz", "offset", or especially "reject files" + are printed, it might mean you applied the wrong patch file. If + you believe this is the case, it is best to restart the sequence + after deleting (or at least renaming to unused names) the + top-level directories for `g77' and `gcc' and their symbolic links. + + After this command finishes, the `gcc' directory might have old + versions of several files as saved by `patch'. To remove these, + after `cd gcc', type `rm -i *.~*~'. + + *Note Merging Distributions::, for more information. + + Step 9: `touch f77-install-ok' + Don't do this if you don't want to overwrite an existing version + of `f77' (such as a native compiler, or a script that invokes + `f2c'). Otherwise, installation will overwrite the `f77' command + and the `f77' man pages with copies of the corresponding `g77' + material. + + *Note Installing `f77': Installing f77, for more information. + + Step 10: `touch f2c-install-ok' + Don't do this if you don't want to overwrite an existing + installation of `libf2c' (though, chances are, you do). Instead, + `touch f2c-exists-ok' to allow the installation to continue + without any error messages about `/usr/lib/libf2c.a' already + existing. + + *Note Installing `f2c': Installing f2c, for more information. + + Step 11: `./configure --prefix=/usr' + This is where you specify that the `g77' executable is to be + installed in `/usr/bin/', the `libf2c.a' library is to be + installed in `/usr/lib/', and so on. + + You should ensure that any existing installation of the `gcc' + executable is in `/usr/bin/'. Otherwise, installing `g77' so that + it does not fully replace the existing installation of `gcc' is + likely to result in the inability to compile Fortran programs. + + *Note Where in the World Does Fortran (and GNU C) Go?: Where to + Install, for more information on determining where to install + `g77'. *Note Configuring gcc::, for more information on the + configuration process triggered by invoking the `./configure' + script. + + Step 12: `make bootstrap' + *Note Installing GNU CC: (gcc)Installation, for information on the + kinds of diagnostics you should expect during this procedure. + + *Note Building gcc::, for complete `g77'-specific information on + this step. + + Step 13: `rm -fr stage1' + You don't need to do this, but it frees up disk space. + + Step 14: `make -k install' + If this doesn't seem to work, try: + + make -k install install-libf77 install-f2c-all + + *Note Installation of Binaries::, for more information. + + *Note Updating Your Info Directory: Updating Documentation, for + information on entering this manual into your system's list of + texinfo manuals. + +  + File: g77.info, Node: Complete Installation, Next: Distributing Binaries, Prev: Quick Start, Up: Installation + + Complete Installation + ===================== + + Here is the complete `g77'-specific information on how to configure, + build, and install `g77'. + + * Menu: + + * Unpacking:: + * Merging Distributions:: + * f77: Installing f77. + * f2c: Installing f2c. + * Patching GNU Fortran:: + * Where to Install:: + * Configuring gcc:: + * Building gcc:: + * Pre-installation Checks:: + * Installation of Binaries:: + * Updating Documentation:: + * bison: Missing bison?. + * makeinfo: Missing makeinfo?. + +  + File: g77.info, Node: Unpacking, Next: Merging Distributions, Up: Complete Installation + + Unpacking + --------- + + The `gcc' source distribution is a stand-alone distribution. It is + designed to be unpacked (producing the `gcc' source tree) and built as + is, assuming certain prerequisites are met (including the availability + of compatible UNIX programs such as `make', `cc', and so on). + + However, before building `gcc', you will want to unpack and merge + the `g77' distribution in with it, so that you build a Fortran-capable + version of `gcc', which includes the `g77' command, the necessary + run-time libraries, and this manual. + + Unlike `gcc', the `g77' source distribution is *not* a stand-alone + distribution. It is designed to be unpacked and, afterwards, + immediately merged into an applicable `gcc' source tree. That is, the + `g77' distribution *augments* a `gcc' distribution--without `gcc', + generally only the documentation is immediately usable. + + A sequence of commands typically used to unpack `gcc' and `g77' is: + + sh# `cd /usr/src' + sh# `gunzip -d < /usr/FSF/gcc-2.7.2.tar.gz | tar xf -' + sh# `gunzip -d < /usr/FSF/g77-0.5.18.tar.gz | tar xf -' + sh# `ln -s gcc-2.7.2 gcc' + sh# `ln -s g77-0.5.18 g77' + sh# `mv -i g77/* gcc' + + *Notes:* The commands beginning with `gunzip...' might print `Broken + pipe...' as they complete. That is nothing to worry about, unless you + actually *hear* a pipe breaking. The `ln' commands are helpful in + reducing typing and clutter in installation examples in this manual. + Hereafter, the top level of `gcc' source tree is referred to as `gcc', + and the top level of just the `g77' source tree (prior to issuing the + `mv' command, above) is referred to as `g77'. + + There are three top-level names in a `g77' distribution: + + g77/COPYING.g77 + g77/README.g77 + g77/f + + All three entries should be moved (or copied) into a `gcc' source + tree (typically named after its version number and as it appears in the + FSF distributions--e.g. `gcc-2.7.2'). + + `g77/f' is the subdirectory containing all of the code, + documentation, and other information that is specific to `g77'. The + other two files exist to provide information on `g77' to someone + encountering a `gcc' source tree with `g77' already present, who has + not yet read these installation instructions and thus needs help + understanding that the source tree they are looking at does not come + from a single FSF distribution. They also help people encountering an + unmerged `g77' source tree for the first time. + + *Note:* Please use *only* `gcc' and `g77' source trees as + distributed by the FSF. Use of modified versions, such as the + Pentium-specific-optimization port of `gcc', is likely to result in + problems that appear to be in the `g77' code but, in fact, are not. Do + not use such modified versions unless you understand all the + differences between them and the versions the FSF distributes--in which + case you should be able to modify the `g77' (or `gcc') source trees + appropriately so `g77' and `gcc' can coexist as they do in the stock + FSF distributions. + diff -rcp2N g77-0.5.17/f/g77.info-5 g77-0.5.18/f/g77.info-5 *** g77-0.5.17/f/g77.info-5 Wed Dec 31 19:00:00 1969 --- g77-0.5.18/f/g77.info-5 Mon Apr 1 10:20:51 1996 *************** *** 0 **** --- 1,1085 ---- + This is Info file g77.info, produced by Makeinfo-1.64 from the input + file g77.texi. + + This file explains how to use the GNU Fortran system. + + Published by the Free Software Foundation 59 Temple Place - Suite 330 + Boston, MA 02111-1307 USA + + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of this + manual provided the copyright notice and this permission notice are + preserved on all copies. + + Permission is granted to copy and distribute modified versions of + this manual under the conditions for verbatim copying, provided also + that the sections entitled "GNU General Public License," "Funding for + Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are + included exactly as in the original, and provided that the entire + resulting derived work is distributed under the terms of a permission + notice identical to this one. + + Permission is granted to copy and distribute translations of this + manual into another language, under the above conditions for modified + versions, except that the sections entitled "GNU General Public + License," "Funding for Free Software," and "Protect Your Freedom--Fight + `Look And Feel'", and this permission notice, may be included in + translations approved by the Free Software Foundation instead of in the + original English. + + Contributed by James Craig Burley (`burley@gnu.ai.mit.edu'). + Inspired by a first pass at translating `g77-0.5.16/f/DOC' that was + contributed to Craig by David Ronis (`ronis@onsager.chem.mcgill.ca'). + +  + File: g77.info, Node: Merging Distributions, Next: Installing f77, Prev: Unpacking, Up: Complete Installation + + Merging Distributions + --------------------- + + After merging the `g77' source tree into the `gcc' source tree, the + final merge step is done by applying the pertinent patches the `g77' + distribution provides for the `gcc' source tree. + + Read the file `gcc/f/gbe/README', and apply the appropriate patch + file for the version of the GNU CC compiler you have, if that exists. + If the directory exists but the appropriate file does not exist, you + are using either an old, unsupported version, or a release one that is + newer than the newest `gcc' version supported by the version of `g77' + you have. + + GNU version numbers make it easy to figure out whether a particular + version of a distribution is newer or older than some other version of + that distribution. The format is, generally, MAJOR.MINOR.PATCH, with + each field being a decimal number. (You can safely ignore leading + zeros; for example, 1.5.3 is the same as 1.5.03.) The MAJOR field only + increases with time. The other two fields are reset to 0 when the + field to their left is incremented; otherwise, they, too, only increase + with time. So, version 2.6.2 is newer than version 2.5.8, and version + 3.0 is newer than both. (Trailing `.0' fields often are omitted in + announcements and in names for distributions and the directories they + create.) + + If your version of `gcc' is older than the oldest version supported + by `g77' (as casually determined by listing the contents of + `gcc/f/gbe/'), you should obtain a newer, supported version of `gcc'. + (You could instead obtain an older version of `g77', or try and get + your `g77' to work with the old `gcc', but neither approach is + recommended, and you shouldn't bother reporting any bugs you find if you + take either approach, because they're probably already fixed in the + newer versions you're not using.) + + If your version of `gcc' is newer than the newest version supported + by `g77', it is possible that your `g77' will work with it anyway. If + the version number for `gcc' differs only in the PATCH field, you might + as well try applying the `g77' patch that is for the newest version of + `gcc' having the same MAJOR and MINOR fields, as this is likely to work. + + So, for example, if `g77' has support for versions 2.7.0 and 2.7.1, + it is likely that `gcc-2.7.2' would work well with `g77' by using the + `2.7.1.diff' patch file provided with `g77' (aside from some offsets + reported by `patch', which usually are harmless). + + However, `gcc-2.8.0' would almost certainly not work with that + version of `g77' no matter which patch file was used, so a new version + of `g77' would be needed (and you should wait for it rather than + bothering the maintainers--*note User-Visible Changes: Changes.). + + This complexity is the result of `gcc' and `g77' being separate + distributions. By keeping them separate, each product is able to be + independently improved and distributed to its user base more frequently. + + However, `g77' often requires changes to contemporary versions of + `gcc'. Also, the GBE interface defined by `gcc' typically undergoes + some incompatible changes at least every time the MINOR field of the + version number is incremented, and such changes require corresponding + changes to the `g77' front end (FFE). + + It is hoped that the GBE interface, and the `gcc' and `g77' products + in general, will stabilize sufficiently for the need for hand-patching + to disappear. + + Invoking `patch' as described in `gcc/f/gbe/README' can produce a + wide variety of printed output, from `Hmm, I can't seem to find a patch + in there anywhere...' to long lists of messages indicated that patches + are being found, applied successfully, and so on. + + If messages about "fuzz", "offset", or especially "reject files" are + printed, it might mean you applied the wrong patch file. If you + believe this is the case, it is best to restart the sequence after + deleting (or at least renaming to unused names) the top-level + directories for `g77' and `gcc' and their symbolic links. That is + because `patch' might have partially patched some `gcc' source files, + so reapplying the correct patch file might result in the correct + patches being applied incorrectly (due to the way `patch' necessarily + works). + + After `patch' finishes, the `gcc' directory might have old versions + of several files as saved by `patch'. To remove these, after `cd gcc', + type `rm -i *.~*~'. + + *Note:* `g77''s configuration file `gcc/f/config-lang.in' ensures + that the source code for the version of `gcc' being configured has at + least one GBE function required specifically by `g77'. This function + was added to `gcc-2.7.1', making the patch file + `g77-0.5.17/f/gbe/2.7.1.diff' empty of actual patches. + + For `gcc-2.7.0' and earlier, this configuration-time checking should + catch failure to apply the correct patch and, if so caught, it should + abort the configuration with an explanation. *Please* do not try to + disable the check, otherwise `g77' might well appear to build and + install correctly, and even appear to compile correctly, but could + easily produce broken code. + + `diff -rcp2N' is used to create the patch files in `gcc/f/gbe/'. + +  + File: g77.info, Node: Installing f77, Next: Installing f2c, Prev: Merging Distributions, Up: Complete Installation + + Installing `f77' + ---------------- + + You should decide whether you want installation of `g77' to also + install an `f77' command. On systems with a native `f77', this is not + normally desired, so `g77' does not do this by default. + + If you want `f77' installed, create the file `f77-install-ok' (e.g. + via the UNIX command `touch f77-install-ok') in the source or build + top-level directory (the same directory in which the `g77' `f' + directory resides, not the `f' directory itself), or edit + `gcc/f/Make-lang.in' and change the definition of the + `F77_INSTALL_FLAG' macro appropriately. + + Usually, this means that, after typing `cd gcc', you would type + `touch f77-install-ok'. + + When you enable installation of `f77', either a link to or a direct + copy of the `g77' command is made. Similarly, `f77.1' is installed as + a man page. + + (The `uninstall' target in the `gcc/Makefile' also tests this macro + and file, when invoked, to determine whether to delete the installed + copies of `f77' and `f77.1'.) + + *Note:* No attempt is yet made to install a program (like a shell + script) that provides compatibility with any other `f77' programs. + Only the most rudimentary invocations of `f77' will work the same way + with `g77'. + +  + File: g77.info, Node: Installing f2c, Next: Patching GNU Fortran, Prev: Installing f77, Up: Complete Installation + + Installing `f2c' + ---------------- + + Currently, `g77' does not include `f2c' itself in its distribution. + However, it does include a modified version of the `libf2c'. This + version is normally compatible with `f2c', but has been modified to + meet the needs of `g77' in ways that might possibly be incompatible + with some versions or configurations of `f2c'. + + Decide how installation of `g77' should affect any existing + installation of `f2c' on your system. + + If you do not have `f2c' on your system (e.g. no `/usr/bin/f2c', no + `/usr/include/f2c.h', and no `/usr/lib/libf2c.a', `/usr/lib/libF77.a', + or `/usr/lib/libI77.a'), you don't need to be concerned with this item. + + If you do have `f2c' on your system, you need to decide how users of + `f2c' will be affected by your installing `g77'. Since `g77' is + currently designed to be object-code-compatible with `f2c' (with very + few, clear exceptions), users of `f2c' might want to combine + `f2c'-compiled object files with `g77'-compiled object files in a + single executable. + + To do this, users of `f2c' should use the same copies of `f2c.h' and + `libf2c.a' that `g77' uses (and that get built as part of `g77'). + + If you do nothing here, the `g77' installation process will not + overwrite the `include/f2c.h' and `lib/libf2c.a' files with its own + versions, and in fact will not even install `libf2c.a' for use with the + newly installed versions of `gcc' and `g77' if it sees that + `lib/libf2c.a' exists--instead, it will print an explanatory message + and skip this part of the installation. + + To install `g77''s versions of `f2c.h' and `libf2c.a' in the + appropriate places, create the file `f2c-install-ok' (e.g. via the UNIX + command `touch f2c-install-ok') in the source or build top-level + directory (the same directory in which the `g77' `f' directory resides, + not the `f' directory itself), or edit `gcc/f/Make-lang.in' and change + the definition of the `F2C_INSTALL_FLAG' macro appropriately. + + Usually, this means that, after typing `cd gcc', you would type + `touch f2c-install-ok'. + + Make sure that when you enable the overwriting of `f2c.h' and + `libf2c.a' as used by `f2c', you have a recent and properly configured + version of `bin/f2c' so that it generates code that is compatible with + `g77'. + + If you don't want installation of `g77' to overwrite `f2c''s existing + installation, but you do want `g77' installation to proceed with + installation of its own versions of `f2c.h' and `libf2c.a' in places + where `g77' will pick them up (even when linking `f2c'-compiled object + files--which might lead to incompatibilities), create the file + `f2c-exists-ok' (e.g. via the UNIX command `touch f2c-exists-ok') in + the source or build top-level directory, or edit `gcc/f/Make-lang.in' + and change the definition of the `F2CLIBOK' macro appropriately. + +  + File: g77.info, Node: Patching GNU Fortran, Next: Where to Install, Prev: Installing f2c, Up: Complete Installation + + Patching GNU Fortran + -------------------- + + If you're using a SunOS system, you'll need to make the following + change to `gcc/f/proj.h': edit the line reading + + #define FFEPROJ_STRTOUL 1 ... + + by replacing the `1' with `0'. + + This causes a minimal version of `strtoul()' provided as part of the + `g77' distribution to be compiled and linked into whatever `g77' + programs need it, since some systems (like SunOS) do not provide this + function in their system libraries. + + Similarly, a minimal version of `bsearch()' is available and can be + enabled by editing a line similar to the one for `strtoul()' above in + `gcc/f/proj.h', if your system libraries lack `bsearch()'. + + These are not problems with `g77', which requires an ANSI C + environment. You should upgrade your system to one that provides a + full ANSI C environment, or encourage the maintainers of `gcc' to + provide one to all `gcc'-based compilers in future `gcc' distributions. + + *Note Problems Installing::, for more information on why `strtoul()' + comes up missing and on approaches to dealing with this problem that + have already been tried. + +  + File: g77.info, Node: Where to Install, Next: Configuring gcc, Prev: Patching GNU Fortran, Up: Complete Installation + + Where in the World Does Fortran (and GNU C) Go? + ----------------------------------------------- + + Before configuring, you should make sure you know where you want the + `g77' and `gcc' binaries to be installed after they're built, because + this information is given to the configuration tool and used during the + build itself. + + A `g77' installation necessarily requires installation of a + `g77'-aware version of `gcc', so that the `gcc' command recognizes + Fortran source files and knows how to compile them. + + For this to work, the version of `gcc' that you will be building as + part of `g77' *must* be installed as the "active" version of `gcc' on + the system. + + Sometimes people make the mistake of installing `gcc' as + `/usr/local/bin/gcc', leaving an older, non-Fortran-aware version in + `/usr/bin/gcc'. (Or, the opposite happens.) This can result in `g77' + being unable to compile Fortran source files, because when it calls on + `gcc' to do the actual compilation, `gcc' complains that it does not + recognize the language, or the file name suffix. + + So, determine whether `gcc' already is installed on your system, + and, if so, *where* it is installed, and prepare to configure the new + version of `gcc' you'll be building so that it installs over the + existing version of `gcc'. + + You might want to back up your existing copy of `bin/gcc', and the + entire `lib/' directory, before you perform the actual installation (as + described in this manual). + + Existing `gcc' installations typically are found in `/usr' or + `/usr/local'. If you aren't certain where the currently installed + version of `gcc' and its related programs reside, look at the output of + this command: + + gcc -v -o /tmp/delete-me -xc /dev/null -xnone + + All sorts of interesting information on the locations of various + `gcc'-related programs and data files should be visible in the output + of the above command. However, you do have to sift through it + yourself; `gcc' currently provides no easy way to ask it where it is + installed and where it looks for the various programs and data files it + calls on to do its work. + + Just *building* `g77' should not overwrite any installed + programs--but, usually, after you build `g77', you will want to install + it, so backing up anything it might overwrite is a good idea. (This is + true for any package, not just `g77', though in this case it is + intentional that `g77' overwrites `gcc' if it is already installed--it + is unusual that the installation process for one distribution + intentionally overwrites a program or file installed by another + distribution.) + + Another reason to back up the existing version first, or make sure + you can restore it easily, is that it might be an older version on + which other users have come to depend for certain behaviors. However, + even the new version of `gcc' you install will offer users the ability + to specify an older version of the actual compilation programs if + desired, and these older versions need not include any `g77' components. + *Note Specifying Target Machine and Compiler Version: (gcc)Target + Options, for information on the `-V' option of `gcc'. + +  + File: g77.info, Node: Configuring gcc, Next: Building gcc, Prev: Where to Install, Up: Complete Installation + + Configuring GNU CC + ------------------ + + `g77' is configured automatically when you configure `gcc'. There + are two parts of `g77' that are configured in two different + ways--`g77', which "camps on" to the `gcc' configuration mechanism, and + `libf2c', which uses a variation of the GNU `autoconf' configuration + system. + + Generally, you shouldn't have to be concerned with either `g77' or + `libf2c' configuration, unless you're configuring `g77' as a + cross-compiler. In this case, the `libf2c' configuration, and possibly + the `g77' and `gcc' configurations as well, might need special + attention. (This also might be the case if you're porting `gcc' to a + whole new system--even if it is just a new operating system on an + existing, supported CPU.) + + To configure the system, see *Note Installing GNU CC: + (gcc)Installation, following the instructions for running `./configure'. + Pay special attention to the `--prefix=' option, which you almost + certainly will need to specify. + + (Note that `gcc' installation information is provided as a straight + text file in `gcc/INSTALL'.) + + The information printed by the invocation of `./configure' should + show that the `f' directory (the Fortran language) has been configured. + If it does not, there is a problem. + + *Note:* Configuring with the `--srcdir' argument is known to work + with GNU `make', but it is not known to work with other variants of + `make'. Irix5.2 and SunOS4.1 versions of `make' definitely won't work + outside the source directory at present. `g77''s portion of the + `configure' script issues a warning message about this when you + configure for building binaries outside the source directory. + +  + File: g77.info, Node: Building gcc, Next: Pre-installation Checks, Prev: Configuring gcc, Up: Complete Installation + + Building GNU CC + --------------- + + Building `g77' requires building enough of `gcc' that these + instructions assume you're going to build all of `gcc', including + `g++', `protoize', and so on. You can save a little time and disk + space by changes the `LANGUAGES' macro definition in `gcc/Makefile.in' + or `gcc/Makefile', but if you do that, you're on your own. One change + is almost *certainly* going to cause failures: removing `c' or `f77' + from the definition of the `LANGUAGES' macro. + + After configuring `gcc', which configures `g77' and `libf2c' + automatically, you're ready to start the actual build by invoking + `make'. + + *Note:* You *must* have run `./configure' before you run `make', + even if you're using an already existing `gcc' development directory, + because `./configure' does the work to recognize that you've added + `g77' to the configuration. + + There are two general approaches to building GNU CC from scratch: + + "bootstrap" + This method uses minimal native system facilities to build a + barebones, unoptimized `gcc', that is then used to compile + ("bootstrap") the entire system. + + "straight" + This method assumes a more complete native system exists, and uses + that just once to build the entire system. + + On all systems without a recent version of `gcc' already installed, + the bootstrap method must be used. In particular, `g77' uses + extensions to the C language offered, apparently, only by `gcc'. + + On most systems with a recent version of `gcc' already installed, + the straight method can be used. This is an advantage, because it + takes less CPU time and disk space for the build. However, it does + require that the system have fairly recent versions of many GNU + programs and other programs, which are not enumerated here. + + * Menu: + + * Bootstrap Build:: For all systems. + * Straight Build:: For systems with a recent version of `gcc'. + +  + File: g77.info, Node: Bootstrap Build, Next: Straight Build, Up: Building gcc + + Bootstrap Build + ............... + + A complete bootstrap build is done by issuing a command beginning + with `make bootstrap ...', as described in *Note Installing GNU CC: + (gcc)Installation. This is the most reliable form of build, but it + does require the most disk space and CPU time, since the complete system + is built twice (in Stages 2 and 3), after an initial build (during + Stage 1) of a minimal `gcc' compiler using the native compiler and + libraries. + + You might have to, or want to, control the way a bootstrap build is + done by entering the `make' commands to build each stage one at a time, + as described in the `gcc' manual. For example, to save time or disk + space, you might want to not bother doing the Stage 3 build, in which + case you are assuming that the `gcc' compiler you have built is + basically sound (because you are giving up the opportunity to compare a + large number of object files to ensure they're identical). + + To save some disk space during installation, after Stage 2 is built, + you can type `rm -fr stage1' to remove the binaries built during Stage + 1. + + *Note:* If you do build Stage 3 and you compare the object files + produced by various stages, the file `gcc/f/zzz.o' *will* be different. + That is because it contains a string with an expansion of the + `__TIME__' macro, which expands to the current time of day. It is + nothing to worry about, since `gcc/f/zzz.c' doesn't contain any actual + code. It does allow you to override its use of `__DATE__' and + `__TIME__' by defining macros for the compilation--see the source code + for details. + + *Note Installing GNU CC: (gcc)Installation, for important + information on building `gcc' that is not described in this `g77' + manual. For example, explanations of diagnostic messages and whether + they're expected, or indicate trouble, are found there. + +  + File: g77.info, Node: Straight Build, Prev: Bootstrap Build, Up: Building gcc + + Straight Build + .............. + + If you have a recent version of `gcc' already installed on your + system, and if you're reasonably certain it produces code that is + object-compatible with the version of `gcc' you want to build as part + of building `g77', you can save time and disk space by doing a straight + build. + + To build just the C and Fortran compilers and the necessary run-time + libraries, issue the following command: + + make -k CC=gcc LANGUAGES=f77 all g77 + + (The `g77' target is necessary because the `gcc' build procedures + apparently do not automatically build command drivers for languages in + subdirectories. It's the `all' target that triggers building + everything except, apparently, the `g77' command itself.) + + If you run into problems using this method, you have two options: + + * Abandon this approach and do a bootstrap build. + + * Try to make this approach work by diagnosing the problems you're + running into and retrying. + + Especially if you do the latter, you might consider submitting any + solutions as bug/fix reports. *Note Known Causes of Trouble with GNU + Fortran: Trouble. + + However, understand that many problems preventing a straight build + from working are not `g77' problems, and, in such cases, are not likely + to be addressed in future versions of `g77'. + +  + File: g77.info, Node: Pre-installation Checks, Next: Installation of Binaries, Prev: Building gcc, Up: Complete Installation + + Pre-installation Checks + ----------------------- + + Before installing the system, which includes installing `gcc', you + might want to do some minimum checking to ensure that some basic things + work. + + Here are some commands you can try, and output typically printed by + them when they work: + + sh# `cd /usr/src/gcc' + sh# `./g77 --driver=./xgcc -B./ -v' + ./xgcc -B./ -v -fnull-version -o /tmp/gfa03648 ... + Reading specs from ./specs + gcc version 2.7.1 + ./cpp -lang-c -v -isystem ./include -undef ... + GNU CPP version 2.7.1 (80386, BSD syntax) + #include "..." search starts here: + #include <...> search starts here: + ./include + /usr/include + /usr/i486-unknown-linuxaout/include + /usr/lib/gcc-lib/i486-unknown-linuxaout/2.7.1/include + /usr/include + End of search list. + ./f771 /tmp/cca03648.i -quiet -dumpbase null.F -version ... + GNU F77 version 2.7.1 (80386, BSD syntax) compiled ... + GNU Fortran Front End version 0.5.18 compiled: ... + as -o /tmp/cca036481.o /tmp/cca03648.s + ld -m i386linux -o /tmp/gfa03648 /usr/lib/crt0.o -L. ... + /usr/lib/crt0.o(.text+0x35): undefined reference to `main' + sh# `./xgcc -B./ -v -o /tmp/delete-me -xc /dev/null -xnone' + Reading specs from ./specs + gcc version 2.7.1 + ./cpp -lang-c -v -isystem ./include -undef ... + GNU CPP version 2.7.1 (80386, BSD syntax) + #include "..." search starts here: + #include <...> search starts here: + ./include + /usr/include + /usr/i486-unknown-linuxaout/include + /usr/lib/gcc-lib/i486-unknown-linuxaout/2.7.1/include + /usr/include + End of search list. + ./cc1 /tmp/cca03659.i -quiet -dumpbase null.c -version ... + GNU C version 2.7.1 (80386, BSD syntax) compiled ... + as -o /tmp/cca036591.o /tmp/cca03659.s + ld -m i386linux -o /tmp/delete-me /usr/lib/crt0.o -L. ... + /usr/lib/crt0.o(.text+0x35): undefined reference to `main' + sh# + + (Note that long lines have been truncated, and `...' used to + indicate such truncations.) + + The above two commands test whether `g77' and `gcc', respectively, + are able to compile empty (null) source files, whether invocation of + the C preprocessor works, whether libraries can be linked (even though + there is an undefined reference due to there being no main program + unit), and so on. + + If the output you get from either of the above two commands is + noticably different, especially if it is shorter or longer in ways that + do not look consistent with the above sample output, you probably + should not install `gcc' and `g77' until you have investigated further. + + For example, you could try compiling actual applications and seeing + how that works. (You might want to do that anyway, even if the above + tests work.) + + To compile using the not-yet-installed versions of `gcc' and `g77', + use the following commands to invoke them. + + To invoke `g77', type: + + /usr/src/gcc/g77 --driver=/usr/src/gcc/xgcc -B/usr/src/gcc/ ... + + To invoke `gcc', type: + + /usr/src/gcc/xgcc -B/usr/src/gcc/ ... + +  + File: g77.info, Node: Installation of Binaries, Next: Updating Documentation, Prev: Pre-installation Checks, Up: Complete Installation + + Installation of Binaries + ------------------------ + + After configuring, building, and testing `g77' and `gcc', when you + are ready to install them on your system, type: + + make -k CC=gcc LANGUAGES=f77 install + + As described in *Note Installing GNU CC: (gcc)Installation, the + values for the `CC' and `LANGUAGES' macros should be the same as those + you supplied for the build itself. + + So, the details of the above command might vary if you used a + bootstrap build (where you might be able to omit both definitions, or + might have to supply the same definitions you used when building the + final stage) or if you deviated from the instructions for a straight + build. + + If the above command does not install `libf2c.a' as expected, try + this: + + make -k ... install install-libf77 install-f2c-all + + We don't know why some non-GNU versions of `make' sometimes require + this alternate command, but they do. (Remember to supply the + appropriate definitions for `CC' and `LANGUAGES' where you see `...' in + the above command.) + + Note that using the `-k' option tells `make' to continue after some + installation problems, like not having `makeinfo' installed on your + system. It might not be necessary. + +  + File: g77.info, Node: Updating Documentation, Next: Missing bison?, Prev: Installation of Binaries, Up: Complete Installation + + Updating Your Info Directory + ---------------------------- + + As part of installing `g77', you should make sure users of `info' + can easily access this manual on-line. Do this by making sure a line + such as the following exists in `/usr/info/dir', or in whatever file is + the top-level file in the `info' directory on your system (perhaps + `/usr/local/info/dir': + + * g77: (g77). The GNU Fortran programming language. + + If the menu in `dir' is organized into sections, `g77' probably + belongs in a section with a name such as the following: + + * Writing Programs + + * Programming Languages + + * Languages Other Than C + + * Scientific/Engineering Tools + + * GNU Compilers + +  + File: g77.info, Node: Missing bison?, Next: Missing makeinfo?, Prev: Updating Documentation, Up: Complete Installation + + Missing `bison'? + ---------------- + + If you cannot install `bison', make sure you have started with a + *fresh* distribution of `gcc', do *not* do `make maintainer-clean' (in + other versions of `gcc', this was called `make realclean'), and, to + ensure that `bison' is not invoked by `make' during the build, type + these commands: + + sh# `cd gcc' + sh# `touch bi-parser.c bi-parser.h c-parse.c c-parse.h cexp.c' + sh# `touch cp/parse.c cp/parse.h objc-parse.c' + sh# + + These commands update the date-time-modified information for all the + files produced by the various invocations of `bison' in the current + versions of `gcc', so that `make' no longer believes it needs to update + them. All of these files should already exist in a `gcc' distribution, + but the application of patches to upgrade to a newer version can leave + the modification information set such that the `bison' input files look + more "recent" than the corresponding output files. + + *Note:* New versions of `gcc' might change the set of files it + generates by invoking `bison'--if you cannot figure out for yourself + how to handle such a situation, try an older version of `gcc' until you + find someone who can (or until you obtain and install `bison'). + +  + File: g77.info, Node: Missing makeinfo?, Prev: Missing bison?, Up: Complete Installation + + Missing `makeinfo'? + ------------------- + + If you cannot install `makeinfo', either use the `-k' option when + invoking make to specify any of the `install' or related targets, or + specify `MAKEINFO=echo' on the `make' command line. + + If you fail to do one of these things, some files, like `libf2c.a', + might not be installed, because the failed attempt by `make' to invoke + `makeinfo' causes it to cancel any further processing. + +  + File: g77.info, Node: Distributing Binaries, Next: Settings, Prev: Complete Installation, Up: Installation + + Distributing Binaries + ===================== + + If you are building `g77' for distribution to others in binary form, + first make sure you are aware of your legal responsibilities (read the + file `gcc/COPYING' thoroughly). + + Then, consider your target audience and decide where `g77' should be + installed. + + For systems like Linux that have no native Fortran compiler (or + where `g77' could be considered the native compiler for Fortran and + `gcc' for C, etc.), you should definitely configure `g77' for + installation in `/usr/bin' instead of `/usr/local/bin'. Specify the + `--prefix=/usr' option when running `./configure'. You might also want + to set up the distribution so the `f77' command is a link to + `g77'--just make an empty file named `f77-install-ok' in the source or + build directory (the one in which the `f' directory resides, not the + `f' directory itself) when you specify one of the `install' or + `uninstall' targets in a `make' command. + + For a system that might already have `f2c' installed, you definitely + will want to make another empty file (in the same directory) named + either `f2c-exists-ok' or `f2c-install-ok'. Use the former if you + don't want your distribution to overwrite `f2c'-related files in + existing systems; use the latter if you want to improve the likelihood + that users will be able to use both `f2c' and `g77' to compile code for + a single program without encountering link-time or run-time + incompatibilities. + + (Make sure you clearly document, in the "advertising" for your + distribution, how installation of your distribution will affect + existing installations of `gcc', `f2c', `f77', `libf2c.a', and so on. + Similarly, you should clearly document any requirements you assume are + met by users of your distribution.) + + For other systems with native `f77' (and `cc') compilers, configure + `g77' as you (or most of your audience) would configure `gcc' for their + installations. Typically this is for installation in `/usr/local', and + would not include a copy of `g77' named `f77', so users could still use + the native `f77'. + + In any case, for `g77' to work properly, you *must* ensure that the + binaries you distribute include: + + `bin/g77' + This is the command most users use to compile Fortran. + + `bin/gcc' + This is the command all users use to compile Fortran, either + directly or indirectly via the `g77' command. The `bin/gcc' + executable file must have been built from a `gcc' source tree into + which a `g77' source tree was merged and configured, or it will + not know how to compile Fortran programs. + + `bin/f77' + In installations with no non-GNU native Fortran compiler, this is + the same as `bin/g77'. Otherwise, it should be omitted from the + distribution, so the one on already on a particular system does + not get overwritten. + + `info/g77.info*' + This is the documentation for `g77'. + + Please edit this documentation (by editing `gcc/f/*.texi' and + doing `make doc' from the `/usr/src/gcc' directory) to reflect any + changes you've made to `g77', or at least to encourage users of + your binary distribution to report bugs to you first. + + Also, whether you distribute binaries or install `g77' on your own + system, it might be helpful for everyone to add a line listing + this manual by name and topic to the top-level `info' node in + `/usr/info/dir'. That way, users can find `g77' documentation more + easily. *Note Updating Your Info Directory: Updating + Documentation. + + `man/man1/g77.1' + This is the short man page for `g77'. + + `man/man1/f77.1' + In installations where `f77' is the same as `g77', this is the + same as `man/man1/g77.1'. Otherwise, it should be omitted from + the distribution, so the one already on a particular system does + not get overwritten. + + `lib/gcc-lib/.../f771' + This is the actual Fortran compiler. + + `lib/gcc-lib/.../libf2c.a' + This is the run-time library for `g77'-compiled programs. + + Whether you want to include the slightly updated (and possibly + improved) versions of `cc1', `cc1plus', and whatever other binaries get + rebuilt with the changes the GNU Fortran distribution makes to the GNU + back end, is up to you. These changes are highly unlikely to break any + compilers, and it is possible they'll fix back-end bugs that can be + demonstrated using front ends other than GNU Fortran's. + + Please assure users that unless they have a specific need for their + existing, older versions of `gcc' command, they are unlikely to + experience any problems by overwriting it with your version--though + they could certainly protect themselves by making backup copies first! + Otherwise, users might try and install your binaries in a "safe" place, + find they cannot compile Fortran programs with your distribution + (because, perhaps, they're picking up their old version of the `gcc' + command, which does not recognize Fortran programs), and assume that + your binaries (or, more generally, GNU Fortran distributions in + general) are broken, at least for their system. + + Finally, *please* ask for bug reports to go to you first, at least + until you're sure your distribution is widely used and has been well + tested. This especially goes for those of you making any changes to + the `g77' sources to port `g77', e.g. to OS/2. + `fortran@gnu.ai.mit.edu' has received a fair amount of bug reports that + turned out to be problems with other peoples' ports and distributions, + about which nothing could be done for the user. Once you are quite + certain a bug report does not involve your efforts, you can forward it + to us. + +  + File: g77.info, Node: Settings, Prev: Distributing Binaries, Up: Installation + + Changing Settings Before Building + ================================= + + Here are some internal `g77' settings that can be changed by editing + source files in `gcc/f/' before building. + + This information, and perhaps even these settings, represent + stop-gap solutions to problems people doing various ports of `g77' have + encountered. As such, none of the following information is expected to + be pertinent in future versions of `g77'. + + * Menu: + + * Maximum Stackable Size:: Large arrays are forced off the stack frame. + * Floating-point Bit Patterns:: Possible programs building cross-compiler. + * Large Initialization:: Large arrays with `DATA' initialization. + * Alpha Problems:: Problems with 64-bit systems like Alphas. + +  + File: g77.info, Node: Maximum Stackable Size, Next: Floating-point Bit Patterns, Up: Settings + + Maximum Stackable Size + ---------------------- + + `g77', on most machines, puts many variables and arrays on the stack + where possible, and can be configured (by changing + `FFECOM_sizeMAXSTACKITEM' in `gcc/f/com.c') to force smaller-sized + entities into static storage (saving on stack space) or permit + larger-sized entities to be put on the stack (which can improve + run-time performance, as it presents more opportunities for the GBE to + optimize the generated code). + +  + File: g77.info, Node: Floating-point Bit Patterns, Next: Large Initialization, Prev: Maximum Stackable Size, Up: Settings + + Floating-point Bit Patterns + --------------------------- + + The `g77' build will crash if an attempt is made to build it as a + cross-compiler for a target when `g77' cannot reliably determine the + bit pattern of floating-point constants for the target. Planned + improvements for g77-0.6 will give it the capabilities it needs to not + have to crash the build but rather generate correct code for the target. + (Currently, `g77' would generate bad code under such circumstances if + it didn't crash during the build, e.g. when compiling a source file + that does something like `EQUIVALENCE (I,R)' and `DATA + R/3.1415926535/'.) + +  + File: g77.info, Node: Large Initialization, Next: Alpha Problems, Prev: Floating-point Bit Patterns, Up: Settings + + Initialization of Large Aggregate Areas + --------------------------------------- + + A warning message is issued when `g77' sees code that provides + initial values (e.g. via `DATA') to an aggregate area (`COMMON' or + `EQUIVALENCE', or even a large enough array or `CHARACTER' variable) + that is large enough to increase `g77''s compile time by roughly a + factor of 10. + + This size currently is quite small, since `g77' currently has a + known bug requiring too much memory and time to handle such cases. In + `gcc/f/data.c', the macro `FFEDATA_sizeTOO_BIG_INIT_' is defined to the + minimum size for the warning to appear. The size is specified in + storage units, which can be bytes, words, or whatever, on a + case-by-case basis. + + After changing this macro definition, you must (of course) rebuild + and reinstall `g77' for the change to take effect. + + Note that, as of version 0.5.18, improvements have reduced the scope + of the problem for *sparse* initialization of large arrays, especially + those with large, contiguous uninitialized areas. However, the warning + is issued at a point prior to when `g77' knows whether the + initialization is sparse, and delaying the warning could mean it is + produced too late to be helpful. + + Therefore, the macro definition should not be adjusted to reflect + sparse cases. Instead, adjust it to generate the warning when densely + initialized arrays begin to cause responses noticably slower than + linear performance would suggest. + +  + File: g77.info, Node: Alpha Problems, Prev: Large Initialization, Up: Settings + + Alpha Problems + -------------- + + `g77' might warn when it is used to compile Fortran code for a + target configuration that is not basically a 32-bit machine (such as an + Alpha, which is a 64-bit machine, especially if it has a 64-bit + operating system running on it). This is because `g77' is known to not + work properly on such configurations, although the reasons for this are + not fully explored. This is expected to be fixed at 0.6, at which + point the warning would be dropped. (The reason the unexplored + problems are expected to be fixed at 0.6 is because some known internal + design problems `g77' has, which reduce portability and the ability to + configure it as a cross-compiler, are presumed to be at least partly + responsible for the problems being encountered on the Alpha. The + problems remain unexplored partly because the known problems exist and + are scheduled to be addressed anyway. Plus, the `g77' maintainer does + not yet possess an Alpha workstation of his own.) + +  + File: g77.info, Node: Debugging and Interfacing, Next: Collected Fortran Wisdom, Prev: Installation, Up: Top + + Debugging and Interfacing + ************************* + + GNU Fortran currently generates code that is object-compatible with + the `f2c' converter. Also, it avoids limitations in the current GBE, + such as the inability to generate a procedure with multiple entry + points, by generating code that is structured differently (in terms of + procedure names, scopes, arguments, and so on) than might be expected. + + As a result, writing code in other languages that calls on, is + called by, or shares in-memory data with `g77'-compiled code generally + requires some understanding of the way `g77' compiles code for various + constructs. + + Similarly, using a debugger to debug `g77'-compiled code, even if + that debugger supports native Fortran debugging, generally requires + this sort of information. + + This section describes some of the basic information on how `g77' + compiles code for constructs involving interfaces to other languages + and to debuggers. + + *Caution:* Much or all of this information pertains to only the + current release of `g77', sometimes even to using certain compiler + options with `g77' (such as `-fno-f2c'). Do not write code that + depends on this information without clearly marking said code as + nonportable and subject to review for every new release of `g77'. This + information is provided primarily to make debugging of code generated + by this particular release of `g77' easier for the user, and partly to + make writing (generally nonportable) interface code easier. Both of + these activities require tracking changes in new version of `g77' as + they are installed, because new versions can change the behaviors + described in this section. + + * Menu: + + * Names:: Naming of user-defined variables, procedures, etc. + * Main Program Unit:: How `g77' compiles a main program unit. + * Arrays:: Dealing with (possibly multi-dimensional) arrays. + * Procedures:: How `g77' constructs parameter lists + for procedures. + * Adjustable Arrays:: Special consideration for adjustable arrays. + * Alternate Returns:: How `g77' handles alternate returns. + * Functions:: Functions returning floating-point or character data. + * Common Blocks:: Accessing common variables while debugging. + * Local Equivalence Areas:: Accessing `EQUIVALENCE' while debugging. + * Alternate Entry Points:: How `g77' implements alternate `ENTRY'. + * Assigned Statement Labels:: How `g77' handles `ASSIGN'. + +  + File: g77.info, Node: Names, Next: Main Program Unit, Up: Debugging and Interfacing + + Names + ===== + + Fortran permits each implementation to decide how to represent names + as far as how they're seen in other contexts, such as debuggers and + when interfacing to other languages, and especially as far as how + casing is handled. + + External names--names of entities that are public, or "accessible", + to all modules in a program--normally have an underscore (`_') appended + by `g77', to generate code that is compatible with f2c. External names + include names of Fortran things like common blocks, external procedures + (subroutines and functions, but not including statement functions, + which are internal procedures), and entry point names. + + However, use of the `-fno-underscoring' option disables this kind of + transformation of external names (though inhibiting the transformation + certainly improves the chances of colliding with incompatible externals + written in other languages--but that might be intentional. + + When `-funderscoring' is in force, any name (external or local) that + already has at least one underscore in it is implemented by `g77' by + appending two underscores. External names are changed this way for + `f2c' compatibility. Local names are changed this way to avoid + collisions with external names that are different in the source + code--`f2c' does the same thing, but there's no compatibility issue + there except for user expectations while debugging. + + For example: + + Max_Cost = 0 + + Here, a user would, in the debugger, refer to this variable using the + name `max_cost__' (or `MAX_COST__' or `Max_Cost__', as described below). + (We hope to improve `g77' in this regard in the future--don't write + scripts depending on this behavior! Also, consider experimenting with + the `-fno-underscoring' option to try out debugging without having to + massage names by hand like this.) + + `g77' provides a number of command-line options that allow the user + to control how case mapping is handled for source files. The default + is the traditional UNIX model for Fortran compilers--names are mapped + to lower case. Other command-line options can be specified to map + names to upper case, or to leave them exactly as written in the source + file. + + For example: + + Foo = 3.14159 + + Here, it is normally the case that the variable assigned will be named + `foo'. This would be the name to enter when using a debugger to access + the variable. + + However, depending on the command-line options specified, the name + implemented by `g77' might instead be `FOO' or even `Foo', thus + affecting how debugging is done. + + Also: + + Call Foo + + This would normally call a procedure that, if it were in a separate C + program, be defined starting with the line: + + void foo_() + + However, `g77' command-line options could be used to change the casing + of names, resulting in the name `FOO_' or `Foo_' being given to the + procedure instead of `foo_', and the `-fno-underscoring' option could + be used to inhibit the appending of the underscore to the name. + +  + File: g77.info, Node: Main Program Unit, Next: Arrays, Prev: Names, Up: Debugging and Interfacing + + Main Program Unit (PROGRAM) + =========================== + + When `g77' compiles a main program unit, it gives it the public + procedure name `MAIN__'. The `libf2c' library has the actual `main()' + procedure as is typical of C-based environments, and it is this + procedure that performs some initial start-up activity and then calls + `MAIN__'. + + Generally, `g77' and `libf2c' are designed so that you need not + include a main program unit written in Fortran in your program--it can + be written in C or some other language. Especially for I/O handling, + this is the case, although `g77-0.5.16' includes a bug fix for `libf2c' + that solved a problem with using the `OPEN' statement as the first + Fortran I/O activity in a program without a Fortran main program unit. + + However, if you don't intend to use `g77' (or `f2c') to compile your + main program unit--that is, if you intend to compile a `main()' + procedure using some other language--you should carefully examine the + code for `main()' in `libf2c', found in the source file + `gcc/f/runtime/libF77/main.c', to see what kinds of things might need + to be done by your `main()' in order to provide the Fortran environment + your Fortran code is expecting. + + For example, `libf2c''s `main()' sets up the information used by the + `IARGC' and `GETARG' intrinsics. Bypassing `libf2c''s `main()' without + providing a substitute for this activity would mean that invoking + `IARGC' and `GETARG' would produce undefined results. + + When debugging, one implication of the fact that `main()', which is + the place where the debugged program "starts" from the debugger's point + of view, is in `libf2c' is that you won't be starting your Fortran + program at a point you recognize as your Fortran code. + + The standard way to get around this problem is to set a break point + (a one-time, or temporary, break point will do) at the entrance to + `MAIN__', and then run the program. + + After doing this, the debugger will see the current execution point + of the program as at the beginning of the main program unit of your + program. + + Of course, if you really want to set a break point at some other + place in your program and just start the program running, without first + breaking at `MAIN__', that should work fine. + diff -rcp2N g77-0.5.17/f/g77.info-6 g77-0.5.18/f/g77.info-6 *** g77-0.5.17/f/g77.info-6 Wed Dec 31 19:00:00 1969 --- g77-0.5.18/f/g77.info-6 Mon Apr 1 10:20:51 1996 *************** *** 0 **** --- 1,1098 ---- + This is Info file g77.info, produced by Makeinfo-1.64 from the input + file g77.texi. + + This file explains how to use the GNU Fortran system. + + Published by the Free Software Foundation 59 Temple Place - Suite 330 + Boston, MA 02111-1307 USA + + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of this + manual provided the copyright notice and this permission notice are + preserved on all copies. + + Permission is granted to copy and distribute modified versions of + this manual under the conditions for verbatim copying, provided also + that the sections entitled "GNU General Public License," "Funding for + Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are + included exactly as in the original, and provided that the entire + resulting derived work is distributed under the terms of a permission + notice identical to this one. + + Permission is granted to copy and distribute translations of this + manual into another language, under the above conditions for modified + versions, except that the sections entitled "GNU General Public + License," "Funding for Free Software," and "Protect Your Freedom--Fight + `Look And Feel'", and this permission notice, may be included in + translations approved by the Free Software Foundation instead of in the + original English. + + Contributed by James Craig Burley (`burley@gnu.ai.mit.edu'). + Inspired by a first pass at translating `g77-0.5.16/f/DOC' that was + contributed to Craig by David Ronis (`ronis@onsager.chem.mcgill.ca'). + +  + File: g77.info, Node: Arrays, Next: Procedures, Prev: Main Program Unit, Up: Debugging and Interfacing + + Arrays (DIMENSION) + ================== + + Fortran uses "column-major ordering" in its arrays. This differs + from other languages, such as C, which use "row-major ordering". The + difference is that, with Fortran, array elements adjacent to each other + in memory differ in the *first* subscript instead of the last; + `A(5,10,20)' immediately follows `A(4,10,20)', whereas with row-major + ordering it would follow `A(5,10,19)'. + + This consideration affects not only interfacing with and debugging + Fortran code, it can greatly affect how code is designed and written, + especially when code speed and size is a concern. + + Fortran also differs from C, a popular language for interfacing and + to support directly in debuggers, in the way arrays are treated. In C, + arrays are single-dimensional and have interesting relationships to + pointers, neither of which is true for Fortran. As a result, dealing + with Fortran arrays from within an environment limited to C concepts + can be challenging. + + For example, accessing the array element `A(5,10,20)' is easy enough + in Fortran (use `A(5,10,20)'), but in C some difficult machinations are + needed. First, C would treat the A array as a single-dimension array. + Second, C does not understand low bounds for arrays as does Fortran. + Third, C assumes a low bound of zero (0), while Fortran defaults to a + low bound of one (1) and can supports an arbitrary low bound. + Therefore, calculations must be done to determine what the C equivalent + of `A(5,10,20)' would be, and these calculations require knowing the + dimensions of `A'. + + For `DIMENSION A(2:11,21,0:29)', the calculation of the offset of + `A(5,10,20)' would be: + + (5-2) + + (10-1)*(11-2+1) + + (20-0)*(11-2+1)*(21-1+1) + = 4293 + + So the C equivalent in this case would be `a[4293]'. + + When using a debugger directly on Fortran code, the C equivalent + might not work, because some debuggers cannot understand the notion of + low bounds other than zero. However, unlike `f2c', `g77' does inform + the GBE that a multi-dimensional array (like `A' in the above example) + is really multi-dimensional, rather than a single-dimensional array, so + at least the dimensionality of the array is preserved. + + Debuggers that understand Fortran should have no trouble with + non-zero low bounds, but for non-Fortran debuggers, especially C + debuggers, the above example might have a C equivalent of `a[4305]'. + This calculation is arrived at by eliminating the subtraction of the + lower bound in the first parenthesized expression on each line--that + is, for `(5-2)' substitute `(5)', for `(10-1)' substitute `(10)', and + for `(20-0)' substitute `(20)'. Actually, the implication of this can + be that the expression `*(&a[2][1][0] + 4293)' works fine, but that + `a[20][10][5]' produces the equivalent of `*(&a[0][0][0] + 4305)' + because of the missing lower bounds. + + Come to think of it, perhaps the behavior is due to the debugger + internally compensating for the lower bounds by offsetting the base + address of `a', leaving `&a' set lower, in this case, than + `&a[2][1][0]' (the address of its first element as identified by + subscripts equal to the corresponding lower bounds). + + You know, maybe nobody really needs to use arrays. + +  + File: g77.info, Node: Procedures, Next: Adjustable Arrays, Prev: Arrays, Up: Debugging and Interfacing + + Procedures (SUBROUTINE and FUNCTION) + ==================================== + + Procedures that accept `CHARACTER' arguments are implemented by + `g77' so that each `CHARACTER' argument has two actual arguments. + + The first argument occupies the expected position in the argument + list and has the user-specified name. This argument is a pointer to an + array of characters, passed by the caller. + + The second argument is appended to the end of the user-specified + calling sequence and is named `__g77_length_X', where X is the + user-specified name. This argument is of the C type `ftnlen' (see + `gcc/f/runtime/f2c.h.in' for information on that type) and is the + number of characters the caller has allocated in the array pointed to + by the first argument. + + A procedure will ignore the length argument if `X' is not declared + `CHARACTER*(*)', because for other declarations, it knows the length. + Not all callers necessarily "know" this, however, which is why they all + pass the extra argument. + + The contents of the `CHARACTER' argument are specified by the + address passed in the first argument (named after it). The procedure + can read or write these contents as appropriate. + + When more than one `CHARACTER' argument is present in the argument + list, the length arguments are appended in the order the orginal + arguments appear. So `CALL FOO('HI','THERE')' is implemented in C as + `foo("hi","there",2,5);', ignoring the fact that `g77' does not provide + the trailing null bytes on the constant strings (`f2c' does provide + them, but they are unnecessary in a Fortran environment, and you should + not expect them to be there). + + Note that the above information applies to `CHARACTER' variables and + arrays *only*. It does *not* apply to external `CHARACTER' functions + or to intrinsic `CHARACTER' functions. That is, no second length + argument is passed to `FOO' in this case: + + CHARACTER X + EXTERNAL X + CALL FOO(X) + + Nor does `FOO' expect such an argument in this case: + + SUBROUTINE FOO(X) + CHARACTER X + EXTERNAL X + + Because of this implementation detail, if a program has a bug such + that there is disagreement as to whether an argument is a procedure, + and the type of the argument is `CHARACTER', subtle symptoms might + appear. + +  + File: g77.info, Node: Adjustable Arrays, Next: Alternate Returns, Prev: Procedures, Up: Debugging and Interfacing + + Adjustable Arrays (DIMENSION) + ============================= + + Adjustable and automatic arrays in Fortran require the implementation + (in this case, the `g77' compiler) to "memorize" the expressions that + dimension the arrays each time the procedure is invoked. This is so + that subsequent changes to variables used in those expressions, made + during execution of the procedure, do not have any effect on the + dimensions of those arrays. + + For example: + + REAL ARRAY(5) + DATA ARRAY/5*2/ + CALL X(ARRAY, 5) + END + SUBROUTINE X(A, N) + DIMENSION A(N) + N = 20 + PRINT *, N, A + END + + Here, the implementation should, when running the program, print + something like: + + 20 2. 2. 2. 2. 2. + + Note that this shows that while the value of `N' was successfully + changed, the size of the `A' array remained at 5 elements. + + To support this, `g77' generates code that executes before any user + code (and before the internally generated computed `GOTO' to handle + alternate entry points, as described below) that evaluates each + (nonconstant) expression in the list of subscripts for an array, and + saves the result of each such evaluation to be used when determining + the size of the array (instead of re-evaluating the expressions). + + So, in the above example, when `X' is first invoked, code is + executed that copies the value of `N' to a temporary. And that same + temporary serves as the actual high bound for the single dimension of + the `A' array (the low bound being the constant 1). Since the user + program cannot (legitimately) change the value of the temporary during + execution of the procedure, the size of the array remains constant + during each invocation. + + For alternate entry points, the code `g77' generates takes into + account the possibility that a dummy adjustable array is not actually + passed to the actual entry point being invoked at that time. In that + case, the public procedure implementing the entry point passes to the + master private procedure implementing all the code for the entry points + a `NULL' pointer where a pointer to that adjustable array would be + expected. The `g77'-generated code doesn't attempt to evaluate any of + the expressions in the subscripts for an array if the pointer to that + array is `NULL' at run time in such cases. (Don't depend on this + particular implementation by writing code that purposely passes `NULL' + pointers where the callee expects adjustable arrays, even if you know + the callee won't reference the arrays--nor should you pass `NULL' + pointers for any dummy arguments used in calculating the bounds of such + arrays or leave undefined any values used for that purpose in + COMMON--because the way `g77' implements these things might change in + the future!) + +  + File: g77.info, Node: Alternate Returns, Next: Functions, Prev: Adjustable Arrays, Up: Debugging and Interfacing + + Alternate Returns (SUBROUTINE and RETURN) + ========================================= + + Subroutines with alternate returns (e.g. `SUBROUTINE X(*)' and `CALL + X(*50)') are implemented by `g77' as functions returning the C `int' + type. The actual alternate-return arguments are omitted from the + calling sequence. Instead, the caller uses the return value to do a + rough equivalent of the Fortran computed-`GOTO' statement, as in `GOTO + (50), X()' in the example above (where `X' is quietly declared as an + `INTEGER' function), and the callee just returns whatever integer is + specified in the `RETURN' statement for the subroutine For example, + `RETURN 1' is implemented as `X = 1' followed by `RETURN' in C, and + `RETURN' by itself is `X = 0' and `RETURN'). + +  + File: g77.info, Node: Functions, Next: Common Blocks, Prev: Alternate Returns, Up: Debugging and Interfacing + + Functions (FUNCTION and RETURN) + =============================== + + `g77' handles in a special way functions that return the following + types: + + * `CHARACTER' + + * `COMPLEX' (and `DOUBLE COMPLEX') + + * `REAL' + + For `CHARACTER', `g77' implements a subroutine (a C function + returning `void') with two arguments prepended: `__g77_result', which + the caller passes as a pointer to a `char' array expected to hold the + return value, and `__g77_length', which the caller passes as an + `ftnlen' value specifying the length of the return value as declared in + the calling program. For `CHARACTER'*(*), the called function uses + `__g77_length' to determine the size of the array that `__g77_result' + points to; otherwise, it ignores that argument. + + For `COMPLEX' and `DOUBLE COMPLEX', when `-ff2c' is in force, `g77' + implements a subroutine with one argument prepended: `__g77_result', + which the caller passes as a pointer to a variable of the type of the + function. The called function writes the return value into this + variable instead of returning it as a function value. When `-fno-f2c' + is in force, `g77' implements a `COMPLEX' function as `gcc''s + `__complex__ float' function, returning the result of the function in + the same way as `gcc' would, and implements a `DOUBLE COMPLEX' function + similarly. + + For `REAL', when `-ff2c' is in force, `g77' implements a function + that actually returns `DOUBLE PRECISION' (usually C's `double' type). + When `-fno-f2c' is in force, `REAL' functions return `float'. + +  + File: g77.info, Node: Common Blocks, Next: Local Equivalence Areas, Prev: Functions, Up: Debugging and Interfacing + + Common Blocks (COMMON) + ====================== + + `g77' names and lays out `COMMON' areas the same way f2c does, for + compatibility with f2c. + + Currently, `g77' does not emit any debugging information for items + in a `COMMON' area, due to an apparent bug in the GBE. + + Moreover, `g77' currently implements a `COMMON' area such that its + type is an array of the C `char' data type. + + So, when debugging, you must know the offset into a `COMMON' area + for a particular item in that area, and you have to take into account + the appropriate multiplier for the respective sizes of the types (as + declared in your code) for the items preceding the item in question as + compared to the size of the `char' type. + + For example, using default implicit typing, the statement + + COMMON I(15), R(20), T + + results in a public 144-byte `char' array named `_BLNK__' with `I' + placed at `_BLNK__[0]', `R' at `_BLNK__[60]', and `T' at `_BLNK__[140]'. + (This is assuming that the target machine for the compilation has + 4-byte `INTEGER' and `REAL' types.) + +  + File: g77.info, Node: Local Equivalence Areas, Next: Alternate Entry Points, Prev: Common Blocks, Up: Debugging and Interfacing + + Local Equivalence Areas (EQUIVALENCE) + ===================================== + + `g77' treats storage-associated areas involving a `COMMON' block as + explained in the section on common blocks. + + A local `EQUIVALENCE' area is a collection of variables and arrays + connected to each other in any way via `EQUIVALENCE', none of which are + listed in a `COMMON' statement. + + Currently, `g77' does not emit any debugging information for items + in a local `EQUIVALENCE' area, due to an apparent bug in the GBE. + + Moreover, `g77' implements a local `EQUIVALENCE' area such that its + type is an array of the C `char' data type. + + The name `g77' gives this array of `char' type is `__g77_equiv_X', + where X is the name of the first item listed in the `EQUIVALENCE' + statements for that area that is placed at the beginning (offset 0) of + this array. + + When debugging, you must therefore access members of `EQUIVALENCE' + areas by specifying the appropriate `__g77_equiv_X' array section with + the appropriate offset. See the explanation of debugging `COMMON' + blocks for info applicable to debugging local `EQUIVALENCE' areas. + + (Note: `g77' version 0.5.16 fixed a bug in how certain `EQUIVALENCE' + cases were handled. The bug caused the debugger to not know the size + of the array if any variable or array in the `EQUIVALENCE' was given an + initial value via `DATA' or similar.) + +  + File: g77.info, Node: Alternate Entry Points, Next: Assigned Statement Labels, Prev: Local Equivalence Areas, Up: Debugging and Interfacing + + Alternate Entry Points (ENTRY) + ============================== + + The GBE does not understand the general concept of alternate entry + points as Fortran provides via the ENTRY statement. `g77' gets around + this by using an approach to compiling procedures having at least one + `ENTRY' statement that is almost identical to the approach used by + `f2c'. (An alternate approach could be used that would probably + generate faster, but larger, code that would also be a bit easier to + debug.) + + Information on how `g77' implements `ENTRY' is provided for those + trying to debug such code. The choice of implementation seems unlikely + to affect code (compiled in other languages) that interfaces to such + code. + + `g77' compiles exactly one public procedure for the primary entry + point of a procedure plus each `ENTRY' point it specifies, as usual. + That is, in terms of the public interface, there is no difference + between + + SUBROUTINE X + END + SUBROUTINE Y + END + + and: + + SUBROUTINE X + ENTRY Y + END + + The difference between the above two cases lies in the code compiled + for the `X' and `Y' procedures themselves, plus the fact that, for the + second case, an extra internal procedure is compiled. + + For every Fortran procedure with at least one `ENTRY' statement, + `g77' compiles an extra procedure named `__g77_masterfun_X', where X is + the name of the primary entry point (which, in the above case, using + the standard compiler options, would be `x_' in C). + + This extra procedure is compiled as a private procedure--that is, a + procedure not accessible by name to separately compiled modules. It + contains all the code in the program unit, including the code for the + primary entry point plus for every entry point. (The code for each + public procedure is quite short, and explained later.) + + The extra procedure has some other interesting characteristics. + + The argument list for this procedure is invented by `g77'. It + contains a single integer argument named `__g77_which_entrypoint', + passed by value (as in Fortran's `%VAL()' intrinsic), specifying the + entry point index--0 for the primary entry point, 1 for the first entry + point (the first `ENTRY' statement encountered), 2 for the second entry + point, and so on. + + It also contains, for functions returning `CHARACTER' and (when + `-ff2c' is in effect) `COMPLEX' functions, and for functions returning + different types among the `ENTRY' statements (e.g. `REAL FUNCTION R()' + containing `ENTRY I()'), an argument named `__g77_result' that is + expected at run time to contain a pointer to where to store the result + of the entry point. For `CHARACTER' functions, this storage area is an + array of the appropriate number of characters; for `COMPLEX' functions, + it is the appropriate area for the return type (currently either + `COMPLEX' or `DOUBLE COMPLEX'); for multiple- return-type functions, it + is a union of all the supported return types (which cannot include + `CHARACTER', since combining `CHARACTER' and non-`CHARACTER' return + types via `ENTRY' in a single function is not supported by `g77'). + + For `CHARACTER' functions, the `__g77_result' argument is followed + by yet another argument named `__g77_length' that, at run time, + specifies the caller's expected length of the returned value. Note + that only `CHARACTER*(*)' functions and entry points actually make use + of this argument, even though it is always passed by all callers of + public `CHARACTER' functions (since the caller does not generally know + whether such a function is `CHARACTER*(*)' or whether there are any + other callers that don't have that information). + + The rest of the argument list is the union of all the arguments + specified for all the entry points (in their usual forms, e.g. + `CHARACTER' arguments have extra length arguments, all appended at the + end of this list). This is considered the "master list" of arguments. + + The code for this procedure has, before the code for the first + executable statement, code much like that for the following Fortran + statement: + + GOTO (100000,100001,100002), __g77_which_entrypoint + 100000 ...code for primary entry point... + 100001 ...code immediately following first ENTRY statement... + 100002 ...code immediately following second ENTRY statement... + + (Note that invalid Fortran statement labels and variable names are used + in the above example to highlight the fact that it represents code + generated by the `g77' internals, not code to be written by the user.) + + It is this code that, when the procedure is called, picks which + entry point to start executing. + + Getting back to the public procedures (`x' and `Y' in the original + example), those procedures are fairly simple. Their interfaces are + just like they would be if they were self-contained procedures (without + `ENTRY'), of course, since that is what the callers expect. Their code + consists of simply calling the private procedure, described above, with + the appropriate extra arguments (the entry point index, and perhaps a + pointer to a multiple-type- return variable, local to the public + procedure, that contains all the supported returnable non-character + types). For arguments that are not listed for a given entry point that + are listed for other entry points, and therefore that are in the + "master list" for the private procedure, null pointers (in C, the + `NULL' macro) are passed. Also, for entry points that are part of a + multiple-type- returning function, code is compiled after the call of + the private procedure to extract from the multi-type union the + appropriate result, depending on the type of the entry point in + question, returning that result to the original caller. + + When debugging a procedure containing alternate entry points, you + can either set a break point on the public procedure itself (e.g. a + break point on `X' or `Y') or on the private procedure that contains + most of the pertinent code (e.g. `__g77_masterfun_X'). If you do the + former, you should use the debugger's command to "step into" the called + procedure to get to the actual code; with the latter approach, the + break point leaves you right at the actual code, skipping over the + public entry point and its call to the private procedure (unless you + have set a break point there as well, of course). + + Further, the list of dummy arguments that is visible when the + private procedure is active is going to be the expanded version of the + list for whichever particular entry point is active, as explained + above, and the way in which return values are handled might well be + different from how they would be handled for an equivalent single-entry + function. + +  + File: g77.info, Node: Assigned Statement Labels, Prev: Alternate Entry Points, Up: Debugging and Interfacing + + Assigned Statement Labels (ASSIGN and GOTO) + =========================================== + + 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 `ASSIGN'ed value + of a variable as it does the numerical value in that variable, unless + the variable is wide enough (can hold enough bits). + + In particular, while `g77' implements + + I = 10 + + as, in C notation, `i = 10;', it might implement + + ASSIGN 10 TO I + + as, in GNU's extended C notation (for the label syntax), + `__g77_ASSIGN_I = &&L10;' (where `L10' is just a massaging of the + Fortran label `10' to make the syntax C-like; `g77' doesn't actually + generate the name `L10' or any other name like that, 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', that probably means `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'.) + +  + File: g77.info, Node: Collected Fortran Wisdom, Next: Trouble, Prev: Debugging and Interfacing, Up: Top + + Collected Fortran Wisdom + ************************ + + Most users of `g77' can be divided into two camps: + + * Those writing new Fortran code to be compiled by `g77'. + + * Those using `g77' to compile existing, "legacy" code. + + Users writing new code generally understand most of the necessary + aspects of Fortran to write "mainstream" code, but often need help + deciding how to handle problems, such as the construction of libraries + containing `BLOCK DATA'. + + Users dealing with "legacy" code sometimes don't have much + experience with Fortran, but believe that the code they're compiling + already works when compiled by other compilers (and might not + understand why, as is sometimes the case, it doesn't work when compiled + by `g77'). + + The following information is designed to help users do a better job + coping with existing, "legacy" Fortran code, and with writing new code + as well. + + * Menu: + + * Overly Convenient Options:: Temptations to avoid, habits to not form. + * Block Data and Libraries:: How `g77' solves a common problem. + * Faster Programs:: Everybody wants these, but at what cost? + * Working Programs:: Getting programs to work should be done first. + * Loops:: Fortran `DO' loops surprise many people. + * Advantages Over f2c:: If `f2c' is so great, why `g77'? + +  + File: g77.info, Node: Overly Convenient Options, Next: Block Data and Libraries, Up: Collected Fortran Wisdom + + Overly Convenient Command-line Options + ====================================== + + These options should be used only as a quick-and-dirty way to + determine how well your program will run under different compilation + models without having to change the source. Some are more problematic + than others, depending on how portable and maintainable you want the + program to be (and, of course, whether you are allowed to change it at + all is crucial). + + You should not continue to use these command-line options to compile + a given program, but rather should make changes to the source code: + + `-finit-local-zero' + (This option specifies that any uninitialized local variables and + arrays have default initialization to binary zeros.) + + Many other compilers do this automatically, which means lots of + Fortran code developed with those compilers depends on it. + + It is safer (and probably would produce a faster program) to find + the variables and arrays that need such initialization and provide + it explicitly via `DATA', so that `-finit-local-zero' is not + needed. + + Consider using `-Wuninitialized' (which requires `-O') to find + likely candidates, but do not specify `-finit-local-zero' or + `-fno-automatic', or this technique won't work. + + `-fno-automatic' + (This option specifies that all local variables and arrays are to + be treated as if they were named in `SAVE' statements.) + + Many other compilers do this automatically, which means lots of + Fortran code developed with those compilers depends on it. + + The effect of this is that all variables and arrays are made + static, that is, not placed on the stack or in heap storage. This + might cause a buggy program to appear to work better. If so, + rather than relying on this command-line option (and hoping all + compilers provide the equivalent one), add `SAVE' statements to + some or all program unit sources, as appropriate. Consider using + `-Wuninitialized' (which requires `-O') to find likely candidates, + but do not specify `-finit-local-zero' or `-fno-automatic', or + this technique won't work. + + The default is `-fautomatic', which tells `g77' to try and put + variables and arrays on the stack (or in fast registers) where + possible and reasonable. This tends to make programs faster. + + `-fugly' + Fix the source code so that `-fno-ugly' will work. Note that, for + many programs, it is difficult to practically avoid using the + features enabled via `-fugly-init', and these features pose the + lowest risk of writing nonportable code, among the various "ugly" + features. + + `-fGROUP-intrinsics-hide' + Change the source code to use `EXTERNAL' for any external procedure + that might be the name of an intrinsic. It is easy to find these + using `-fGROUP-intrinsics-disable'. + +  + File: g77.info, Node: Block Data and Libraries, Next: Faster Programs, Prev: Overly Convenient Options, Up: Collected Fortran Wisdom + + Block Data and Libraries + ======================== + + To ensure that block data program units are linked, especially a + concern when they are put into libraries, give each one a name (as in + `BLOCK DATA FOO') and make sure there is an `EXTERNAL FOO' statement in + every program unit that uses any common block initialized by the + corresponding `BLOCK DATA'. `g77' currently compiles a `BLOCK DATA' as + if it were a `SUBROUTINE', that is, it generates an actual procedure + having the appropriate name. The procedure does nothing but return + immediately if it happens to be called. For `EXTERNAL FOO', where + `FOO' is not otherwise referenced in the same program unit, `g77' + assumes there exists a `BLOCK DATA FOO' in the program and ensures that + by generating a reference to it so the linker will make sure it is + present. (Specifically, `g77' outputs in the data section a static + pointer to the external name `FOO'.) + + The implementation `g77' currently uses to make this work is one of + the few things not compatible with `f2c' as currently shipped. `f2c' + currently does nothing with `EXTERNAL FOO' except issue a warning that + `FOO' is not otherwise referenced, and for `BLOCK DATA FOO', f2c + doesn't generate a dummy procedure with the name `FOO'. The upshot is + that you shouldn't mix `f2c' and `g77' in this particular case. If you + use f2c to compile `BLOCK DATA FOO', then any `g77'-compiled program + unit that says `EXTERNAL FOO' will result in an unresolved reference + when linked. If you do the opposite, then `FOO' might not be linked in + under various circumstances (such as when `FOO' is in a library, or + you're using a "clever" linker--so clever, it produces a broken program + with little or no warning by omitting initializations of global data + because they are contained in unreferenced procedures). + + The changes you make to your code to make `g77' handle this + situation, however, appear to be a widely portable way to handle it. + That is, many systems permit it (as they should, since the FORTRAN 77 + standard permits `EXTERNAL FOO' when `FOO' is a block data program + unit), and of the ones that might not link `BLOCK DATA FOO' under some + circumstances, most of them appear to do so once `EXTERNAL FOO' is + present in the appropriate program units. + +  + File: g77.info, Node: Faster Programs, Next: Working Programs, Prev: Block Data and Libraries, Up: Collected Fortran Wisdom + + Faster Programs + =============== + + Aside from the usual `gcc' options, such as `-O', `-ffast-math', and + so on, consider trying: + + `-fno-f2c' + Use this if you aren't linking with any code compiled using `f2c'. + (Note that `libf2c' is *not* an example of code that is compiled + using `f2c'--it is compiled by a C compiler, usually `gcc'.) + + If you're using `-fno-automatic' already, you probably should change + your code to allow compilation with `-fautomatic' (the default), to + allow the program to run faster. + + Similarly, you should be able to use `-fno-init-local-zero' (the + default) instead of `-finit-local-zero'. This is because it is rare + that every variable affected by these options in a given program + actually needs to be so affected. + + For example, `-fno-automatic', which effectively `SAVE's every local + variable and array, affects even things like `DO' iteration variables, + which rarely need to be `SAVE'd, and this often reduces run-time + performances. Similarly, `-fno-init-local-zero' forces such variables + to be initialized to zero--when `SAVE'd (such as when + `-fno-automatic'), this by itself generally affects only startup time + for a program, but when not `SAVE'd, it can slow down the procedure + every time it is called. + + *Note Overly Convenient Command-Line Options: Overly Convenient + Options, for information on the `-fno-automatic' and + `-finit-local-zero' options and how to convert their use into selective + changes in your own code. + +  + File: g77.info, Node: Working Programs, Next: Loops, Prev: Faster Programs, Up: Collected Fortran Wisdom + + Working Programs + ================ + + Getting Fortran programs to work in the first place can be quite a + challenge--even when the programs already work on other systems, or + when using other compilers. + + `g77' offers some options that might be useful for tracking down + bugs in such programs. *Note Option Summary::, for a summary of these + and other options, and cross-references for each such option to the + pertinent material in this manual. + + `-finit-local-zero' + A program that works better when compiled with this option is + depending on a particular system's, or compiler's, tendency to + initialize some variables to zero. It might be worthwhile finding + such cases and fixing them. + + `-fno-automatic' + A program that works better when compiled with this option is + depending on not having to use the `SAVE' statement as required by + the Fortran standard. It might be worthwhile finding such cases + and fixing them. + + `-Wimplicit' + This might catch failures to properly specify the types of + variables, arrays, and functions in the code. However, in code + that makes heavy use of Fortran's implicit-typing facility, this + option might produce so many warnings about cases that are + working, it would be hard to find the one or two that represent + bugs. + + `-Wunused' + This can find bugs involving implicitly typing, sometimes more + easily than using -Wimplicit in code that makes heavy use of + implicit typing. An unused variable or array might indicate that + the spelling for its declaration is different from that of its + intended uses. + + `-Wuninitialized' + This can find bugs involving uninitialized variables, which can in + turn result from misspellings in declaration statements. + + `-Wsurprising' + This can find bugs involving expression evaluation or in the way + `DO' loops with non-integral iteration variables are handled. + Cases found by this option might indicate a difference of + interpretation between the author of the code involved, and a + standard-conforming compiler such as `g77'. Such a difference + might produce actual bugs. + + In any case, changing the code to explicitly do what the + programmer might have expected it to do, so `g77' and other + compilers are more likely to follow the programmer's expectations, + might be worthwhile, especially if such changes make the program + work better. + + `-W' + It is possible that the "extra" warnings enabled by this option + could expose bugs in the code. + +  + File: g77.info, Node: Loops, Next: Advantages Over f2c, Prev: Working Programs, Up: Collected Fortran Wisdom + + Loops + ===== + + The meaning of a `DO' loop in Fortran is precisely specified in the + Fortran standard...and is quite different from what many programmers + might expect. + + In particular, Fortran `DO' loops are implemented as if the number + of trips through the loop is calculated *before* the loop is entered. + + The number of trips for a loop is calculated from the START, END, + and INCREMENT values specified in a statement such as: + + DO ITER = START, END, INCREMENT + + The trip count is evaluated using a fairly simple formula based on + the three values following the `=' in the statement, and it is that + trip count that is effectively decremented during each iteration of the + loop. If, at the beginning of an iteration of the loop, the trip count + is zero or negative, the loop terminates. The per-loop-iteration + modifications to ITER are not related to determining whether to + terminate the loop. + + There are two important things to remember about the trip count: + + * It can be *negative*, in which case it is treated as if it was + zero--meaning the loop is not executed at all. + + * The type used to *calculate* the trip count the same type as ITER, + but the final calculation, and thus the type of the trip count + itself, always is `INTEGER'. + + These two items mean that there are loops that cannot be written in + straightforward fashion using the Fortran `DO'. + + For example, on a system with the canonical 32-bit two's-complement + implementation of `INTEGER', the following loop will not work: + + DO I = -2000000000, 2000000000 + + Although the START and END values are well within the range of + `INTEGER', the *trip count* is not. The expected trip count is + 40000000001, which is outside the range of `INTEGER' on many systems. + + Instead, the above loop should be constructed this way: + + I = -2000000000 + DO + IF (I .GT. 2000000000) EXIT + ... + I = I + 1 + END DO + + The simple `DO' construct and the `EXIT' statement (used to leave the + innermost loop) are F90 features that `g77' supports. + + Some Fortran compilers have buggy implementations of `DO', in that + they don't follow the standard. They implement `DO' as a + straightforward translation to what, in C, would be a `for' statement. + Instead of creating a temporary variable to hold the trip count as + calculated at run time, these compilers use the iteration variable ITER + to control whether the loop continues at each iteration. + + The bug in such an implementation shows up when the trip count is + within the range of the type of ITER, but the magnitude of `ABS(END) + + ABS(INCR)' exceeds that range. For example: + + DO I = 2147483600, 2147483647 + + A loop started by the above statement will work as implemented by + `g77', but the use, by some compilers, of a more C-like implementation + akin to + + for (i = 2147483600; i <= 2147483647; ++i) + + produces a loop that does not terminate, because `i' can never be + greater than 2147483647, since incrementing it beyond that value + overflows `i', setting it to -2147483648. This is a large, negative + number that still is less than 2147483647. + + Another example of unexpected behavior of `DO' involves using a + nonintegral iteration variable ITER, such as a `REAL' or `DOUBLE + PRECISION' variable. Consider the following program: + + DATA BEGIN, END, STEP /.1, .31, .007/ + DO 10 R = BEGIN, END, STEP + IF (R .GT. END) PRINT *, R, ' .GT. ', END, '!!' + PRINT *,R + 10 CONTINUE + PRINT *,'LAST = ',R + IF (R .LE. END) PRINT *, R, ' .LE. ', END, '!!' + END + + A C-like view of `DO' would hold that the two "exclamatory" `PRINT' are + never executed. However, this is the output of running the above + program as compiled by `g77' on a Linux ix86 system: + + .100000001 + .107000001 + .114 + .120999999 + ... + .289000005 + .296000004 + .303000003 + LAST = .310000002 + .310000002 .LE. .310000002!! + + Note that one of the two checks in the program turned up an apparent + violation of the programmer's expectation--yet, the loop is correctly + implemented by `g77', in that it has 30 iterations. This trip count of + 30 is correct when evaluated using the floating-point representations + for the BEGIN, END, and INCR values (.1, .31, .007) on Linux ix86 are + used. On other systems, an apparently more accurate trip count of 31 + might result, but, nevertheless, `g77' is faithfully following the + Fortran standard, and the result is not what the author of the sample + program above apparently expected. (Such other systems might, for + different values in the `DATA' statement, violate the other + programmer's expectation, for example.) + + Due to this combination of imprecise representation of + floating-point values and the often-misunderstood interpretation of + `DO' by standard-conforming compilers such as `g77', use of `DO' loops + with `REAL' or `DOUBLE PRECISION' iteration variables is not + recommended. Such use can be caught by specifying `-Wsurprising'. + *Note Warning Options::, for more information on this option. + +  + File: g77.info, Node: Advantages Over f2c, Prev: Loops, Up: Collected Fortran Wisdom + + Advantages Over f2c + =================== + + Without `f2c', `g77' would have taken much longer to do and probably + not been as good for quite a while. Sometimes people who notice how + much `g77' depends on, and documents encouragement to use, `f2c' ask + why `g77' was created if `f2c' already existed. + + This section gives some basic answers to these questions, though it + is not intended to be comprehensive. + + * Menu: + + * Language Extensions:: Features used by Fortran code. + * Compiler Options:: Features helpful during development. + * Compiler Speed:: Speed of the compilation process. + * Program Speed:: Speed of the generated, optimized code. + * Ease of Debugging:: Debugging ease-of-use at the source level. + * Character and Hollerith Constants:: A byte saved is a byte earned. + +  + File: g77.info, Node: Language Extensions, Next: Compiler Options, Up: Advantages Over f2c + + Language Extensions + ------------------- + + `g77' offers several extensions to the Fortran language that `f2c' + doesn't. + + However, `f2c' offers a few that `g77' doesn't, like fairly complete + support for `INTEGER*2'. It is expected that `g77' will offer some or + all of these missing features at some time in the future. (Version + 0.5.18 of `g77' offers some rudimentary support for some of these + features.) + +  + File: g77.info, Node: Compiler Options, Next: Compiler Speed, Prev: Language Extensions, Up: Advantages Over f2c + + Compiler Options + ---------------- + + `g77' offers a whole bunch of compiler options that `f2c' doesn't. + + However, `f2c' offers a few that `g77' doesn't, like an option to + generate code to check array subscripts at run time. It is expected + that `g77' will offer some or all of these missing options at some time + in the future. + +  + File: g77.info, Node: Compiler Speed, Next: Program Speed, Prev: Compiler Options, Up: Advantages Over f2c + + Compiler Speed + -------------- + + Saving the steps of writing and then rereading C code is a big reason + why `g77' should be able to compile code much faster than using `f2c' + in conjunction with the equivalent invocation of `gcc'. + + However, due to `g77''s youth, lots of self-checking is still being + performed. As a result, this improvement is as yet unrealized (though + the potential seems to be there for quite a big speedup in the future). + It is possible that, as of version 0.5.18, `g77' is noticably faster + compiling many Fortran source files than using `f2c' in conjunction + with `gcc'. + +  + File: g77.info, Node: Program Speed, Next: Ease of Debugging, Prev: Compiler Speed, Up: Advantages Over f2c + + Program Speed + ------------- + + `g77' has the potential to better optimize code than `f2c', even + when `gcc' is used to compile the output of `f2c', because `f2c' must + necessarily translate Fortran into a somewhat lower-level language (C) + that cannot preserve all the information that is potentially useful for + optimization, while `g77' can gather, preserve, and transmit that + information directly to the GBE. + + For example, `g77' implements `ASSIGN' and assigned `GOTO' using + direct assignment of pointers to labels and direct jumps to labels, + whereas `f2c' maps the assigned labels to integer values and then uses + a C `switch' statement to encode the assigned `GOTO' statements. + + However, as is typical, theory and reality don't quite match, at + least not in all cases, so it is still the case that `f2c' plus `gcc' + can generate code that is faster than `g77'. + + It is hoped that version 0.5.18 of `g77' will offer default settings + and options that allow for better program speed, though it is not yet + known whether these same options, when applied to a `gcc' compilation + of `f2c' output, will improve the speed of programs compiled using that + method as well. + +  + File: g77.info, Node: Ease of Debugging, Next: Character and Hollerith Constants, Prev: Program Speed, Up: Advantages Over f2c + + Ease of Debugging + ----------------- + + Because `g77' compiles directly to assembler code like `gcc', + instead of translating to an intermediate language (C) as does `f2c', + support for debugging can be better for `g77' than `f2c'. + + However, although `g77' might be somewhat more "native" in terms of + debugging support than `f2c' plus `gcc', there still are a lot of + things "not quite right". Many of the important ones should be + resolved in the near future. + + For example, `g77' doesn't have to worry about reserved names like + `f2c' does. Given `FOR = WHILE', `f2c' must necessarily translate this + to something *other* than `for = while;', because C reserves those + words. + + However, `g77' does still uses things like an extra level of + indirection for `ENTRY'-laden procedures--in this case, because the + back end doesn't yet support multiple entry points. + + Another example is that, given + + COMMON A, B + EQUIVALENCE (B, C) + + the `g77' user should be able to access the variables directly, by name, + without having to traverse C-like structures and unions, while `f2c' is + unlikely to ever offer this ability (due to limitations in the C + language). + + However, due to apparent bugs in the back end, `g77' currently + doesn't take advantage of this facility at all--it doesn't emit any + debugging information for `COMMON' and `EQUIVALENCE' areas, other than + information on the array of `char' it creates (and, in the case of + local `EQUIVALENCE', names) for each such area. + + Yet another example is arrays. `g77' represents them to the debugger + using the same "dimensionality" as in the source code, while `f2c' must + necessarily convert them all to one-dimensional arrays to fit into the + confines of the C language. However, the level of support offered by + debuggers for interactive Fortran-style access to arrays as compiled by + `g77' can vary widely. In some cases, it can actually be an advantage + that `f2c' converts everything to widely supported C semantics. + + In fairness, `g77' could do many of the things `f2c' does to get + things working at least as well as `f2c'--for now, the maintainers have + tended to prefer making `g77' work the way they think it is supposed + to, and find help improving the other products (the GBE of `gcc'; + `gdb'; and so on) to get things working properly. + +  + File: g77.info, Node: Character and Hollerith Constants, Prev: Ease of Debugging, Up: Advantages Over f2c + + Character and Hollerith Constants + --------------------------------- + + To avoid the extensive hassle that would be needed to avoid this, + `f2c' uses C character constants to encode character and Hollerith + constants. That means a constant like `'HELLO'' is translated to + `"hello"' in C, which further means that an extra null byte is present + at the end of the constant. This null byte is superfluous. + + `g77' does not generate such null bytes. This represents significant + savings of resources, such as on systems where `/dev/null' or + `/dev/zero' represent bottlenecks in the systems' performance, because + `g77' simply asks for fewer zeros from the operating system than `f2c'. + +  + File: g77.info, Node: Trouble, Next: Open Questions, Prev: Collected Fortran Wisdom, Up: Top + + Known Causes of Trouble with GNU Fortran + **************************************** + + This section describes known problems that affect users of GNU + Fortran. Most of these are not GNU Fortran bugs per se--if they were, + we would fix them. But the result for a user may be like the result of + a bug. + + Some of these problems are due to bugs in other software, some are + missing features that are too much work to add, and some are places + where people's opinions differ as to what is best. + + Information on bugs that show up when configuring, porting, building, + or installing `g77' is not provided here. *Note Problems Installing::. + + (Note that some of this portion of the manual is lifted directly + from the `gcc' manual, with minor modifications to tailor it to users + of `g77'. Anytime a bug seems to have more to do with the `gcc' + portion of `g77', *Note Known Causes of Trouble with GNU CC: + (gcc)Trouble.) + + * Menu: + + * But-bugs:: Bugs really in other programs. + * Actual Bugs:: Bugs and misfeatures we will fix later. + * Missing Features:: Features we already know we want to add later. + * Disappointments:: Regrettable things we can't change. + * Non-bugs:: Things we think are right, but some others disagree. + * Warnings and Errors:: Which problems in your code get warnings, + and which get errors. + diff -rcp2N g77-0.5.17/f/g77.info-7 g77-0.5.18/f/g77.info-7 *** g77-0.5.17/f/g77.info-7 Wed Dec 31 19:00:00 1969 --- g77-0.5.18/f/g77.info-7 Mon Apr 1 10:20:51 1996 *************** *** 0 **** --- 1,1084 ---- + This is Info file g77.info, produced by Makeinfo-1.64 from the input + file g77.texi. + + This file explains how to use the GNU Fortran system. + + Published by the Free Software Foundation 59 Temple Place - Suite 330 + Boston, MA 02111-1307 USA + + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of this + manual provided the copyright notice and this permission notice are + preserved on all copies. + + Permission is granted to copy and distribute modified versions of + this manual under the conditions for verbatim copying, provided also + that the sections entitled "GNU General Public License," "Funding for + Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are + included exactly as in the original, and provided that the entire + resulting derived work is distributed under the terms of a permission + notice identical to this one. + + Permission is granted to copy and distribute translations of this + manual into another language, under the above conditions for modified + versions, except that the sections entitled "GNU General Public + License," "Funding for Free Software," and "Protect Your Freedom--Fight + `Look And Feel'", and this permission notice, may be included in + translations approved by the Free Software Foundation instead of in the + original English. + + Contributed by James Craig Burley (`burley@gnu.ai.mit.edu'). + Inspired by a first pass at translating `g77-0.5.16/f/DOC' that was + contributed to Craig by David Ronis (`ronis@onsager.chem.mcgill.ca'). + +  + File: g77.info, Node: But-bugs, Next: Actual Bugs, Up: Trouble + + Bugs Not In GNU Fortran + ======================= + + These are bugs to which the maintainers often have to reply, "but + that isn't a bug in `g77'...". Some of these already are fixed in new + versions of other software; some still need to be fixed; some are + problems with how `g77' is installed or is being used; some just cannot + be addressed at this time until more is known about the problem. + + Please don't re-report these bugs to the `g77' maintainers--if you + must remind someone how important it is to you that the problem be + fixed, talk to the people responsible for the other products identified + below, but preferably only after you've tried the latest versions of + those products. The `g77' maintainers have their hands full working on + just fixing and improving `g77', without serving as a clearinghouse for + all bugs that happen to affect `g77' users. + + *Note Collected Fortran Wisdom::, for information on behavior of + Fortran programs, and the programs that compile them, that might be + *thought* to indicate bugs. + + * On some older Linux systems, programs with common blocks larger + than 16MB cannot be linked without some kind of error message + being produced. + + This is a bug in older versions of `ld', fixed in more recent + versions of `binutils', such as version 2.6. + + * 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. + + * On some systems, perhaps just those with out-of-date (shared?) + libraries, unresolved-reference errors happen when linking + `g77'-compiled programs (which should be done using `g77'). + + If this happens to you, try appending `-lc' to the command you use + to link the program, e.g. `g77 foo.f -lc'. `g77' already + specifies `-lf2c -lm' when it calls the linker, but it cannot also + specify `-lc' because not all systems have a file named `libc.a'. + + It is unclear at this point whether there are legitimately + installed systems where `-lf2c -lm' is insufficient to resolve + code produced by `g77'. + + * If your program doesn't link, due to unresolved references to names + like `_main', make sure you're using the `g77' command to do the + link, since this command ensures that the necessary libraries are + loaded by specifying `-lf2c -lm' when it invokes the `gcc' command + to do the actual link. (Use the `-v' option to discover more + about what actually happens when you use the `g77' and `gcc' + commands.) + + Also, try specifying `-lc' as the last item on the `g77' command + line, because some systems need it and `g77' doesn't do it + automatically. + + * Developers of Fortran code on NeXTStep (all architectures) have to + watch out for the following problem when writing programs with + large, statically allocated (i.e. non-stack based) data structures + (common blocks, saved arrays). + + Due to the way the native loader (`/bin/ld') lays out data + structures in virtual memory, it is very easy to create an + executable wherein the `__DATA' segment overlaps (has addresses in + common) with the `UNIX STACK' segment. + + This leads to all sorts of trouble, from the executable simply not + executing, to bus errors. The NeXTStep command line tool + `ebadexec' points to the problem as follows: + + % `/bin/ebadexec a.out' + /bin/ebadexec: __LINKEDIT segment (truncated address = 0x3de000 + rounded size = 0x2a000) of executable file: a.out overlaps with UNIX + STACK segment (truncated address = 0x400000 rounded size = + 0x3c00000) of executable file: a.out + + (In the above case, it is the `__LINKEDIT' segment that overlaps + the stack segment.) + + This can be cured by assigning the `__DATA' segment (virtual) + addresses beyond the stack segment. A conservative estimate for + this is from address 6000000 (hexadecimal) onwards--this has + always worked for me [Toon Moene]: + + % `g77 -segaddr __DATA 6000000 test.f' + % `ebadexec a.out' + ebadexec: file: a.out appears to be executable + % + + Browsing through `gcc/f/Makefile.in', you will find that the + `f771' program itself also has to be linked with these flags--it + has large statically allocated data structures. (Version 0.5.18 + reduces this somewhat, but probably not enough.) + + (The above item was contributed by Toon Moene + (`toon@moene.indiv.nluug.nl').) + + * `g77' rejects some particularly nonportable, silent data-type + conversions such as `LOGICAL' to `REAL' (as in `A=.FALSE.', where + `A' is type `REAL'), that other compilers might quietly accept. + + Some of these conversions are accepted by `g77' when the `-fugly' + option is specified. + +  + File: g77.info, Node: Actual Bugs, Next: Missing Features, Prev: But-bugs, Up: Trouble + + Actual Bugs We Haven't Fixed Yet + ================================ + + This section identifies bugs that `g77' *users* might run into. + This includes bugs that are actually in the `gcc' back end (GBE) or in + `libf2c', because those sets of code are at least somewhat under the + control of (and necessarily intertwined with) `g77', so it isn't worth + separating them out. + + For information on bugs that might afflict people who configure, + port, build, and install `g77', *Note Problems Installing::. + + * When using `-fugly', `g77' assumes an extra `%VAL(0)' argument is + to be passed to intrinsics taking no arguments, such as `IARGC()', + which in turn reject such a call. Although this has been worked + around for 0.5.18 due to changes in the handling of intrinsics, + `g77' needs to do the ugly-argument-appending trick only for + external-function invocation, as this would probably be more + consistent with compilers that default to using that trick. + + * Although `g77' generally supports `SELECT CASE', it doesn't do so + for `CHARACTER' types. Worse, it just crashes with a barely + servicable diagnostic. If the time can't be taken soon to finish + implementing this feature, at least a better way of diagnosing the + problem should be provided. + + * To accept a lot of fine code, `g77' needs to accept `FORMAT' and + `ENTRY' before an `IMPLICIT NONE'. + + * Some crashes occur when compiling under Solaris on x86 machines. + + * Something about `g77''s straightforward handling of label + references and definitions sometimes prevents the GBE from + unrolling loops. Until this is solved, try inserting or removing + `CONTINUE' statements as the terminal statement, using the `END DO' + form instead, and so on. + + * The `g77' command itself should more faithfully process options + the way the `gcc' command does. For example, `gcc' accepts + abbreviated forms of long options, `g77' generally doesn't. + + * `g77' could use a `--help' option of some sort. + + * Some confusion in diagnostics concerning failing `INCLUDE' + statements from within `INCLUDE''d or `#include''d files. + + * Some problems on RS/6000 regarding statement functions and/or + `COMPLEX' arithmetic? + + * `g77' assumes that `INTEGER' constants range from `-2**31' to + `2**31-1' (the range for two's-complement 32-bit values), instead + of determining their range from the actual range of the `INTEGER' + type for the configuration (and, someday, for the constant). + + Further, it generally doesn't implement the handling of constants + very well in that it makes assumptions about the configuration + that it no longer makes regarding variables (types). + + Included with this item is the fact that `g77' doesn't recognize + that, on IEEE-754/854-compliant systems, `0./0.' should produce a + NaN and no warning instead of the value `0.' and a warning. This + is to be fixed in version 0.6, when `g77' will use the `gcc' back + end's constant-handling mechanisms to replace its own. + + * `g77' uses way too much memory and CPU time to process large + aggregate areas having any initialized elements. + + For example, `REAL A(1000000)' followed by `DATA A(1)/1/' takes up + way too much time and space, including the size of the generated + assembler file. This is to be mitigated somewhat in version 0.6. + + Version 0.5.18 improves cases like this--specifically, cases of + *sparse* initialization that leave large, contiguous areas + uninitialized--significantly. However, even with the + improvements, these cases still require too much memory and CPU + time. + + (Version 0.5.18 also improves cases where the initial values are + zero to a much greater degree, so if the above example ends with + `DATA A(1)/0/', the compile-time performance will be about as good + as it will ever get, aside from unrelated improvements to the + compiler.) + + Note that `g77' does display a warning message to notify the user + before the compiler appears to hang. *Note Initialization of + Large Aggregate Areas: Large Initialization, for information on + how to change the point at which `g77' decides to issue this + warning. + + * `g77' doesn't emit variable and array members of common blocks for + use with a debugger (the `-g' command-line option). The code is + present to do this, but doesn't work with at least one debug + format--perhaps it works with others. And it turns out there's a + similar bug for local equivalence areas, so that has been disabled + as well. + + * When debugging, after starting up the debugger but before being + able to see the source code for the main program unit, the user + must currently set a breakpoint at `MAIN__' (or `MAIN___' or + `MAIN_' if `MAIN__' doesn't exist) and run the program until it + hits the breakpoint. At that point, the main program unit is + activated and about to execute its first executable statement, but + that's the state in which the debugger should start up, as is the + case for languages like C. + + * `g77' currently inserts needless padding for things like `COMMON + A,IPAD' where `A' is `CHARACTER*1' and `IPAD' is `INTEGER*4' on + machines like x86, because the back end insists that `IPAD' be + aligned to a 4-byte boundary, but the processor has no such + requirement (though it's good for performance). + + It is possible that this is not a real bug, and could be considered + a performance feature, but it might be important to provide the + ability to Fortran code to specify minimum padding for aggregate + areas such as common blocks--and, certainly, there is the + potential, with the current setup, for interface differences in + the way such areas are laid out between `g77' and other compilers. + + * RS/6000 support is not complete as of the gcc 2.6.3 back end. The + 2.7.0 back end appears to fix this problem, or at least mitigate + it significantly, but there is at least one known problem that is + likely to be a code-generation bug in `gcc-2.7.0' plus + `g77-0.5.16'. This problem shows up only when compiling the + Fortran program with `-O'. + + * SGI support is known to be a bit buggy. The known problem shows + up only when compiling the Fortran program with `-O'. + + * `g77' doesn't work on 64-bit configurations such as the Alpha. + The problem is not yet adequately investigated, and some Alpha + users are having quite a bit of success, so perhaps it depends on + the OS and configuration of `gcc' they are using. + + * 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. + + * 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, and it apparently occurs only when compiling + sufficiently complicated functions *without* the `-O' option. + + This might be fixed in version 2.7.2 of `gcc'. + +  + File: g77.info, Node: Missing Features, Next: Disappointments, Prev: Actual Bugs, Up: Trouble + + Missing Features + ================ + + This section lists features we know are missing from `g77', and + which we want to add someday. (There is no priority implied in the + ordering below.) + + * `g77' does not support many of the features that distinguish + Fortran 90 (and, now, Fortran 95) from ANSI FORTRAN 77. + + Some Fortran 90 features are listed here, because they make sense + to offer even to die-hard users of F77. For example, many of them + codify various ways F77 has been extended to meet users' needs + during its tenure, so `g77' might as well offer them as the primary + way to meet those same needs, even if it offers compatibility with + one or more of the ways those needs were met by other F77 + compilers in the industry. + + Still, many important F90 features are not listed here, because no + attempt has been made to research each and every feature and + assess its viability in `g77'. In the meantime, users who need + those features must use Fortran 90 compilers anyway, and the best + approach to adding some F90 features to GNU Fortran might well be + to fund a comprehensive project to create GNU Fortran 95. + + * `g77' does not allow `REAL' and other non-integral types for + arguments to intrinsics like `AND', `OR', and `SHIFT'. + + * `g77' doesn't support `INTEGER*2', `LOGICAL*1', and similar. + Version 0.6 will provide full support for this extremely important + set of features. In the meantime, version 0.5.18 provides + rudimentary support for them. + + * `g77' rejects things other compilers accept, like `INTRINSIC + SIN,SIN'. As time permits in the future, some of these things + that are easy for humans to read and write and unlikely to be + intended to mean something else will be accepted by `g77' (though + `-fpedantic' should trigger warnings about such non-standard + constructs). + + In the meantime, you might as well fix your code to be more + standard-conforming and portable. + + The kind of case that is important to except from the + recommendation to change your code is one where following good + coding rules would force you to write non-standard code that + nevertheless has a clear meaning. + + For example, when writing an `INCLUDE' file that defines a common + block, it might be appropriate to include a `SAVE' statement for + the common block (such as `SAVE /CBLOCK/'), so that variables + defined in the common block retain their values even when all + procedures declaring the common block become inactive (return to + their callers). + + However, putting `SAVE' statements in an `INCLUDE' file would + prevent otherwise standard-conforming code from also specifying + the `SAVE' statement, by itself, to indicate that all local + variables and arrays are to have the `SAVE' attribute. + + For this reason, `g77' already has been changed to allow this + combination, because although the general problem of gratuitously + rejecting unambiguous and "safe" constructs still exists in `g77', + this particular construct was deemed useful enough that it was + worth fixing `g77' for just this case. + + So, while there is no need to change your code to avoid using this + particular construct, there might be other, equally appropriate + but non-standard constructs, that you shouldn't have to stop using + just because `g77' (or any other compiler) gratuitously rejects it. + + Until the general problem is solved, if you have any such + construct you believe is worthwhile using (e.g. not just an + arbitrary, redundant specification of an attribute), please submit + a bug report with an explanation, so we can consider fixing `g77' + just for cases like yours. + + * `g77' doesn't accept `PARAMETER I=1'. Supporting this obsolete + form of the `PARAMETER' statement would not be particularly hard, + as most of the parsing code is already in place and working. + + Until time/money is spent implementing it, you might as well fix + your code to use the standard form, `PARAMETER (I=1)' (possibly + needing `INTEGER I' preceding the `PARAMETER' statement as well, + otherwise, in the obsolete form of `PARAMETER', the type of the + variable is set from the type of the constant being assigned to + it). + + * `g77' doesn't support pointers or allocatable objects. This set + of features is probably considered just behind `INTEGER*2' and + intrinsics in `PARAMETER' statements on the list of large, + 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', partly because it requires a + great deal of work either upgrading or replacing `libf2c'. + + * There is no support for keywords such as `DISP='DELETE'' in the + `OPEN', `CLOSE', and `INQUIRE' statements. These extensions are + easy to add to `g77' itself, but require much more work on + `libf2c'. + + * `g77' doesn't allow intrinsics in `PARAMETER' statements. This + feature is considered to be absolutely vital, even though it is + not standard-conforming, and is scheduled for version 0.6. + + Related to this, `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 use that facility in implementing this feature + soon afterwards. + + * `g77' doesn't support `FORMAT(I)' and the like. Supporting + this requires a significant redesign or replacement of `libf2c'. + + * Need option to suppress information messages (notes). `-w' does + this but also suppresses warnings. The default should be to + suppress info messages. + + * Provide some way, a la `gcc', for `g77' code to specify assembler + code. + + * Support `INTEGER', `REAL', and `COMPLEX' equivalents for all + applicable back-end-supported types (`char', `short int', `int', + `long int', `long long int', and `long double'). This means + providing intrinsic support, and maybe constant support (using F90 + syntax) as well, and, for most machines will result in automatic + support of `INTEGER*1', `INTEGER*2', `INTEGER*8', and so on. This + is scheduled for version 0.6. + + * Provide as the default source-line model a "pure visual" mode, + where the interpretation of a source program in this mode can be + accurately determined by a user looking at a traditionally + displayed rendition of the program (assuming the user knows + whether the program is fixed or free form). + + That is, assume the user cannot tell tabs from spaces and cannot + see trailing spaces on lines, but has canonical tab stops and, for + fixed-form source, has the ability to always know exactly where + column 72 is. + + This would change the default treatment of fixed-form source to + not treat lines with tabs as if they were infinitely long--instead, + they would end at column 72 just as if the tabs were replaced by + spaces in the canonical way. + + As part of this, provide common alternate models (Digital, `f2c', + and so on) via command-line options. This includes allowing + arbitrarily long lines for free-form source as well as fixed-form + source and providing various limits and diagnostics as appropriate. + + * Support more general expressions to dimension 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'). + + * Finish support for old-style `PARAMETER' statement (like F77 + `PARAMETER', but type of destination is set from type of source + expression). + + * Character-type selector/cases for `SELECT CASE'. + + * Option to initialize everything not explicitly initialized to + "weird" (machine-dependent) values, e.g. NANs, bad (non-`NULL') + pointers, and largest-magnitude integers. + + * Add run-time bounds-checking of array/subscript references a la + `f2c'. + + * Output labels for use by debuggers that know how to support them. + Same with weirder things like construct names. It is not yet + known if any debug formats or debuggers support these. + + * Support the POSIX standard for Fortran. + + * Support Digital-style lossage of virtual blanks at end of source + line if some command-line option specified. + + This affects cases where a character constant is continued onto + the next line in a fixed-form source file, as in the following + example: + + 10 PRINT *,'HOW MANY + 1 SPACES?' + + `g77', and many other compilers, virtually extend the continued + line through column 72 with blanks that become part of the + character constant, but Digital Fortran normally didn't, leaving + only one space between `MANY' and `SPACES?' in the output of the + above statement. + + Fairly recently, at least one version of Digital Fortran was + enhanced to provide the other behavior when a command-line option + is specified, apparently due to demand from readers of the USENET + group `comp.lang.fortran' to offer conformance to this widespread + practice in the industry. `g77' should return the favor by + offering conformance to Digital's approach to handling the above + example. + + * Consider a preprocessor designed specifically for Fortran to + replace `cpp -traditional'. There are several out there worth + evaluating, at least. + + * 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.) + + * Add `-Wintrinsics' to 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 + warnings instead of rejecting constructs outright. Have it warn: + if a variable that dimensions an array is not a dummy or placed + explicitly in `COMMON' (F77 does not allow it to be placed in + `COMMON' via `EQUIVALENCE'); if specification statements follow + statement-function-definition statements; about all sorts of + syntactic extensions. + + * Warn about modifying `DO' variables via `EQUIVALENCE'. (This test + might be useful in setting the internal "doiter" flag for a + variable or even array reference within a loop, since that might + produce faster code someday.) + + * Add `-Wpromotions' to warn if source code appears to expect + automatic, silent, and somewhat dangerous compiler-assisted + conversion of `REAL' constants to `DOUBLE PRECISION' based on + context. + + For example, warn about cases like this: + + DOUBLE PRECISION FOO + PARAMETER (PI = 3.14159) + FOO = PI * 3D0 + + * Generally continue processing for warnings and recoverable (user) + errors whenever possible--don't gratuitously make bad code. + + For example: + + INTRINSIC ZABS + CALL FOO(ZABS) + END + + When compiling the above with `-ff2c-intrinsics-disable', `g77' + should indeed complain about passing `ZABS', but it still should + compile, instead of rejecting the entire `CALL' statement. (Some + of this is related to improving the compiler internals to improve + how statements are analyzed.) + + * If `-fno-ugly', reject badly designed trailing-radix quoted + (typeless) numbers, such as `'123'O'. + + * Add `-Wugly*', `-Wautomatic', `-Wvxt-not-f90', `-Wf90', and so on. + These would warn about places in the user's source where + ambiguities are found. + + One especially interesting case that `-Wf90' would catch is use of + `REAL(Z)', where `Z' is `DOUBLE COMPLEX'. Apparently, traditional + extended F77 compilers treat this as what all compilers should + agree is `REAL(REAL(Z))', while F90 compilers are required to + treat `REAL(Z)' as the same as `DBLE(Z)', returning a `DOUBLE + PRECISION' result rather than a `REAL' result. + + * `-Wconversion' and related should flag places where non-standard + conversions are found. Perhaps much of this would be part of + `-Wugly*'. + + * Complain when list of dummies containing an adjustable dummy array + does not also contain every variable listed in the dimension list + of the adjustable array. + + Currently, `g77' does complain about a variable that dimensions an + array but doesn't appear in any dummy list or `COMMON' area, but + this needs to be extended to catch cases where it doesn't appear in + every dummy list that also lists any arrays it dimensions. + + * Make sure things like `RETURN 2HAB' are invalid in both source + forms (must be `RETURN (2HAB)', which probably still makes no + sense but at least can be reliably parsed). Fixed form rejects + it, but not free form, except in a way that is a bit difficult to + understand. + + * The sort of routines usually found in the BSD-ish `libU77' should + be provided in addition to the few utility routines in `libf2c'. + Much of this work has already been done, and is awaiting + integration into `g77'. + +  + File: g77.info, Node: Disappointments, Next: Non-bugs, Prev: Missing Features, Up: Trouble + + Disappointments and Misunderstandings + ===================================== + + These problems are perhaps regrettable, but we don't know any + practical way around them for now. + + * `g77' disallows `IMPLICIT CHARACTER*(*)'. This is not + standard-conforming, and there are some very good reasons for that. + When I next remember any, I'll try to write them down. + + * `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, to be compatible with `f2c'. + + `g77' could special-case the way it handles `BLOCK DATA', since it + is not compatible with `f2c' in this particular area (necessarily, + since `g77' offers an important feature here), but it is likely + that such special-casing would be very annoying to people with + programs that use `EXTERNAL FOO', with no other mention of `FOO' + in the same program unit, to refer to external procedures, since + the result would be that `g77' would treat these references as + requests to force-load BLOCK DATA program units. + + In that case, if `g77' modified names of `BLOCK DATA' so they + could have the same names as `COMMON', users would find that their + programs wouldn't link because the `FOO' procedure didn't have its + name translated the same way. + + (Strictly speaking, `g77' could emit a + null-but-externally-satisfying definition of `FOO' with its name + transformed as if it had been a `BLOCK DATA', but that probably + invites more trouble than it's worth.) + + * The current external-interface design, which includes naming of + external procedures, COMMON blocks, and the library interface, has + various usability problems, including things like adding + underscores where not really necessary (and preventing easier + inter-language operability) and yet not providing complete + namespace freedom for user C code linked with Fortran apps (due to + the naming of functions in the library, among other things). + + Project GNU should at least get all this "right" for systems it + fully controls, such as the Hurd, and provide defaults and options + for compatibility with existing systems and interoperability with + popular existing compilers. + +  + File: g77.info, Node: Non-bugs, Next: Warnings and Errors, Prev: Disappointments, Up: Trouble + + Certain Changes We Don't Want to Make + ===================================== + + This section lists changes that people frequently request, but which + we do not make because we think GNU Fortran is better without them. + + * `-fno-backslash' should be the default, not `-fbackslash'. + + First of all, you can always specify `-fno-backslash' to turn off + this processing. + + Despite not being within the spirit (though apparently within the + letter) of the ANSI FORTRAN 77 standard, `g77' defaults to + `-fbackslash' because that is what most UNIX `f77' commands + default to, and apparently lots of code depends on this feature. + + This is a particularly troubling issue. The use of a C construct + in the midst of Fortran code is bad enough, worse when it makes + existing Fortran programs stop working (as happens when programs + written for non-UNIX systems are ported to UNIX systems with + compilers that provide the `-fbackslash' feature as the + default--sometimes with no option to turn it off). + + The author of GNU Fortran wished, for reasons of linguistic + purity, to make `-fno-backslash' the default for GNU Fortran and + thus require users of UNIX `f77' and `f2c' to specify + `-fbackslash' to get the UNIX behavior. + + However, the realization that `g77' is intended as a replacement + for *UNIX* `f77', caused the author to choose to make `g77' as + compatible with `f77' as feasible, which meant making `-fbackslash' + the default. + + The primary focus on compatibility is at the source-code level, + and the question became "What will users expect a replacement for + `f77' to do, by default?" Although at least one UNIX `f77' does + not provide `-fbackslash' as a default, it appears that, by far, + the majority of them do, which suggests that, by far, the majority + of code that is compiled by UNIX `f77' compilers expects + `-fbackslash' to be the default. + + It is probably the case that more code exists that would *not* + work with `-fbackslash' in force than code that requires it be in + force. + + However, most of *that* code is not being compiled with `f77', and + when it is, new build procedures (shell scripts, makefiles, and so + on) must be set up anyway so that they work under UNIX. That + makes a much more natural and safe opportunity for non-UNIX users + to adapt their build procedures for `g77''s default of + `-fbackslash' than would exist for the majority of UNIX `f77' + users who would have to modify existing, working build procedures + to explicitly specify `-fbackslash' if that was not the default. + + One suggestion has been to configure the default for `-fbackslash' + (and perhaps other options as well) based on the configuration of + `g77'. + + This is technically quite straightforward, but will be avoided + even in cases where not configuring defaults to be dependent on a + particular configuration greatly inconveniences some users of + legacy code. + + Many users appreciate the GNU compilers because they provide an + environment that is uniform across machines. These users would be + inconvenienced if the compiler treated things like the format of + the source code differently on certain machines. + + Occasionally users write programs intended only for a particular + machine type. On these occasions, the users would benefit if the + GNU Fortran compiler were to support by default the same dialect + as the other compilers on that machine. But such applications are + rare. And users writing a program to run on more than one type of + machine cannot possibly benefit from this kind of compatibility. + (This is consistent with the design goals for `gcc'. To change + them for `g77', you must first change them for `gcc'. Do not ask + the maintainers of `g77' to do this for you, or to disassociate + `g77' from the widely understood, if not widely agreed-upon, goals + for GNU compilers in general.) + + This is why GNU Fortran does and will treat backslashes in the same + fashion on all types of machines (by default). + + Of course, users strongly concerned about portability should + indicate explicitly in their build procedures which options are + expected by their source code, or write source code that has as + few such expectations as possible. + + For example, avoid writing code that depends on backslash (`\') + being interpreted either way in particular, such as by starting a + program unit with: + + CHARACTER BACKSL + PARAMETER (BACKSL = '\\') + + Then, use concatenation of `BACKSL' anyplace a backslash is + desired. (However, this technique does not work for Hollerith + constants--which is good, since the only generally portable uses + for Hollerith constants are in places where character constants + can and should be used instead, for readability.) + + In this way, users can write programs which have the same meaning + in many Fortran dialects. + + * `g77' does not use context to determine the types of constants or + named constants (`PARAMETER'). + + For example, consider the following statement: + + PRINT *, 3.1415926535 * 2D0 + + `g77' will interpret the (truncated) constant `3.1415926535' as a + `REAL', not `DOUBLE PRECISION', constant, because the suffix `D0' + is not specified. + + As a result, the output of the above statement when compiled by + `g77' will appear to have "less precision" than when compiled by + other compilers. + + In these and other cases, some compilers detect the fact that a + single-precision constant is used in a double-precision context + and therefore interpret the single-precision constant as if it was + *explicitly* specified as a double-precision constant. (This has + the effect of appending *decimal*, not *binary*, zeros to the + fractional part of the number--producing different computational + results.) + + The reason this misfeature is dangerous is that a slight, + apparently innocuous change to the source code can change the + computational results. Consider: + + REAL ALMOST, CLOSE + DOUBLE PRECISION FIVE + PARAMETER (ALMOST = 5.000000000001) + FIVE = 5 + CLOSE = 5.000000000001 + PRINT *, 5.000000000001 - FIVE + PRINT *, ALMOST - FIVE + PRINT *, CLOSE - FIVE + END + + Running the above program should result in the same value being + printed three times. With `g77' as the compiler, it does. + + However, compiled by many other compilers, running the above + program would print two or three distinct values, because in two + or three of the statements, the constant `5.000000000001', which + on most systems is exactly equal to `5.' when interpreted as a + single-precision constant, is instead interpreted as a + double-precision constant, preserving the represented precision. + However, this "clever" promotion of type does not extend to + variables or, in some compilers, to named constants. + + Since programmers often are encouraged to replace manifest + constants or permanently-assigned variables with named constants + (`PARAMETER' in Fortran), and might need to replace some constants + with variables having the same values for pertinent portions of + code, it is important that compilers treat code so modified in the + same way so that the results of such programs are the same. `g77' + helps in this regard by treating constants just the same as + variables in terms of determining their types in a + context-independent way. + + Still, there is a lot of existing Fortran code that has been + written to depend on the way other compilers freely interpret + constants' types based on context, so anything `g77' can do to + help flag cases of this in such code could be very helpful. + + * `g77' treats procedure references to *possible* intrinsic names as + always enabling their intrinsic nature, regardless of whether the + *form* of the reference is valid for that intrinsic. + + For example, `CALL IFIX' is interpreted by `g77' first as a + reference to the `IFIX' intrinsic, because the reference is a + procedure invocation (as compared to `J=IFIX'); only after + establishing that, in the program unit being compiled, `IFIX' is + in fact an intrinsic and not a local name that happens to have the + same name as an intrinsic, does `g77' recognize that the form of + the reference is invalid for that particular intrinsic. At that + point, `g77' issues a diagnostic. + + Some users claim that it is "obvious" that `CALL IFIX' references + an external subroutine of their own, not an intrinsic function. + + However, `g77' knows about intrinsic subroutines, not just + functions, and is able to support both having the same names, for + example. + + As a result of this, `g77' rejects calls to intrinsics that are + not subroutines, and function invocations of intrinsics that are + not functions, just as it (and most compilers) rejects invocations + of intrinsics with the wrong number (or types) of arguments. + + Use the `EXTERNAL IFIX' statement in a program unit that calls a + user-written subroutine named `IFIX'. + + * Allow `DATA VAR/.../' to come before `COMMON /.../ ...,VAR,...'. + + It is *possible* `g77' will someday allow this. + + Then again, maybe it is better to have `g77' always require + placement of `DATA' so that it can possibly immediately write + constants to the output file, thus saving time and space. + + That is, `DATA A/1000000*1/' should perhaps always be immediately + writable to canonical assembler, unless it's already known to be + in a `COMMON' area following as-yet-uninitialized stuff, and to do + this it cannot be followed by `COMMON A'. + + * Making side effects happen in the same order as in some other + compiler. + + It is never safe to depend on the order of evaluation of side + effects. For example, an expression like this may very well + behave differently from one compiler to another: + + J = IFUNC() - IFUNC() + + There is no guarantee that `IFUNC' will be evaluated in any + particular order. Either invocation might happen first. If + `IFUNC' returns 5 the first time it is invoked, and returns 12 the + second time, `J' might end up with the value `7', or it might end + up with `-7'. + + Generally, in Fortran, procedures with side-effects intended to be + visible to the caller are best designed as *subroutines*, not + functions. Examples of such side-effects include: + + * The generation of random numbers that are intended to + influence return values. + + * Performing I/O (other than internal I/O to local variables). + + * Updating information in common blocks. + + An example of a side-effect that is not intended to be visible to + the caller is a function that maintains a cache of recently + calculated results, intended solely to speed repeated invocations + of the function with identical arguments. Such a function can be + safely used in expressions, because if the compiler optimizes away + one or more calls to the function, operation of the program is + unaffected (aside from being speeded up). + +  + File: g77.info, Node: Warnings and Errors, Prev: Non-bugs, Up: Trouble + + Warning Messages and Error Messages + =================================== + + The GNU compiler can produce two kinds of diagnostics: errors and + warnings. Each kind has a different purpose: + + *Errors* report problems that make it impossible to compile your + program. GNU Fortran reports errors with the source file name, + line number, and column within the line where the problem is + apparent. + + *Warnings* report other unusual conditions in your code that + *might* indicate a problem, although compilation can (and does) + proceed. Warning messages also report the source file name, line + number, and column information, but include the text `warning:' to + distinguish them from error messages. + + Warnings might indicate danger points where you should check to make + sure that your program really does what you intend; or the use of + obsolete features; or the use of nonstandard features of GNU Fortran. + Many warnings are issued only if you ask for them, with one of the `-W' + options (for instance, `-Wall' requests a variety of useful warnings). + + *Note:* Currently, the text of the line and a pointer to the column + is printed in most `g77' diagnostics. Probably, as of version 0.6, + `g77' will no longer print the text of the source line, instead printing + the column number following the file name and line number in a form + that GNU Emacs recognizes. This change is expected to speed up and + reduce the memory usage of the `g77' compiler. + + *Note Options to Request or Suppress Warnings: Warning Options, for + more detail on these and related command-line options. + +  + File: g77.info, Node: Open Questions, Next: Bugs, Prev: Trouble, Up: Top + + Open Questions + ************** + + Please consider offering useful answers to these questions! + + * `g77' treats constants like `Z'ABCD'' and `'ABCD'Z' as typeless. + It seems like maybe the prefix-letter form, `Z'ABCD'', should be + `INTEGER' instead. + + You can test for yourself whether a particular compiler treats the + prefix form as `INTEGER' or typeless by running the following + program: + + EQUIVALENCE (I, R) + R = Z'ABCD' + J = Z'ABCD' + IF (J .EQ. I) PRINT *, 'Prefix form is TYPELESS' + IF (J .NE. I) PRINT *, 'Prefix form is INTEGER' + END + + If you wish to report the results of this test to the maintainers + of `g77', please include full information on the compiler, system, + and version information you're using. (We already know how `g77' + handles it, of course.) + + Perhaps this will be changed in version 0.6. + + * `LOC()' and other intrinsics are probably somewhat misclassified. + Is the a need for more precise classification of intrinsics, and + if so, what are the appropriate groupings? Is there a need to + individually enable/disable/delete/hide intrinsics from the + command line? + +  + File: g77.info, Node: Bugs, Next: Service, Prev: Open Questions, Up: Top + + Reporting Bugs + ************** + + Your bug reports play an essential role in making GNU Fortran + reliable. + + When you encounter a problem, the first thing to do is to see if it + is already known. *Note Trouble::. If it isn't known, then you should + report the problem. + + Reporting a bug might help you by bringing a solution to your + problem, or it might not. (If it does not, look in the service + directory; see *Note Service::.) In any case, the principal function of + a bug report is to help the entire community by making the next version + of GNU Fortran work better. Bug reports are your contribution to the + maintenance of GNU Fortran. + + Since the maintainers are very overloaded, we cannot respond to every + bug report. However, if the bug has not been fixed, we are likely to + send you a patch and ask you to tell us whether it works. + + In order for a bug report to serve its purpose, you must include the + information that makes for fixing the bug. + + * Menu: + + * Criteria: Bug Criteria. Have you really found a bug? + * Where: Bug Lists. Where to send your bug report. + * Reporting: Bug Reporting. How to report a bug effectively. + * Patches: Sending Patches. How to send a patch for GNU Fortran. + * Known: Trouble. Known problems. + * Help: Service. Where to ask for help. + +  + File: g77.info, Node: Bug Criteria, Next: Bug Lists, Up: Bugs + + Have You Found a Bug? + ===================== + + If you are not sure whether you have found a bug, here are some + guidelines: + + * If the compiler gets a fatal signal, for any input whatever, that + is a compiler bug. Reliable compilers never crash--they just + remain obsolete. + + * If the compiler produces invalid assembly code, for any input + whatever (except an `asm' statement), that is a compiler bug, + unless the compiler reports errors (not just warnings) which would + ordinarily prevent the assembler from being run. + + * If the compiler produces valid assembly code that does not + correctly execute the input source code, that is a compiler bug. + + However, you must double-check to make sure, because you might + have run into an incompatibility between GNU Fortran and + traditional Fortran. These incompatibilities might be considered + bugs, but they are inescapable consequences of valuable features. + + Or you might have a program whose behavior is undefined, which + happened by chance to give the desired results with another + Fortran compiler. It is best to check the relevant Fortran + standard thoroughly if it is possible that the program indeed does + something undefined. + + After you have localized the error to a single source line, it + should be easy to check for these things. If your program is + correct and well defined, you have found a compiler bug. + + It might help if, in your submission, you identified the specific + language in the relevant Fortran standard that specifies the + desired behavior, if it isn't likely to be obvious and agreed-upon + by all Fortran users. + + * If the compiler produces an error message for valid input, that is + a compiler bug. + + * If the compiler does not produce an error message for invalid + input, that is a compiler bug. However, you should note that your + idea of "invalid input" might be someone else's idea of "an + extension" or "support for traditional practice". + + * If you are an experienced user of Fortran compilers, your + suggestions for improvement of GNU Fortran are welcome in any case. + +  + File: g77.info, Node: Bug Lists, Next: Bug Reporting, Prev: Bug Criteria, Up: Bugs + + Where to Report Bugs + ==================== + + Send bug reports for GNU Fortran to `fortran@gnu.ai.mit.edu'. + + Often people think of posting bug reports to a newsgroup instead of + mailing them. This sometimes appears to work, but it has one problem + which can be crucial: a newsgroup posting does not contain a mail path + back to the sender. Thus, if maintainers need more information, they + may be unable to reach you. For this reason, you should always send + bug reports by mail to the proper mailing list. + + As a last resort, send bug reports on paper to: + + GNU Compiler Bugs + Free Software Foundation + 59 Temple Place - Suite 330 + Boston, MA 02111-1307, USA + diff -rcp2N g77-0.5.17/f/g77.info-8 g77-0.5.18/f/g77.info-8 *** g77-0.5.17/f/g77.info-8 Wed Dec 31 19:00:00 1969 --- g77-0.5.18/f/g77.info-8 Mon Apr 1 10:20:51 1996 *************** *** 0 **** --- 1,916 ---- + This is Info file g77.info, produced by Makeinfo-1.64 from the input + file g77.texi. + + This file explains how to use the GNU Fortran system. + + Published by the Free Software Foundation 59 Temple Place - Suite 330 + Boston, MA 02111-1307 USA + + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of this + manual provided the copyright notice and this permission notice are + preserved on all copies. + + Permission is granted to copy and distribute modified versions of + this manual under the conditions for verbatim copying, provided also + that the sections entitled "GNU General Public License," "Funding for + Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are + included exactly as in the original, and provided that the entire + resulting derived work is distributed under the terms of a permission + notice identical to this one. + + Permission is granted to copy and distribute translations of this + manual into another language, under the above conditions for modified + versions, except that the sections entitled "GNU General Public + License," "Funding for Free Software," and "Protect Your Freedom--Fight + `Look And Feel'", and this permission notice, may be included in + translations approved by the Free Software Foundation instead of in the + original English. + + Contributed by James Craig Burley (`burley@gnu.ai.mit.edu'). + Inspired by a first pass at translating `g77-0.5.16/f/DOC' that was + contributed to Craig by David Ronis (`ronis@onsager.chem.mcgill.ca'). + +  + File: g77.info, Node: Bug Reporting, Next: Sending Patches, Prev: Bug Lists, Up: Bugs + + How to Report Bugs + ================== + + The fundamental principle of reporting bugs usefully is this: + *report all the facts*. If you are not sure whether to state a fact or + leave it out, state it! + + Often people omit facts because they think they know what causes the + problem and they conclude that some details don't matter. Thus, you + might assume that the name of the variable you use in an example does + not matter. Well, probably it doesn't, but one cannot be sure. + Perhaps the bug is a stray memory reference which happens to fetch from + the location where that name is stored in memory; perhaps, if the name + were different, the contents of that location would fool the compiler + into doing the right thing despite the bug. Play it safe and give a + specific, complete example. That is the easiest thing for you to do, + and the most helpful. + + Keep in mind that the purpose of a bug report is to enable someone to + fix the bug if it is not known. It isn't very important what happens if + the bug is already known. Therefore, always write your bug reports on + the assumption that the bug is not known. + + Sometimes people give a few sketchy facts and ask, "Does this ring a + bell?" This cannot help us fix a bug, so it is rarely helpful. We + respond by asking for enough details to enable us to investigate. You + might as well expedite matters by sending them to begin with. + (Besides, there are enough bells ringing around here as it is.) + + Try to make your bug report self-contained. If we have to ask you + for more information, it is best if you include all the previous + information in your response, as well as the information that was + missing. + + Please report each bug in a separate message. This makes it easier + for us to track which bugs have been fixed and to forward your bugs + reports to the appropriate maintainer. + + Do not compress and encode any part of your bug report using programs + such as `uuencode'. If you do so it will slow down the processing of + your bug. If you must submit multiple large files, use `shar', which + allows us to read your message without having to run any decompression + programs. + + (As a special exception for GNU Fortran bug-reporting, at least for + now, if you are sending more than a few lines of code, if your + program's source file format contains "interesting" things like + trailing spaces or strange characters, or if you need to include binary + data files, it is acceptable to put all the files together in a `tar' + archive, and, whether you need to do that, it is acceptable to then + compress the single file (`tar' archive or source file) using `gzip' + and encode it via `uuencode'. Do not use any MIME stuff--the current + maintainer can't decode this. Using `compress' instead of `gzip' is + acceptable, assuming you have licensed the use of the patented + algorithm in `compress' from Unisys.) + + To enable someone to investigate the bug, you should include all + these things: + + * The version of GNU Fortran. You can get this by running `g77' + with the `-v' option. (Ignore any error messages that might be + displayed when the linker is run.) + + Without this, we won't know whether there is any point in looking + for the bug in the current version of GNU Fortran. + + * A complete input file that will reproduce the bug. If the bug is + in the compiler proper (`f771') and you are using the C + preprocessor, run your source file through the C preprocessor by + doing `g77 -E SOURCEFILE > OUTFILE', then include the contents of + OUTFILE in the bug report. (When you do this, use the same `-I', + `-D' or `-U' options that you used in actual compilation.) + + A single statement is not enough of an example. In order to + compile it, it must be embedded in a complete file of compiler + input; and the bug might depend on the details of how this is done. + + Without a real example one can compile, all anyone can do about + your bug report is wish you luck. It would be futile to try to + guess how to provoke the bug. For example, bugs in register + allocation and reloading frequently depend on every little detail + of the function they happen in. + + * Note that you should include with your bug report any files + included by the source file (via the `INCLUDE' statement) that you + send, and any files they `INCLUDE', and so on. + + It is not necessary to replace the `INCLUDE' statements with the + actual files in the version of the source file that you send, but + it might make submitting the bug report easier on the ends. + However, be sure to *reproduce* the bug using the *exact* version + of the source material you submit, to avoid wild-goose chases. + + * The command arguments you gave GNU Fortran to compile that example + and observe the bug. For example, did you use `-O'? To guarantee + you won't omit something important, list all the options. + + If we were to try to guess the arguments, we would probably guess + wrong and then we would not encounter the bug. + + * The type of machine you are using, and the operating system name + and version number. (Much of this information is printed by `g77 + -v'--if you include that, send along any additional info you have + that you don't see clearly represented in that output.) + + * The operands you gave to the `configure' command when you installed + the compiler. + + * A complete list of any modifications you have made to the compiler + source. (We don't promise to investigate the bug unless it + happens in an unmodified compiler. But if you've made + modifications and don't tell us, then you are sending us on a + wild-goose chase.) + + Be precise about these changes. A description in English is not + enough--send a context diff for them. + + Adding files of your own (such as a machine description for a + machine we don't support) is a modification of the compiler source. + + * Details of any other deviations from the standard procedure for + installing GNU Fortran. + + * A description of what behavior you observe that you believe is + incorrect. For example, "The compiler gets a fatal signal," or, + "The assembler instruction at line 208 in the output is incorrect." + + Of course, if the bug is that the compiler gets a fatal signal, + then one can't miss it. But if the bug is incorrect output, the + maintainer might not notice unless it is glaringly wrong. None of + us has time to study all the assembler code from a 50-line Fortran + program just on the chance that one instruction might be wrong. + We need *you* to do this part! + + Even if the problem you experience is a fatal signal, you should + still say so explicitly. Suppose something strange is going on, + such as, your copy of the compiler is out of synch, or you have + encountered a bug in the C library on your system. (This has + happened!) Your copy might crash and the copy here would not. If + you said to expect a crash, then when the compiler here fails to + crash, we would know that the bug was not happening. If you don't + say to expect a crash, then we would not know whether the bug was + happening. We would not be able to draw any conclusion from our + observations. + + If the problem is a diagnostic when building GNU Fortran with some + other compiler, say whether it is a warning or an error. + + Often the observed symptom is incorrect output when your program + is run. Sad to say, this is not enough information unless the + program is short and simple. None of us has time to study a large + program to figure out how it would work if compiled correctly, + much less which line of it was compiled wrong. So you will have + to do that. Tell us which source line it is, and what incorrect + result happens when that line is executed. A person who + understands the program can find this as easily as finding a bug + in the program itself. + + * If you send examples of assembler code output from GNU Fortran, + please use `-g' when you make them. The debugging information + includes source line numbers which are essential for correlating + the output with the input. + + * If you wish to mention something in the GNU Fortran source, refer + to it by context, not by line number. + + The line numbers in the development sources don't match those in + your sources. Your line numbers would convey no convenient + information to the maintainers. + + * Additional information from a debugger might enable someone to + find a problem on a machine which he does not have available. + However, you need to think when you collect this information if + you want it to have any chance of being useful. + + For example, many people send just a backtrace, but that is never + useful by itself. A simple backtrace with arguments conveys little + about GNU Fortran because the compiler is largely data-driven; the + same functions are called over and over for different RTL insns, + doing different things depending on the details of the insn. + + Most of the arguments listed in the backtrace are useless because + they are pointers to RTL list structure. The numeric values of the + pointers, which the debugger prints in the backtrace, have no + significance whatever; all that matters is the contents of the + objects they point to (and most of the contents are other such + pointers). + + In addition, most compiler passes consist of one or more loops that + scan the RTL insn sequence. The most vital piece of information + about such a loop--which insn it has reached--is usually in a + local variable, not in an argument. + + What you need to provide in addition to a backtrace are the values + of the local variables for several stack frames up. When a local + variable or an argument is an RTX, first print its value and then + use the GDB command `pr' to print the RTL expression that it points + to. (If GDB doesn't run on your machine, use your debugger to call + the function `debug_rtx' with the RTX as an argument.) In + general, whenever a variable is a pointer, its value is no use + without the data it points to. + + Here are some things that are not necessary: + + * A description of the envelope of the bug. + + Often people who encounter a bug spend a lot of time investigating + which changes to the input file will make the bug go away and which + changes will not affect it. + + This is often time consuming and not very useful, because the way + we will find the bug is by running a single example under the + debugger with breakpoints, not by pure deduction from a series of + examples. You might as well save your time for something else. + + Of course, if you can find a simpler example to report *instead* of + the original one, that is a convenience. Errors in the output + will be easier to spot, running under the debugger will take less + time, etc. Most GNU Fortran bugs involve just one function, so + the most straightforward way to simplify an example is to delete + all the function definitions except the one where the bug occurs. + Those earlier in the file may be replaced by external declarations + if the crucial function depends on them. (Exception: inline + functions may affect compilation of functions defined later in the + file.) + + However, simplification is not vital; if you don't want to do this, + report the bug anyway and send the entire test case you used. + + * In particular, some people insert conditionals `#ifdef BUG' around + a statement which, if removed, makes the bug not happen. These + are just clutter; we won't pay any attention to them anyway. + Besides, you should send us preprocessor output, and that can't + have conditionals. + + * A patch for the bug. + + A patch for the bug is useful if it is a good one. But don't omit + the necessary information, such as the test case, on the + assumption that a patch is all we need. We might see problems + with your patch and decide to fix the problem another way, or we + might not understand it at all. + + Sometimes with a program as complicated as GNU Fortran it is very + hard to construct an example that will make the program follow a + certain path through the code. If you don't send the example, we + won't be able to construct one, so we won't be able to verify that + the bug is fixed. + + And if we can't understand what bug you are trying to fix, or why + your patch should be an improvement, we won't install it. A test + case will help us to understand. + + *Note Sending Patches::, for guidelines on how to make it easy for + us to understand and install your patches. + + * A guess about what the bug is or what it depends on. + + Such guesses are usually wrong. Even the maintainer can't guess + right about such things without first using the debugger to find + the facts. + + * A core dump file. + + We have no way of examining a core dump for your type of machine + unless we have an identical system--and if we do have one, we + should be able to reproduce the crash ourselves. + +  + File: g77.info, Node: Sending Patches, Prev: Bug Reporting, Up: Bugs + + Sending Patches for GNU Fortran + =============================== + + If you would like to write bug fixes or improvements for the GNU + Fortran compiler, that is very helpful. Send suggested fixes to the + bug report mailing list, `fortran@gnu.ai.mit.edu'. + + Please follow these guidelines so we can study your patches + efficiently. If you don't follow these guidelines, your information + might still be useful, but using it will take extra work. Maintaining + GNU Fortran is a lot of work in the best of circumstances, and we can't + keep up unless you do your best to help. + + * Send an explanation with your changes of what problem they fix or + what improvement they bring about. For a bug fix, just include a + copy of the bug report, and explain why the change fixes the bug. + + (Referring to a bug report is not as good as including it, because + then we will have to look it up, and we have probably already + deleted it if we've already fixed the bug.) + + * Always include a proper bug report for the problem you think you + have fixed. We need to convince ourselves that the change is + right before installing it. Even if it is right, we might have + trouble judging it if we don't have a way to reproduce the problem. + + * Include all the comments that are appropriate to help people + reading the source in the future understand why this change was + needed. + + * Don't mix together changes made for different reasons. Send them + *individually*. + + If you make two changes for separate reasons, then we might not + want to install them both. We might want to install just one. If + you send them all jumbled together in a single set of diffs, we + have to do extra work to disentangle them--to figure out which + parts of the change serve which purpose. If we don't have time + for this, we might have to ignore your changes entirely. + + If you send each change as soon as you have written it, with its + own explanation, then the two changes never get tangled up, and we + can consider each one properly without any extra work to + disentangle them. + + Ideally, each change you send should be impossible to subdivide + into parts that we might want to consider separately, because each + of its parts gets its motivation from the other parts. + + * Send each change as soon as that change is finished. Sometimes + people think they are helping us by accumulating many changes to + send them all together. As explained above, this is absolutely + the worst thing you could do. + + Since you should send each change separately, you might as well + send it right away. That gives us the option of installing it + immediately if it is important. + + * Use `diff -c' to make your diffs. Diffs without context are hard + for us to install reliably. More than that, they make it hard for + us to study the diffs to decide whether we want to install them. + Unidiff format is better than contextless diffs, but not as easy + to read as `-c' format. + + If you have GNU diff, use `diff -cp', which shows the name of the + function that each change occurs in. (The maintainer of GNU + Fortran currently uses `diff -rcp2N'.) + + * Write the change log entries for your changes. We get lots of + changes, and we don't have time to do all the change log writing + ourselves. + + Read the `ChangeLog' file to see what sorts of information to put + in, and to learn the style that we use. The purpose of the change + log is to show people where to find what was changed. So you need + to be specific about what functions you changed; in large + functions, it's often helpful to indicate where within the + function the change was. + + On the other hand, once you have shown people where to find the + change, you need not explain its purpose. Thus, if you add a new + function, all you need to say about it is that it is new. If you + feel that the purpose needs explaining, it probably does--but the + explanation will be much more useful if you put it in comments in + the code. + + If you would like your name to appear in the header line for who + made the change, send us the header line. + + * When you write the fix, keep in mind that we can't install a + change that would break other systems. + + People often suggest fixing a problem by changing + machine-independent files such as `toplev.c' to do something + special that a particular system needs. Sometimes it is totally + obvious that such changes would break GNU Fortran for almost all + users. We can't possibly make a change like that. At best it + might tell us how to write another patch that would solve the + problem acceptably. + + Sometimes people send fixes that *might* be an improvement in + general--but it is hard to be sure of this. It's hard to install + such changes because we have to study them very carefully. Of + course, a good explanation of the reasoning by which you concluded + the change was correct can help convince us. + + The safest changes are changes to the configuration files for a + particular machine. These are safe because they can't create new + bugs on other machines. + + Please help us keep up with the workload by designing the patch in + a form that is good to install. + +  + File: g77.info, Node: Service, Next: Adding Options, Prev: Bugs, Up: Top + + How To Get Help with GNU Fortran + ******************************** + + If you need help installing, using or changing GNU Fortran, there + are two ways to find it: + + * Look in the service directory for someone who might help you for a + fee. The service directory is found in the file named `SERVICE' + in the GNU CC distribution. + + * Send a message to `fortran@gnu.ai.mit.edu'. + +  + File: g77.info, Node: Adding Options, Next: Projects, Prev: Service, Up: Top + + Adding Options + ************** + + To add a new command-line option to `g77', first decide what kind of + option you wish to add. Search the `g77' and `gcc' documentation for + one or more options that is most closely like the one you want to add + (in terms of what kind of effect it has, and so on) to help clarify its + nature. + + * *Fortran options* are options that apply only when compiling + Fortran programs. They are accepted by `g77' and `gcc', but they + mean something only when these commands actually compile Fortran + programs. + + * *Compiler options* are options that apply when compiling most any + kind of program. + + *Fortran options* are listed in the file `gcc/f/lang-options.h', + which is used when during the build of `gcc' to build a list of all + options that are accepted by at last one language's compiler. This + list goes into the `lang_options' array in `gcc/toplev.c', which uses + this array to determine whether a particular option should be offered + to the linked-in front end for processing by calling + `lang_option_decode', which, for `g77', is in `gcc/f/com.c' and just + calls `ffe_decode_option'. + + Even if the linked-in front end "rejects" a particular option passed + to it, `toplev.c' just ignores the option, because *some* language's + compiler is willing to accept it. + + This allows commands like `gcc -fno-asm foo.c bar.f' to work, even + though Fortran compilation does not currently support the `-fno-asm' + option; even though the `f771' version of `lang_decode_option' rejects + `-fno-asm', `toplev.c' doesn't produce a diagnostic because some other + language (C) does accept it. + + This also means that commands like `g77 -fno-asm foo.f' yield no + diagnostics, despite the fact that no phase of the command was able to + recognize and process `-fno-asm'--perhaps a warning about this would be + helpful if it were possible. + + Code that processes Fortran options is found in `gcc/f/top.c', + function `ffe_decode_option'. This code needs to check positive and + negative forms of each option. + + The defaults for Fortran options are set in their global + definitions, also found in `gcc/f/top.c'. Some of these defaults are + actually macros defined in `gcc/f/target.h', since they might be + machine-specific, although, in practice, GNU compilers should behave + the same way on all configurations (especially when it comes to + language constructs). + + Accessor macros for Fortran options, used by code in the `g77' FFE, + are defined in `gcc/f/top.h'. + + *Compiler options* are listed in `gcc/toplev.c' in the array + `f_options'. An option not listed in `lang_options' is looked up in + `f_options' and handled from there. + + The defaults for compiler options are set in the global definitions + for the corresponding variables, some of which are in `gcc/toplev.c'. + + You can set different defaults for *Fortran-oriented* or + *Fortran-reticent* compiler options by changing the way `f771' handles + the `-fset-g77-defaults' option, which is always provided as the first + option when called by `g77' or `gcc'. + + This code is in `ffe_decode_options' in `gcc/f/top.c'. Have it + change just the variables that you want to default to a different + setting for Fortran compiles compared to compiles of other languages. + + The `-fset-g77-defaults' option is passed to `f771' automatically + because of the specification information kept in `gcc/f/lang-specs.h'. + This file tells the `gcc' command how to recognize, in this case, + Fortran source files (those to be preprocessed, and those that are + not), and further, how to invoke the appropriate programs (including + `f771') to process those source files. + + It is in `gcc/f/lang-specs.h' that `-fset-g77-defaults', + `-fversion', and other options are passed, as appropriate, even when + the user has not explicitly specified them. Other "internal" options + such as `-quiet' also are passed via this mechanism. + +  + File: g77.info, Node: Projects, Next: Index, Prev: Adding Options, Up: Top + + Projects + ******** + + If you want to contribute to `g77' by doing research, design, + specification, documentation, coding, or testing, the following + information should give you some ideas. + + * Menu: + + * Efficiency:: Make `g77' itself compile code faster. + * Better Optimization:: Teach `g77' to generate faster code. + * Simplify Porting:: Make `g77' easier to configure, build, + and install. + * More Extensions:: Features many users won't know to ask for. + * Machine Model:: `g77' should better leverage `gcc'. + * Internals Documentation:: Make maintenance easier. + * Internals Improvements:: Make internals more robust. + * Better Diagnostics:: Make using `g77' on new code easier. + +  + File: g77.info, Node: Efficiency, Next: Better Optimization, Up: Projects + + Improve Efficiency + ================== + + Don't bother doing any performance analysis until most of the + following items are taken care of, because there's no question they + represent serious space/time problems, although some of them show up + only given certain kinds of (popular) input. + + * Improve `malloc' package and its uses to specify more info about + memory pools and, where feasible, use obstacks to implement them. + + * Skip over uninitialized portions of aggregate areas (arrays, + `COMMON' areas, `EQUIVALENCE' areas) so zeros need not be output. + This would reduce memory usage for large initialized aggregate + areas, even ones with only one initialized element. + + As of version 0.5.18, a portion of this item has already been + accomplished. + + * Prescan the statement (in `sta.c') so that the nature of the + statement is determined as much as possible by looking entirely at + its form, and not looking at any context (previous statements, + including types of symbols). This would allow ripping out of the + statement-confirmation, symbol retraction/confirmation, and + diagnostic inhibition mechanisms. Plus, it would result in + much-improved diagnostics. For example, `CALL + some-intrinsic(...)', where the intrinsic is not a subroutine + intrinsic, would result actual error instead of the + unimplemented-statement catch-all. + + * Throughout `g77', don't pass line/column pairs where a simple + `ffewhere' type, which points to the error as much as is desired + by the configuration, will do, and don't pass `ffelexToken' types + where a simple `ffewhere' type will do. Then, allow new default + configuration of `ffewhere' such that the source line text is not + preserved, and leave it to things like Emacs' next-error function + to point to them (now that `next-error' supports column, or, + perhaps, character-offset, numbers). The change in calling + sequences should improve performance somewhat, as should not + having to save source lines. (Whether this whole item will + improve performance is questionable, but it should improve + maintainability.) + + * Handle `DATA (A(I),I=1,1000000)/1000000*2/' more efficiently, + especially as regards the assembly output. Some of this might + require improving the back end, but lots of improvement in + space/time required in `g77' itself can be fairly easily obtained + without touching the back end. Maybe type-conversion, where + necessary, can be speeded up as well in cases like the one shown + (converting the `2' into `2.'). + + * If analysis shows it to be worthwhile, optimize `lex.c'. + + * Consider redesigning `lex.c' to not need any feedback during + tokenization, by keeping track of enough parse state on its own. + +  + File: g77.info, Node: Better Optimization, Next: Simplify Porting, Prev: Efficiency, Up: Projects + + Better Optimization + =================== + + Much of this work should be put off until after `g77' has all the + features necessary for its widespread acceptance as a useful F77 + compiler. However, perhaps this work can be done in parallel during + the feature-adding work. + + * Get the back end to produce at least as good code involving array + references as does `f2c' plus `gcc'. (*Note:* 0.5.18, with its + improvements to the GBE for versions 2.7.1 and 2.7.2 of `gcc', + should succeed at doing this. Please submit any cases where `g77' + cannot be made to generate as optimal code as `f2c' in combination + with the same version of `gcc', but only for versions 2.7.1 and + greater of `gcc'.) + + * Do the equivalent of the trick of putting `extern inline' in front + of every function definition in `libf2c' and #include'ing the + resulting file in `f2c'+`gcc'--that is, inline all + run-time-library functions that are at all worth inlining. (Some + of this has already been done, such as for integral + exponentiation.) + + * When doing `CHAR_VAR = CHAR_FUNC(...)', and it's clear that types + line up and `CHAR_VAR' is addressable or not a `VAR_DECL', make + `CHAR_VAR', not a temporary, be the receiver for `CHAR_FUNC'. + (This is now done for `COMPLEX' variables.) + + * Design and implement Fortran-specific optimizations that don't + really belong in the back end, or where the front end needs to + give the back end more info than it currently does. + + * Design and implement a new run-time library interface, with the + code going into `libgcc' so no special linking is required to link + Fortran programs using standard language features. This library + would speed up lots of things, from I/O (using precompiled formats, + doing just one, or, at most, very few, calls for arrays or array + sections, and so on) to general computing (array/section + implementations of various intrinsics, implementation of commonly + performed loops that aren't likely to be optimally compiled + otherwise, etc.). + + Among the important things the library would do are: + + * Be a one-stop-shop-type library, hence shareable and usable + by all, in that what are now library-build-time options in + `libf2c' would be moved at least to the `g77' compile phase, + if not to finer grains (such as choosing how list-directed + I/O formatting is done by default at `OPEN' time, for + preconnected units via options or even statements in the main + program unit, maybe even on a per-I/O basis with appropriate + pragma-like devices). + + * Probably requiring the new library design, change interface to + normally have `COMPLEX' functions return their values in the way + `gcc' would if they were declared `__complex__ float', rather than + using the mechanism currently used by `CHARACTER' functions + (whereby the functions are compiled as returning void and their + first arg is a pointer to where to store the result). (Don't + append underscores to external names for `COMPLEX' functions in + some cases once `g77' uses `gcc' rather than `f2c' calling + conventions.) + + * Do something useful with `doiter' references where possible. For + example, `CALL FOO(I)' cannot modify `I' if within a `DO' loop + that uses `I' as the iteration variable, and the back end might + find that info useful in determining whether it needs to read `I' + back into a register after the call. (It normally has to do that, + unless it knows `FOO' never modifies its passed-by-reference + argument, which is rarely the case for Fortran-77 code.) + +  + File: g77.info, Node: Simplify Porting, Next: More Extensions, Prev: Better Optimization, Up: Projects + + Simplify Porting + ================ + + Making `g77' easier to configure, port, build, and install, either + as a single-system compiler or as a cross-compiler, would be very + useful. + + * A new library (replacing `libf2c') should improve portability as + well as produce more optimal code. Further, `g77' and the new + library should conspire to simplify naming of externals, such as + by removing unnecessarily added underscores, and to + reduce/eliminate the possibility of naming conflicts, while making + debugger more straightforward. + + Also, it should make multi-language applications more feasible, + such as by providing Fortran intrinsics that get Fortran unit + numbers given C `FILE *' descriptors. + + * Possibly related to a new library, `g77' should produce the + equivalent of a `gcc' `main(argc, argv)' function when it compiles + a main program unit, instead of compiling something that must be + called by a library implementation of `main()'. + + This would do many useful things such as provide more flexibility + in terms of setting up exception handling, not requiring + programmers to start their debugging sessions with `breakpoint + MAIN__' followed by `run', and so on. + + * The GBE needs to understand the difference between alignment + requirements and desires. For example, on Intel x86 machines, + `g77' currently imposes overly strict alignment requirements, due + to the back end, but it would be useful for Fortran and C + programmers to be able to override these *recommendations* as long + as they don't violate the actual processor *requirements*. + +  + File: g77.info, Node: More Extensions, Next: Machine Model, Prev: Simplify Porting, Up: Projects + + More Extensions + =============== + + These extensions are not the sort of things users ask for "by name", + but they might improve the usability of `g77', and Fortran in general, + in the long run. Some of these items really pertain to improving `g77' + internals so that some popular extensions can be more easily supported. + + * Consider adding a `NUMERIC' type to designate typeless numeric + constants, named and unnamed. The idea is to provide a + forward-looking, effective replacement for things like the + old-style `PARAMETER' statement when people really need + typelessness in a maintainable, portable, clearly documented way. + Maybe `TYPELESS' would include `CHARACTER', `POINTER', and + whatever else might come along. (This is not really a call for + polymorphism per se, just an ability to express limited, syntactic + polymorphism.) + + * Support `OPEN(...,KEY=(...),...)'. + + * `OPEN(NOSPANBLOCKS,...)' is treated as + `OPEN(UNIT=NOSPANBLOCKS,...)', so a later `UNIT=' in the first + example is invalid. Make sure this is what users of this feature + would expect. + + * Currently `g77' disallows `READ(1'10)' since it is an obnoxious + syntax, but supporting it might be pretty easy if needed. More + details are needed, such as whether general expressions separated + by an apostrophe are supported, or maybe the record number can be + a general expression, and so on. + + * Support `STRUCTURE', `UNION', `MAP', and `RECORD' fully. + Currently there is no support at all for `%FILL' in `STRUCTURE' + and related syntax, whereas the rest of the stuff has at least + some parsing support. This requires either major changes to + `libf2c' or its replacement. + + * F90 and `g77' probably disagree about label scoping relative to + `INTERFACE' and `END INTERFACE', and their contained procedure + interface bodies (blocks?). + + * `ENTRY' doesn't support F90 `RESULT()' yet, since that was added + after S8.112. + + * Empty-statement handling (10 ;;CONTINUE;;) probably isn't + consistent with the final form of the standard (it was vague at + S8.112). + + * It seems to be an "open" question whether a file, immediately + after being `OPEN'ed,is positioned at the beginning, the end, or + wherever--it might be nice to offer an option of opening to + "undefined" status, requiring an explicit absolute-positioning + operation to be performed before any other (besides `CLOSE') to + assist in making applications port to systems (some IBM?) that + `OPEN' to the end of a file or some such thing. + +  + File: g77.info, Node: Machine Model, Next: Internals Documentation, Prev: More Extensions, Up: Projects + + Machine Model + ============= + + This items pertain to generalizing `g77''s view of the machine model + to more fully accept whatever the GBE provides it via its configuration. + + * Switch to using `REAL_VALUE_TYPE' to represent floating-point + constants exclusively so the target float format need not be + required. This means changing the way `g77' handles + initialization of aggregate areas having more than one type, such + as `REAL' and `INTEGER', because currently it initializes them as + if they were arrays of `char' and uses the bit patterns of the + constants of the various types in them to determine what to stuff + in elements of the arrays. + + * Rely more and more on back-end info and capabilities, especially + in the area of constants (where having the `g77' front-end's IL + just store the appropriate tree nodes containing constants might + be best). + + * Suite of C and Fortran programs that a user/administrator can run + on a machine to help determine the configuration for `g77' before + building and help determine if the compiler works (especially with + whatever libraries are installed) after building. + +  + File: g77.info, Node: Internals Documentation, Next: Internals Improvements, Prev: Machine Model, Up: Projects + + Internals Documentation + ======================= + + Better info on how `g77' works and how to port it is needed. + +  + File: g77.info, Node: Internals Improvements, Next: Better Diagnostics, Prev: Internals Documentation, Up: Projects + + Internals Improvements + ====================== + + Some more items that would make `g77' more reliable and easier to + maintain: + + * Generally make expression handling focus more on critical syntax + stuff, leaving semantics to callers. For example, anything a + caller can check, semantically, let it do so, rather than having + `expr.c' do it. (Exceptions might include things like diagnosing + `FOO(I--K:)=BAR' where `FOO' is a `PARAMETER'--if it seems + important to preserve the left-to-right-in-source order of + production of diagnostics.) + + * Come up with better naming conventions for `-D' to establish + requirements to achieve desired implementation dialect via + `proj.h'. + + * Clean up used tokens and `ffewhere's in `ffeglobal_terminate_1'. + + * Replace `sta.c' `outpooldisp' mechanism with `malloc_pool_use'. + + * Check for `opANY' in more places in `com.c', `std.c', and `ste.c', + and get rid of the `opCONVERT(opANY)' kludge (after determining if + there is indeed no real need for it). + + * Utility to read and check `bad.def' messages and their references + in the code, to make sure calls are consistent with message + templates. + + * Search and fix `&ffe...' and similar so that `ffe...ptr...' macros + are available instead (a good argument for wishing this could have + written all this stuff in C++, perhaps). On the other hand, it's + questionable whether this sort of improvement is really necessary, + given the availability of tools such as Emacs and perl, which + making finding any address-taking of structure members easy enough? + + * Some modules truly export the member names of their structures + (and the structures themselves), maybe fix this, and fix other + modules that just appear to as well (by appending `_', though it'd + be ugly and probably not worth the time). + + * Implement C macros `RETURNS(value)' and `SETS(something,value)' in + `proj.h' and use them throughout `g77' source code (especially in + the definitions of access macros in `.h' files) so they can be + tailored to catch code writing into a `RETURNS()' or reading from + a `SETS()'. + + * Decorate throughout with `const' and other such stuff. + + * All F90 notational derivations in the source code are still based + on the S8.112 version of the draft standard. Probably should + update to the official standard, or put documentation of the rules + as used in the code...uh...in the code. + + * Some `ffebld_new' calls (those outside of `ffeexpr.c' or inside + but invoked via paths not involving `ffeexpr_lhs' or + `ffeexpr_rhs') might be creating things in improper pools, leading + to such things staying around too long or (doubtful, but possible + and dangerous) not long enough. + + * Some `ffebld_list_new' (or whatever) calls might not be matched by + `ffebld_list_bottom' (or whatever) calls, which might someday + matter. (It definitely is not a problem just yet.) + + * Probably not doing clean things when we fail to `EQUIVALENCE' + something due to alignment/mismatch or other problems--they end up + without `ffestorag' objects, so maybe the backend (and other parts + of the front end) can notice that and handle like an `opANY' (do + what it wants, just don't complain or crash). Most of this seems + to have been addressed by now, but a code review wouldn't hurt. + +  + File: g77.info, Node: Better Diagnostics, Prev: Internals Improvements, Up: Projects + + Better Diagnostics + ================== + + These are things users might not ask about, or that need to be + looked into, before worrying about. Also here are items that involve + reducing unnecessary diagnostic clutter. + + * Implement non-F90 messages (especially avoid mentioning F90 things + `g77' doesn't yet support). Much of this has been done as of + 0.5.14. + + * When `FUNCTION' and `ENTRY' point types disagree (`CHARACTER' + lengths, type classes, and so on), `ANY'-ize the offending `ENTRY' + point and any *new* dummies it specifies. + + * Speed up and improve error handling for data when repeat-count is + specified. For example, don't output 20 unnecessary messages + after the first necessary one for: + + INTEGER X(20) + CONTINUE + DATA (X(I), J= 1, 20) /20*5/ + END + + (The `CONTINUE' statement ensures the `DATA' statement is + processed in the context of executable, not specification, + statements.) + diff -rcp2N g77-0.5.17/f/g77.info-9 g77-0.5.18/f/g77.info-9 *** g77-0.5.17/f/g77.info-9 Wed Dec 31 19:00:00 1969 --- g77-0.5.18/f/g77.info-9 Mon Apr 1 10:20:51 1996 *************** *** 0 **** --- 1,938 ---- + This is Info file g77.info, produced by Makeinfo-1.64 from the input + file g77.texi. + + This file explains how to use the GNU Fortran system. + + Published by the Free Software Foundation 59 Temple Place - Suite 330 + Boston, MA 02111-1307 USA + + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of this + manual provided the copyright notice and this permission notice are + preserved on all copies. + + Permission is granted to copy and distribute modified versions of + this manual under the conditions for verbatim copying, provided also + that the sections entitled "GNU General Public License," "Funding for + Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are + included exactly as in the original, and provided that the entire + resulting derived work is distributed under the terms of a permission + notice identical to this one. + + Permission is granted to copy and distribute translations of this + manual into another language, under the above conditions for modified + versions, except that the sections entitled "GNU General Public + License," "Funding for Free Software," and "Protect Your Freedom--Fight + `Look And Feel'", and this permission notice, may be included in + translations approved by the Free Software Foundation instead of in the + original English. + + Contributed by James Craig Burley (`burley@gnu.ai.mit.edu'). + Inspired by a first pass at translating `g77-0.5.16/f/DOC' that was + contributed to Craig by David Ronis (`ronis@onsager.chem.mcgill.ca'). + +  + File: g77.info, Node: Index, Prev: Projects, Up: Top + + Index + ***** + + * Menu: + + * #define: Overall Options. + * #if: Overall Options. + * #include: Overall Options. + * %DESCR() intrinsic <1>: Extensions. + * %DESCR() intrinsic: Changes. + * %LOC() intrinsic: Extensions. + * %REF() intrinsic: Extensions. + * %VAL() intrinsic: Extensions. + * *N notation: Types. + * --driver option <1>: Invoking G77. + * --driver option: G77 and GCC. + * -fGROUP-intrinsics-hide option: Overly Convenient Options. + * -fcaller-saves option: Optimize Options. + * -fcase-initcap option: Fortran Dialect Options. + * -fcase-lower option: Fortran Dialect Options. + * -fcase-preserve option: Fortran Dialect Options. + * -fcase-strict-lower option: Fortran Dialect Options. + * -fcase-strict-upper option: Fortran Dialect Options. + * -fcase-upper option: Fortran Dialect Options. + * -fdcp-intrinsics-delete option: Fortran Dialect Options. + * -fdcp-intrinsics-disable option: Fortran Dialect Options. + * -fdcp-intrinsics-enable option: Fortran Dialect Options. + * -fdcp-intrinsics-hide option: Fortran Dialect Options. + * -fdelayed-branch option: Optimize Options. + * -fdollar-ok option: Fortran Dialect Options. + * -fexpensive-optimizations option: Optimize Options. + * -ff2c-intrinsics-delete option: Fortran Dialect Options. + * -ff2c-intrinsics-disable option: Fortran Dialect Options. + * -ff2c-intrinsics-enable option: Fortran Dialect Options. + * -ff2c-intrinsics-hide option: Fortran Dialect Options. + * -ff2c-library option: Code Gen Options. + * -ff90 option: Fortran Dialect Options. + * -ff90-intrinsics-delete option: Fortran Dialect Options. + * -ff90-intrinsics-disable option: Fortran Dialect Options. + * -ff90-intrinsics-enable option: Fortran Dialect Options. + * -ff90-intrinsics-hide option: Fortran Dialect Options. + * -ff90-not-vxt option: Fortran Dialect Options. + * -ffast-math option: Optimize Options. + * -ffixed-line-length-N option: Fortran Dialect Options. + * -ffloat-store option: Optimize Options. + * -fforce-addr option: Optimize Options. + * -fforce-mem option: Optimize Options. + * -ffree-form option: Fortran Dialect Options. + * -finit-local-zero option <1>: Overly Convenient Options. + * -finit-local-zero option: Code Gen Options. + * -fintrin-case-any option: Fortran Dialect Options. + * -fintrin-case-initcap option: Fortran Dialect Options. + * -fintrin-case-lower option: Fortran Dialect Options. + * -fintrin-case-upper option: Fortran Dialect Options. + * -fmatch-case-any option: Fortran Dialect Options. + * -fmatch-case-initcap option: Fortran Dialect Options. + * -fmatch-case-lower option: Fortran Dialect Options. + * -fmatch-case-upper option: Fortran Dialect Options. + * -fmil-intrinsics-delete option: Fortran Dialect Options. + * -fmil-intrinsics-disable option: Fortran Dialect Options. + * -fmil-intrinsics-enable option: Fortran Dialect Options. + * -fmil-intrinsics-hide option: Fortran Dialect Options. + * -fno-automatic option <1>: Overly Convenient Options. + * -fno-automatic option: Code Gen Options. + * -fno-backslash option: Fortran Dialect Options. + * -fno-common option: Code Gen Options. + * -fno-f2c option <1>: Faster Programs. + * -fno-f2c option: Code Gen Options. + * -fno-fixed-form option: Fortran Dialect Options. + * -fno-ident option: Code Gen Options. + * -fno-inline option: Optimize Options. + * -fno-second-underscore option: Code Gen Options. + * -fno-ugly-args option: Warning Options. + * -fno-ugly-init option: Warning Options. + * -fno-underscoring option: Code Gen Options. + * -fpack-struct option: Code Gen Options. + * -fpcc-struct-return option: Code Gen Options. + * -fpedantic option: Warning Options. + * -fPIC option: Actual Bugs. + * -freg-struct-return option: Code Gen Options. + * -frerun-cse-after-loop option: Optimize Options. + * -fschedule-insns option: Optimize Options. + * -fschedule-insns2 option: Optimize Options. + * -fset-g77-defaults option: Overall Options. + * -fshort-double option: Code Gen Options. + * -fsource-case-lower option: Fortran Dialect Options. + * -fsource-case-preserve option: Fortran Dialect Options. + * -fsource-case-upper option: Fortran Dialect Options. + * -fstrength-reduce option: Optimize Options. + * -fsymbol-case-any option: Fortran Dialect Options. + * -fsymbol-case-initcap option: Fortran Dialect Options. + * -fsymbol-case-lower option: Fortran Dialect Options. + * -fsymbol-case-upper option: Fortran Dialect Options. + * -fsyntax-only option: Warning Options. + * -fugly option <1>: Actual Bugs. + * -fugly option <2>: Overly Convenient Options. + * -fugly option: Warning Options. + * -funix-intrinsics-delete option: Fortran Dialect Options. + * -funix-intrinsics-disable option: Fortran Dialect Options. + * -funix-intrinsics-enable option: Fortran Dialect Options. + * -funix-intrinsics-hide option: Fortran Dialect Options. + * -funroll-all-loops option: Optimize Options. + * -funroll-loops option: Optimize Options. + * -fversion option: Overall Options. + * -fvxt-intrinsics-delete option: Fortran Dialect Options. + * -fvxt-intrinsics-disable option: Fortran Dialect Options. + * -fvxt-intrinsics-enable option: Fortran Dialect Options. + * -fvxt-intrinsics-hide option: Fortran Dialect Options. + * -fvxt-not-f90 option: Fortran Dialect Options. + * -fzeros option: Code Gen Options. + * -g option: Debugging Options. + * -I- option: Directory Options. + * -Idir option: Directory Options. + * -pedantic option: Warning Options. + * -pedantic-errors option: Warning Options. + * -u option: Warning Options. + * -v option: G77 and GCC. + * -w option: Warning Options. + * -Waggregate-return option: Warning Options. + * -Wall option: Warning Options. + * -Wcomment option: Warning Options. + * -Wconversion option: Warning Options. + * -Werror option: Warning Options. + * -Wformat option: Warning Options. + * -Wid-clash-LEN option: Warning Options. + * -Wimplicit option: Warning Options. + * -Wlarger-than-LEN option: Warning Options. + * -Wparentheses option: Warning Options. + * -Wredundant-decls option: Warning Options. + * -Wshadow option: Warning Options. + * -Wsurprising option: Warning Options. + * -Wswitch option: Warning Options. + * -Wtraditional option: Warning Options. + * -Wuninitialized option: Warning Options. + * -Wunused option: Warning Options. + * .F: Overall Options. + * .fpp: Overall Options. + * /WARNINGS=DECLARATIONS switch: Warning Options. + * 64-bit systems: Alpha Problems. + * bison: Missing bison?. + * g77, installation of: Installation of Binaries. + * gcc versions supported by g77: Merging Distributions. + * gcc, installation of: Installation of Binaries. + * gdb support: But-bugs. + * makeinfo: Missing makeinfo?. + * _strtoul: General Problems. + * ABORT() intrinsic: Fortran Dialect Options. + * ACCEPT statement: Missing Features. + * adding options: Adding Options. + * adjustable arrays: Adjustable Arrays. + * aggregate initialization: Large Initialization. + * all warnings: Warning Options. + * Alpha support: Actual Bugs. + * Alpha, bugs: Alpha Problems. + * alternate entry points: Alternate Entry Points. + * alternate returns: Alternate Returns. + * AND intrinsic: Missing Features. + * ANSI FORTRAN 77 support: Standard Support. + * arguments, unused: Warning Options. + * array ordering: Arrays. + * arrays: Arrays. + * arrays, adjustable: Adjustable Arrays. + * arrays, automatic: Adjustable Arrays. + * arrays, dimensioning: Adjustable Arrays. + * as command: What is GNU Fortran?. + * assembler: What is GNU Fortran?. + * assembly code: What is GNU Fortran?. + * assembly code, invalid: Bug Criteria. + * ASSIGN statement: Assigned Statement Labels. + * assigned statement labels: Assigned Statement Labels. + * automatic arrays: Adjustable Arrays. + * back end, gcc: What is GNU Fortran?. + * backslash <1>: Non-bugs. + * backslash: Fortran Dialect Options. + * backtrace for bug reports: Bug Reporting. + * basic concepts: What is GNU Fortran?. + * beginners: Getting Started. + * binaries, distributing: Distributing Binaries. + * bit patterns: Floating-point Bit Patterns. + * block data: Disappointments. + * block data and libraries: Block Data and Libraries. + * BLOCK DATA statement <1>: Disappointments. + * BLOCK DATA statement: Block Data and Libraries. + * bootstrap build: Bootstrap Build. + * bug criteria: Bug Criteria. + * bug report mailing lists: Bug Lists. + * bugs <1>: Bugs. + * bugs: What is GNU Fortran?. + * bugs, known: Trouble. + * build, bootstrap: Bootstrap Build. + * build, straight: Straight Build. + * building g77: Building gcc. + * building gcc: Building gcc. + * but-bugs: But-bugs. + * C preprocessor: Overall Options. + * C routines calling Fortran: Debugging and Interfacing. + * calling C routines: Debugging and Interfacing. + * card image: Fortran Dialect Options. + * carriage returns: Source Form. + * case sensitivity: Case Sensitivity. + * cc1 program: What is GNU Fortran?. + * cc1plus program: What is GNU Fortran?. + * changes, user-visible: Changes. + * character constants <1>: Character and Hollerith Constants. + * character constants <2>: Distensions. + * character constants <3>: Dialects. + * character constants: Fortran Dialect Options. + * character set: Fortran Dialect Options. + * characters, comment: Dialects. + * characters, continuation: Dialects. + * CLOSE statement: Missing Features. + * code generation conventions: Code Gen Options. + * code generation, improving: Better Optimization. + * code generator: What is GNU Fortran?. + * code, assembly: What is GNU Fortran?. + * code, displaying main source: Actual Bugs. + * code, distributing: Distributing Binaries. + * code, in-line: What is GNU Fortran?. + * code, legacy: Collected Fortran Wisdom. + * code, machine: What is GNU Fortran?. + * code, modifying: Unpacking. + * code, object: Object Compatibility. + * code, source <1>: Unpacking. + * code, source <2>: Case Sensitivity. + * code, source <3>: Source Form. + * code, source: What is GNU Fortran?. + * code, stack variables: Maximum Stackable Size. + * code, user: But-bugs. + * code, writing: Collected Fortran Wisdom. + * column-major ordering: Arrays. + * command options: Invoking G77. + * commands, as: What is GNU Fortran?. + * commands, f77: Installing f77. + * commands, g77 <1>: G77 and GCC. + * commands, g77: What is GNU Fortran?. + * commands, gcc <1>: G77 and GCC. + * commands, gcc: What is GNU Fortran?. + * commands, gdb: What is GNU Fortran?. + * commands, ld: What is GNU Fortran?. + * comment character: Dialects. + * common blocks <1>: Actual Bugs. + * common blocks: Common Blocks. + * COMMON blocks: Debugging Options. + * common blocks, large: But-bugs. + * COMMON statement <1>: Disappointments. + * COMMON statement: Common Blocks. + * compatibility <1>: Faster Programs. + * compatibility <2>: Block Data and Libraries. + * compatibility: Object Compatibility. + * compatibility, f2c: Code Gen Options. + * compilation, in-line: Optimize Options. + * compilation, pedantic: Pedantic Compilation. + * compiler bugs, reporting: Bug Reporting. + * compiler memory usage: Actual Bugs. + * compiler speed: Actual Bugs. + * compilers: What is GNU Fortran?. + * compilers, compatibility: Object Compatibility. + * compiling programs: G77 and GCC. + * COMPLEX intrinsics: Fortran Dialect Options. + * COMPLEX support: Actual Bugs. + * COMPLEX type: Types. + * components of g77: What is GNU Fortran?. + * concepts, basic: What is GNU Fortran?. + * conformance, IEEE: Optimize Options. + * constants: Constants. + * constants, character <1>: Character and Hollerith Constants. + * constants, character <2>: Distensions. + * constants, character: Dialects. + * constants, Hollerith <1>: Character and Hollerith Constants. + * constants, Hollerith <2>: Distensions. + * constants, Hollerith: Changes. + * constants, integer: Actual Bugs. + * constants, octal: Dialects. + * constants, typeless: Changes. + * continuation character: Dialects. + * contributors: Contributors. + * core dump: Bug Criteria. + * cpp preprocessor: Overall Options. + * cpp program <1>: Bug Reporting. + * cpp program <2>: Preprocessor Options. + * cpp program <3>: Overall Options. + * cpp program: What is GNU Fortran?. + * Cray pointers: Missing Features. + * creating patch files: Merging Distributions. + * credits: Contributors. + * cross-compilation: Cross-compiler Problems. + * cross-compiler, building: Floating-point Bit Patterns. + * DATA statement <1>: Actual Bugs. + * DATA statement: Code Gen Options. + * data types: Types. + * debug_rtx: Bug Reporting. + * debugger: What is GNU Fortran?. + * debugging <1>: Actual Bugs. + * debugging <2>: Main Program Unit. + * debugging: Debugging and Interfacing. + * debugging information options: Debugging Options. + * debugging main source code: Actual Bugs. + * deleted intrinsics: Intrinsics. + * diagnostics, incorrect: What is GNU Fortran?. + * dialect options: Fortran Dialect Options. + * dialects of language: Dialects. + * Digital Fortran features: Fortran Dialect Options. + * DIMENSION statement <1>: Adjustable Arrays. + * DIMENSION statement: Arrays. + * dimensioning arrays: Adjustable Arrays. + * directory options: Directory Options. + * directory search paths for inclusion: Directory Options. + * directory, updating info: Updating Documentation. + * disabled intrinsics: Intrinsics. + * displaying main source code: Actual Bugs. + * disposition of files: Missing Features. + * distensions: Distensions. + * distributions, unpacking: Unpacking. + * distributions, why separate: Merging Distributions. + * DO statement <1>: Loops. + * DO statement: Warning Options. + * documentation: Updating Documentation. + * dollar sign: Fortran Dialect Options. + * DOUBLE COMPLEX type: Types. + * DOUBLE PRECISION type: Types. + * double quotes: Dialects. + * driver, gcc command as: What is GNU Fortran?. + * dummies, unused: Warning Options. + * effecting IMPLICIT NONE: Warning Options. + * efficiency: Efficiency. + * ELF support: Actual Bugs. + * enabled intrinsics: Intrinsics. + * entry points: Alternate Entry Points. + * ENTRY statement: Alternate Entry Points. + * environment variables: Environment Variables. + * equivalence areas <1>: Actual Bugs. + * equivalence areas: Local Equivalence Areas. + * EQUIVALENCE areas: Debugging Options. + * EQUIVALENCE statement: Local Equivalence Areas. + * error messages: Warnings and Errors. + * error messages, incorrect: What is GNU Fortran?. + * errors, linker: But-bugs. + * exclamation points: Dialects. + * executable file: What is GNU Fortran?. + * EXIT() intrinsic: Fortran Dialect Options. + * extended-source option: Fortran Dialect Options. + * extensions: Extensions. + * extensions, file name: Overall Options. + * extensions, more: More Extensions. + * extensions, VXT: Dialects. + * extra warnings: Warning Options. + * f2c compatibility <1>: Faster Programs. + * f2c compatibility <2>: Block Data and Libraries. + * f2c compatibility <3>: Debugging and Interfacing. + * f2c compatibility <4>: Object Compatibility. + * f2c compatibility: Code Gen Options. + * f2c intrinsics: Fortran Dialect Options. + * F2C_INSTALL_FLAG: Installing f2c. + * F2CLIBOK: Installing f2c. + * f77 command: Installing f77. + * f77 support: Non-bugs. + * f771 program: What is GNU Fortran?. + * f771, linking error for: General Problems. + * F77_INSTALL_FLAG: Installing f77. + * fatal signal: Bug Criteria. + * features, ugly <1>: Distensions. + * features, ugly: Warning Options. + * FFE: What is GNU Fortran?. + * FFECOM_sizeMAXSTACKITEM: Maximum Stackable Size. + * file format not recognized: What is GNU Fortran?. + * file name extension: Overall Options. + * file name suffix: Overall Options. + * file type: Overall Options. + * file, source: What is GNU Fortran?. + * files, executable: What is GNU Fortran?. + * files, source: Source Form. + * fixed form <1>: Source Form. + * fixed form: Fortran Dialect Options. + * fixed-form line length: Fortran Dialect Options. + * floating-point bit patterns: Floating-point Bit Patterns. + * FLUSH() intrinsic: Fortran Dialect Options. + * FORMAT statement: Missing Features. + * Fortran 90 features <1>: Dialects. + * Fortran 90 features: Fortran Dialect Options. + * Fortran 90 intrinsics: Fortran Dialect Options. + * Fortran 90 support: Missing Features. + * Fortran preprocessor: Overall Options. + * free form <1>: Source Form. + * free form: Fortran Dialect Options. + * front end, g77: What is GNU Fortran?. + * FSF, funding the: Funding GNU Fortran. + * FUNCTION statement <1>: Functions. + * FUNCTION statement: Procedures. + * functions: Functions. + * functions, intrinsic: Fortran Dialect Options. + * funding improvements: Funding GNU Fortran. + * funding the FSF: Funding GNU Fortran. + * g77 command <1>: G77 and GCC. + * g77 command: What is GNU Fortran?. + * g77 front end: What is GNU Fortran?. + * g77 options, -driver: G77 and GCC. + * g77 options, -v: G77 and GCC. + * g77 options, driver: Invoking G77. + * g77, components of: What is GNU Fortran?. + * GBE <1>: General Problems. + * GBE: What is GNU Fortran?. + * gcc back end: What is GNU Fortran?. + * gcc command <1>: G77 and GCC. + * gcc command: What is GNU Fortran?. + * gcc command as driver: What is GNU Fortran?. + * gcc not recognizing Fortran source: What is GNU Fortran?. + * gdb command: What is GNU Fortran?. + * GETARG() intrinsic: Main Program Unit. + * getting started: Getting Started. + * GNU Back End (GBE): What is GNU Fortran?. + * GNU C required: General Problems. + * GNU Fortran command options: Invoking G77. + * GNU Fortran Front End (FFE): What is GNU Fortran?. + * GOTO statement: Assigned Statement Labels. + * groups of intrinsics: Intrinsics. + * hidden intrinsics: Intrinsics. + * Hollerith constants <1>: Character and Hollerith Constants. + * Hollerith constants <2>: Distensions. + * Hollerith constants <3>: Changes. + * Hollerith constants: Fortran Dialect Options. + * IARGC() intrinsic: Main Program Unit. + * IEEE conformance: Optimize Options. + * IMPLICIT CHARACTER*(*) statement: Disappointments. + * implicit declaration, warning: Warning Options. + * IMPLICIT NONE, similar effect: Warning Options. + * improvements, funding: Funding GNU Fortran. + * in-line code: What is GNU Fortran?. + * in-line compilation: Optimize Options. + * INCLUDE statement <1>: Bug Reporting. + * INCLUDE statement <2>: Directory Options. + * INCLUDE statement: Preprocessor Options. + * included files: Bug Reporting. + * inclusion, directory search paths for: Directory Options. + * incorrect diagnostics: What is GNU Fortran?. + * incorrect error messages: What is GNU Fortran?. + * incorrect use of language: What is GNU Fortran?. + * info, updating directory: Updating Documentation. + * initialization: Actual Bugs. + * initialization of local variables: Code Gen Options. + * INQUIRE statement: Missing Features. + * installation of binaries: Installation of Binaries. + * installation problems: Problems Installing. + * installation trouble: Trouble. + * installing GNU Fortran: Installation. + * installing, checking before: Pre-installation Checks. + * integer constants: Actual Bugs. + * INTEGER type: Types. + * INTEGER*2 support: Missing Features. + * interfacing: Debugging and Interfacing. + * intrinsic functions: Fortran Dialect Options. + * intrinsic subroutines: Fortran Dialect Options. + * intrinsics, %DESCR() <1>: Extensions. + * intrinsics, %DESCR(): Changes. + * intrinsics, %LOC(): Extensions. + * intrinsics, %REF(): Extensions. + * intrinsics, %VAL(): Extensions. + * intrinsics, ABORT(): Fortran Dialect Options. + * intrinsics, AND: Missing Features. + * intrinsics, COMPLEX: Fortran Dialect Options. + * intrinsics, deleted: Intrinsics. + * intrinsics, disabled: Intrinsics. + * intrinsics, enabled: Intrinsics. + * intrinsics, EXIT(): Fortran Dialect Options. + * intrinsics, f2c: Fortran Dialect Options. + * intrinsics, FLUSH(): Fortran Dialect Options. + * intrinsics, Fortran 90: Fortran Dialect Options. + * intrinsics, GETARG(): Main Program Unit. + * intrinsics, groups: Intrinsics. + * intrinsics, groups of: Intrinsics. + * intrinsics, hidden: Intrinsics. + * intrinsics, IARGC(): Main Program Unit. + * intrinsics, LOC(): Extensions. + * intrinsics, MIL-STD 1753: Fortran Dialect Options. + * intrinsics, OR: Missing Features. + * intrinsics, SHIFT: Missing Features. + * intrinsics, side effects of: Fortran Dialect Options. + * intrinsics, SIGNAL(): Fortran Dialect Options. + * intrinsics, SYSTEM(): Fortran Dialect Options. + * intrinsics, UNIX: Fortran Dialect Options. + * intrinsics, VXT: Fortran Dialect Options. + * Introduction: Top. + * invalid assembly code: Bug Criteria. + * invalid input: Bug Criteria. + * KIND= notation: Types. + * known causes of trouble: Trouble. + * language dialect options: Fortran Dialect Options. + * language dialects: Dialects. + * language extensions: Extensions. + * language, incorrect use of: What is GNU Fortran?. + * LANGUAGES: Building gcc. + * large aggregate areas: Actual Bugs. + * large common blocks: But-bugs. + * large initialization: Large Initialization. + * ld can't find _main: But-bugs. + * ld can't find _strtoul: General Problems. + * ld can't find strange names: But-bugs. + * ld command: What is GNU Fortran?. + * ld error for f771: General Problems. + * ld error for user code: But-bugs. + * ld errors: But-bugs. + * legacy code: Collected Fortran Wisdom. + * length of source lines: Fortran Dialect Options. + * letters, lowercase: Case Sensitivity. + * letters, uppercase: Case Sensitivity. + * libf2c library: What is GNU Fortran?. + * libraries: What is GNU Fortran?. + * libraries, containing BLOCK DATA: Block Data and Libraries. + * libraries, libf2c: What is GNU Fortran?. + * line length: Fortran Dialect Options. + * linker errors: But-bugs. + * linking: What is GNU Fortran?. + * linking error for f771: General Problems. + * linking error for user code: But-bugs. + * LOC() intrinsic: Extensions. + * local equivalence areas <1>: Actual Bugs. + * local equivalence areas: Local Equivalence Areas. + * LOGICAL type: Types. + * LOGICAL*1 support: Missing Features. + * loops, speeding up: Optimize Options. + * loops, unrolling: Optimize Options. + * lowercase letters: Case Sensitivity. + * machine code: What is GNU Fortran?. + * main program unit, debugging: Main Program Unit. + * main(): Main Program Unit. + * MAIN__(): Main Program Unit. + * MAP statement: Missing Features. + * maximum stackable size: Maximum Stackable Size. + * memory usage, of compiler: Actual Bugs. + * memory utilization: Large Initialization. + * merging distributions: Merging Distributions. + * messages, warning: Warning Options. + * messages, warning and error: Warnings and Errors. + * MIL-STD 1753: Fortran Dialect Options. + * missing bison: Missing bison?. + * missing makeinfo: Missing makeinfo?. + * missing debug features: Debugging Options. + * mistakes: What is GNU Fortran?. + * modifying g77: Unpacking. + * NAMELIST statement: Extensions. + * naming conflicts: Disappointments. + * native compiler: Installing f77. + * negative forms of options: Invoking G77. + * new users: Getting Started. + * newbies: Getting Started. + * null byte, trailing: Character and Hollerith Constants. + * number of trips: Loops. + * object code: Object Compatibility. + * octal constants: Dialects. + * OPEN statement: Missing Features. + * optimization, better: Better Optimization. + * optimizations, Pentium: Unpacking. + * optimize options: Optimize Options. + * options to control warnings: Warning Options. + * options, -driver <1>: Invoking G77. + * options, -driver: G77 and GCC. + * options, -fGROUP-intrinsics-hide: Overly Convenient Options. + * options, -fcaller-saves: Optimize Options. + * options, -fcase-initcap: Fortran Dialect Options. + * options, -fcase-lower: Fortran Dialect Options. + * options, -fcase-preserve: Fortran Dialect Options. + * options, -fcase-strict-lower: Fortran Dialect Options. + * options, -fcase-strict-upper: Fortran Dialect Options. + * options, -fcase-upper: Fortran Dialect Options. + * options, -fdcp-intrinsics-delete: Fortran Dialect Options. + * options, -fdcp-intrinsics-disable: Fortran Dialect Options. + * options, -fdcp-intrinsics-enable: Fortran Dialect Options. + * options, -fdcp-intrinsics-hide: Fortran Dialect Options. + * options, -fdelayed-branch: Optimize Options. + * options, -fdollar-ok: Fortran Dialect Options. + * options, -fexpensive-optimizations: Optimize Options. + * options, -ff2c-intrinsics-delete: Fortran Dialect Options. + * options, -ff2c-intrinsics-disable: Fortran Dialect Options. + * options, -ff2c-intrinsics-enable: Fortran Dialect Options. + * options, -ff2c-intrinsics-hide: Fortran Dialect Options. + * options, -ff2c-library: Code Gen Options. + * options, -ff90: Fortran Dialect Options. + * options, -ff90-intrinsics-delete: Fortran Dialect Options. + * options, -ff90-intrinsics-disable: Fortran Dialect Options. + * options, -ff90-intrinsics-enable: Fortran Dialect Options. + * options, -ff90-intrinsics-hide: Fortran Dialect Options. + * options, -ff90-not-vxt: Fortran Dialect Options. + * options, -ffast-math: Optimize Options. + * options, -ffixed-line-length-N: Fortran Dialect Options. + * options, -ffloat-store: Optimize Options. + * options, -fforce-addr: Optimize Options. + * options, -fforce-mem: Optimize Options. + * options, -ffree-form: Fortran Dialect Options. + * options, -finit-local-zero <1>: Overly Convenient Options. + * options, -finit-local-zero: Code Gen Options. + * options, -fintrin-case-any: Fortran Dialect Options. + * options, -fintrin-case-initcap: Fortran Dialect Options. + * options, -fintrin-case-lower: Fortran Dialect Options. + * options, -fintrin-case-upper: Fortran Dialect Options. + * options, -fmatch-case-any: Fortran Dialect Options. + * options, -fmatch-case-initcap: Fortran Dialect Options. + * options, -fmatch-case-lower: Fortran Dialect Options. + * options, -fmatch-case-upper: Fortran Dialect Options. + * options, -fmil-intrinsics-delete: Fortran Dialect Options. + * options, -fmil-intrinsics-disable: Fortran Dialect Options. + * options, -fmil-intrinsics-enable: Fortran Dialect Options. + * options, -fmil-intrinsics-hide: Fortran Dialect Options. + * options, -fno-automatic <1>: Overly Convenient Options. + * options, -fno-automatic: Code Gen Options. + * options, -fno-backslash: Fortran Dialect Options. + * options, -fno-common: Code Gen Options. + * options, -fno-f2c <1>: Faster Programs. + * options, -fno-f2c: Code Gen Options. + * options, -fno-fixed-form: Fortran Dialect Options. + * options, -fno-ident: Code Gen Options. + * options, -fno-inline: Optimize Options. + * options, -fno-second-underscore: Code Gen Options. + * options, -fno-ugly-args: Warning Options. + * options, -fno-ugly-init: Warning Options. + * options, -fno-underscoring: Code Gen Options. + * options, -fpack-struct: Code Gen Options. + * options, -fpcc-struct-return: Code Gen Options. + * options, -fpedantic: Warning Options. + * options, -fPIC: Actual Bugs. + * options, -freg-struct-return: Code Gen Options. + * options, -frerun-cse-after-loop: Optimize Options. + * options, -fschedule-insns: Optimize Options. + * options, -fschedule-insns2: Optimize Options. + * options, -fset-g77-defaults: Overall Options. + * options, -fshort-double: Code Gen Options. + * options, -fsource-case-lower: Fortran Dialect Options. + * options, -fsource-case-preserve: Fortran Dialect Options. + * options, -fsource-case-upper: Fortran Dialect Options. + * options, -fstrength-reduce: Optimize Options. + * options, -fsymbol-case-any: Fortran Dialect Options. + * options, -fsymbol-case-initcap: Fortran Dialect Options. + * options, -fsymbol-case-lower: Fortran Dialect Options. + * options, -fsymbol-case-upper: Fortran Dialect Options. + * options, -fsyntax-only: Warning Options. + * options, -fugly <1>: Actual Bugs. + * options, -fugly <2>: Overly Convenient Options. + * options, -fugly: Warning Options. + * options, -funix-intrinsics-delete: Fortran Dialect Options. + * options, -funix-intrinsics-disable: Fortran Dialect Options. + * options, -funix-intrinsics-enable: Fortran Dialect Options. + * options, -funix-intrinsics-hide: Fortran Dialect Options. + * options, -funroll-all-loops: Optimize Options. + * options, -funroll-loops: Optimize Options. + * options, -fversion: Overall Options. + * options, -fvxt-intrinsics-delete: Fortran Dialect Options. + * options, -fvxt-intrinsics-disable: Fortran Dialect Options. + * options, -fvxt-intrinsics-enable: Fortran Dialect Options. + * options, -fvxt-intrinsics-hide: Fortran Dialect Options. + * options, -fvxt-not-f90: Fortran Dialect Options. + * options, -fzeros: Code Gen Options. + * options, -g: Debugging Options. + * options, -I-: Directory Options. + * options, -Idir: Directory Options. + * options, -pedantic: Warning Options. + * options, -pedantic-errors: Warning Options. + * options, -v: G77 and GCC. + * options, -w: Warning Options. + * options, -Waggregate-return: Warning Options. + * options, -Wall: Warning Options. + * options, -Wcomment: Warning Options. + * options, -Wconversion: Warning Options. + * options, -Werror: Warning Options. + * options, -Wformat: Warning Options. + * options, -Wid-clash-LEN: Warning Options. + * options, -Wimplicit: Warning Options. + * options, -Wlarger-than-LEN: Warning Options. + * options, -Wparentheses: Warning Options. + * options, -Wredundant-decls: Warning Options. + * options, -Wshadow: Warning Options. + * options, -Wsurprising: Warning Options. + * options, -Wswitch: Warning Options. + * options, -Wtraditional: Warning Options. + * options, -Wuninitialized: Warning Options. + * options, -Wunused: Warning Options. + * options, adding: Adding Options. + * options, code generation: Code Gen Options. + * options, debugging: Debugging Options. + * options, dialect: Fortran Dialect Options. + * options, directory search: Directory Options. + * options, GNU Fortran command: Invoking G77. + * options, negative forms: Invoking G77. + * options, optimization: Optimize Options. + * options, overall: Overall Options. + * options, overly convenient: Overly Convenient Options. + * options, preprocessor: Preprocessor Options. + * OR intrinsic: Missing Features. + * order of evaluation, side effects: Non-bugs. + * ordering, array: Arrays. + * overall options: Overall Options. + * overflow: Warning Options. + * overly convenient options: Overly Convenient Options. + * packages: Unpacking. + * padding: Actual Bugs. + * PARAMETER statement: Missing Features. + * parameters, unused: Warning Options. + * patch files: General Problems. + * patch files, creating: Merging Distributions. + * pedantic compilation: Pedantic Compilation. + * Pentium optimizations: Unpacking. + * POINTER statement: Missing Features. + * porting, simplify: Simplify Porting. + * pre-installation checks: Pre-installation Checks. + * preprocessor <1>: Bug Reporting. + * preprocessor <2>: Overall Options. + * preprocessor: What is GNU Fortran?. + * preprocessor options: Preprocessor Options. + * prerequisites: Prerequisites. + * printing main source: Actual Bugs. + * printing version information <1>: Overall Options. + * printing version information: What is GNU Fortran?. + * problems installing: Problems Installing. + * procedures: Procedures. + * PROGRAM statement: Main Program Unit. + * programs, cc1: What is GNU Fortran?. + * programs, cc1plus: What is GNU Fortran?. + * programs, compiling: G77 and GCC. + * programs, cpp <1>: Bug Reporting. + * programs, cpp <2>: Preprocessor Options. + * programs, cpp <3>: Overall Options. + * programs, cpp: What is GNU Fortran?. + * programs, f771: What is GNU Fortran?. + * programs, speeding up: Faster Programs. + * projects: Projects. + * questionable instructions: What is GNU Fortran?. + * quick start: Quick Start. + * REAL type: Types. + * recent versions <1>: Changes. + * recent versions: News. + * RECORD statement: Missing Features. + * reporting bugs: Bugs. + * requirements, GNU C: General Problems. + * RETURN statement <1>: Functions. + * RETURN statement: Alternate Returns. + * return type of functions: Functions. + * row-major ordering: Arrays. + * RS/6000 support: Actual Bugs. + * run-time library: What is GNU Fortran?. + * run-time options: Code Gen Options. + * SAVE statement: Code Gen Options. + * search path: Directory Options. + * searching for included files: Directory Options. + * semicolons: Extensions. + * separate distributions: Merging Distributions. + * SGI support: Actual Bugs. + * SHIFT intrinsic: Missing Features. + * side effects: Fortran Dialect Options. + * side effects, order of evaluation: Non-bugs. + * SIGNAL() intrinsic: Fortran Dialect Options. + * signature of procedures: Procedures. + * simplify porting: Simplify Porting. + * slow compiler: Large Initialization. + * source code <1>: Unpacking. + * source code <2>: Case Sensitivity. + * source code <3>: Source Form. + * source code: What is GNU Fortran?. + * source file: What is GNU Fortran?. + * source file form: Fortran Dialect Options. + * source file format <1>: Case Sensitivity. + * source file format <2>: Source Form. + * source file format: Fortran Dialect Options. + * source form: Source Form. + * source tree: Unpacking. + * speed, compiler: Large Initialization. + * speed, of compiler: Actual Bugs. + * speeding up loops: Optimize Options. + * speeding up programs: Faster Programs. + * standard support: Standard Support. + * statement labels, assigned: Assigned Statement Labels. + * statements, ACCEPT: Missing Features. + * statements, ASSIGN: Assigned Statement Labels. + * statements, BLOCK DATA <1>: Disappointments. + * statements, BLOCK DATA: Block Data and Libraries. + * statements, CLOSE: Missing Features. + * statements, COMMON <1>: Disappointments. + * statements, COMMON: Common Blocks. + * statements, DATA <1>: Actual Bugs. + * statements, DATA: Code Gen Options. + * statements, DIMENSION <1>: Adjustable Arrays. + * statements, DIMENSION: Arrays. + * statements, DO <1>: Loops. + * statements, DO: Warning Options. + * statements, ENTRY: Alternate Entry Points. + * statements, EQUIVALENCE: Local Equivalence Areas. + * statements, FORMAT: Missing Features. + * statements, FUNCTION <1>: Functions. + * statements, FUNCTION: Procedures. + * statements, GOTO: Assigned Statement Labels. + * statements, IMPLICIT CHARACTER*(*): Disappointments. + * statements, INCLUDE <1>: Bug Reporting. + * statements, INCLUDE <2>: Directory Options. + * statements, INCLUDE: Preprocessor Options. + * statements, INQUIRE: Missing Features. + * statements, MAP: Missing Features. + * statements, NAMELIST: Extensions. + * statements, OPEN: Missing Features. + * statements, PARAMETER: Missing Features. + * statements, POINTER: Missing Features. + * statements, PROGRAM: Main Program Unit. + * statements, RECORD: Missing Features. + * statements, RETURN <1>: Functions. + * statements, RETURN: Alternate Returns. + * statements, SAVE: Code Gen Options. + * statements, separated by semicolon: Extensions. + * statements, STRUCTURE: Missing Features. + * statements, SUBROUTINE <1>: Alternate Returns. + * statements, SUBROUTINE: Procedures. + * statements, TYPE <1>: Missing Features. + * statements, TYPE: Dialects. + * statements, UNION: Missing Features. + * straight build: Straight Build. + * STRUCTURE statement: Missing Features. + * structures: Actual Bugs. + * SUBROUTINE statement <1>: Alternate Returns. + * SUBROUTINE statement: Procedures. + * subroutines: Alternate Returns. + * subroutines, intrinsic: Fortran Dialect Options. + * suffixes, file name: Overall Options. + * support for gcc versions: Merging Distributions. + * support for ANSI FORTRAN 77: Standard Support. + * support, gdb: But-bugs. + * support, Alpha: Actual Bugs. + * support, COMPLEX: Actual Bugs. + * support, ELF: Actual Bugs. + * support, f77: Non-bugs. + * support, Fortran 90: Missing Features. + * support, RS/6000: Actual Bugs. + * support, SGI: Actual Bugs. + * suppressing warnings: Warning Options. + * symbol names <1>: Names. + * symbol names: Fortran Dialect Options. + * symbol names, transforming: Code Gen Options. + * symbol names, underscores: Code Gen Options. + * syntax checking: Warning Options. + * SYSTEM() intrinsic: Fortran Dialect Options. + * tab characters: Source Form. + * texinfo: Updating Documentation. + * trailing null byte: Character and Hollerith Constants. + * transformation of symbol names: Names. + * transforming symbol names: Code Gen Options. + * translation of user programs: What is GNU Fortran?. + * trips, number of: Loops. + * TYPE statement <1>: Missing Features. + * TYPE statement: Dialects. + * typeless constants: Changes. + * types, COMPLEX: Types. + * types, constants: Constants. + * types, DOUBLE COMPLEX: Types. + * types, DOUBLE PRECISION: Types. + * types, file: Overall Options. + * types, INTEGER: Types. + * types, LOGICAL: Types. + * types, of data: Types. + * types, REAL: Types. + * ugly features <1>: Distensions. + * ugly features: Warning Options. + * undefined behavior: Bug Criteria. + * undefined function value: Bug Criteria. + * undefined reference (_main): But-bugs. + * undefined reference (_strtoul): General Problems. + * underscores: Code Gen Options. + * uninitialized variables <1>: Code Gen Options. + * uninitialized variables: Warning Options. + * UNION statement: Missing Features. + * UNIX intrinsics: Fortran Dialect Options. + * unpacking distributions: Unpacking. + * unrecognized file format: What is GNU Fortran?. + * unresolved reference (various): But-bugs. + * unrolling loops: Optimize Options. + * unsupported warnings: Warning Options. + * unused arguments: Warning Options. + * unused dummies: Warning Options. + * unused parameters: Warning Options. + * unused variables: Warning Options. + * updating info directory: Updating Documentation. + * uppercase letters: Case Sensitivity. + * user-visible changes: Changes. + * variables, initialization of: Code Gen Options. + * variables, uninitialized <1>: Code Gen Options. + * variables, uninitialized: Warning Options. + * variables, unused: Warning Options. + * version information, printing <1>: Overall Options. + * version information, printing: What is GNU Fortran?. + * versions of gcc: Merging Distributions. + * versions, recent <1>: Changes. + * versions, recent: News. + * VXT extensions: Dialects. + * VXT features <1>: Dialects. + * VXT features: Fortran Dialect Options. + * VXT intrinsics: Fortran Dialect Options. + * warning messages: Warning Options. + * warnings: What is GNU Fortran?. + * warnings vs errors: Warnings and Errors. + * warnings, all: Warning Options. + * warnings, extra: Warning Options. + * warnings, implicit declaration: Warning Options. + * warnings, unsupported: Warning Options. + * why separate distributions: Merging Distributions. + * wisdom: Collected Fortran Wisdom. + * writing code: Collected Fortran Wisdom. + * zero byte, trailing: Character and Hollerith Constants. + + diff -rcp2N g77-0.5.17/f/g77.texi g77-0.5.18/f/g77.texi *** g77-0.5.17/f/g77.texi Wed Dec 31 19:00:00 1969 --- g77-0.5.18/f/g77.texi Sat Mar 23 22:05:59 1996 *************** *** 0 **** --- 1,7841 ---- + \input texinfo @c -*-texinfo-*- + @c fix @set inside @example: + @tex + \gdef\set{\begingroup\catcode` =10 \parsearg\setxxx} + \gdef\setyyy#1 #2\endsetyyy{% + \def\temp{#2}% + \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty + \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted. + \fi + \endgroup + } + @end tex + + @c %**start of header + @setfilename g77.info + @c @setfilename useg77.info + @c @setfilename portg77.info + @c To produce the full manual, use the "g77.info" setfilename, and + @c make sure the following do NOT begin with '@c' (and the @clear lines DO) + @set INTERNALS + @set USING + @c To produce a user-only manual, use the "useg77.info" setfilename, and + @c make sure the following does NOT begin with '@c': + @c @clear INTERNALS + @c To produce a porter-only manual, use the "portg77.info" setfilename, + @c and make sure the following does NOT begin with '@c': + @c @clear USING + + @c (For FSF printing, turn on smallbook; that is all that is needed.) + + @c smallbook + + @ifset INTERNALS + @ifset USING + @settitle Using and Porting GNU Fortran + @end ifset + @end ifset + @c seems reasonable to assume at least one of INTERNALS or USING is set... + @ifclear INTERNALS + @settitle Using GNU Fortran + @end ifclear + @ifclear USING + @settitle Porting GNU Fortran + @end ifclear + @c then again, have some fun + @ifclear INTERNALS + @ifclear USING + @settitle Doing Squat with GNU Fortran + @end ifclear + @end ifclear + + @syncodeindex fn cp + @syncodeindex vr cp + @c %**end of header + @setchapternewpage odd + + @ifinfo + This file explains how to use the GNU Fortran system. + + Published by the Free Software Foundation + 59 Temple Place - Suite 330 + Boston, MA 02111-1307 USA + + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of + this manual provided the copyright notice and this permission notice + are preserved on all copies. + + @ignore + Permission is granted to process this file through Tex and print the + results, provided the printed document carries copying permission + notice identical to this one except for the removal of this paragraph + (this paragraph not being relevant to the printed manual). + + @end ignore + Permission is granted to copy and distribute modified versions of this + manual under the conditions for verbatim copying, provided also that the + sections entitled ``GNU General Public License,'' ``Funding for Free + Software,'' and ``Protect Your Freedom---Fight `Look And Feel'@w{}'' are + included exactly as in the original, and provided that the entire + resulting derived work is distributed under the terms of a permission + notice identical to this one. + + Permission is granted to copy and distribute translations of this manual + into another language, under the above conditions for modified versions, + except that the sections entitled ``GNU General Public License,'' + ``Funding for Free Software,'' and ``Protect Your Freedom---Fight `Look + And Feel'@w{}'', and this permission notice, may be included in + translations approved by the Free Software Foundation instead of in the + original English. + @end ifinfo + + Contributed by James Craig Burley (@code{burley@@gnu.ai.mit.edu}). + Inspired by a first pass at translating @code{g77-0.5.16/f/DOC} that + was contributed to Craig by David Ronis (@code{ronis@@onsager.chem.mcgill.ca}). + + @finalout + @titlepage + @comment The title is printed in a large font. + @center @titlefont{Using GNU Fortran} + @sp 2 + @center James Craig Burley + @sp 3 + @center Last updated 1996-03-23 + @sp 1 + @c The version number appears some more times in this file. + + @center for version 0.5.18 + @page + @vskip 0pt plus 1filll + Copyright @copyright{} 1995, 1996 Free Software Foundation, Inc. + @sp 2 + For GNU Fortran Version 0.5.18* + @sp 1 + Published by the Free Software Foundation @* + 59 Temple Place - Suite 330@* + Boston, MA 02111-1307, USA@* + @c Last printed ??ber, 19??.@* + @c Printed copies are available for $? each.@* + @c ISBN ??? + @sp 1 + Permission is granted to make and distribute verbatim copies of + this manual provided the copyright notice and this permission notice + are preserved on all copies. + + Permission is granted to copy and distribute modified versions of this + manual under the conditions for verbatim copying, provided also that the + sections entitled ``GNU General Public License,'' ``Funding for Free + Software,'' and ``Protect Your Freedom---Fight `Look And Feel'@w{}'' are + included exactly as in the original, and provided that the entire + resulting derived work is distributed under the terms of a permission + notice identical to this one. + + Permission is granted to copy and distribute translations of this manual + into another language, under the above conditions for modified versions, + except that the sections entitled ``GNU General Public License,'' + ``Funding for Free Software,'' and ``Protect Your Freedom---Fight `Look + And Feel'@w{}'', and this permission notice, may be included in + translations approved by the Free Software Foundation instead of in the + original English. + @end titlepage + @page + + @ifinfo + + @node Top, Copying,, (DIR) + @top Introduction + @cindex Introduction + + @ifset INTERNALS + @ifset USING + This manual documents how to run, install and port the GNU Fortran + compiler, as well as its new features and incompatibilities, and how to + report bugs. It corresponds to GNU Fortran version 0.5.18. + @end ifset + @end ifset + + @ifclear INTERNALS + This manual documents how to run and install the GNU Fortran compiler, + as well as its new features and incompatibilities, and how to report + bugs. It corresponds to GNU Fortran version 0.5.18. + @end ifclear + @ifclear USING + This manual documents how to port the GNU Fortran compiler, + as well as its new features and incompatibilities, and how to report + bugs. It corresponds to GNU Fortran version 0.5.18. + @end ifclear + + @end ifinfo + @menu + * Copying:: GNU General Public License says + how you can copy and share GNU Fortran. + * Contributors:: People who have contributed to GNU Fortran. + * Funding:: How to help assure continued work for free software. + * Funding GNU Fortran:: How to help assure continued work on GNU Fortran. + * Look and Feel:: Protect your freedom---fight ``look and feel''. + @ifset USING + * Getting Started:: Finding your way around this manual. + * What is GNU Fortran?:: How @code{g77} fits into the universe. + * G77 and GCC:: You can compile Fortran, C, or other programs. + * Invoking G77:: Command options supported by @code{g77}. + * News:: News about recent releases of @code{g77}. + * Changes:: User-visible changes to recent releases of @code{g77}. + * Language:: The GNU Fortran language. + * Installation:: How to configure, compile and install GNU Fortran. + * Debugging and Interfacing:: How @code{g77} generates code. + * Collected Fortran Wisdom:: How to avoid Trouble. + * Trouble:: If you have trouble with GNU Fortran. + * Open Questions:: Things we'd like to know. + * Bugs:: How, why, and where to report bugs. + * Service:: How to find suppliers of support for GNU Fortran. + @end ifset + @ifset INTERNALS + * Adding Options:: Guidance on teaching @code{g77} about new options. + * Projects:: Projects for @code{g77} internals hackers. + @end ifset + + * Index:: Index of concepts and symbol names. + @end menu + + @node Copying + @unnumbered GNU GENERAL PUBLIC LICENSE + @center Version 2, June 1991 + + @display + Copyright @copyright{} 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. + @end display + + @unnumberedsec Preamble + + The licenses for most software are designed to take away your + freedom to share and change it. By contrast, the GNU General Public + License is intended to guarantee your freedom to share and change free + software---to make sure the software is free for all its users. This + General Public License applies to most of the Free Software + Foundation's software and to any other program whose authors commit to + using it. (Some other Free Software Foundation software is covered by + the GNU Library General Public License instead.) You can apply it to + your programs, too. + + When we speak of free software, we are referring to freedom, not + price. Our General Public Licenses are designed to make sure that you + have the freedom to distribute copies of free software (and charge for + this service if you wish), that you receive source code or can get it + if you want it, that you can change the software or use pieces of it + in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid + anyone to deny you these rights or to ask you to surrender the rights. + These restrictions translate to certain responsibilities for you if you + distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether + gratis or for a fee, you must give the recipients all the rights that + you have. You must make sure that they, too, receive or can get the + source code. And you must show them these terms so they know their + rights. + + We protect your rights with two steps: (1) copyright the software, and + (2) offer you this license which gives you legal permission to copy, + distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain + that everyone understands that there is no warranty for this free + software. If the software is modified by someone else and passed on, we + want its recipients to know that what they have is not the original, so + that any problems introduced by others will not reflect on the original + authors' reputations. + + Finally, any free program is threatened constantly by software + patents. We wish to avoid the danger that redistributors of a free + program will individually obtain patent licenses, in effect making the + program proprietary. To prevent this, we have made it clear that any + patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and + modification follow. + + @iftex + @unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + @end iftex + @ifinfo + @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + @end ifinfo + + @enumerate 0 + @item + This License applies to any program or other work which contains + a notice placed by the copyright holder saying it may be distributed + under the terms of this General Public License. The ``Program'', below, + refers to any such program or work, and a ``work based on the Program'' + means either the Program or any derivative work under copyright law: + that is to say, a work containing the Program or a portion of it, + either verbatim or with modifications and/or translated into another + language. (Hereinafter, translation is included without limitation in + the term ``modification''.) Each licensee is addressed as ``you''. + + Activities other than copying, distribution and modification are not + covered by this License; they are outside its scope. The act of + running the Program is not restricted, and the output from the Program + is covered only if its contents constitute a work based on the + Program (independent of having been made by running the Program). + Whether that is true depends on what the Program does. + + @item + You may copy and distribute verbatim copies of the Program's + source code as you receive it, in any medium, provided that you + conspicuously and appropriately publish on each copy an appropriate + copyright notice and disclaimer of warranty; keep intact all the + notices that refer to this License and to the absence of any warranty; + and give any other recipients of the Program a copy of this License + along with the Program. + + You may charge a fee for the physical act of transferring a copy, and + you may at your option offer warranty protection in exchange for a fee. + + @item + You may modify your copy or copies of the Program or any portion + of it, thus forming a work based on the Program, and copy and + distribute such modifications or work under the terms of Section 1 + above, provided that you also meet all of these conditions: + + @enumerate a + @item + You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + @item + You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + @item + If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + @end enumerate + + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the Program, + and can be reasonably considered independent and separate works in + themselves, then this License, and its terms, do not apply to those + sections when you distribute them as separate works. But when you + distribute the same sections as part of a whole which is a work based + on the Program, the distribution of the whole must be on the terms of + this License, whose permissions for other licensees extend to the + entire whole, and thus to each and every part regardless of who wrote it. + + Thus, it is not the intent of this section to claim rights or contest + your rights to work written entirely by you; rather, the intent is to + exercise the right to control the distribution of derivative or + collective works based on the Program. + + In addition, mere aggregation of another work not based on the Program + with the Program (or with a work based on the Program) on a volume of + a storage or distribution medium does not bring the other work under + the scope of this License. + + @item + You may copy and distribute the Program (or a work based on it, + under Section 2) in object code or executable form under the terms of + Sections 1 and 2 above provided that you also do one of the following: + + @enumerate a + @item + Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + @item + Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + @item + Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + @end enumerate + + The source code for a work means the preferred form of the work for + making modifications to it. For an executable work, complete source + code means all the source code for all modules it contains, plus any + associated interface definition files, plus the scripts used to + control compilation and installation of the executable. However, as a + special exception, the source code distributed need not include + anything that is normally distributed (in either source or binary + form) with the major components (compiler, kernel, and so on) of the + operating system on which the executable runs, unless that component + itself accompanies the executable. + + If distribution of executable or object code is made by offering + access to copy from a designated place, then offering equivalent + access to copy the source code from the same place counts as + distribution of the source code, even though third parties are not + compelled to copy the source along with the object code. + + @item + You may not copy, modify, sublicense, or distribute the Program + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense or distribute the Program is + void, and will automatically terminate your rights under this License. + However, parties who have received copies, or rights, from you under + this License will not have their licenses terminated so long as such + parties remain in full compliance. + + @item + You are not required to accept this License, since you have not + signed it. However, nothing else grants you permission to modify or + distribute the Program or its derivative works. These actions are + prohibited by law if you do not accept this License. Therefore, by + modifying or distributing the Program (or any work based on the + Program), you indicate your acceptance of this License to do so, and + all its terms and conditions for copying, distributing or modifying + the Program or works based on it. + + @item + Each time you redistribute the Program (or any work based on the + Program), the recipient automatically receives a license from the + original licensor to copy, distribute or modify the Program subject to + these terms and conditions. You may not impose any further + restrictions on the recipients' exercise of the rights granted herein. + You are not responsible for enforcing compliance by third parties to + this License. + + @item + If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent issues), + conditions are imposed on you (whether by court order, agreement or + otherwise) that contradict the conditions of this License, they do not + excuse you from the conditions of this License. If you cannot + distribute so as to satisfy simultaneously your obligations under this + License and any other pertinent obligations, then as a consequence you + may not distribute the Program at all. For example, if a patent + license would not permit royalty-free redistribution of the Program by + all those who receive copies directly or indirectly through you, then + the only way you could satisfy both it and this License would be to + refrain entirely from distribution of the Program. + + If any portion of this section is held invalid or unenforceable under + any particular circumstance, the balance of the section is intended to + apply and the section as a whole is intended to apply in other + circumstances. + + It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of any + such claims; this section has the sole purpose of protecting the + integrity of the free software distribution system, which is + implemented by public license practices. Many people have made + generous contributions to the wide range of software distributed + through that system in reliance on consistent application of that + system; it is up to the author/donor to decide if he or she is willing + to distribute software through any other system and a licensee cannot + impose that choice. + + This section is intended to make thoroughly clear what is believed to + be a consequence of the rest of this License. + + @item + If the distribution and/or use of the Program is restricted in + certain countries either by patents or by copyrighted interfaces, the + original copyright holder who places the Program under this License + may add an explicit geographical distribution limitation excluding + those countries, so that distribution is permitted only in or among + countries not thus excluded. In such case, this License incorporates + the limitation as if written in the body of this License. + + @item + The Free Software Foundation may publish revised and/or new versions + of the General Public License from time to time. Such new versions will + be similar in spirit to the present version, but may differ in detail to + address new problems or concerns. + + Each version is given a distinguishing version number. If the Program + specifies a version number of this License which applies to it and ``any + later version'', you have the option of following the terms and conditions + either of that version or of any later version published by the Free + Software Foundation. If the Program does not specify a version number of + this License, you may choose any version ever published by the Free Software + Foundation. + + @item + If you wish to incorporate parts of the Program into other free + programs whose distribution conditions are different, write to the author + to ask for permission. For software which is copyrighted by the Free + Software Foundation, write to the Free Software Foundation; we sometimes + make exceptions for this. Our decision will be guided by the two goals + of preserving the free status of all derivatives of our free software and + of promoting the sharing and reuse of software generally. + + @iftex + @heading NO WARRANTY + @end iftex + @ifinfo + @center NO WARRANTY + @end ifinfo + + @item + BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY + FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN + OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES + PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED + OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS + TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE + PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, + REPAIR OR CORRECTION. + + @item + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING + WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR + REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, + INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING + OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED + TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY + YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER + PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE + POSSIBILITY OF SUCH DAMAGES. + @end enumerate + + @iftex + @heading END OF TERMS AND CONDITIONS + @end iftex + @ifinfo + @center END OF TERMS AND CONDITIONS + @end ifinfo + + @page + @unnumberedsec How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest + possible use to the public, the best way to achieve this is to make it + free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest + to attach them to the start of each source file to most effectively + convey the exclusion of warranty; and each file should have at least + the ``copyright'' line and a pointer to where the full notice is found. + + @smallexample + @var{one line to give the program's name and a brief idea of what it does.} + Copyright (C) 19@var{yy} @var{name of author} + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + 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. + @end smallexample + + Also add information on how to contact you by electronic and paper mail. + + If the program is interactive, make it output a short notice like this + when it starts in an interactive mode: + + @smallexample + Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author} + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details + type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + @end smallexample + + The hypothetical commands @samp{show w} and @samp{show c} should show + the appropriate parts of the General Public License. Of course, the + commands you use may be called something other than @samp{show w} and + @samp{show c}; they could even be mouse-clicks or menu items---whatever + suits your program. + + You should also get your employer (if you work as a programmer) or your + school, if any, to sign a ``copyright disclaimer'' for the program, if + necessary. Here is a sample; alter the names: + + @smallexample + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + @var{signature of Ty Coon}, 1 April 1989 + Ty Coon, President of Vice + @end smallexample + + This General Public License does not permit incorporating your program into + proprietary programs. If your program is a subroutine library, you may + consider it more useful to permit linking proprietary applications with the + library. If this is what you want to do, use the GNU Library General + Public License instead of this License. + + @node Contributors + @unnumbered Contributors to GNU Fortran + @cindex contributors + @cindex credits + + In addition to James Craig Burley, who wrote the front end, + many people have helped create and improve GNU Fortran. + + @itemize @bullet + @item + The packaging and compiler portions of GNU Fortran are based largely + on the GNU CC compiler. + @xref{Contributors,,Contributors to GNU CC,gcc,Using and Porting GNU CC}, + for more information. + + @item + The run-time library used by GNU Fortran is a minor repackaging + of the @code{libf2c} library (combined from the @code{libF77} and + @code{libI77} libraries) provided as part of @code{f2c}, available for + free from @code{netlib} sites on the Internet. + + @item + Cygnus Support and The Free Software Foundation contributed + significant money and/or equipment to Craig's efforts. + + @item + The following individuals served as alpha testers prior to @code{g77}'s + public release. This work consisted of testing, researching, sometimes + debugging, and occasionally providing small amounts of code and fixes + for @code{g77}, plus offering plenty of helpful advice to Craig: + + @itemize @w{} + @item + Jonathan Corbet + @item + Dr.@: Mark Fernyhough + @item + Takafumi Hayashi (The University of AIzu)---@code{takafumi@@u-aizu.ac.jp} + @item + Kate Hedstrom + @item + Michel Kern (INRIA and Rice University)---@code{Michel.Kern@@inria.fr} + @item + Dr.@: A. O. V. Le Blanc + @item + Dave Love + @item + Rick Lutowski + @item + Toon Moene + @item + Rick Niles + @item + Derk Reefman + @item + Wayne K. Schroll + @item + Bill Thorson + @item + Pedro A. M. Vazquez + @item + Ian Watson + @end itemize + + @item + Scott Snyder (@code{snyder@@d0sgif.fnal.gov}) + provided the patch to add rudimentary support + for @samp{INTEGER*1}, @samp{INTEGER*2}, and + @samp{LOGICAL*1}. + This inspired Craig to add further support, + even though the resulting support + would still be incomplete, because version 0.6 is still + a ways off. + + @item + David Ronis (@code{ronis@@onsager.chem.mcgill.ca}) inspired + and encouraged Craig to rewrite the documentation in texinfo + format by contributing a first pass at a translation of the + old @code{g77-0.5.16/f/DOC} file. + + @item + Toon Moene (@code{toon@@moene.indiv.nluug.nl}) performed + some analysis of generated code as part of an overall project + to improve @code{g77} code generation to at least be as good + as @code{f2c} used in conjunction with @code{gcc}. + So far, this has resulted in the three, somewhat + experimental, options added by @code{g77} to the @code{gcc} + compiler and its back end. + + @item + Many other individuals have helped debug, test, and improve @code{g77} + over the past several years, and undoubtedly more people + will be doing so in the future. + If you have done so, and would like + to see your name listed in the above list, please ask! + The default is that people wish to remain anonymous. + @end itemize + + @node Funding + @chapter Funding Free Software + + If you want to have more free software a few years from now, it makes + sense for you to help encourage people to contribute funds for its + development. The most effective approach known is to encourage + commercial redistributors to donate. + + Users of free software systems can boost the pace of development by + encouraging for-a-fee distributors to donate part of their selling price + to free software developers---the Free Software Foundation, and others. + + The way to convince distributors to do this is to demand it and expect + it from them. So when you compare distributors, judge them partly by + how much they give to free software development. Show distributors + they must compete to be the one who gives the most. + + To make this approach work, you must insist on numbers that you can + compare, such as, ``We will donate ten dollars to the Frobnitz project + for each disk sold.'' Don't be satisfied with a vague promise, such as + ``A portion of the profits are donated,'' since it doesn't give a basis + for comparison. + + Even a precise fraction ``of the profits from this disk'' is not very + meaningful, since creative accounting and unrelated business decisions + can greatly alter what fraction of the sales price counts as profit. + If the price you pay is $50, ten percent of the profit is probably + less than a dollar; it might be a few cents, or nothing at all. + + Some redistributors do development work themselves. This is useful too; + but to keep everyone honest, you need to inquire how much they do, and + what kind. Some kinds of development make much more long-term + difference than others. For example, maintaining a separate version of + a program contributes very little; maintaining the standard version of a + program for the whole community contributes much. Easy new ports + contribute little, since someone else would surely do them; difficult + ports such as adding a new CPU to the GNU C compiler contribute more; + major new features or packages contribute the most. + + By establishing the idea that supporting further development is ``the + proper thing to do'' when distributing free software for a fee, we can + assure a steady flow of resources into making more free software. + + @display + Copyright (C) 1994 Free Software Foundation, Inc. + Verbatim copying and redistribution of this section is permitted + without royalty; alteration is not permitted. + @end display + + @node Funding GNU Fortran + @chapter Funding GNU Fortran + @cindex funding improvements + @cindex improvements, funding + + Work on GNU Fortran is still being done mostly by its author, + James Craig Burley (@code{burley@@gnu.ai.mit.edu}), who is a volunteer + for, not an employee of, the Free Software Foundation (FSF). + As with other GNU software, funding is important because it can pay for + needed equipment, personnel, and so on. + + @cindex FSF, funding the + @cindex funding the FSF + The FSF provides information on the best way to fund ongoing + development of GNU software (such as GNU Fortran) in documents + such as the ``GNUS Bulletin''. + Email @code{gnu@@prep.ai.mit.edu} for information on funding the FSF. + + To fund specific GNU Fortran work in particular, the FSF might + provide a means for that, but the FSF does not provide direct funding + to the author of GNU Fortran to continue his work. The FSF has + employee salary restrictions that can be incompatible with the + financial needs of some volunteers, who therefore choose to + remain volunteers and thus be able to be free to do contract work + and otherwise make their own schedules for doing GNU work. + + Still, funding the FSF at least indirectly benefits work + on specific projects like GNU Fortran because it ensures the + continuing operation of the FSF offices, their workstations, their + network connections, and so on, which are invaluable to volunteers. + (Similarly, hiring Cygnus Support can help a project like GNU + Fortran---Cygnus has been a long-time donor of equipment usage to the author + of GNU Fortran, and this too has been invaluable---@xref{Contributors}.) + + Currently, the only way to directly fund the author of GNU Fortran + in his work on that project is to hire him for the work you want + him to do, or donate money to him. + Several people have done this + already, with the result that he has not needed to immediately find + contract work on a few occasions. + If more people did this, he + would be able to plan on not doing contract work for many months and + could thus devote that time to work on projects (such as the planned + changes for @code{g77-0.6}) that require longer timeframes to complete. + For the latest information on the status of the author, do + @samp{finger -l burley@@gnu.ai.mit.edu}, i.e. access @code{burley}'s + @code{.plan} file just as you would @code{fortran}'s to get @code{g77} + status (except there's no public @code{ftp} access to @code{burley}'s + @code{.plan} file---you can email him asking for it). + + Another important way to support work on GNU Fortran is to volunteer + to help out. + Work is needed on documentation, testing, porting + to various machines, and in some cases, coding (although major + changes planned for version 0.6 make it difficult to add manpower to this + area). + Email @code{fortran@@gnu.ai.mit.edu} to volunteer for this work. + + @xref{Funding,,Funding Free Software}, for more information. + + @node Look and Feel + @chapter Protect Your Freedom---Fight ``Look And Feel'' + @c the above chapter heading overflows onto the next line. --mew 1/26/93 + + To preserve the ability to write free software, including replacements + for proprietary software, authors must be free to replicate the + user interface to which users of existing software have become + accustomed. + + @xref{Look and Feel,,Protect Your Freedom---Fight ``Look And Feel'', + gcc,Using and Porting GNU CC}, for more information. + + @node Getting Started + @chapter Getting Started + @cindex getting started + @cindex new users + @cindex newbies + @cindex beginners + + If you don't need help getting started reading the portions + of this manual that are most important to you, you should skip + this portion of the manual. + + If you are new to compilers, especially Fortran compilers, or + new to how compilers are structured under UNIX and UNIX-like + systems, you'll want to see @ref{What is GNU Fortran?}. + + If you are new to GNU compilers, or have used only one GNU + compiler in the past and not had to delve into how it lets + you manage various versions and configurations of @code{gcc}, + you should see @ref{G77 and GCC}. + + Everyone except experienced @code{g77} users should + see @ref{Invoking G77}. + + If you're acquainted with previous versions of @code{g77}, + you should see @ref{News}. + Further, if you've actually used previous versions of @code{g77}, + especially if you've written or modified Fortran code to + be compiled by previous versions of @code{g77}, you + should see @ref{Changes}. + + If you intend to write or otherwise compile code that is + not already strictly conforming ANSI FORTRAN 77---and this + is probably everyone---you should see @ref{Language}. + + If you don't already have @code{g77} installed on your + system, you must see @ref{Installation}. + + If you run into trouble getting Fortran code to compile, + link, run, or work properly, you might find answers + if you see @ref{Debugging and Interfacing}, + see @ref{Collected Fortran Wisdom}, + and see @ref{Trouble}. + You might also find that the problems you are encountering + are bugs in @code{g77}---see @ref{Bugs}, for information on + reporting them, after reading the other material. + + If you need further help with @code{g77}, or with + freely redistributable software in general, + see @ref{Service}. + + If you would like to help the @code{g77} project, + see @ref{Funding GNU Fortran}, for information on + helping financially, and see @ref{Projects}, for information + on helping in other ways. + + If you're generally curious about the future of + @code{g77}, see @ref{Projects}. + If you're curious about its past, + see @ref{Contributors}, + and see @ref{Funding GNU Fortran}. + + To see a few of the questions maintainers of @code{g77} have, + and that you might be able to answer, + see @ref{Open Questions}. + + @ifset USING + @node What is GNU Fortran? + @chapter What is GNU Fortran? + @cindex concepts, basic + @cindex basic concepts + + GNU Fortran, or @code{g77}, is designed initially as a free replacement + for, or alternative to, the UNIX @code{f77} command. + (Similarly, @code{gcc} is designed as a replacement + for the UNIX @code{cc} command.) + + @code{g77} also is designed to fit in well with the other + fine GNU compilers and tools. + + Sometimes these design goals conflict---in such cases, resolution + often is made in favor of fitting in well with Project GNU. + These cases are usually identified in the appropriate + sections of this manual. + + @cindex compilers + As compilers, @code{g77}, @code{gcc}, and @code{f77} + share the following characteristics: + + @itemize @bullet + @cindex source code + @cindex file, source + @cindex code, source + @cindex source file + @item + They read a user's program, stored in a file and + containing instructions written in the appropriate + language (Fortran, C, and so on). + This file contains @dfn{source code}. + + @cindex translation of user programs + @cindex machine code + @cindex code, machine + @cindex mistakes + @item + They translate the user's program into instructions + a computer can carry out more quickly than it takes + to translate the instructions in the first place. + These instructions are called @dfn{machine code}---code + designed to be efficiently translated and processed + by a machine such as a computer. + Humans usually aren't as good writing machine code + as they are at writing Fortran or C, because + it is easy to make tiny mistakes writing machine code. + When writing Fortran or C, it is easy + to make big mistakes. + + @cindex debugger + @cindex bugs + @cindex gdb command + @cindex commands, gdb + @item + They provide information in the generated machine code + that can make it easier to find bugs in the program + (using a debugging tool, called a @dfn{debugger}, + such as @code{gdb}). + + @cindex libraries + @cindex linking + @cindex ld command + @cindex commands, ld + @item + They locate and gather machine code already generated + to perform actions requested by statements in + the user's program. + This machine code is organized + into @dfn{libraries} and is located and gathered + during the @dfn{link} phase of the compilation + process. + (Linking often is thought of as a separate + step, because it can be directly invoked via the + @code{ld} command. + However, the @code{g77} and @code{gcc} + commands, as with most compiler commands, automatically + perform the linking step by calling on @code{ld} + directly, unless asked to not do so by the user.) + + @cindex language, incorrect use of + @cindex incorrect use of language + @item + They attempt to diagnose cases where the user's + program contains incorrect usages of the language. + The @dfn{diagnostics} produced by the compiler + indicate the problem and the location in the user's + source file where the problem was first noticed. + The user can use this information to locate and + fix the problem. + @cindex diagnostics, incorrect + @cindex incorrect diagnostics + @cindex error messages, incorrect + @cindex incorrect error messages + (Sometimes an incorrect usage + of the language leads to a situation where the + compiler can no longer make any sense of what + follows---while a human might be able to---and + thus ends up complaining about many ``problems'' + it encounters that, in fact, stem from just one + problem, usually the first one reported.) + + @cindex warnings + @cindex questionable instructions + @item + They attempt to diagnose cases where the user's + program contains a correct usage of the language, + but instructs the computer to do something questionable. + These diagnostics often are in the form of @dfn{warnings}, + instead of the @dfn{errors} that indicate incorrect + usage of the language. + @end itemize + + How these actions are performed is generally under the + control of the user. + Using command-line options, the user can specify + how persnickety the compiler is to be regarding + the program (whether to diagnose questionable usage + of the language), how much time to spend making + the generated machine code run faster, and so on. + + @cindex components of g77 + @cindex g77, components of + @code{g77} consists of several components: + + @cindex gcc command + @cindex commands, gcc + @itemize @bullet + @item + A modified version of the @code{gcc} command, which also might be + installed as the system's @code{cc} command. + (In many cases, @code{cc} refers to the + system's ``native'' C compiler, which + might be a non-GNU compiler, or an older version + of @code{gcc} considered more stable or that is + used to build the operating system kernel.) + + @cindex g77 command + @cindex commands, g77 + @item + The @code{g77} command itself, which also might be installed as the + system's @code{f77} command. + + @cindex libf2c library + @cindex libraries, libf2c + @cindex run-time library + @item + The @code{libf2c} run-time library. + This library contains the machine code needed to support + capabilities of the Fortran language that are not directly + provided by the machine code generated by the @code{g77} + compilation phase. + + @cindex f771 program + @cindex programs, f771 + @cindex assembler + @cindex as command + @cindex commands, as + @cindex assembly code + @cindex code, assembly + @item + The compiler itself, internally named @code{f771}. + + Note that @code{f771} does not generate machine code directly---it + generates @dfn{assembly code} that is a more readable form + of machine code, leaving the conversion to actual machine code + to an @dfn{assembler}, usually named @code{as}. + @end itemize + + @code{gcc} is often thought of as ``the C compiler'' only, + but it does more than that. + Based on command-line options and the names given for files + on the command line, @code{gcc} determines which actions to perform, including + preprocessing, compiling (in a variety of possible languages), assembling, + and linking. + + @cindex driver, gcc command as + @cindex gcc command as driver + @cindex executable file + @cindex files, executable + @cindex cc1 program + @cindex programs, cc1 + @cindex preprocessor + @cindex cpp program + @cindex programs, cpp + For example, the command @samp{gcc foo.c} @dfn{drives} the file + @samp{foo.c} through the preprocessor @samp{cpp}, then + the C compiler (internally named + @code{cc1}), then the assembler (usually @code{as}), then the linker + (@code{ld}), producing an executable program named @file{a.out} (on + UNIX systems). + + @cindex cc1plus program + @cindex programs, cc1plus + As another example, the command @samp{gcc foo.cc} would do much the same as + @samp{gcc foo.c}, but instead of using the C compiler named @code{cc1}, + @code{gcc} would use the C++ compiler (named @code{cc1plus}). + + @cindex f771 program + @cindex programs, f771 + In a GNU Fortran installation, @code{gcc} recognizes Fortran source + files by name just like it does C and C++ source files. + It knows to use the Fortran compiler named @code{f771}, instead of + @code{cc1} or @code{cc1plus}, to compile Fortran files. + + @cindex gcc not recognizing Fortran source + @cindex unrecognized file format + @cindex file format not recognized + Non-Fortran-related operation of @code{gcc} is generally + unaffected by installing the GNU Fortran version of @code{gcc}. + However, without the installed version of @code{gcc} being the + GNU Fortran version, @code{gcc} will not be able to compile + and link Fortran programs---and since @code{g77} uses @code{gcc} + to do most of the actual work, neither will @code{g77}! + + @cindex g77 command + @cindex commands, g77 + The @code{g77} command is essentially just a front-end for + the @code{gcc} command. + Fortran users will normally use @code{g77} instead of @code{gcc}, + because @code{g77} + knows how to specify the libraries needed to link with Fortran programs + (@code{libf2c} and @code{lm}). + @code{g77} can still compile and link programs and + source files written in other languages, just like @code{gcc}. + + @cindex printing version information + @cindex version information, printing + The command @samp{g77 -v} is a quick + way to display lots of version information for the various programs + used to compile a typical preprocessed Fortran source file---this + produces much more output than @samp{gcc -v} currently does. + (It also produces an error message near the end of the output, + a diagnostic from the linker, usually @code{ld}---you can safely + ignore this error, but do include the entire output with any + bug report you submit.) + In the output of this command, the line beginning @samp{GNU Fortran Front + End} identifies the version number of GNU Fortran; immediately + preceding that line is a line identifying the version of @code{gcc} + with which that version of @code{g77} was built. + + @cindex libf2c library + @cindex libraries, libf2c + The @code{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. + + @cindex in-line code + @cindex code, in-line + For example, while code generated by @code{g77} is likely + to do additions, subtractions, and multiplications @dfn{in line}---in + the actual compiled code---it is not likely to do trigonometric + functions this way. + + Instead, operations like trigonometric + functions are compiled by the @code{f771} compiler + (invoked by @code{g77} when compiling Fortran code) into machine + code that, when run, calls on functions in @code{libf2c}, so + @code{libf2c} must be linked with almost every useful program + having any component compiled by GNU Fortran. + (As mentioned above, the @code{g77} command takes + care of all this for you.) + + The @code{f771} program represents most of what is unique to GNU Fortran. + While the @code{libf2c} component is really part of @code{f2c}, a + free Fortran-to-C converter distributed by Bellcore (AT&T), and + the @code{g77} command is just a small front-end to @code{gcc}, + @code{f771} is a combination of two rather + large chunks of code. + + @cindex GNU Back End (GBE) + @cindex GBE + @cindex gcc back end + @cindex back end, gcc + @cindex code generator + One chunk is the so-called @dfn{GNU Back End}, or GBE, + which knows how to generate fast code for a wide variety of processors. + The same GBE is used by the C, C++, and Fortran compiler programs @code{cc1}, + @code{cc1plus}, and @code{f771}, plus others. + Often the GBE is referred to as the ``gcc back end'' or + even just ``gcc''---in this manual, the term GBE is used + whenever the distinction is important. + + @cindex GNU Fortran Front End (FFE) + @cindex FFE + @cindex g77 front end + @cindex front end, g77 + The other chunk of @code{f771} is the + majority of what is unique about GNU Fortran---the code that knows how + to interpret Fortran programs to determine what they are intending to + do, and then communicate that knowledge to the GBE for actual compilation + of those programs. + This chunk is called the @dfn{Fortran Front End} (FFE). + The @code{cc1} and @code{cc1plus} programs have their own front ends, + for the C and C++ languages, respectively. + These fronts ends are responsible for diagnosing + incorrect usage of their respective languages by the + programs the process, and are responsible for most of + the warnings about questionable constructs as well. + (The GBE handles producing some warnings, like those + concerning possible references to undefined variables.) + + Because so much is shared among the compilers for various languages, + much of the behavior and many of the user-selectable options for these + compilers are similar. + For example, diagnostics (error messages and + warnings) are similar in appearance; command-line + options like @samp{-Wall} have generally similar effects; and the quality + of generated code (in terms of speed and size) is roughly similar + (since that work is done by the shared GBE). + + @node G77 and GCC + @chapter Compile Fortran, C, or Other Programs + @cindex compiling programs + @cindex programs, compiling + + @cindex gcc command + @cindex commands, gcc + A GNU Fortran installation includes a modified version of the @code{gcc} + command. + + In a non-Fortran installation, @code{gcc} recognizes C, C++, + and Objective-C source files. + + In a GNU Fortran installation, @code{gcc} also recognizes Fortran source + files and accepts Fortran-specific command-line options, plus some + command-line options that are designed to cater to Fortran users + but apply to other languages as well. + + @xref{G++ and GCC,,Compile C; C++; or Objective-C,gcc,Using and Porting GNU CC}, + for information on the way different languages are handled + by the GNU CC compiler (@code{gcc}). + + @cindex g77 command + @cindex commands, g77 + Also provided as part of GNU Fortran is the @code{g77} command. + The @code{g77} command is designed to make compiling and linking Fortran + programs somewhat easier than when using the @code{gcc} command for + these tasks. + It does this by analyzing the command line somewhat and changing it + appropriately before submitting it to the @code{gcc} command. + + @cindex -v option + @cindex g77 options, -v + @cindex options, -v + @cindex -@w{}-driver option + @cindex g77 options, --driver + @cindex options, --driver + Use the @samp{-v} option with @code{g77} + to see what is going on---the first line of output is the invocation + of the @code{gcc} command. + Use @samp{--driver=true} to disable actual invocation + of @code{gcc} (this works because @samp{true} is the name of a + UNIX command that simply returns success status). + + @node Invoking G77 + @chapter GNU Fortran Command Options + @cindex GNU Fortran command options + @cindex command options + @cindex options, GNU Fortran command + + The @code{g77} command supports all the options supported by the + @code{gcc} command. + @xref{Invoking GCC,,GNU CC Command Options,gcc,Using and Porting GNU CC}, + for information + on the non-Fortran-specific aspects of the @code{gcc} command (and, + therefore, the @code{g77} command). + + The @code{g77} command supports one option not supported by + the @code{gcc} command: + + @table @code + @cindex -@w{}-driver option + @cindex g77 options, driver + @cindex options, --driver + @item --driver=@var{command} + Specifies that @var{command}, rather than @code{gcc}, is to + be invoked by @code{g77} to do its job. + For example, within the gcc build directory after + building GNU Fortran (but without having to install it), + @samp{./g77 --driver=./xgcc foo.f -B./}. + @end table + + @cindex options, negative forms + @cindex negative forms of options + All other options are supported both by @code{g77} and by @code{gcc} as + modified (and reinstalled) by the @code{g77} distribution. + In some cases, options have positive and negative forms; + the negative form of @samp{-ffoo} would be @samp{-fno-foo}. + This manual documents only one of these two forms, whichever + one is not the default. + + @menu + * Option Summary:: Brief list of all @code{g77} options, + without explanations. + * Overall Options:: Controlling the kind of output: + an executable, object files, assembler files, + or preprocessed source. + * Fortran Dialect Options:: Controlling the variant of Fortran language + compiled. + * Warning Options:: How picky should the compiler be? + * Debugging Options:: Symbol tables, measurements, and debugging dumps. + * Optimize Options:: How much optimization? + * Preprocessor Options:: Controlling header files and macro definitions. + Also, getting dependency information for Make. + * Directory Options:: Where to find header files and libraries. + Where to find the compiler executable files. + * Code Gen Options:: Specifying conventions for function calls, data layout + and register usage. + * Environment Variables:: Env vars that affect GNU Fortran. + @end menu + + @node Option Summary + @section Option Summary + + Here is a summary of all the options specific to GNU Fortran, grouped + by type. Explanations are in the following sections. + + @table @emph + @item Overall Options + @xref{Overall Options,,Options Controlling the Kind of Output}. + @smallexample + --driver -fversion -fset-g77-defaults + @end smallexample + + @item Fortran Language Options + @xref{Fortran Dialect Options,,Options Controlling Fortran Dialect}. + @smallexample + -ffree-form -fno-fixed-form -ff90 -fvxt-not-f90 + -ff90-not-vxt -fdollar-ok -fno-backslash + -fintrin-case-initcap -fintrin-case-upper + -fintrin-case-lower -fintrin-case-any + -fmatch-case-initcap -fmatch-case-upper + -fmatch-case-lower -fmatch-case-any + -fsource-case-upper -fsource-case-lower -fsource-case-preserve + -fsymbol-case-initcap -fsymbol-case-upper + -fsymbol-case-lower -fsymbol-case-any + -fcase-strict-upper -fcase-strict-lower + -fcase-initcap -fcase-upper -fcase-lower -fcase-preserve + -fdcp-intrinsics-delete -fdcp-intrinsics-hide + -fdcp-intrinsics-disable -fdcp-intrinsics-enable + -ff2c-intrinsics-delete -ff2c-intrinsics-hide + -ff2c-intrinsics-disable -ff2c-intrinsics-enable + -ff90-intrinsics-delete -ff90-intrinsics-hide + -ff90-intrinsics-disable -ff90-intrinsics-enable + -fmil-intrinsics-delete -fmil-intrinsics-hide + -fmil-intrinsics-disable -fmil-intrinsics-enable + -funix-intrinsics-delete -funix-intrinsics-hide + -funix-intrinsics-disable -funix-intrinsics-enable + -fvxt-intrinsics-delete -fvxt-intrinsics-hide + -fvxt-intrinsics-disable -fvxt-intrinsics-enable + -ffixed-line-length-@var{n} -ffixed-line-length-none + @end smallexample + + @item Warning Options + @xref{Warning Options,,Options to Request or Suppress Warnings}. + @smallexample + -fsyntax-only -pedantic -pedantic-errors -fpedantic + -fugly -fno-ugly-args -fno-ugly-init -w -Wimplicit + -Wunused -Wuninitialized -Wall -Wsurprising -Werror + -W + @end smallexample + + @item Debugging Options + @xref{Debugging Options,,Options for Debugging Your Program or GCC}. + @smallexample + -g + @end smallexample + + @item Optimization Options + @xref{Optimize Options,,Options that Control Optimization}. + @smallexample + -ffloat-store -fforce-mem -fforce-addr -fno-inline + -ffast-math -fstrength-reduce -frerun-cse-after-loop + -fexpensive-optimizations -fdelayed-branch + -fschedule-insns -fschedule-insn2 -fcaller-saves + -funroll-loops -funroll-all-loops + -fno-move-all-movables -fno-reduce-all-givs + -fno-rerun-loop-opt + @end smallexample + + @item Directory Options + @xref{Directory Options,,Options for Directory Search}. + @smallexample + -I@var{dir} -I- + @end smallexample + + @item Code Generation Options + @xref{Code Gen Options,,Options for Code Generation Conventions}. + @smallexample + -fno-automatic -finit-local-zero -fno-f2c + -ff2c-library -fno-underscoring -fno-ident + -fpcc-struct-return -freg-struct-return + -fshort-double -fno-common -fpack-struct + -fzeros + @end smallexample + @end table + + @menu + * Overall Options:: Controlling the kind of output: + an executable, object files, assembler files, + or preprocessed source. + * Fortran Dialect Options:: Controlling the variant of Fortran language + compiled. + * Warning Options:: How picky should the compiler be? + * Debugging Options:: Symbol tables, measurements, and debugging dumps. + * Optimize Options:: How much optimization? + * Preprocessor Options:: Controlling header files and macro definitions. + Also, getting dependency information for Make. + * Directory Options:: Where to find header files and libraries. + Where to find the compiler executable files. + * Code Gen Options:: Specifying conventions for function calls, data layout + and register usage. + @end menu + + @node Overall Options + @section Options Controlling the Kind of Output + @cindex overall options + @cindex options, overall + + Compilation can involve as many as four stages: preprocessing, compilation + proper, assembly, and linking, always in that order. The first three + stages apply to an individual source file, and end by producing an + object file; linking combines all the object files (those newly + compiled, and those specified as input) into an executable file. + + @cindex file name suffix + @cindex suffixes, file name + @cindex file name extension + @cindex extensions, file name + @cindex file type + @cindex types, file + For any given input file, the file name suffix determines what kind of + compilation is done. + Suffixes specific to GNU Fortran are listed + below. + @xref{Overall Options,,gcc,Using and Porting GNU CC}, for + information on suffixes recognized by GNU CC. + + @table @code + @item @var{file}.f + @item @var{file}.for + Fortran source code that should not be preprocessed. + + @cindex preprocessor + @cindex C preprocessor + @cindex cpp preprocessor + @cindex Fortran preprocessor + @cindex cpp program + @cindex programs, cpp + @cindex .F + @cindex .fpp + @item @var{file}.F + @item @var{file}.fpp + Fortran source code that must be preprocessed (by the C preprocessor + @code{cpp}, which is part of GNU CC). + @end table + + UNIX users typically use the @file{@var{file}.f} and @file{@var{file}.F} + nomenclature. + Users of other operating systems, especially those that cannot + distinguish upper-case + letters from lower-case letters in their file names, typically use + the @file{@var{file}.for} and @file{@var{file}.fpp} nomenclature. + + @cindex #define + @cindex #include + @cindex #if + Use of the preprocessor @code{cpp} allows use of C-like + constructs such as @samp{#define} and @samp{#include}, but can + lead to unexpected, even mistaken, results due to Fortran's source file + format. + It is recommended that use of the C preprocessor + be limited to @samp{#include} and, in + conjunction with @samp{#define}, only @samp{#if} and related directives, + thus avoiding in-line macro expansion entirely. + This recommendation applies especially + when using the traditional fixed source form. + With free source form, + fewer unexpected transformations are likely to happen, but use of + Hollerith and things like continued character constants can nevertheless + present problems. + + The following options that affect overall processing are recognized + by the @code{g77} and @code{gcc} commands in a GNU Fortran installation: + + @table @code + @item --driver=@var{command} + This works only when invoking the @code{g77} command, not + when invoking the @code{gcc} command. + @xref{Invoking G77,,GNU Fortran Command Options}, for + information on this option. + + @cindex -fversion option + @cindex options, -fversion + @cindex printing version information + @cindex version information, printing + @item -fversion + Ensure that the @code{g77}-specific version of the compiler phase is reported, + if run. + (This is supplied automatically when @samp{-v} or @samp{--version} + is specified as a command-line option for @code{g77} or @code{gcc} + and when the resulting commands compile Fortran source files.) + + @cindex -fset-g77-defaults option + @cindex options, -fset-g77-defaults + @item -fset-g77-defaults + Set up whatever @code{gcc} options are to apply to Fortran + compilations. + For version 0.5.18, this is equivalent to @samp{-fmove-all-movables + -freduce-all-givs -frerun-loop-opt}. + (This is supplied automatically when compiling Fortran code. + The description of this option is here so that users seeing + it in the output of, say, @samp{g77 -v} understand why it is + there. + Also, developers who run @code{f771} directly might want to specify it + by hand to get the same defaults as they would running @code{f771} + via @code{g77} or @code{gcc}.) + @end table + + @xref{Overall Options,,Options Controlling the Kind of Output, + gcc,Using and Porting GNU CC}, for information + on more options that control the overall operation of the @code{gcc} command + (and, by extension, the @code{g77} command). + + @node Fortran Dialect Options + @section Options Controlling Fortran Dialect + @cindex dialect options + @cindex language dialect options + @cindex options, dialect + + The following options control the dialect of Fortran + that the compiler accepts: + + @table @code + @cindex -ffree-form option + @cindex options, -ffree-form + @cindex -fno-fixed-form option + @cindex options, -fno-fixed-form + @cindex source file form + @cindex free form + @cindex fixed form + @cindex Fortran 90 features + @item -ffree-form + @item -fno-fixed-form + Specify that the source file is written in free form + (introduced in Fortran 90) instead of the more-traditional fixed form. + + @cindex -ff90 option + @cindex options, -ff90 + @cindex Fortran 90 features + @item -ff90 + Allow certain Fortran-90 constructs. + + This option controls whether certain + Fortran 90 constructs are recognized. + (Other Fortran 90 constructs + might or might not be recognized depending on other options such as + @samp{-fvxt-not-f90}, @samp{-ff90-intrinsics-enable}, and the + current level of support for Fortran 90.) + + @xref{Extensions,,GNU Fortran Extensions}, for more information. + + @cindex -fvxt-not-f90 option + @cindex options, -fvxt-not-f90 + @item -fvxt-not-f90 + @cindex -ff90-not-vxt option + @cindex options, -ff90-not-vxt + @item -ff90-not-vxt + @cindex Fortran 90 features + @cindex VXT features + Specify whether Fortran 90 or other popular extensions + are to be assumed for ambiguous constructs. + The default is -fvxt-not-f90. + + For example, with @samp{-ff90-not-vxt}, + @samp{PRINT *,"double-quoted string"} is valid, + while with @samp{-fvxt-not-f90}, @samp{PRINT *,"2000} is valid. + + (There is no way to allow + both constructs in the general case, since statements like + @samp{PRINT *,"2000 !comment?"} would be ambiguous.) + + @xref{Dialects,,GNU Fortran Dialects}, for more information. + + @cindex -fdollar-ok option + @cindex options, -fdollar-ok + @item -fdollar-ok + @cindex dollar sign + @cindex symbol names + @cindex character set + Allow @samp{$} as a valid character in a symbol name. + + @cindex -fno-backslash option + @cindex options, -fno-backslash + @item -fno-backslash + @cindex backslash + @cindex character constants + @cindex Hollerith constants + Specify that @samp{\} is not to be specially interpreted in character + and Hollerith constants a la C and many UNIX Fortran compilers. + + For example, with @samp{-fbackslash} in effect, @samp{A\nB} specifies + three characters, with the second one being newline. + With @samp{-fno-backslash}, it specifies four characters, + @samp{A}, @samp{\}, @samp{n}, and @samp{B}. + + Note that @code{g77} implements a fairly general form of backslash + processing that is incompatible with the narrower forms supported + by some other compilers. + For example, @samp{'A\003B'} is a three-character string in @code{g77}, + whereas other compilers that support backslash might not support + the three-octal-digit form, and thus treat that string as longer + than three characters. + + @xref{Non-bugs,,Certain Changes We Don't Want to Make}, for + information on why @samp{-fbackslash} is the default + instead of @samp{-fno-backslash}. + + @cindex -fintrin-case-initcap option + @cindex options, -fintrin-case-initcap + @item -fintrin-case-initcap + @cindex -fintrin-case-upper option + @cindex options, -fintrin-case-upper + @item -fintrin-case-upper + @cindex -fintrin-case-lower option + @cindex options, -fintrin-case-lower + @item -fintrin-case-lower + @cindex -fintrin-case-any option + @cindex options, -fintrin-case-any + @item -fintrin-case-any + Specify expected case for intrinsic names. + @samp{-fintrin-case-lower} is the default. + + @cindex -fmatch-case-initcap option + @cindex options, -fmatch-case-initcap + @item -fmatch-case-initcap + @cindex -fmatch-case-upper option + @cindex options, -fmatch-case-upper + @item -fmatch-case-upper + @cindex -fmatch-case-lower option + @cindex options, -fmatch-case-lower + @item -fmatch-case-lower + @cindex -fmatch-case-any option + @cindex options, -fmatch-case-any + @item -fmatch-case-any + Specify expected case for keywords. + @samp{-fmatch-case-lower} is the default. + + @cindex -fsource-case-upper option + @cindex options, -fsource-case-upper + @item -fsource-case-upper + @cindex -fsource-case-lower option + @cindex options, -fsource-case-lower + @item -fsource-case-lower + @cindex -fsource-case-preserve option + @cindex options, -fsource-case-preserve + @item -fsource-case-preserve + Specify whether source text other than character and Hollerith constants + is to be translated to uppercase, to lowercase, or preserved as is. + @samp{-fsource-case-lower} is the default. + + @cindex -fsymbol-case-initcap option + @cindex options, -fsymbol-case-initcap + @item -fsymbol-case-initcap + @cindex -fsymbol-case-upper option + @cindex options, -fsymbol-case-upper + @item -fsymbol-case-upper + @cindex -fsymbol-case-lower option + @cindex options, -fsymbol-case-lower + @item -fsymbol-case-lower + @cindex -fsymbol-case-any option + @cindex options, -fsymbol-case-any + @item -fsymbol-case-any + Specify valid cases for user-defined symbol names. + @samp{-fsymbol-case-any} is the default. + + @cindex -fcase-strict-upper option + @cindex options, -fcase-strict-upper + @item -fcase-strict-upper + Same as @samp{-fintrin-case-upper -fmatch-case-upper -fsource-case-preserve + -fsymbol-case-upper}. + (Requires all pertinent source to be in uppercase.) + + @cindex -fcase-strict-lower option + @cindex options, -fcase-strict-lower + @item -fcase-strict-lower + Same as @samp{-fintrin-case-lower -fmatch-case-lower -fsource-case-preserve + -fsymbol-case-lower}. + (Requires all pertinent source to be in lowercase.) + + @cindex -fcase-initcap option + @cindex options, -fcase-initcap + @item -fcase-initcap + Same as @samp{-fintrin-case-initcap -fmatch-case-initcap -fsource-case-preserve + -fsymbol-case-initcap}. + (Requires all pertinent source to be in initial capitals, + as in @samp{Print *,SqRt(Value)}.) + + @cindex -fcase-upper option + @cindex options, -fcase-upper + @item -fcase-upper + Same as @samp{-fintrin-case-any -fmatch-case-any -fsource-case-upper + -fsymbol-case-any}. + (Maps all pertinent source to uppercase.) + + @cindex -fcase-lower option + @cindex options, -fcase-lower + @item -fcase-lower + Same as @samp{-fintrin-case-any -fmatch-case-any -fsource-case-lower + -fsymbol-case-any}. + (Maps all pertinent source to lowercase.) + + @cindex -fcase-preserve option + @cindex options, -fcase-preserve + @item -fcase-preserve + Same as @samp{-fintrin-case-any -fmatch-case-any -fsource-case-preserve + -fsymbol-case-any}. + (Preserves all case in user-defined symbols, + while allowing any-case matching of intrinsics and keywords. + For example, @samp{call Foo(i,I)} would pass two @emph{different} + variables named @samp{i} and @samp{I} to a procedure named @samp{Foo}.) + + @cindex -fdcp-intrinsics-delete option + @cindex options, -fdcp-intrinsics-delete + @item -fdcp-intrinsics-delete + @cindex -fdcp-intrinsics-hide option + @cindex options, -fdcp-intrinsics-hide + @item -fdcp-intrinsics-hide + @cindex -fdcp-intrinsics-disable option + @cindex options, -fdcp-intrinsics-disable + @item -fdcp-intrinsics-disable + @cindex -fdcp-intrinsics-enable option + @cindex options, -fdcp-intrinsics-enable + @item -fdcp-intrinsics-enable + @cindex Digital Fortran features + @cindex COMPLEX intrinsics + @cindex intrinsics, COMPLEX + Specify status of Digital's COMPLEX-related intrinsics. + @samp{-fdcp-intrinsics-enable} is the default. + + @cindex -ff2c-intrinsics-delete option + @cindex options, -ff2c-intrinsics-delete + @item -ff2c-intrinsics-delete + @cindex -ff2c-intrinsics-hide option + @cindex options, -ff2c-intrinsics-hide + @item -ff2c-intrinsics-hide + @cindex -ff2c-intrinsics-disable option + @cindex options, -ff2c-intrinsics-disable + @item -ff2c-intrinsics-disable + @cindex -ff2c-intrinsics-enable option + @cindex options, -ff2c-intrinsics-enable + @item -ff2c-intrinsics-enable + @cindex f2c intrinsics + @cindex intrinsics, f2c + Specify status of f2c-specific intrinsics. + @samp{-ff2c-intrinsics-enable} is the default. + + @cindex -ff90-intrinsics-delete option + @cindex options, -ff90-intrinsics-delete + @item -ff90-intrinsics-delete + @cindex -ff90-intrinsics-hide option + @cindex options, -ff90-intrinsics-hide + @item -ff90-intrinsics-hide + @cindex -ff90-intrinsics-disable option + @cindex options, -ff90-intrinsics-disable + @item -ff90-intrinsics-disable + @cindex -ff90-intrinsics-enable option + @cindex options, -ff90-intrinsics-enable + @item -ff90-intrinsics-enable + @cindex Fortran 90 intrinsics + @cindex intrinsics, Fortran 90 + Specify status of F90-specific intrinsics. + @samp{-ff90-intrinsics-delete} is the default. + + @cindex -fmil-intrinsics-delete option + @cindex options, -fmil-intrinsics-delete + @item -fmil-intrinsics-delete + @cindex -fmil-intrinsics-hide option + @cindex options, -fmil-intrinsics-hide + @item -fmil-intrinsics-hide + @cindex -fmil-intrinsics-disable option + @cindex options, -fmil-intrinsics-disable + @item -fmil-intrinsics-disable + @cindex -fmil-intrinsics-enable option + @cindex options, -fmil-intrinsics-enable + @item -fmil-intrinsics-enable + @cindex MIL-STD 1753 + @cindex intrinsics, MIL-STD 1753 + Specify status of MIL-STD-1753-specific intrinsics. + @samp{-fmil-intrinsics-enable} is the default. + + @cindex -funix-intrinsics-delete option + @cindex options, -funix-intrinsics-delete + @item -funix-intrinsics-delete + @cindex -funix-intrinsics-hide option + @cindex options, -funix-intrinsics-hide + @item -funix-intrinsics-hide + @cindex -funix-intrinsics-disable option + @cindex options, -funix-intrinsics-disable + @item -funix-intrinsics-disable + @cindex -funix-intrinsics-enable option + @cindex options, -funix-intrinsics-enable + @item -funix-intrinsics-enable + @cindex UNIX intrinsics + @cindex intrinsics, UNIX + Specify status of UNIX intrinsics. + @samp{-funix-intrinsics-enable} is the default. + + @cindex FLUSH() intrinsic + @cindex intrinsics, FLUSH() + For example, if your code invokes @code{FLUSH} as + a library function and thus works with other UNIX Fortran + compilers or earlier version of @code{g77}, either add the + @samp{EXTERNAL FLUSH} statement or, perhaps + more convenient for you, compile with the -funix-intrinsics-hide or + -funix-intrinsics-delete option. + + @cindex ABORT() intrinsic + @cindex intrinsics, ABORT() + @cindex EXIT() intrinsic + @cindex intrinsics, EXIT() + @cindex SIGNAL() intrinsic + @cindex intrinsics, SIGNAL() + @cindex SYSTEM() intrinsic + @cindex intrinsics, SYSTEM() + @cindex intrinsic subroutines + @cindex subroutines, intrinsic + @cindex intrinsic functions + @cindex functions, intrinsic + @cindex side effects + @cindex intrinsics, side effects of + Note that @code{ABORT}, @code{EXIT}, @code{FLUSH}, @code{SIGNAL}, and + @code{SYSTEM} are intrinsic subroutines, not functions (since they have + side effects), so to get the return values from @code{SIGNAL} and + @code{SYSTEM}, append a final argument specifying an @samp{INTEGER} + variable or array element to receive the returned status. + (For example, @samp{CALL SYSTEM('rm foo',ISTAT)}.) + + @code{FLUSH()} accepts an optional single @samp{INTEGER} argument, + since many Fortran implementations allow or require a unit number. + Currently, since @code{libf2c} + does not flush a given unit number, this argument is not used---all + units are flushed by @code{libf2c}'s implementation of @code{FLUSH()}. + Do not depend on this behavior---if you want to flush all units, + use @samp{CALL FLUSH} (that is, specify no arguments to @code{FLUSH}). + + @code{EXIT()} accepts an optional single @samp{INTEGER} argument. + If omitted, zero is the default (as in @samp{CALL EXIT(0)}). + The default might change on + configurations where the ``normal return status'' is not zero, however. + If you want to return a ``success'' status, it is best to call @code{EXIT} + with no arguments in your code, and let @code{g77} choose the appropriate + default. + + @cindex -fvxt-intrinsics-delete option + @cindex options, -fvxt-intrinsics-delete + @item -fvxt-intrinsics-delete + @cindex -fvxt-intrinsics-hide option + @cindex options, -fvxt-intrinsics-hide + @item -fvxt-intrinsics-hide + @cindex -fvxt-intrinsics-disable option + @cindex options, -fvxt-intrinsics-disable + @item -fvxt-intrinsics-disable + @cindex -fvxt-intrinsics-enable option + @cindex options, -fvxt-intrinsics-enable + @item -fvxt-intrinsics-enable + @cindex VXT intrinsics + @cindex intrinsics, VXT + Specify status of VXT intrinsics. + @samp{-fvxt-intrinsics-delete} is the default. + + @cindex -ffixed-line-length-@var{n} option + @cindex options, -ffixed-line-length-@var{n} + @item -ffixed-line-length-@var{n} + @cindex source file format + @cindex line length + @cindex length of source lines + @cindex fixed-form line length + Set column after which characters are ignored in typical fixed-form + lines in the source file. + + @cindex card image + @cindex extended-source option + Popular values for @var{n} include 72 (the + standard and the default), 80 (card image), and 132 (corresponds + to ``extended-source'' options in some popular compilers). + @var{n} may be @samp{none}, meaning that the entire line is meaningful + and that continued character constants never have implicit spaces appended + to them to fill out the line. + @samp{-ffixed-line-length-0} means the same thing as + @samp{-ffixed-line-length-none}. + @end table + + @node Warning Options + @section Options to Request or Suppress Warnings + @cindex options to control warnings + @cindex warning messages + @cindex messages, warning + @cindex suppressing warnings + + Warnings are diagnostic messages that report constructions which + are not inherently erroneous but which are risky or suggest there + might have been an error. + + You can request many specific warnings with options beginning @samp{-W}, + for example @samp{-Wimplicit} to request warnings on implicit + declarations. Each of these specific warning options also has a + negative form beginning @samp{-Wno-} to turn off warnings; + for example, @samp{-Wno-implicit}. This manual lists only one of the + two forms, whichever is not the default. + + These options control the amount and kinds of warnings produced by GNU + Fortran: + + @table @code + @cindex syntax checking + @cindex -fsyntax-only option + @cindex options, -fsyntax-only + @item -fsyntax-only + Check the code for syntax errors, but don't do anything beyond that. + + @cindex -pedantic option + @cindex options, -pedantic + @item -pedantic + Issue warnings for uses of extensions to ANSI FORTRAN 77. + @samp{-pedantic} also applies to C-language constructs where they + occur in GNU Fortran source files, such as use of @samp{\e} in a + character constant within a directive like @samp{#include}. + + Valid ANSI FORTRAN 77 programs should compile properly with or without + this option. + However, without this option, certain GNU extensions and traditional + Fortran features are supported as well. + With this option, many of them are rejected. + + Some users try to use @samp{-pedantic} to check programs for strict ANSI + conformance. They soon find that it does not do quite what they want: + it finds some non-ANSI practices, but not all---however, improvements + to @code{g77} in this area are welcome. + + @cindex -pedantic-errors option + @cindex options, -pedantic-errors + @item -pedantic-errors + Like @samp{-pedantic}, except that errors are produced rather than + warnings. + + @cindex -fpedantic option + @cindex options, -fpedantic + @item -fpedantic + Like @samp{-pedantic}, but applies only to Fortran constructs. + + @cindex -fugly option + @cindex options, -fugly + @item -fugly + @cindex ugly features + @cindex features, ugly + Specify that certain ``ugly'' constructs are to be quietly accepted. + Implies @samp{-fugly-args} and @samp{-fugly-init} as well. + + For example, with @samp{-fno-ugly}, @samp{CALL FOO(,)} means to pass + one null argument, whereas with @samp{-fugly}, it means to pass two null + arguments. + + @cindex -fno-ugly-args option + @cindex options, -fno-ugly-args + @item -fno-ugly-args + Disallow passing Hollerith and typeless constants as actual + arguments (for example, @samp{CALL FOO(4HABCD)}). + + @cindex -fno-ugly-init option + @cindex options, -fno-ugly-init + @item -fno-ugly-init + Disallow use of Hollerith and typeless constants as initial + values (in @code{PARAMETER} and @code{DATA} statements), and + use of character constants to + initialize numeric types and vice versa. + + For example, @samp{DATA I/'F'/, CHRVAR/65/, J/4HABCD/} is disallowed by + @samp{-fno-ugly-init}. + + @cindex -w option + @cindex options, -w + @item -w + Inhibit all warning messages. + + @cindex -Wimplicit option + @cindex options, -Wimplicit + @item -Wimplicit + @cindex implicit declaration, warning + @cindex warnings, implicit declaration + @cindex -u option + @cindex /WARNINGS=DECLARATIONS switch + @cindex IMPLICIT NONE, similar effect + @cindex effecting IMPLICIT NONE + Warn whenever a variable, array, or function is implicitly + declared. + Has an effect similar to using the @samp{IMPLICIT NONE} statement + in every program unit. + (Some Fortran compilers provide this feature by an option + named @samp{-u} or @samp{/WARNINGS=DECLARATIONS}.) + + @cindex -Wunused option + @cindex options, -Wunused + @item -Wunused + @cindex unused variables + @cindex variables, unused + Warn whenever a variable is unused aside from its declaration. + + @cindex -Wuninitialized option + @cindex options, -Wuninitialized + @item -Wuninitialized + @cindex uninitialized variables + @cindex variables, uninitialized + Warn whenever an automatic variable is used without first being initialized. + + These warnings are possible only in optimizing compilation, + because they require data flow information that is computed only + when optimizing. If you don't specify @samp{-O}, you simply won't + get these warnings. + + These warnings occur only for variables that are candidates for + register allocation. Therefore, they do not occur for a variable that + is declared @code{volatile}, or whose address is taken, or whose size + is other than 1, 2, 4 or 8 bytes. Also, they do not occur for + arrays, even when they are in registers. + + Note that there may be no warning about a variable that is used only + to compute a value that itself is never used, because such + computations may be deleted by data flow analysis before the warnings + are printed. + + These warnings are made optional because GNU Fortran is not smart + enough to see all the reasons why the code might be correct + despite appearing to have an error. Here is one example of how + this can happen: + + @example + SUBROUTINE DISPAT(J) + IF (J.EQ.1) I=1 + IF (J.EQ.2) I=4 + IF (J.EQ.3) I=5 + CALL FOO(I) + END + @end example + + @noindent + If the value of @code{J} is always 1, 2 or 3, then @code{I} is + always initialized, but GNU Fortran doesn't know this. Here is + another common case: + + @example + SUBROUTINE MAYBE(FLAG) + LOGICAL FLAG + IF (FLAG) VALUE = 3.14 + @dots{} + IF (FLAG) PRINT *, VALUE + END + @end example + + @noindent + This has no bug because @code{VALUE} is used only if it is set. + + @cindex -Wall option + @cindex options, -Wall + @item -Wall + @cindex all warnings + @cindex warnings, all + The @samp{-Wunused} and @samp{-Wuninitialized} options combined. + These are all the + options which pertain to usage that we recommend avoiding and that we + believe is easy to avoid. + (As more warnings are added to @code{g77}, some might + be added to the list enabled by @samp{-Wall}.) + @end table + + The remaining @samp{-W@dots{}} options are not implied by @samp{-Wall} + because they warn about constructions that we consider reasonable to + use, on occasion, in clean programs. + + @table @code + @c @item -W + @c Print extra warning messages for these events: + @c + @c @itemize @bullet + @c @item + @c If @samp{-Wall} or @samp{-Wunused} is also specified, warn about unused + @c arguments. + @c + @c @end itemize + @c + @cindex -Wsurprising option + @cindex options, -Wsurprising + @item -Wsurprising + Warn about ``suspicious'' constructs that are interpreted + by the compiler in a way that might well be surprising to + someone reading the code. + These differences can result in subtle, compiler-dependent + (even machine-dependent) behavioral differences. + The constructs warned about include: + + @itemize @bullet + @item + Expressions having two arithmetic operators in a row, such + as @samp{X*-Y}. + Such a construct is nonstandard, and can produce + unexpected results in more complicated situations such + as @samp{X**-Y*Z}. + @code{g77}, along with many other compilers, interprets + this example differently than many programmers, and a few + other compilers. + Specifically, @code{g77} interprets @samp{X**-Y*Z} as + @samp{(X**(-Y))*Z}, while others might think it should + be interpreted as @samp{X**(-(Y*Z))}. + + A revealing example is the constant expression @samp{2**-2*1.}, + which @code{g77} evaluates to .25, while others might evaluate + it to 0., the difference being the way precedence affects type + promotion. + + (The @samp{-fpedantic} option also warns about expressions + having two arithmetic operators in a row.) + + @item + Expressions with a unary minus followed by an operand and then + a binary operator other than plus or minus. + For example, @samp{-2**2} produces a warning, because + the precedence is @samp{-(2**2)}, yielding -4, not + @samp{(-2)**2}, which yields 4, and which might represent + what a programmer expects. + Even cases such as @samp{-I*J} produce warnings, + even though, in most configurations and situations, + there is no computational difference between the + results of the two interpretations---the purpose + of this warning is to warn about differing interpretations + and encourage a better style of coding, not to identify + only those places where bugs might exist in the user's + code. + + @cindex DO statement + @cindex statements, DO + @item + @samp{DO} loops with @samp{DO} variables that are not + of integral type---that is, using @samp{REAL} or + @samp{DOUBLE PRECISION} variables as loop control + variables. + Although such loops can be written to work in the + ``obvious'' way, the way @code{g77} is required by the + Fortran standard to interpret such code is likely to + be quite different from the way many programmers expect. + (This is true of all @samp{DO} loops, but the differences + are pronounced for non-integral loop control variables.) + + @xref{Loops}, for more information. + @end itemize + + @cindex -Werror option + @cindex options, -Werror + @item -Werror + Make all warnings into errors. + + @cindex -W option + @cindex options, -W + @item -W + @cindex extra warnings + @cindex warnings, extra + Turns on ``extra warnings'' and the @samp{uninitialized} option. + (This might change in future versions of @code{g77}.) + + ``Extra warnings'' are issued for: + + @itemize @bullet + @item + @cindex unused parameters + @cindex parameters, unused + @cindex unused arguments + @cindex arguments, unused + @cindex unused dummies + @cindex dummies, unused + Unused parameters to a procedure (when @samp{-Wunused} also is + specified). + + @item + @cindex overflow + Overflows involving floating-point constants (not available + for certain configurations?). + @end itemize + @end table + + @xref{Warning Options,,Options to Request or Suppress Warnings, + gcc,Using and Porting GNU CC}, for information on more options offered + by the GBE shared by @code{g77}, @code{gcc}, and other GNU compilers. + + Some of these have no effect when compiling programs written in Fortran: + + @table @code + @cindex -Wcomment option + @cindex options, -Wcomment + @item -Wcomment + @cindex -Wformat option + @cindex options, -Wformat + @item -Wformat + @cindex -Wparentheses option + @cindex options, -Wparentheses + @item -Wparentheses + @cindex -Wswitch option + @cindex options, -Wswitch + @item -Wswitch + @cindex -Wtraditional option + @cindex options, -Wtraditional + @item -Wtraditional + @cindex -Wshadow option + @cindex options, -Wshadow + @item -Wshadow + @cindex -Wid-clash-@var{len} option + @cindex options, -Wid-clash-@var{len} + @item -Wid-clash-@var{len} + @cindex -Wlarger-than-@var{len} option + @cindex options, -Wlarger-than-@var{len} + @item -Wlarger-than-@var{len} + @cindex -Wconversion option + @cindex options, -Wconversion + @item -Wconversion + @cindex -Waggregate-return option + @cindex options, -Waggregate-return + @item -Waggregate-return + @cindex -Wredundant-decls option + @cindex options, -Wredundant-decls + @item -Wredundant-decls + @cindex unsupported warnings + @cindex warnings, unsupported + These options all could have some relevant meaning for + GNU Fortran programs, but are not yet supported. + @end table + + @node Debugging Options + @section Options for Debugging Your Program or GNU Fortran + @cindex options, debugging + @cindex debugging information options + + GNU Fortran has various special options that are used for debugging + either your program or @code{g77}. + + @table @code + @cindex -g option + @cindex options, -g + @item -g + Produce debugging information in the operating system's native format + (stabs, COFF, XCOFF, or DWARF). GDB can work with this debugging + information. + + @cindex COMMON blocks + @cindex EQUIVALENCE areas + @cindex missing debug features + Support for this option in Fortran programs is incomplete. + In particular, names of variables and arrays in common blocks + or that are storage-associated via @samp{EQUIVALENCE} are + unavailable to the debugger. + @end table + + @xref{Debugging Options,,Options for Debugging Your Program or GNU CC, + gcc,Using and Porting GNU CC}, for more information on debugging options. + + @node Optimize Options + @section Options That Control Optimization + @cindex optimize options + @cindex options, optimization + + Most Fortran users will want to use no optimization when + developing and testing programs, and use @samp{-O} or @samp{-O2} when + compiling programs for late-cycle testing and for production use. + + The following flags have particular applicability when + compiling Fortran programs: + + @table @code + @cindex -ffloat-store option + @cindex options, -ffloat-store + @item -ffloat-store + @cindex IEEE conformance + @cindex conformance, IEEE + Might help a Fortran program that depends on exact IEEE conformance + on some machines, but might slow down a program that doesn't. + + @cindex -fforce-mem option + @cindex options, -fforce-mem + @item -fforce-mem + @cindex -fforce-addr option + @cindex options, -fforce-addr + @item -fforce-addr + @cindex loops, speeding up + @cindex speeding up loops + Might improve optimization of loops. + + @cindex -fno-inline option + @cindex options, -fno-inline + @item -fno-inline + @cindex in-line compilation + @cindex compilation, in-line + Don't compile statement functions inline. + Might reduce the size of a program unit---which might be at + expense of some speed (though it should compile faster). + Note that if you are not optimizing, no functions can be expanded inline. + + @cindex -ffast-math option + @cindex options, -ffast-math + @item -ffast-math + @cindex IEEE conformance + @cindex conformance, IEEE + Might allow some programs designed to not be too dependent + on IEEE behavior for floating-point to run faster, or die trying. + + @cindex -fstrength-reduce option + @cindex options, -fstrength-reduce + @item -fstrength-reduce + @cindex loops, speeding up + @cindex speeding up loops + Might make some loops run faster. + + @cindex -frerun-cse-after-loop option + @cindex options, -frerun-cse-after-loop + @item -frerun-cse-after-loop + @cindex -fexpensive-optimizations option + @cindex options, -fexpensive-optimizations + @item -fexpensive-optimizations + @cindex -fdelayed-branch option + @cindex options, -fdelayed-branch + @item -fdelayed-branch + @cindex -fschedule-insns option + @cindex options, -fschedule-insns + @item -fschedule-insns + @cindex -fschedule-insns2 option + @cindex options, -fschedule-insns2 + @item -fschedule-insns2 + @cindex -fcaller-saves option + @cindex options, -fcaller-saves + @item -fcaller-saves + Might improve performance on some code. + + @cindex -funroll-loops option + @cindex options, -funroll-loops + @item -funroll-loops + @cindex loops, unrolling + @cindex unrolling loops + Definitely improves performance on some code. + + @cindex -funroll-all-loops option + @cindex options, -funroll-all-loops + @item -funroll-all-loops + Definitely improves performance on some code. + + @item -fno-move-all-movables + @item -fno-reduce-all-givs + @item -fno-rerun-loop-opt + Each of these might improve performance on some code. + + Analysis of Fortran code optimization and the resulting + optimizations triggered by the above options were + contributed by Toon Moene (@code{toon@@moene.indiv.nluug.nl}). + + Please let us know how use of these options affects + the performance of your production code. + We're particularly interested in code that runs faster + when these options are @emph{disabled}, and in + non-Fortran code that benefits when they are + @emph{enabled} via the above @code{gcc} command-line options. + @end table + + @xref{Optimize Options,,Options That Control Optimization, + gcc,Using and Porting GNU CC}, for more information on options + to optimize the generated machine code. + + @node Preprocessor Options + @section Options Controlling the Preprocessor + @cindex preprocessor options + @cindex options, preprocessor + @cindex cpp program + @cindex programs, cpp + + These options control the C preprocessor, which is run on each C source + file before actual compilation. + + @xref{Preprocessor Options,,Options Controlling the Preprocessor, + gcc,Using and Porting GNU CC}, for information on C preprocessor options. + + @cindex INCLUDE statement + @cindex statements, INCLUDE + Some of these options also affect how @code{g77} processes the + @samp{INCLUDE} statement. + Since this statement is processed even when preprocessing + is not requested, it is not described in this section. + @xref{Directory Options,,Options for Directory Search}, for + information on how @code{g77} processes the @samp{INCLUDE} statement. + + @node Directory Options + @section Options for Directory Search + @cindex directory options + @cindex options, directory search + @cindex search path + + These options affect how the @code{cpp} preprocessor searches + for files specified via the @samp{#include} directive. + Therefore, when compiling Fortran programs, they are meaningful + when the preproecssor is used. + + @cindex INCLUDE statement + @cindex statements, INCLUDE + Some of these options also affect how @code{g77} searches + for files specified via the @samp{INCLUDE} statement. + These options are: + + @table @code + @cindex -I- option + @cindex options, -I- + @item -I- + @cindex -Idir option + @cindex options, -Idir + @item -I@var{dir} + @cindex directory search paths for inclusion + @cindex inclusion, directory search paths for + @cindex searching for included files + These affect interpretation of the @samp{INCLUDE} statement + (as well as of the @samp{#include} directive of the @code{cpp} + preprocessor). + + Note that @samp{-I@var{dir}} must be specified @emph{without} any + spaces between @samp{-I} and the directory name---that is, + @samp{-Ifoo/bar} is valid, but @samp{-I foo/bar} + is rejected by the @code{g77} compiler (though the preprocessor supports + the latter form). + @c this is due to toplev.c's inflexible option processing + Also note that the general behavior of @samp{-I} and + @samp{INCLUDE} is pretty much the same as of @samp{-I} with + @samp{#include} in the @code{cpp} preprocessor, with regard to + looking for @file{header.gcc} files and other such things. + + @xref{Directory Optoins,,Options for Directory Search, + gcc,Using and Porting GNU CC}, for information on the @samp{-I} option. + @end table + + @node Code Gen Options + @section Options for Code Generation Conventions + @cindex code generation conventions + @cindex options, code generation + @cindex run-time options + + These machine-independent options control the interface conventions + used in code generation. + + Most of them have both positive and negative forms; the negative form + of @samp{-ffoo} would be @samp{-fno-foo}. In the table below, only + one of the forms is listed---the one which is not the default. You + can figure out the other form by either removing @samp{no-} or adding + it. + + @table @code + @cindex -fno-automatic option + @cindex options, -fno-automatic + @item -fno-automatic + @cindex SAVE statement + @cindex statements, SAVE + Treat each program unit as if the @code{SAVE} statement was specified + for every local variable and array referenced in it. + Does not affect common blocks. + (Some Fortran compilers provide this option under + the name @samp{-static}.) + + @cindex -finit-local-zero option + @cindex options, -finit-local-zero + @item -finit-local-zero + @cindex DATA statement + @cindex statements, DATA + @cindex initialization of local variables + @cindex variables, initialization of + @cindex uninitialized variables + @cindex variables, uninitialized + Specify that variables and arrays that are local to a program unit + (not in a common block and not passed as an argument) are to be initialized + to binary zeros. + + Since there is a run-time penalty for initialization of variables + that are not given the @code{SAVE} attribute, it might be a + good idea to also use @samp{-fno-automatic} with @samp{-finit-local-zero}. + + @cindex -fno-f2c option + @cindex options, -fno-f2c + @item -fno-f2c + @cindex f2c compatibility + @cindex compatibility, f2c + Do not generate code designed to be compatible with code generated + by @code{f2c}. + + This does not affect the generation of code that interfaces with the + @code{libf2c} library. + + @strong{Caution:} If @samp{-fno-f2c} is used when compiling any + source file used in a program, it must be used when compiling + @emph{all} Fortran source files used in that program. + + @c seems kinda dumb to tell people about an option they can't use -- jcb + @c then again, we want users building future-compatible libraries with it. + @cindex -ff2c-library option + @cindex options, -ff2c-library + @item -ff2c-library + Specify that use of @code{libf2c} is required. + This is the default for the current version of @code{g77}. + + Currently it is not + valid to specify @samp{-fno-f2c-library}. + This option is provided so users can specify it in shell + scripts that build programs and libraries that require the + @code{libf2c} library, even when being compiled by future + versions of @code{g77} that might otherwise default to + generating code for an incompatible library. + + @cindex -fno-underscoring option + @cindex options, -fno-underscoring + @item -fno-underscoring + @cindex underscores + @cindex symbol names, underscores + @cindex transforming symbol names + @cindex symbol names, transforming + Do not transform names of entities specified in the Fortran + source file by appending underscores to them. + + With @samp{-funderscoring} in effect, @code{g77} appends two underscores + to names with underscores and one underscore to external names with + no underscores. (@code{g77} also appends two underscores to internal + names with underscores to avoid naming collisions with external names.) + + This is done to ensure compatibility with code produced by many + UNIX Fortran compilers, including @code{f2c}, which perform the + same transformations. + + Use of @samp{-fno-underscoring} is not recommended unless you are + experimenting with issues such as integration of (GNU) Fortran into + existing system environments (vis-a-vis existing libraries, tools, and + so on). + + For example, with @samp{-funderscoring}, and assuming other defaults like + @samp{-fcase-lower} and that @samp{j()} and @samp{max_count()} are + external functions while @samp{my_var} and @samp{lvar} are local variables, + a statement like + + @smallexample + I = J() + MAX_COUNT (MY_VAR, LVAR) + @end smallexample + + @noindent + is implemented as something akin to: + + @smallexample + i = j_() + max_count__(&my_var__, &lvar); + @end smallexample + + With @samp{-fno-underscoring}, the same statement is implemented as: + + @smallexample + i = j() + max_count(&my_var, &lvar); + @end smallexample + + Use of @samp{-fno-underscoring} allows direct specification of + user-defined names while debugging and when interfacing @code{g77}-compiled + code with other languages. + + Note that just because the names match does @emph{not} mean that the + interface implemented by @code{g77} for an external name matches the + interface implemented by some other language for that same name. + That is, getting code produced by @code{g77} to link to code produced + by some other compiler using this or any other method can be only a + small part of the overall solution---getting the code generated by + both compilers to agree on issues other than naming can require + significant effort, and, unlike naming disagreements, linkers normally + cannot detect disagreements in these other areas. + + Also, note that with @samp{-fno-underscoring}, the lack of appended + underscores introduces the very real possibility that a user-defined + external name will conflict with a name in a system library, which + could make finding unresolved-reference bugs quite difficult in some + cases---they might occur at program run time, and show up only as + buggy behavior at run time. + + In future versions of @code{g77}, we hope to improve naming and linking + issues so that debugging always involves using the names as they appear + in the source, even if the names as seen by the linker are mangled to + prevent accidental linking between procedures with incompatible + interfaces. + + @cindex -fno-second-underscore option + @cindex options, -fno-second-underscore + @item -fno-second-underscore + @cindex underscores + @cindex symbol names, underscores + @cindex transforming symbol names + @cindex symbol names, transforming + Do not append a second underscore to names of entities specified + in the Fortran source file. + + This option has no effect if @samp{-fno-underscoring} is not + in effect. + + Otherwise, with this option, an external name such as @samp{MAX_COUNT} + is implemented as a reference to the link-time external symbol + @samp{max_count_}, instead of @samp{max_count__}. + + @cindex -fno-ident option + @cindex options, -fno-ident + @item -fno-ident + Ignore the @samp{#ident} directive. + + @cindex -fzeros option + @cindex options, -fzeros + @item -fzeros + Treat initial values of zero as if they were any other value. + + As of version 0.5.18, @code{g77} normally treats @samp{DATA} and + other statements that are used specify initial values of zero + for variables and arrays as if no values were actually specified, + in the sense that no diagnostics regarding multiple initializations + are produced. + + This is done to speed up compiling of programs that initialize + large arrays to zeros. + + Use @samp{-fzeros} to revert to the simpler, slower behavior + that can catch multiple initializations by keeping track of + all initializations, zero or otherwise. + + @emph{Caution:} Future versions of @code{g77} might disregard this option + (and its negative form, the default) or interpret it somewhat + differently. + The interpretation changes will affect only non-standard + programs; standard-conforming programs should not be affected. + @end table + + @xref{Code Gen Options,,Options for Code Generation Conventions, + gcc,Using and Porting GNU CC}, for information on more options + offered by the GBE + shared by @code{g77}, @code{gcc}, and other GNU compilers. + + Some of these do @emph{not} work when compiling programs written in Fortran: + + @table @code + @cindex -fpcc-struct-return option + @cindex options, -fpcc-struct-return + @item -fpcc-struct-return + @cindex -freg-struct-return option + @cindex options, -freg-struct-return + @item -freg-struct-return + You should not use these except strictly the same way as you + used them to build the version of @code{libf2c} with which + you will be linking all code compiled by @code{g77} with the + same option. + + @cindex -fshort-double option + @cindex options, -fshort-double + @item -fshort-double + This probably either has no effect on Fortran programs, or + makes them act loopy. + + @cindex -fno-common option + @cindex options, -fno-common + @item -fno-common + Do not use this when compiling Fortran programs, + or there will be Trouble. + + @cindex -fpack-struct option + @cindex options, -fpack-struct + @item -fpack-struct + This probably will break any calls to the @code{libf2c} library, + at the very least, even if it is built with the same option. + @end table + + @node Environment Variables + @section Environment Variables Affecting GNU Fortran + @cindex environment variables + + GNU Fortran currently does not make use of any environment + variables to control its operation above and beyond those + that affect the operation of @code{gcc}. + + @xref{Environment Variables,,Environment Variables Affecting GNU CC, + gcc,Using and Porting GNU CC}, for information on environment + variables. + + @include news.texi + + @node Changes + @chapter User-visible Changes + @cindex versions, recent + @cindex recent versions + @cindex changes, user-visible + @cindex user-visible changes + + To find out about existing bugs and ongoing plans for GNU + Fortran, on Internet do @samp{finger -l fortran@@gnu.ai.mit.edu} + or whatever is the equivalent on your system. + (You might need to use the address @samp{fortran@@gate-1.gnu.ai.mit.edu} + instead, or use @samp{gate-2}, @samp{gate-3}, @samp{gate-4}, and so on, + instead of @samp{gate-1}.) + + Alternatively, retrieve @file{gnu.ai.mit.edu:/g77.plan} via + anonymous ftp, or if you cannot do that, email + @samp{fortran@@gnu.ai.mit.edu} asking for a recent copy of the + GNU Fortran @file{.plan} file. + (The @code{finger} command shown above obtains the most recent + copy of all these methods.) + + @heading In 0.5.18: + + @itemize @bullet + @item + The @code{BYTE} and @code{WORD} statements now are supported, + to a limited extent. + + @item + @samp{INTEGER*1}, @samp{INTEGER*2}, @samp{INTEGER*8}, + and their @samp{LOGICAL} + equivalents, now are supported to a limited extent. + Among the missing elements are complete intrinsic and constant + support. + + @item + Support automatic arrays in procedures. + For example, @samp{REAL A(N)}, where @samp{A} is + not a dummy argument, specifies that @samp{A} is + an automatic array. + The size of @samp{A} is calculated from the value + of @samp{N} each time the procedure is called, + that amount of space is allocated, and that space + is freed when the procedure returns to its caller. + + @item + Add @samp{-fno-zeros} option, enabled by default, + to reduce compile-time CPU and memory usage for + code that provides initial zero values for variables + and arrays. + + @item + Introduce three new options that apply to all compilations + by @code{g77}-aware GNU compilers---@samp{-fmove-all-movables}, + @samp{-freduce-all-givs}, and @samp{-frerun-loop-opt}---which + can improve the run-time performance of some programs. + + @item + Replace much of the existing documentation with a single + Info document. + + @item + New option @samp{-fno-second-underscore}. + @end itemize + + @heading In 0.5.17: + + @itemize @bullet + @item + The @samp{ERF()} and @samp{ERFC()} intrinsics now are generic + intrinsics, mapping to @samp{ERF}/@samp{DERF} and + @samp{ERFC}/@samp{DERFC}, respectively. + @emph{Note:} Use @samp{INTRINSIC ERF,ERFC} in any code that + might reference these as generic intrinsics, to + improve the likelihood of diagnostics (instead of subtle run-time + bugs) when using compilers that don't support these as intrinsics. + + @item + New option @samp{-Wsurprising}. + + @item + DO loops with non-@samp{INTEGER} variables now diagnosed only when + @samp{-Wsurprising} specified. + Previously, this was diagnosed @emph{unless} @samp{-fpedantic} or + @samp{-fugly} was specified. + @end itemize + + @heading In 0.5.16: + + @itemize @bullet + @item + @code{libf2c} changed to output a leading zero (0) digit for floating-point + values output via list-directed and formatted output (to bring @code{g77} + more in line with many existing Fortran implementations---the + ANSI FORTRAN 77 standard leaves this choice to the implementation). + + @item + @code{libf2c} no longer built with debugging information + intact, making it much smaller. + + @item + Automatic installation of the @code{g77} command now works. + + @item + Diagnostic messages now more informative, a la @code{gcc}, + including messages like @samp{In function `foo':} and @samp{In file + included from...:}. + + @item + New group of intrinsics called @samp{unix}, including @samp{ABORT}, + @samp{DERF}, @samp{DERFC}, @samp{ERF}, @samp{ERFC}, @samp{EXIT}, + @samp{FLUSH}, @samp{GETARG}, @samp{GETENV}, @samp{SIGNAL}, and + @samp{SYSTEM}. + + @item + @samp{-funix-intrinsics-@{delete,hide,disable,enable@}} + options added. + + @item + @samp{-fno-underscoring} option added. + + @item + @samp{--driver} option added to the @code{g77} command. + + @item + Support for the @code{gcc} options @samp{-fident} and @samp{-fno-ident} + added. + + @item + @samp{g77 -v} returns much more version info, making the submission + of better bug reports easily. + + @item + Many improvements to the @code{g77} command to better fulfill its role as + a front-end to the @code{gcc} driver. + For example, @code{g77} now + recognizes @samp{--version} as a verbose way of specifying @samp{-v}. + + @item + Compiling preprocessed (@file{*.F} and @file{*.fpp}) files now + results in better diagnostics and debugging information, as the + source-location info now is passed all the + way through the compilation process instead of being lost. + @end itemize + + @heading In 0.5.15: + + @itemize @bullet + @item + @samp{-ffixed-line-length-@var{n}} option introduced. + @end itemize + + @heading In 0.5.14: + + @itemize @bullet + @item + Support for gcc's @samp{-I} option added. + + @item + @samp{-fbackslash} option added. + + @item + @samp{-fugly-args} option enabled by default (allows @samp{CALL FOO(4HABCD)}). + + @item + @samp{-fugly-init} option added. + + @item + @samp{-finit-local-zero} option added. + + @item + Support for the @code{gcc} option @samp{-Wimplicit} added. + + @item + @samp{-Wall} now implies @samp{-Wunused} and, when @samp{-O} is + specified, @samp{-Wuninitialized}. + + @cindex Hollerith constants + @cindex constants, Hollerith + @item + Hollerith constants as actual arguments now are passed by reference + instead of by value---so @samp{CALL FOO(4HABCD)} now is compiled exactly + the same as @samp{CALL FOO(%REF('ABCD'))}, instead of as + @samp{CALL FOO(%VAL('ABCD'))}. + + @item + Hollerith constants converted to larger types now are padded on the + right with spaces. + When converted to smaller types, warnings are issued + if non-spaces are truncated on the right. + + @item + Format specifications of arrays of types other than @samp{CHARACTER} are + allowed in I/O statements, such as when they contain Hollerith + data. + + @cindex typeless constants + @cindex constants, typeless + @item + Typeless constants as actual arguments now are passed by reference + to an @samp{INTEGER} version of the constant instead of by value. + + @item + Typeless constants converted to larger types are padded on the left + with zeros. + When converted to smaller types, warnings are issued if non-zero + bits are truncated on the left. + + @cindex %DESCR() intrinsic + @cindex intrinsics, %DESCR() + @item + @samp{%DESCR()} of a non-@samp{CHARACTER} expression treats the expression + as if it were @samp{CHARACTER}, passing both a pointer to the expression + and the length of the type of the expression in bytes, by value, in the + ``hidden'' list of lengths used for @samp{CHARACTER} arguments. + + @item + The @samp{ICHAR()}, @samp{IACHAR()}, and @samp{LEN()} intrinsics now + accept character expressions involving concatenation of assumed-length + dummy arguments. + + @item + Block data program units now may contain @samp{NAMELIST}, @samp{EXTERNAL}, + @samp{INTRINSIC}, and @samp{VOLATILE} statements. + + @item + Zero-length character expressions now supported. + + @item + Support for the @code{f2c} intrinsic @samp{IMAG()} added. + + @item + @samp{INCLUDE} statement restrictions, such as no continuation + lines allowed, now lifted. + @end itemize + + @node Language + @chapter The GNU Fortran Language + + GNU Fortran supports a variety of extensions to, and dialects + of, the Fortran language. + Its primary base is the ANSI FORTRAN 77 standard. + It offers some extensions that are popular among users + of UNIX @code{f77} and @code{f2c} compilers, some that + are popular among users of other compilers (such as Digital + products), some that are popular among users of the + newer Fortran 90 standard, and some that are introduced + by GNU Fortran. + + Part of what defines a particular implementation of a Fortran + system, such as @code{g77}, is the particular characteristics + of how it supports types, constants, and so on. + Much of this is left up to the implementation by the various + Fortran standards and accepted practice in the industry. + + @menu + * Standard Support:: Degree of support for the ANSI FORTRAN 77 standard. + * Extensions:: Extensions to GNU Fortran. + * Types:: Data types. + * Constants:: Constants and their types. + * Source Form:: Form of source files (fixed, free, and so on). + * Pedantic Compilation:: Warnings about non-standard constructs. + * Case Sensitivity:: Uppercase and lowercase in source files. + * Intrinsics:: How intrinsics are grouped for easy management. + * Dialects:: Dialects supported by GNU Fortran. + * Object Compatibility:: Compatibility issues for code generated by @code{g77}. + * Distensions:: Misfeatures supported by GNU Fortran. + @end menu + + @node Standard Support + @section ANSI FORTRAN 77 Standard Support + @cindex ANSI FORTRAN 77 support + @cindex standard support + @cindex support for ANSI FORTRAN 77 + + GNU Fortran supports ANSI FORTRAN 77 with the following caveats: + + @itemize @bullet + @item + No passing of an external procedure as an actual argument if the procedure's + type is declared @samp{CHARACTER*(*)}. For example: + + @example + CHARACTER*(*) CFUNC + EXTERNAL CFUNC + CALL FOO(CFUNC) + END + @end example + + @noindent + It isn't clear whether the standard considers this conforming. + + Note that it is unlikely that any production Fortran code + tries to use this unsupported construct. + + @item + No passing of a dummy procedure as an actual argument if the procedure's + type is declared @samp{CHARACTER*(*)}. + + @example + SUBROUTINE BAR(CFUNC) + CHARACTER*(*) CFUNC + EXTERNAL CFUNC + CALL FOO(CFUNC) + END + @end example + + @noindent + It isn't clear whether the standard considers this conforming. + + Note that it is unlikely that any production Fortran code + tries to use this unsupported construct. + + @item + The @samp{DO} variable for an implied-@samp{DO} construct in a + @samp{DATA} statement may not be used as the @samp{DO} variable + for an outer implied-@samp{DO} construct. For example, this + fragment is disallowed by @code{g77}: + + @smallexample + DATA ((A(I, I), I= 1, 10), I= 1, 10)/@dots{}/ + @end smallexample + + @noindent + This also is disallowed by Fortran 90, as it offers no additional + capabilities and would have a variety of possible meanings. + + Note that it is @emph{very} unlikely that any production Fortran code + tries to use this unsupported construct. + + @item + An array element initializer in an implied-@samp{DO} construct in a + @samp{DATA} statement must contain at least one reference to the @samp{DO} + variables of each outer implied-@samp{DO} construct. For example, + this fragment is disallowed by @code{g77}: + + @example + DATA (A, I= 1, 1)/1./ + @end example + + @noindent + This also is disallowed by Fortran 90, as FORTRAN 77's more permissive + requirements offer no additional capabilities. + However, @code{g77} doesn't necessarily diagnose all cases + where this requirement is not met. + + Note that it is @emph{very} unlikely that any production Fortran code + tries to use this unsupported construct. + @end itemize + + In summary, the only ANSI FORTRAN 77 features @code{g77} doesn't + support are those that are probably rarely used in actual code, + some of which are explicitly disallowed by the Fortran 90 standard. + + @node Extensions + @section GNU Fortran Extensions + @cindex extensions + @cindex language extensions + + GNU Fortran supports ANSI FORTRAN 77 plus: + + @itemize @bullet + @cindex LOC() intrinsic + @cindex intrinsics, LOC() + @item + @samp{LOC()}, if @samp{-funix-intrinsics-enable} is in force. + + @item + @cindex %LOC() intrinsic + @cindex intrinsics, %LOC() + @cindex %VAL() intrinsic + @cindex intrinsics, %VAL() + @cindex %REF() intrinsic + @cindex intrinsics, %REF() + @cindex %DESCR() intrinsic + @cindex intrinsics, %DESCR() + @samp{%LOC}, @samp{%VAL}, @samp{%REF}, and @samp{%DESCR}---where + @samp{%DESCR} currently means the same thing as passing the argument + as if it were a @samp{CHARACTER} variable (with the phantom + length argument appended to the argument list). + + @item + MIL-STD 1753 features (@samp{IAND}, @samp{IOR}, @samp{MVBITS}, + @samp{DO WHILE}, @samp{END DO}, and so on). + + @cindex NAMELIST statement + @cindex statements, NAMELIST + @item + @samp{NAMELIST}. + + @item + Most @code{f2c} intrinsics (@samp{AND}, @samp{OR}, @samp{LSHIFT}, + @samp{RSHIFT}, and so on). + + @item + @samp{DOUBLE COMPLEX} and related intrinsics (standard and @code{f2c} + varieties). + + @item + Various Fortran 90 features, such as @samp{CYCLE}, @samp{EXIT}, + @samp{SELECT CASE} (except for @samp{CHARACTER} types). + + @item + Various DEC VAX/VMS FORTRAN v4.0 features (loosely called VXT extensions). + + @item + Various @code{f2c} features. + + @item + Source files that are uppercase-only (enforced), lowercase-only + (enforced), caseless, and various other combinations as chosen via + command-line options. + + @item + Arbitrary (limited only by available memory) number of continuation lines. + + @item + Use of @samp{&} in column 1 to indicate a continuation line + (as supported by @code{f2c}). + + @item + Dollar signs (@samp{$}) in identifiers (other than as the first character) + when the @samp{-fdollar-ok} option is specified. + @end itemize + + When @samp{-ff90} is specified, the language dialect changes as follows: + + @itemize @bullet + @item + The type of @samp{REAL(Z)}, where @samp{Z} is type + @samp{DOUBLE COMPLEX}, is @samp{DOUBLE PRECISION} + instead of @samp{REAL}. + + @item + Zero-length @samp{CHARACTER} entities are accepted, + even when @samp{-fpedantic} is specified. + + @item + Zero-size array dimensions (as in @samp{INTEGER I(10,20,4:2)}) + are accepted, + although these are not supported by @samp{libf2c}, so diagnostics + are nevertheless produced for @code{g77}. + + @item + @samp{DOUBLE COMPLEX} (explicit or implicit) is accepted, + even when @samp{-fpedantic} is specified. + + @item + Substrings of constants (as in @samp{'hello'(3:5)}) are + accepted, even when @samp{-fpedantic} is specified. + + @item + @samp{DATA} statements are allowed to precede executable statements, + even when @samp{-fpedantic} specified. + + Note that this does not allow all possible means of specifying + further attributes via specification statements for a variable + after it has been given an initial value via @samp{DATA} or a + type-declaration statement. + For example, + after @samp{DATA I/1/}, @samp{INTEGER I} is not permitted, but + @samp{INTEGER J} is permitted. + + @item + @cindex semicolons + @cindex statements, separated by semicolon + Use of a semicolon (@samp{;}) as a statement separator + is accepted, even when @samp{-fpedantic} specified + (so @samp{CALL FOO; CALL BAR} works). + + @item + Underscores (@samp{_}) are accepted in symbol names (except as the + first character, since Fortran 90 provides a different interpretation + for certain cases where that would occur---though @code{g77} does + not yet support that interpretation). + @end itemize + + @node Types + @section Types + @cindex types, of data + @cindex data types + + Fortran implementations have a fair amount of freedom given them by the + standard as far as how much storage space is used and how much precision + is offered by the various types such as @samp{LOGICAL}, @samp{INTEGER}, + @samp{REAL}, @samp{DOUBLE PRECISION}, @samp{COMPLEX}, and @samp{CHARACTER}. + Further, many compilers offer so-called @samp{*@var{n}} notation, but + the interpretation of @var{n} varies across compilers and target architectures. + + The standard requires that @samp{LOGICAL}, @samp{INTEGER}, and @samp{REAL} + occupy the same amount of storage space, and that @samp{COMPLEX} and + @samp{DOUBLE PRECISION} take twice as much storage space as @samp{REAL}. + Further, it requires that @samp{COMPLEX} + entities be ordered such that when a @samp{COMPLEX} variable is + storage-associated (such as via @samp{EQUIVALENCE}) + with a two-element @samp{REAL} array named @samp{R}, @samp{R(1)} + corresponds to the real element and @samp{R(2)} to the imaginary + element of the @samp{COMPLEX} variable. + No particular requirements as to precision of any of these are placed on + the implementation, nor is the relationship of storage sizes of these + types to the @samp{CHARACTER} type specified by the standard. + + @code{g77} follows the above requirements, warning when compiling + a program requires placement of items in memory that contradict the + requirements of the target architecture. + (For example, a program can require placement of a @samp{DOUBLE PRECISION} + on a boundary that is not an even multiple of its size, but still an + even multiple of the size of a @samp{REAL} variable. + On some target architectures, using the canonical + mapping of Fortran types to underlying architectural types, such + placement is prohibited by the machine definition or + the Application Binary Interface (ABI) in force for + the configuration defined for building @code{gcc} and @code{g77}. + @code{g77} warns about such + situations when it encounters them.) + + @code{g77} follows consistent rules for configuring the mapping between Fortran + types, including the @samp{*@var{n}} notation, and the underlying architectural + types as accessed by a similarly-configured applicable version of the + @code{gcc} compiler. + These rules offer a widely portable, consistent Fortran/C + environment, although they might well conflict with the expectations of + users of Fortran compilers designed and written for particular + architectures. + + These rules are based on the configuration that is in force for the + version of @code{gcc} built in the same release as @code{g77} (and + which was therefore used to build both the @code{g77} compiler + components and the @code{libf2c} run-time library): + + @table @code + @cindex REAL type + @cindex types, REAL + @item REAL + Same as @samp{float} type. + + @cindex DOUBLE PRECISION type + @cindex types, DOUBLE PRECISION + @item DOUBLE PRECISION + Same as whatever floating-point type that is twice the size + of a @samp{float}---usually, this is a @samp{double}. + + @cindex INTEGER type + @cindex types, INTEGER + @item INTEGER + Same as an integral type that is occupies the same amount + of memory storage @samp{float}---usually, this is either + an @samp{int} or a @samp{long int}. + + @cindex LOGICAL type + @cindex types, LOGICAL + @item LOGICAL + Same @code{gcc} type as @samp{INTEGER}. + + @cindex COMPLEX type + @cindex types, COMPLEX + @item COMPLEX + Two @samp{REAL} scalars (one for the real part followed by + one for the imaginary part). + + @cindex DOUBLE COMPLEX type + @cindex types, DOUBLE COMPLEX + @item DOUBLE COMPLEX + Two @samp{DOUBLE PRECISION} scalars. + + @cindex *@var{n} notation + @item @var{numeric-type}*@var{n} + (Where @var{numeric-type} is any type other than @samp{CHARACTER}.) + Same as whatever @code{gcc} type occupies @var{n} times the storage + space of a @code{gcc} @samp{char} item. + + @cindex KIND= notation + @item @var{numeric-type}(KIND=@var{n}) + @var{n}=1 corresponds to @samp{REAL}, @samp{INTEGER}, @samp{LOGICAL}, + @samp{COMPLEX}. + @var{n}=2 corresponds to @samp{DOUBLE PRECISION}, @samp{DOUBLE COMPLEX}, + and, for integral types, @samp{char} (usually @samp{INTEGER*1} + and @samp{LOGICAL*1}). + @var{n}=3 corresponds to @samp{short} for integral types + (usually @samp{INTEGER*2} and @samp{LOGICAL*2}). + @var{n}=4 corresponds to @samp{long long} for integral types + (this usually means @samp{INTEGER*8} and @samp{LOGICAL*8}). + + Note that these are proposed correspondences and might change + in future versions of @code{g77}---avoid writing code depending + on them. + @end table + + For now, @code{g77} does not support numeric types other + than the ones listed above. + So, on a typical 32-bit machine, only @samp{INTEGER*4}, @samp{REAL*4}, + @samp{LOGICAL*4}, @samp{COMPLEX*8}, and so on, will work. + Other types supported by @code{g77} + are derived from gcc types such as @samp{char}, @samp{short}, + @samp{int}, @samp{long int}, @samp{long long int}, @samp{long double}, + and so on. + That is, whatever types @samp{gcc} already supports, @code{g77} probably + will support in a future version. + The rules for the @samp{@var{numeric-type}*@var{n}} notation will + apply to the new types, + and new values for @samp{@var{numeric-type}(KIND=@var{n})} will be + assigned in a way that encourages clarity, consistency, and portability. + + @node Constants + @section Constants + @cindex constants + @cindex types, constants + + @code{g77} strictly assigns types to all constants not + documented as ``typeless'' (the typeless constants include things like + @samp{Z'1'}). + Context is never a determining factor for the type, and hence + the interpretation, of a typed constant. + Examples: @samp{1} is always type @samp{INTEGER}, + @samp{3.141592653545256234} is always type @samp{REAL} (even if the + additional precision specified is lost, and even when used in a @samp{DOUBLE + PRECISION} context), @samp{1E0} is always type @samp{REAL}, and @samp{1D0} + is always type @samp{DOUBLE PRECISION}. + + Many other Fortran compilers attempt to assign types to typed constants + based on their context. + This results in hard-to-find bugs, nonportable + code, and is not in the spirit (though it strictly follows the letter) + of the 77 and 90 standards. + @code{g77} will not support these dangerous + semantics, but might offer, in a future release, explicit constructs by + which a wider variety of typeless constants may be specified, and/or + user-requested warnings indicating places where @code{g77} might differ + from how other compilers assign types to constants. + + @node Source Form + @section Source Form + @cindex source file format + @cindex source form + @cindex files, source + @cindex source code + @cindex code, source + @cindex fixed form + @cindex free form + + The @samp{-ffree-form} (aka @samp{-fno-fixed-form}) and @samp{-ffixed-form} + (aka @samp{-fno-free-form}) command-line options govern how the + source file is interpreted. + Fixed form + corresponds to classic ANSI FORTRAN 77 (plus popular extensions, such as + allowing tabs) and Fortran 90's fixed form. + Free form corresponds to + Fortran 90's free form (though possibly not entirely up-to-date, and + without complaining about some things that for which Fortran 90 requires + diagnostics, such as @samp{R = 3 . 1}). + + The way a Fortran compiler views source files depends entirely on the + implementation choices made for the compiler. + GNU Fortran currently tries to be somewhat like a few popular compilers + (@code{f2c}, DEC Fortran, and so on), though a cleaner default + definition along with more + flexibility offered by command-line options is likely to be offered + in version 0.6. + + Here are some facts regarding the way @code{g77} interprets source lines: + + @itemize @bullet + @cindex carriage returns + @item + Carriage returns (@samp{\r}) in source lines are ignored. + This is somewhat different from @code{f2c}, which seems to treat them as + spaces outside character/Hollerith constants, and encodes them as @samp{\r} + inside such constants. + + @cindex tab characters + @item + A source line with a @key{TAB} character anywhere in it is treated as + entirely significant---however long it is---instead of ending in + column 72 (for fixed-form source) or 132 (for free-form source). + This also is different from @code{f2c}, which encodes tabs as + @samp{\t} (the ASCII @key{TAB} character) inside character + and Hollerith constants, but nevertheless seems to treat the column + position as if it had been affected by the canonical tab positioning. + + @code{g77} effectively + translates tabs to the appropriate number of spaces (a la the default + for the UNIX @code{expand} command) before doing any other processing, other + than (currently) noting whether a tab was found on a line and using this + info to decide how to interpret the length of the line and continued + constants. + + Note that this default behavior probably will change for version 0.6, + when it will presumably be available via a command-line option. + The default as of version 0.6 is planned to be a ``pure visual'' + model, where tabs are immediately + converted to spaces and otherwise have no effect, so the way a typical + user sees source lines produces a consistent result no matter how the + spacing in those source lines is actually implemented via tabs, spaces, + and trailing tabs/spaces before newline. + Command-line options are likely to be added to specify whether all or + just-tabbed lines are to be extended to 132 or full input-line length, + and perhaps even an option will be added to specify the truncated-line + behavior to which some Digital compilers default (and which affects + the way continued character/Hollerith constants are interpreted). + + @item + Source lines shorter than the applicable fixed length are treated as + if they were padded with spaces to that length. + + This affects only + continued character and Hollerith constants, and is a different + interpretation than provided by some other popular compilers + (although a bit more consistent with the traditional punched-card + basis of Fortran and the way the Fortran standard expressed fixed + source form). + + @code{g77} might someday offer an option to warn about cases where differences + might be seen as a result of this treatment, and perhaps an option to + specify the alternate behavior as well. + + Note that this padding cannot apply to lines that are effectively of + infinite length---such lines are specified using command-line options + like @samp{-ffixed-line-length-none}, for example. + @end itemize + + @node Pedantic Compilation + @section Pedantic Compilation + @cindex pedantic compilation + @cindex compilation, pedantic + + The @samp{-fpedantic} command-line option specifies that @code{g77} + is to warn about certain non-standard constructs. + This is useful for finding + some extensions @code{g77} accepts that other compilers might not accept. + (Note that the @samp{-pedantic} and @samp{-pedantic-errors} options + always imply @samp{-fpedantic}.) + + With @samp{-ff90} in force along with @samp{-fpedantic}, some constructs are + accepted that result in diagnostics when @samp{-fno-f90} and + @samp{-fpedantic} are both in force. + @xref{Extensions,,GNU Fortran Extensions}, for information on those constructs. + + The constructs for which @code{g77} issues diagnostics when @samp{-fpedantic} + and @samp{-fno-f90} are in force are: + + @itemize @bullet + @item + Automatic arrays, as in @samp{REAL A(N)}, where @samp{A} + is not a dummy argument. + + @item + @samp{READ (5), I} and @samp{WRITE (10), J}---the standard disallows the + comma in each case, while allowing it in @samp{READ 10, I}, but many + compilers (including @code{f2c}) allow the superfluous comma. + + @item + @samp{DOUBLE COMPLEX}, either explicitly (via explicit or @samp{IMPLICIT} + statement) or implicitly (as in @samp{C*D}, where @samp{C} is @samp{COMPLEX} + and @samp{D} is @samp{DOUBLE PRECISION}, which is prohibited by the + standard because it should produce a non-standard @samp{DOUBLE COMPLEX} + result). + + @item + Automatic conversion of numeric + expressions to @samp{INTEGER} in contexts such as: + @itemize -- + @item + Array-reference indexes. + @item + Alternate-return values. + @item + Computed @samp{GOTO}. + @item + @samp{FORMAT} run-time expressions (not yet supported). + @item + Dimension lists in specification statements. + @item + Numbers for I/O statements (such as @samp{READ (UNIT=3.2), I}) + @item + Sizes of @samp{CHARACTER} entities in specification statements. + @item + Kind types in specification entities (a Fortran 90 feature). + @item + Initial, terminal, and incrementation parameters for implied-@samp{DO} + constructs in @samp{DATA} statements. + @end itemize + + @item + Automatic conversion of @samp{LOGICAL} expressions to @samp{INTEGER} + in contexts such as arithmetic @samp{IF} (where @samp{COMPLEX} + expressions are disallowed anyway). + + @item + Substring operators applied to character constants and named + constants (such as @samp{PRINT *,'hello'(3:5)}, which would print @samp{llo}). + + @item + Null argument passed to statement function (as in @samp{PRINT *,FOO(,3)}). + + @item + Differences between program units regarding whether a given @samp{COMMON} + area is @samp{SAVE}d (for targets where program units in a single source + file are ``glued'' together as they typically are for UNIX development + environments). + + @item + Differences between named-@samp{COMMON}-block sizes between program units. + + @item + Specification statements following first @samp{DATA} statement (normally + @samp{DATA I/1/} may be followed by @samp{INTEGER J}, though not + @samp{INTEGER I}, but @samp{-fpedantic} disables use of both cases. + + @item + Semicolon as statement separator (as in @samp{CALL FOO; CALL BAR}). + @c + @c @item + @c Comma before list of I/O items in @samp{WRITE} + @c @c, @samp{ENCODE}, @samp{DECODE}, and @samp{REWRITE} + @c statements, as with @samp{READ} (as explained above). + + @item + Use of @samp{&} in column 1 of fixed-form source (indicates continuation). + + @item + Use of @samp{CHARACTER} constants to initialize numeric entities, and vice + versa. + + @item + Expressions having two arithmetic operators in a row, such + as @samp{X*-Y}. + @end itemize + + If @samp{-fpedantic} is specified along with @samp{-ff90}, the + following constructs result in diagnostics: + + @itemize @bullet + @item + Use of semicolons on line with INCLUDE statement. + @end itemize + + @node Case Sensitivity + @section Case Sensitivity + @cindex case sensitivity + @cindex source file format + @cindex code, source + @cindex source code + @cindex uppercase letters + @cindex lowercase letters + @cindex letters, uppercase + @cindex letters, lowercase + + GNU Fortran offers the programmer way too much flexibility in deciding + how source files are to be treated vis-a-vis uppercase and lowercase + characters. + There are 66 useful settings that affect case sensitivity, plus 10 + settings that are nearly useless, with the remaining 116 settings + being either redundant or useless. + + None of these settings have any effect on the contents of comments + (the text after a @samp{c} or @samp{C} in Column 1, for example) + or of character or Hollerith constants. + Note that things like the @samp{E} in the statement + @samp{CALL FOO(3.2E10)} and the @samp{TO} in @samp{ASSIGN 10 TO LAB} + are considered built-in keywords. + + Low-level switches are identified in this discussion thusly: + + @itemize @w{} + @item A + Source Case Conversion + @itemize @w{} + @item 0 + Preserve (see Note 1) + @item 1 + Convert to Upper Case + @item 2 + Convert to Lower Case + @end itemize + + @item B + Built-in Keyword Matching: + @itemize @w{} + @item 0 + Match Any Case (per-character basis) + @item 1 + Match Upper Case Only + @item 2 + Match Lower Case Only + @item 3 + Match InitialCaps Only (see tables for spellings) + @end itemize + + @item C + Built-in Intrinsic Matching: + @itemize @w{} + @item 0 + Match Any Case (per-character basis) + @item 1 + Match Upper Case Only + @item 2 + Match Lower Case Only + @item 3 + Match InitialCaps Only (see tables for spellings) + @end itemize + + @item D + User-defined Symbol Possibilities (warnings only) + @itemize @w{} + @item 0 + Allow Any Case (per-character basis) + @item 1 + Allow Upper Case Only + @item 2 + Allow Lower Case Only + @item 3 + Allow InitialCaps Only (see Note 2) + @end itemize + @end itemize + + Note 1: @code{g77} eventually will support @samp{NAMELIST} in a manner that is + consistent with these source switches---in the sense that input will be + expected to meet the same requirements as source code in terms + of matching symbol names and keywords (for the exponent letters). + + Currently, however, @samp{NAMELIST} is supported @samp{libf2c}, + which uppercases @samp{NAMELIST} input and symbol names for matching. + This means not only that @samp{NAMELIST} output currently shows symbol + (and keyword) names in uppercase even if lower-case source + conversion (option A2) is selected, but that @samp{NAMELIST} cannot be + adequately supported when source case preservation (option A0) + is selected. + + If A0 is selected, a warning message will be + output for each @samp{NAMELIST} statement to this effect. + The behavior + of the program is undefined at run time if two or more symbol names + appear in a given @samp{NAMELIST} such that the names are identical + when converted to upper case (e.g. @samp{NAMELIST /X/ VAR, Var, var}). + For complete and total elegance, perhaps there should be a warning + when option A2 is selected, since the output of NAMELIST is currently + in uppercase but will someday be lowercase (when a @samp{libg77} is written), + but that seems to be overkill for a product in beta test. + + Note 2: Rules for InitialCaps names are: + @itemize -- + @item + Must be a single uppercase letter, @strong{or} + @item + Must start with an uppercase letter and contain at least one + lowercase letter. + @end itemize + + So @samp{A}, @samp{Ab}, @samp{ABc}, @samp{AbC}, and @samp{Abc} are + valid InitialCaps names, but @samp{AB}, @samp{A2}, and @samp{ABC} are + not. + Note that most, but not all, built-in names meet these + requirements---the exceptions are some of the two-letter format + specifiers, such as @samp{BN} and @samp{BZ}. + + Here are the names of the corresponding command-line options: + + @smallexample + A0: -fsource-case-preserve + A1: -fsource-case-upper + A2: -fsource-case-lower + + B0: -fmatch-case-any + B1: -fmatch-case-upper + B2: -fmatch-case-lower + B3: -fmatch-case-initcap + + C0: -fintrin-case-any + C1: -fintrin-case-upper + C2: -fintrin-case-lower + C3: -fintrin-case-initcap + + D0: -fsymbol-case-any + D1: -fsymbol-case-upper + D2: -fsymbol-case-lower + D3: -fsymbol-case-initcap + @end smallexample + + Useful combinations of the above settings, along with abbreviated + option names that set some of these combinations all at once: + + @smallexample + 1: A0-- B0--- C0--- D0--- -fcase-preserve + 2: A0-- B0--- C0--- D-1-- + 3: A0-- B0--- C0--- D--2- + 4: A0-- B0--- C0--- D---3 + 5: A0-- B0--- C-1-- D0--- + 6: A0-- B0--- C-1-- D-1-- + 7: A0-- B0--- C-1-- D--2- + 8: A0-- B0--- C-1-- D---3 + 9: A0-- B0--- C--2- D0--- + 10: A0-- B0--- C--2- D-1-- + 11: A0-- B0--- C--2- D--2- + 12: A0-- B0--- C--2- D---3 + 13: A0-- B0--- C---3 D0--- + 14: A0-- B0--- C---3 D-1-- + 15: A0-- B0--- C---3 D--2- + 16: A0-- B0--- C---3 D---3 + 17: A0-- B-1-- C0--- D0--- + 18: A0-- B-1-- C0--- D-1-- + 19: A0-- B-1-- C0--- D--2- + 20: A0-- B-1-- C0--- D---3 + 21: A0-- B-1-- C-1-- D0--- + 22: A0-- B-1-- C-1-- D-1-- -fcase-strict-upper + 23: A0-- B-1-- C-1-- D--2- + 24: A0-- B-1-- C-1-- D---3 + 25: A0-- B-1-- C--2- D0--- + 26: A0-- B-1-- C--2- D-1-- + 27: A0-- B-1-- C--2- D--2- + 28: A0-- B-1-- C--2- D---3 + 29: A0-- B-1-- C---3 D0--- + 30: A0-- B-1-- C---3 D-1-- + 31: A0-- B-1-- C---3 D--2- + 32: A0-- B-1-- C---3 D---3 + 33: A0-- B--2- C0--- D0--- + 34: A0-- B--2- C0--- D-1-- + 35: A0-- B--2- C0--- D--2- + 36: A0-- B--2- C0--- D---3 + 37: A0-- B--2- C-1-- D0--- + 38: A0-- B--2- C-1-- D-1-- + 39: A0-- B--2- C-1-- D--2- + 40: A0-- B--2- C-1-- D---3 + 41: A0-- B--2- C--2- D0--- + 42: A0-- B--2- C--2- D-1-- + 43: A0-- B--2- C--2- D--2- -fcase-strict-lower + 44: A0-- B--2- C--2- D---3 + 45: A0-- B--2- C---3 D0--- + 46: A0-- B--2- C---3 D-1-- + 47: A0-- B--2- C---3 D--2- + 48: A0-- B--2- C---3 D---3 + 49: A0-- B---3 C0--- D0--- + 50: A0-- B---3 C0--- D-1-- + 51: A0-- B---3 C0--- D--2- + 52: A0-- B---3 C0--- D---3 + 53: A0-- B---3 C-1-- D0--- + 54: A0-- B---3 C-1-- D-1-- + 55: A0-- B---3 C-1-- D--2- + 56: A0-- B---3 C-1-- D---3 + 57: A0-- B---3 C--2- D0--- + 58: A0-- B---3 C--2- D-1-- + 59: A0-- B---3 C--2- D--2- + 60: A0-- B---3 C--2- D---3 + 61: A0-- B---3 C---3 D0--- + 62: A0-- B---3 C---3 D-1-- + 63: A0-- B---3 C---3 D--2- + 64: A0-- B---3 C---3 D---3 -fcase-initcap + 65: A-1- B01-- C01-- D01-- -fcase-upper + 66: A--2 B0-2- C0-2- D0-2- -fcase-lower + @end smallexample + + Number 22 is the ``strict'' ANSI FORTRAN 77 model wherein all input + (except comments, character constants, and Hollerith strings) must + be entered in uppercase. + Use @samp{-fcase-strict-upper} to specify this + combination. + + Number 43 is like Number 22 except all input must be lowercase. Use + @samp{-fcase-strict-lower} to specify this combination. + + Number 65 is the ``classic'' ANSI FORTRAN 77 model as implemented on many + non-UNIX machines whereby all the source is translated to uppercase. + Use @samp{-fcase-upper} to specify this combination. + + Number 66 is the ``canonical'' UNIX model whereby all the source is + translated to lowercase. + Use @samp{-fcase-lower} to specify this combination. + + There are a few nearly useless combinations: + + @smallexample + 67: A-1- B01-- C01-- D--2- + 68: A-1- B01-- C01-- D---3 + 69: A-1- B01-- C--23 D01-- + 70: A-1- B01-- C--23 D--2- + 71: A-1- B01-- C--23 D---3 + 72: A--2 B01-- C0-2- D-1-- + 73: A--2 B01-- C0-2- D---3 + 74: A--2 B01-- C-1-3 D0-2- + 75: A--2 B01-- C-1-3 D-1-- + 76: A--2 B01-- C-1-3 D---3 + @end smallexample + + The above allow some programs to be compiled but with restrictions that + make most useful programs impossible: Numbers 67 and 72 warn about + @emph{any} user-defined symbol names (such as @samp{SUBROUTINE FOO}); + Numbers + 68 and 73 warn about any user-defined symbol names longer than one + character that don't have at least one non-alphabetic character after + the first; + Numbers 69 and 74 disallow any references to intrinsics; + and Numbers 70, 71, 75, and 76 are combinations of the restrictions in + 67+69, 68+69, 72+74, and 73+74, respectively. + + All redundant combinations are shown in the above tables anyplace + where more than one setting is shown for a low-level switch. + For example, @samp{B0-2-} means either setting 0 or 2 is valid for switch B. + The ``proper'' setting in such a case is the one that copies the setting + of switch A---any other setting might slightly reduce the speed of + the compiler, though possibly to an unmeasurable extent. + + All remaining combinations are useless in that they prevent successful + compilation of non-null source files (source files with something other + than comments). + + @node Intrinsics + @section Intrinsics + @cindex groups of intrinsics + @cindex intrinsics, groups + + A given specific intrinsic belongs in one or more groups. + Each group + is deleted, disabled, hidden, or enabled by default or a command-line + option. The meaning of each term follows. + + @table @b + @cindex deleted intrinsics + @cindex intrinsics, deleted + @item Deleted + No intrinsics are recognized as belonging to that group. + + @cindex disabled intrinsics + @cindex intrinsics, disabled + @item Disabled + Intrinsics are recognized as belonging to the group, but + references to them (other than via the @samp{INTRINSIC} statement) + are disallowed through that group. + + @cindex hidden intrinsics + @cindex intrinsics, hidden + @item Hidden + Intrinsics in that group are recognized and enabled (if implemented) + @emph{only} if the first mention of the actual name of an intrinsic + in a program unit is in an @samp{INTRINSIC} statement. + + @cindex enabled intrinsics + @cindex intrinsics, enabled + @item Enabled + Intrinsics in that group are recognized and enabled (if implemented). + @end table + + The distinction between deleting and disabling a group is illustrated + by the following example. + Assume intrinsic @samp{FOO} belongs only to group @samp{FGR}. + If group @samp{FGR} is deleted, the following program unit will + successfully compile, because @samp{FOO()} will be seen as a + reference to an external function named @samp{FOO}: + + @example + PRINT *, FOO() + END + @end example + + @noindent + If group @samp{FGR} is disabled, compiling the above program will produce + diagnostics, either because the @samp{FOO} intrinsic is improperly invoked + or, if properly invoked, it is not enabled. + To change the above program so it references an external function @samp{FOO} + instead of the disabled @samp{FOO} intrinsic, + add the following line to the top: + + @example + EXTERNAL FOO + @end example + + @noindent + So, deleting a group tells @code{g77} to pretend as though the intrinsics in + that group do not exist at all, whereas disabling it tells @code{g77} to + recognize them as (disabled) intrinsics in intrinsic-like contexts. + + Hiding a group is like enabling it, but the intrinsic must be first + named in an @samp{INTRINSIC} statement to be considered a reference to the + intrinsic rather than to an external procedure. + This might be the ``safest'' way to treat a new group of intrinsics + when compiling old + code, because it allows the old code to be generally written as if + those new intrinsics never existed, but to be changed to use them + by inserting @samp{INTRINSIC} statements in the appropriate places. + However, it should be the goal of development to use @samp{EXTERNAL} + for all names of external procedures that might be intrinsic names. + + If an intrinsic is in more than one group, it is enabled if any of its + containing groups are enabled; if not so enabled, it is hidden if + any of its containing groups are hidden; if not so hidden, it is disabled + if any of its containing groups are disabled; if not so disabled, it is + deleted. + This extra complication is necessary because some intrinsics, + such as @samp{IBITS}, belong to more than one group, and hence should be + enabled if any of the groups to which they belong are enabled, and so + on. + + The groups are: + + @cindex intrinsics, groups of + @cindex groups of intrinsics + @table @code + @item dcp + @samp{DOUBLE COMPLEX} intrinsics from the standards (F77, F90). + @item f2c + Intrinsics supported by AT&T's @code{f2c} converter and/or @code{libf2c}. + @item f90 + Fortran 90 intrinsics. + @item mil + MIL-STD 1753 intrinsics (@samp{MVBITS}, @samp{IAND}, @samp{BTEST}, and so on). + @item unix + UNIX intrinsics (@samp{IARGC}, @samp{EXIT}, @samp{ERF}, and so on). + @item vxt + VAX/VMS FORTRAN (current as of v4) intrinsics. + @end table + + @node Dialects + @section GNU Fortran Dialects + @cindex language dialects + @cindex dialects of language + @cindex Fortran 90 features + @cindex VXT features + + The @samp{-fvxt-not-f90} and @samp{-ff90-not-vxt} command-line options + control how @code{g77} interprets certain tokens and constructs that + have different meanings in VAX FORTRAN (circa v4) and Fortran 90. + @cindex VXT extensions + @cindex extensions, VXT + (Generally, this manual uses the invented acronym VXT to refer + to many popular VAX FORTRAN extensions, though not necessarily + those that are specific to the VAX processor architecture or the + VMS operating system. + An extension offered by a Digital Fortran product that also is + offered by several other Fortran products for different kinds of + systems is probably going to be considered for inclusion in @code{g77} + someday, and is considered a VXT extension.) + + When @samp{-ff90-not-vxt} is specified, the following interpretations are made + (and, when @samp{-fvxt-not-f90} is in effect, the opposite interpretations + are made): + + @itemize @bullet + @cindex double quotes + @cindex character constants + @cindex constants, character + @cindex octal constants + @cindex constants, octal + @item + Double-quote character (@samp{"}) delimits character constant just as does + apostrophe (@samp{'}), rather than beginning an octal constant of + @samp{INTEGER} type. + + @cindex exclamation points + @cindex continuation character + @cindex characters, continuation + @cindex comment character + @cindex characters, comment + @item + An exclamation point (@samp{!}) in column 5 of fixed-form source file + treated as a continuation character rather than the beginning of a comment + (as it does in any other column). + + @cindex TYPE statement + @cindex statements, TYPE + @item + @samp{TYPE FOO} and @samp{TYPE (FOO), BAR} + statements are recognized as the Fortran 90 variety, not I/O statements. + (However, the F90 variety is @emph{not} supported, so this really just + ensures that @code{g77} will produce a diagnostic instead of trying to + implement the VXT @samp{TYPE} statement---which currently is not supported + either.) + @end itemize + + @node Object Compatibility + @section Object Compatibility + @cindex object code + @cindex code, object + @cindex compatibility + @cindex f2c compatibility + @cindex compilers, compatibility + + An individual Fortran source file can be compiled to + an object (@file{*.o}) file instead of to the final + program executable. + This allows several portions of a program to be compiled + at different times and linked together whenever a new + version of the program is needed. + However, it introduces the issue of @dfn{object compatibility} + across the various object files (and libraries, or @file{*.a} + files) that are linked together to produce any particular + exectable file. + + Object compatibility is an issue when combining, in one + program, Fortran code compiled by more than one compiler + (or more than one configuration of a compiler). + If the compilers + disagree on how to transform the names of procedures, there + will normally be errors when linking such programs. + Worse, if the compilers agree on naming, but disagree on issues + like how to pass parameters, return arguments, and lay out + @samp{COMMON} areas, the earliest detected errors might be the + incorrect results produced by the program (and that assumes + these errors are detected, which is not always the case). + + Normally, @code{g77} generates code that is + object-compatible with code generated by a version of + @code{f2c} configured (with, for example, @file{f2c.h} definitions) + to be generally compatible with @code{g77} as built by @code{gcc}. + (Normally, @code{f2c} will, by default, conform to the appropriate + configuration, but it is possible that older or perhaps even newer + versions of @code{f2c}, or versions having certain configuration changes + to @code{f2c} internals, will produce object files that are + incompatible with @code{g77}.) + + For example, a Fortran string subroutine + argument will become two arguments on the C side: a @samp{char *} + and an @samp{int} length. + + Much of this compatibility results from the fact that + @code{g77} uses the same run-time library, @code{libf2c}, used by + @code{f2c}. + + Other compilers might or might not generate code that + is object-compatible with @code{libf2c} and current @code{g77}, + and some might offer such compatibility only when explicitly + selected via a command-line option to the compiler. + + @menu + * Dropping f2c Compatibility:: When speed is more important. + * Other Compilers:: Interoperation with code from other compilers. + @end menu + + @node Dropping f2c Compatibility + @subsection Dropping f2c Compatibility + + Specifying @samp{-fno-f2c} allows @code{g77} to generate, in + some cases, faster code, by not needing to allow to the possibility + of linking with code compiled by @code{f2c}. + + For example, this affects how @samp{REAL}, @samp{COMPLEX}, and + @samp{DOUBLE COMPLEX} functions are called. + With @samp{-fno-f2c}, they are + compiled as returning the appropriate @code{gcc} type + (@samp{float}, @samp{__complex__ float}, @samp{__complex__ double}, + in many configurations). + + With @samp{-ff2c} in force, they + are compiled differently (with perhaps slower run-time performance) + to accommodate the restrictions inherent in @code{f2c}'s use of K&R + C as an intermediate language---@samp{REAL} functions return double, + while @samp{COMPLEX} functions return + @samp{void} and use an extra argument pointing to a place for the functions to + return their values. + + It is possible that, in some cases, leaving @samp{-ff2c} in force + might produce faster code than using @samp{-fno-f2c}. + Feel free to experiment, but remember to experiment with changing the way + @emph{entire programs and their Fortran libraries are compiled} at + a time, since this sort of experimentation affects the interface + of code generated for a Fortran source file---that is, it affects + object compatibility. + + Note that @code{f2c} compatibility is a fairly static target to achieve, + though not necessarily perfectly so, since, like @code{g77}, it is + still being improved. + However, specifying @samp{-fno-f2c} causes @code{g77} + to generate code that will probably be incompatible with code + generated by future versions of @code{g77} when the same option + is in force. + You should make sure you are always able to recompile complete + programs from source code when upgrading to new versions of @code{g77} + or @code{f2c}, especially when using options such as @samp{-fno-f2c}. + + Therefore, if you are using @code{g77} to compile libraries and other + object files for possible future use and you don't want to require + recompilation for future use with subsequent versions of @code{g77}, + you might want to stick with @code{f2c} compatibility for now, and + carefully watch for any announcements about changes to the + @code{f2c}/@code{libf2c} interface that might affect existing programs + (thus requiring recompilation). + + It is probable that a future version of @code{g77} will not, + by default, generate object files compatible with @code{f2c} and not + use @code{libf2c}. + If you expect to depend on this compatibility in the + long term, use the options @samp{-ff2c -ff2c-library} when compiling + all of the applicable code. + This should either cause @code{g77} to produce compatible code + (at the expense of the availability of some features and + performance), or at the very least trigger + compiler warning messages, in future versions of @code{g77}. + + @node Other Compilers + @subsection Other Compilers + + On systems with Fortran compilers other than @code{f2c} and @code{g77}, + code compiled by @code{g77} is not expected to work + well with code compiled by the native compiler. + (This is true for @code{f2c}-compiled objects as well.) + Libraries compiled with the native compiler probably will have + to be recompiled with @code{g77} to be used with @code{g77}-compiled code. + + Reasons for such incompatibilities include: + + @itemize @bullet + @item + There might be differences in the way names of Fortran procedures + are translated for use in the system's object-file format. + For example, the statement @samp{CALL FOO} might be compiled + by @code{g77} to call a procedure the linker @code{ld} sees + given the name @samp{_foo_}, while the apparently corresponding + statement @samp{SUBROUTINE FOO} might be compiled by the + native compiler to define the linker-visible name @samp{_foo}, + or @samp{_FOO_}, and so on. + + @item + There might be subtle type mismatches which cause subroutine arguments + and function return values to get corrupted. + + This is why simply getting @code{g77} to + transform procedure names the same way a native + compiler does is not usually a good idea---unless + some effort has been made to ensure that, aside + from the way the two compilers transform procedure + names, everything else about the way they generate + code for procedure interfaces is identical. + + @item + Native compilers + use libraries of private I/O routines which will not be available + at link time unless you have the native compiler---and you would + have to explicitly ask for them. + + For example, on the Sun you + would have to add @samp{-L/usr/lang/SCx.x -lF77 -lV77} to the link + command. + @end itemize + + @node Distensions + @section Distensions + @cindex distensions + @cindex ugly features + @cindex features, ugly + + The @samp{-fugly} command-line options determine whether certain + features supported by VAX FORTRAN and other such compilers, but considered + too ugly to be in code that can be changed to use safer and/or more + portable constructs, are accepted. + These are humorously referred to as ``distensions'', + extensions that just plain look ugly in the harsh light of day. + + The constructs enabled via @samp{-fugly} include: + + @itemize @bullet + @item + Automatic conversion between @samp{INTEGER} and @samp{LOGICAL} as + dictated by + context (typically implies nonportable dependencies on how a + particular implementation encodes @samp{.TRUE.} and @samp{.FALSE.}). + + @item + Use of typeless and Hollerith constants in non-standard places + (the ``standard'' here being the appendix in ANSI FORTRAN 77 and + the descriptions in MIL-STD 1753), plus in places controlled + by @samp{-fugly-args} and @samp{-fugly-init}. + + @item + Use of a @samp{LOGICAL} variable in @samp{ASSIGN} and assigned-@samp{GOTO} + statements. + + @item + Use of a single trailing comma to mean ``pass an extra trailing null + argument'' in a list of actual arguments to a procedure other than a + statement function. + + For example, @samp{CALL FOO(,)} means ``pass + two null arguments'' when @samp{-fugly} is used, rather than + ``pass one null argument''. + @end itemize + + The construct disabled via @samp{-fno-ugly-args} is: + + @itemize @bullet + @cindex Hollerith constants + @cindex constants, Hollerith + @item + Passing of typeless and Hollerith constants as actual arguments + in procedure invocations. + + For example, @samp{CALL FOO(4HABCD)}. + @end itemize + + The constructs disabled by @samp{-fno-ugly-init} are: + + @itemize @bullet + @cindex Hollerith constants + @cindex constants, Hollerith + @item + Use of Hollerith and typeless constants in contexts where they set + initial (compile-time) values for variables, arrays, and named + constants---that is, @samp{DATA} and @samp{PARAMETER} statements, plus + type-declaration statements specifying initial values. + + @cindex character constants + @cindex constants, character + @item + In the same contexts as above, use of character constants to initialize + numeric items and vice versa (one constant per item). + + @item + Use of Hollerith and typeless constants on the right-hand side + of assignment statements to numeric types, and in other + contexts (such as passing arguments to in invocations of + intrinsic procedures and statement functions) that + are treated as assignments to known types (the dummy + arguments, in these cases). + @end itemize + + @include install.texi + + @node Debugging and Interfacing + @chapter Debugging and Interfacing + @cindex debugging + @cindex interfacing + @cindex calling C routines + @cindex C routines calling Fortran + @cindex f2c compatibility + + GNU Fortran currently generates code that is object-compatible with + the @code{f2c} converter. + Also, it avoids limitations in the current GBE, such as the + inability to generate a procedure with + multiple entry points, by generating code that is structured + differently (in terms of procedure names, scopes, arguments, and + so on) than might be expected. + + As a result, writing code in other languages that calls on, is + called by, or shares in-memory data with @code{g77}-compiled code generally + requires some understanding of the way @code{g77} compiles code for + various constructs. + + Similarly, using a debugger to debug @code{g77}-compiled + code, even if that debugger supports native Fortran debugging, generally + requires this sort of information. + + This section describes some of the basic information on how + @code{g77} compiles code for constructs involving interfaces to other + languages and to debuggers. + + @emph{Caution:} Much or all of this information pertains to only the current + release of @code{g77}, sometimes even to using certain compiler options + with @code{g77} (such as @samp{-fno-f2c}). + Do not write code that depends on this + information without clearly marking said code as nonportable and + subject to review for every new release of @code{g77}. + This information + is provided primarily to make debugging of code generated by this + particular release of @code{g77} easier for the user, and partly to make + writing (generally nonportable) interface code easier. + Both of these + activities require tracking changes in new version of @code{g77} as they + are installed, because new versions can change the behaviors + described in this section. + + @menu + * Names:: Naming of user-defined variables, procedures, etc. + * Main Program Unit:: How @code{g77} compiles a main program unit. + * Arrays:: Dealing with (possibly multi-dimensional) arrays. + * Procedures:: How @code{g77} constructs parameter lists + for procedures. + * Adjustable Arrays:: Special consideration for adjustable arrays. + * Alternate Returns:: How @code{g77} handles alternate returns. + * Functions:: Functions returning floating-point or character data. + * Common Blocks:: Accessing common variables while debugging. + * Local Equivalence Areas:: Accessing @samp{EQUIVALENCE} while debugging. + * Alternate Entry Points:: How @code{g77} implements alternate @samp{ENTRY}. + * Assigned Statement Labels:: How @code{g77} handles @samp{ASSIGN}. + @end menu + + @node Names + @section Names + @cindex symbol names + @cindex transformation of symbol names + + Fortran permits each implementation to decide how to represent + names as far as how they're seen in other contexts, such as debuggers + and when interfacing to other languages, and especially as far + as how casing is handled. + + External names---names of entities that are public, or ``accessible'', + to all modules in a program---normally have an underscore (@samp{_}) + appended by @code{g77}, to generate code that is compatible with f2c. + External names include names of Fortran things like common blocks, + external procedures (subroutines and functions, but not including + statement functions, which are internal procedures), and entry point + names. + + However, use of the @samp{-fno-underscoring} option + disables this kind of transformation of external names (though inhibiting + the transformation certainly improves the chances of colliding with + incompatible externals written in other languages---but that + might be intentional. + + When @samp{-funderscoring} is in force, any name (external or local) + that already has at least one underscore in it is + implemented by @code{g77} by appending two underscores. + External names are changed this way for @code{f2c} compatibility. + Local names are changed this way to avoid collisions with external names + that are different in the source code---@code{f2c} does the same thing, but + there's no compatibility issue there except for user expectations while + debugging. + + For example: + + @example + Max_Cost = 0 + @end example + + @noindent + Here, a user would, in the debugger, refer to this variable using the + name @samp{max_cost__} (or @samp{MAX_COST__} or @samp{Max_Cost__}, + as described below). + (We hope to improve @code{g77} in this regard in the future---don't + write scripts depending on this behavior! + Also, consider experimenting with the @samp{-fno-underscoring} + option to try out debugging without having to massage names by + hand like this.) + + @code{g77} provides a number of command-line options that allow the user + to control how case mapping is handled for source files. + The default is the traditional UNIX model for Fortran compilers---names + are mapped to lower case. + Other command-line options can be specified to map names to upper + case, or to leave them exactly as written in the source file. + + For example: + + @example + Foo = 3.14159 + @end example + + @noindent + Here, it is normally the case that the variable assigned will be named + @samp{foo}. + This would be the name to enter when using a debugger to + access the variable. + + However, depending on the command-line options specified, the + name implemented by @code{g77} might instead be @samp{FOO} or even + @samp{Foo}, thus affecting how debugging is done. + + Also: + + @example + Call Foo + @end example + + @noindent + This would normally call a procedure that, if it were in a separate C program, + be defined starting with the line: + + @example + void foo_() + @end example + + @noindent + However, @code{g77} command-line options could be used to change the casing + of names, resulting in the name @samp{FOO_} or @samp{Foo_} being given to the + procedure instead of @samp{foo_}, and the @samp{-fno-underscoring} option + could be used to inhibit the appending of the underscore to the name. + + @node Main Program Unit + @section Main Program Unit (PROGRAM) + @cindex PROGRAM statement + @cindex statements, PROGRAM + + When @code{g77} compiles a main program unit, it gives it the public + procedure name @samp{MAIN__}. + The @code{libf2c} library has the actual @samp{main()} procedure + as is typical of C-based environments, and + it is this procedure that performs some initial start-up + activity and then calls @samp{MAIN__}. + + Generally, @code{g77} and @code{libf2c} are designed so that you need not + include a main program unit written in Fortran in your program---it + can be written in C or some other language. + Especially for I/O handling, this is the case, although @code{g77-0.5.16} + includes a bug fix for @code{libf2c} that solved a problem with using the + @samp{OPEN} statement as the first Fortran I/O activity in a program + without a Fortran main program unit. + + However, if you don't intend to use @code{g77} (or @code{f2c}) to compile + your main program unit---that is, if you intend to compile a @samp{main()} + procedure using some other language---you should carefully + examine the code for @samp{main()} in @code{libf2c}, found in the source + file @file{gcc/f/runtime/libF77/main.c}, to see what kinds of things + might need to be done by your @samp{main()} in order to provide the + Fortran environment your Fortran code is expecting. + + @cindex IARGC() intrinsic + @cindex intrinsics, IARGC() + @cindex GETARG() intrinsic + @cindex intrinsics, GETARG() + For example, @code{libf2c}'s @samp{main()} sets up the information used by + the @samp{IARGC} and @samp{GETARG} intrinsics. + Bypassing @code{libf2c}'s @samp{main()} + without providing a substitute for this activity would mean + that invoking @samp{IARGC} and @samp{GETARG} would produce undefined + results. + + @cindex debugging + @cindex main program unit, debugging + @cindex main() + @cindex MAIN__() + When debugging, one implication of the fact that @samp{main()}, which + is the place where the debugged program ``starts'' from the + debugger's point of view, is in @code{libf2c} is that you won't be + starting your Fortran program at a point you recognize as your + Fortran code. + + The standard way to get around this problem is to set a break + point (a one-time, or temporary, break point will do) at + the entrance to @samp{MAIN__}, and then run the program. + + After doing this, the debugger will see the current execution + point of the program as at the beginning of the main program + unit of your program. + + Of course, if you really want to set a break point at some + other place in your program and just start the program + running, without first breaking at @samp{MAIN__}, + that should work fine. + + @node Arrays + @section Arrays (DIMENSION) + @cindex DIMENSION statement + @cindex statements, DIMENSION + @cindex array ordering + @cindex ordering, array + @cindex column-major ordering + @cindex row-major ordering + @cindex arrays + + Fortran uses ``column-major ordering'' in its arrays. + This differs from other languages, such as C, which use ``row-major ordering''. + The difference is that, with Fortran, array elements adjacent to + each other in memory differ in the @emph{first} subscript instead of + the last; @samp{A(5,10,20)} immediately follows @samp{A(4,10,20)}, + whereas with row-major ordering it would follow @samp{A(5,10,19)}. + + This consideration + affects not only interfacing with and debugging Fortran code, + it can greatly affect how code is designed and written, especially + when code speed and size is a concern. + + Fortran also differs from C, a popular language for interfacing and + to support directly in debuggers, in the way arrays are treated. + In C, arrays are single-dimensional and have interesting relationships + to pointers, neither of which is true for Fortran. + As a result, dealing with Fortran arrays from within + an environment limited to C concepts can be challenging. + + For example, accessing the array element @samp{A(5,10,20)} is easy enough + in Fortran (use @samp{A(5,10,20)}), but in C some difficult machinations + are needed. + First, C would treat the A array as a single-dimension array. + Second, C does not understand low bounds for arrays as does Fortran. + Third, C assumes a low bound of zero (0), while Fortran defaults to a + low bound of one (1) and can supports an arbitrary low bound. + Therefore, calculations must be done + to determine what the C equivalent of @samp{A(5,10,20)} would be, and these + calculations require knowing the dimensions of @samp{A}. + + For @samp{DIMENSION A(2:11,21,0:29)}, the calculation of the offset of + @samp{A(5,10,20)} would be: + + @example + (5-2) + + (10-1)*(11-2+1) + + (20-0)*(11-2+1)*(21-1+1) + = 4293 + @end example + + @noindent + So the C equivalent in this case would be @samp{a[4293]}. + + When using a debugger directly on Fortran code, the C equivalent + might not work, because some debuggers cannot understand the notion + of low bounds other than zero. However, unlike @code{f2c}, @code{g77} + does inform the GBE that a multi-dimensional array (like @samp{A} + in the above example) is really multi-dimensional, rather than a + single-dimensional array, so at least the dimensionality of the array + is preserved. + + Debuggers that understand Fortran should have no trouble with + non-zero low bounds, but for non-Fortran debuggers, especially + C debuggers, the above example might have a C equivalent of + @samp{a[4305]}. + This calculation is arrived at by eliminating the subtraction + of the lower bound in the first parenthesized expression on each + line---that is, for @samp{(5-2)} substitute @samp{(5)}, for @samp{(10-1)} + substitute @samp{(10)}, and for @samp{(20-0)} substitute @samp{(20)}. + Actually, the implication of + this can be that the expression @samp{*(&a[2][1][0] + 4293)} works fine, + but that @samp{a[20][10][5]} produces the equivalent of + @samp{*(&a[0][0][0] + 4305)} because of the missing lower bounds. + + Come to think of it, perhaps + the behavior is due to the debugger internally compensating for + the lower bounds by offsetting the base address of @samp{a}, leaving + @samp{&a} set lower, in this case, than @samp{&a[2][1][0]} (the address of + its first element as identified by subscripts equal to the + corresponding lower bounds). + + You know, maybe nobody really needs to use arrays. + + @node Procedures + @section Procedures (SUBROUTINE and FUNCTION) + @cindex procedures + @cindex SUBROUTINE statement + @cindex statements, SUBROUTINE + @cindex FUNCTION statement + @cindex statements, FUNCTION + @cindex signature of procedures + + Procedures that accept @samp{CHARACTER} arguments are implemented by + @code{g77} so that each @samp{CHARACTER} argument has two actual arguments. + + The first argument occupies the expected position in the + argument list and has the user-specified name. + This argument + is a pointer to an array of characters, passed by the caller. + + The second argument is appended to the end of the user-specified + calling sequence and is named @samp{__g77_length_@var{x}}, where @var{x} + is the user-specified name. + This argument is of the C type @samp{ftnlen} + (see @file{gcc/f/runtime/f2c.h.in} for information on that type) and + is the number of characters the caller has allocated in the + array pointed to by the first argument. + + A procedure will ignore the length argument if @samp{X} is not declared + @samp{CHARACTER*(*)}, because for other declarations, it knows the + length. + Not all callers necessarily ``know'' this, however, which + is why they all pass the extra argument. + + The contents of the @samp{CHARACTER} argument are specified by the + address passed in the first argument (named after it). + The procedure can read or write these contents as appropriate. + + When more than one @samp{CHARACTER} argument is present in the argument + list, the length arguments are appended in the order + the orginal arguments appear. + So @samp{CALL FOO('HI','THERE')} is implemented in + C as @samp{foo("hi","there",2,5);}, ignoring the fact that @code{g77} + does not provide the trailing null bytes on the constant + strings (@code{f2c} does provide them, but they are unnecessary in + a Fortran environment, and you should not expect them to be + there). + + Note that the above information applies to @samp{CHARACTER} variables and + arrays @strong{only}. + It does @strong{not} apply to external @samp{CHARACTER} + functions or to intrinsic @samp{CHARACTER} functions. + That is, no second length argument is passed to @samp{FOO} in this case: + + @example + CHARACTER X + EXTERNAL X + CALL FOO(X) + @end example + + @noindent + Nor does @samp{FOO} expect such an argument in this case: + + @example + SUBROUTINE FOO(X) + CHARACTER X + EXTERNAL X + @end example + + Because of this implementation detail, if a program has a bug + such that there is disagreement as to whether an argument is + a procedure, and the type of the argument is @samp{CHARACTER}, subtle + symptoms might appear. + + @node Adjustable Arrays + @section Adjustable Arrays (DIMENSION) + @cindex arrays, adjustable + @cindex adjustable arrays + @cindex arrays, automatic + @cindex automatic arrays + @cindex DIMENSION statement + @cindex statements, DIMENSION + @cindex dimensioning arrays + @cindex arrays, dimensioning + + Adjustable and automatic arrays in Fortran require the implementation + (in this + case, the @code{g77} compiler) to ``memorize'' the expressions that + dimension the arrays each time the procedure is invoked. + This is so that subsequent changes to variables used in those + expressions, made during execution of the procedure, do not + have any effect on the dimensions of those arrays. + + For example: + + @example + REAL ARRAY(5) + DATA ARRAY/5*2/ + CALL X(ARRAY, 5) + END + SUBROUTINE X(A, N) + DIMENSION A(N) + N = 20 + PRINT *, N, A + END + @end example + + @noindent + Here, the implementation should, when running the program, print something + like: + + @example + 20 2. 2. 2. 2. 2. + @end example + + @noindent + Note that this shows that while the value of @samp{N} was successfully + changed, the size of the @samp{A} array remained at 5 elements. + + To support this, @code{g77} generates code that executes before any user + code (and before the internally generated computed @samp{GOTO} to handle + alternate entry points, as described below) that evaluates each + (nonconstant) expression in the list of subscripts for an + array, and saves the result of each such evaluation to be used when + determining the size of the array (instead of re-evaluating the + expressions). + + So, in the above example, when @samp{X} is first invoked, code is + executed that copies the value of @samp{N} to a temporary. + And that same temporary serves as the actual high bound for the single + dimension of the @samp{A} array (the low bound being the constant 1). + Since the user program cannot (legitimately) change the value + of the temporary during execution of the procedure, the size + of the array remains constant during each invocation. + + For alternate entry points, the code @samp{g77} generates takes into + account the possibility that a dummy adjustable array is not actually + passed to the actual entry point being invoked at that time. + In that case, the public procedure implementing the entry point + passes to the master private procedure implementing all the + code for the entry points a @samp{NULL} pointer where a pointer to that + adjustable array would be expected. + The @code{g77}-generated code + doesn't attempt to evaluate any of the expressions in the subscripts + for an array if the pointer to that array is @samp{NULL} at run time in + such cases. + (Don't depend on this particular implementation + by writing code that purposely passes @samp{NULL} pointers where the + callee expects adjustable arrays, even if you know the callee + won't reference the arrays---nor should you pass @samp{NULL} pointers + for any dummy arguments used in calculating the bounds of such + arrays or leave undefined any values used for that purpose in + COMMON---because the way @code{g77} implements these things might + change in the future!) + + @node Alternate Returns + @section Alternate Returns (SUBROUTINE and RETURN) + @cindex subroutines + @cindex alternate returns + @cindex SUBROUTINE statement + @cindex statements, SUBROUTINE + @cindex RETURN statement + @cindex statements, RETURN + + Subroutines with alternate returns (e.g. @samp{SUBROUTINE X(*)} and + @samp{CALL X(*50)}) are implemented by @code{g77} as functions returning + the C @samp{int} type. + The actual alternate-return arguments are omitted from the calling sequence. + Instead, the caller uses + the return value to do a rough equivalent of the Fortran + computed-@samp{GOTO} statement, as in @samp{GOTO (50), X()} in the + example above (where @samp{X} is quietly declared as an @samp{INTEGER} + function), and the callee just returns whatever integer + is specified in the @samp{RETURN} statement for the subroutine + For example, @samp{RETURN 1} is implemented as @samp{X = 1} followed + by @samp{RETURN} + in C, and @samp{RETURN} by itself is @samp{X = 0} and @samp{RETURN}). + + @node Functions + @section Functions (FUNCTION and RETURN) + @cindex functions + @cindex FUNCTION statement + @cindex statements, FUNCTION + @cindex RETURN statement + @cindex statements, RETURN + @cindex return type of functions + + @code{g77} handles in a special way functions that return the following + types: + + @itemize @bullet + @item + @samp{CHARACTER} + @item + @samp{COMPLEX} (and @samp{DOUBLE COMPLEX}) + @item + @samp{REAL} + @end itemize + + For @samp{CHARACTER}, @code{g77} implements a subroutine (a C function + returning @samp{void}) + with two arguments prepended: @samp{__g77_result}, which the caller passes + as a pointer to a @samp{char} array expected to hold the return value, + and @samp{__g77_length}, which the caller passes as an @samp{ftnlen} value + specifying the length of the return value as declared in the calling + program. + For @samp{CHARACTER}*(*), the called function uses @samp{__g77_length} + to determine the size of the array that @samp{__g77_result} points to; + otherwise, it ignores that argument. + + For @samp{COMPLEX} and @samp{DOUBLE COMPLEX}, when @samp{-ff2c} is in + force, @code{g77} implements + a subroutine with one argument prepended: @samp{__g77_result}, which the + caller passes as a pointer to a variable of the type of the function. + The called function writes the return value into this variable instead + of returning it as a function value. + When @samp{-fno-f2c} is in force, + @code{g77} implements a @samp{COMPLEX} function as @code{gcc}'s + @samp{__complex__ float} function, + returning the result of the function in the same way as @code{gcc} would, + and implements a @samp{DOUBLE COMPLEX} function similarly. + + For @samp{REAL}, when @samp{-ff2c} is in force, @code{g77} implements + a function that actually returns @samp{DOUBLE PRECISION} (usually + C's @samp{double} type). + When @samp{-fno-f2c} is in force, @samp{REAL} functions return @samp{float}. + + @node Common Blocks + @section Common Blocks (COMMON) + @cindex common blocks + @cindex COMMON statement + @cindex statements, COMMON + + @code{g77} names and lays out @samp{COMMON} areas the same way f2c does, + for compatibility with f2c. + + Currently, @code{g77} does not emit any debugging information for + items in a @samp{COMMON} area, due to an apparent bug in the GBE. + + Moreover, @code{g77} currently implements a @samp{COMMON} area such that its + type is an array of the C @samp{char} data type. + + So, when debugging, you must know the offset into a @samp{COMMON} area + for a particular item in that area, and you have to take into + account the appropriate multiplier for the respective sizes + of the types (as declared in your code) for the items preceding + the item in question as compared to the size of the @samp{char} type. + + For example, using default implicit typing, the statement + + @example + COMMON I(15), R(20), T + @end example + + @noindent + results in a public 144-byte @samp{char} array named @samp{_BLNK__} + with @samp{I} placed at @samp{_BLNK__[0]}, @samp{R} at @samp{_BLNK__[60]}, + and @samp{T} at @samp{_BLNK__[140]}. + (This is assuming that the target machine for + the compilation has 4-byte @samp{INTEGER} and @samp{REAL} types.) + + @node Local Equivalence Areas + @section Local Equivalence Areas (EQUIVALENCE) + @cindex equivalence areas + @cindex local equivalence areas + @cindex EQUIVALENCE statement + @cindex statements, EQUIVALENCE + + @code{g77} treats storage-associated areas involving a @samp{COMMON} + block as explained in the section on common blocks. + + A local @samp{EQUIVALENCE} area is a collection of variables and arrays + connected to each other in any way via @samp{EQUIVALENCE}, none of which are + listed in a @samp{COMMON} statement. + + Currently, @code{g77} does not emit any debugging information for + items in a local @samp{EQUIVALENCE} area, due to an apparent bug in the GBE. + + Moreover, @code{g77} implements a local @samp{EQUIVALENCE} area such that its + type is an array of the C @samp{char} data type. + + The name @code{g77} gives this array of @samp{char} type is @samp{__g77_equiv_@var{x}}, + where @var{x} is the name of the first item listed in the @samp{EQUIVALENCE} + statements for that area that is placed at the beginning (offset 0) + of this array. + + When debugging, you must therefore access members of @samp{EQUIVALENCE} + areas by specifying the appropriate @samp{__g77_equiv_@var{x}} + array section with the appropriate offset. + See the explanation of debugging @samp{COMMON} blocks + for info applicable to debugging local @samp{EQUIVALENCE} areas. + + (Note: @code{g77} version 0.5.16 fixed a bug in how certain + @samp{EQUIVALENCE} cases were handled. + The bug caused the debugger to not know the size of the + array if any variable or array in the @samp{EQUIVALENCE} was given an initial + value via @samp{DATA} or similar.) + + @node Alternate Entry Points + @section Alternate Entry Points (ENTRY) + @cindex alternate entry points + @cindex entry points + @cindex ENTRY statement + @cindex statements, ENTRY + + The GBE does not understand the general concept of + alternate entry points as Fortran provides via the ENTRY statement. + @code{g77} gets around this by using an approach to compiling procedures + having at least one @samp{ENTRY} statement that is almost identical to the + approach used by @code{f2c}. + (An alternate approach could be used that + would probably generate faster, but larger, code that would also + be a bit easier to debug.) + + Information on how @code{g77} implements @samp{ENTRY} is provided for those + trying to debug such code. + The choice of implementation seems + unlikely to affect code (compiled in other languages) that interfaces + to such code. + + @code{g77} compiles exactly one public procedure for the primary entry + point of a procedure plus each @samp{ENTRY} point it specifies, as usual. + That is, in terms of the public interface, there is no difference + between + + @example + SUBROUTINE X + END + SUBROUTINE Y + END + @end example + + @noindent + and: + + @example + SUBROUTINE X + ENTRY Y + END + @end example + + The difference between the above two cases lies in the code compiled + for the @samp{X} and @samp{Y} procedures themselves, plus the fact that, + for the second case, an extra internal procedure is compiled. + + For every Fortran procedure with at least one @samp{ENTRY} + statement, @code{g77} compiles an extra procedure + named @samp{__g77_masterfun_@var{x}}, where @var{x} is + the name of the primary entry point (which, in the above case, + using the standard compiler options, would be @samp{x_} in C). + + This extra procedure is compiled as a private procedure---that is, + a procedure not accessible by name to separately compiled modules. + It contains all the code in the program unit, including the code + for the primary entry point plus for every entry point. + (The code for each public procedure is quite short, and explained later.) + + The extra procedure has some other interesting characteristics. + + The argument list for this procedure is invented by @code{g77}. + It contains + a single integer argument named @samp{__g77_which_entrypoint}, + passed by value (as in Fortran's @samp{%VAL()} intrinsic), specifying the + entry point index---0 for the primary entry point, 1 for the + first entry point (the first @samp{ENTRY} statement encountered), 2 for + the second entry point, and so on. + + It also contains, for functions returning @samp{CHARACTER} and + (when @samp{-ff2c} is in effect) @samp{COMPLEX} functions, + and for functions returning different types among the + @samp{ENTRY} statements (e.g. @samp{REAL FUNCTION R()} + containing @samp{ENTRY I()}), an argument named @samp{__g77_result} that + is expected at run time to contain a pointer to where to store + the result of the entry point. + For @samp{CHARACTER} functions, this + storage area is an array of the appropriate number of characters; + for @samp{COMPLEX} functions, it is the appropriate area for the return + type (currently either @samp{COMPLEX} or @samp{DOUBLE COMPLEX}); for multiple- + return-type functions, it is a union of all the supported return + types (which cannot include @samp{CHARACTER}, since combining @samp{CHARACTER} + and non-@samp{CHARACTER} return types via @samp{ENTRY} in a single function + is not supported by @code{g77}). + + For @samp{CHARACTER} functions, the @samp{__g77_result} argument is followed + by yet another argument named @samp{__g77_length} that, at run time, + specifies the caller's expected length of the returned value. + Note that only @samp{CHARACTER*(*)} functions and entry points actually + make use of this argument, even though it is always passed by + all callers of public @samp{CHARACTER} functions (since the caller does not + generally know whether such a function is @samp{CHARACTER*(*)} or whether + there are any other callers that don't have that information). + + The rest of the argument list is the union of all the arguments + specified for all the entry points (in their usual forms, e.g. + @samp{CHARACTER} arguments have extra length arguments, all appended at + the end of this list). + This is considered the ``master list'' of + arguments. + + The code for this procedure has, before the code for the first + executable statement, code much like that for the following Fortran + statement: + + @smallexample + GOTO (100000,100001,100002), __g77_which_entrypoint + 100000 @dots{}code for primary entry point@dots{} + 100001 @dots{}code immediately following first ENTRY statement@dots{} + 100002 @dots{}code immediately following second ENTRY statement@dots{} + @end smallexample + + @noindent + (Note that invalid Fortran statement labels and variable names + are used in the above example to highlight the fact that it + represents code generated by the @code{g77} internals, not code to be + written by the user.) + + It is this code that, when the procedure is called, picks which + entry point to start executing. + + Getting back to the public procedures (@samp{x} and @samp{Y} in the original + example), those procedures are fairly simple. + Their interfaces + are just like they would be if they were self-contained procedures + (without @samp{ENTRY}), of course, since that is what the callers + expect. + Their code consists of simply calling the private + procedure, described above, with the appropriate extra arguments + (the entry point index, and perhaps a pointer to a multiple-type- + return variable, local to the public procedure, that contains + all the supported returnable non-character types). + For arguments + that are not listed for a given entry point that are listed for + other entry points, and therefore that are in the ``master list'' + for the private procedure, null pointers (in C, the @samp{NULL} macro) + are passed. + Also, for entry points that are part of a multiple-type- + returning function, code is compiled after the call of the private + procedure to extract from the multi-type union the appropriate result, + depending on the type of the entry point in question, returning + that result to the original caller. + + When debugging a procedure containing alternate entry points, you + can either set a break point on the public procedure itself (e.g. + a break point on @samp{X} or @samp{Y}) or on the private procedure that + contains most of the pertinent code (e.g. @samp{__g77_masterfun_@var{x}}). + If you do the former, you should use the debugger's command to + ``step into'' the called procedure to get to the actual code; with + the latter approach, the break point leaves you right at the + actual code, skipping over the public entry point and its call + to the private procedure (unless you have set a break point there + as well, of course). + + Further, the list of dummy arguments that is visible when the + private procedure is active is going to be the expanded version + of the list for whichever particular entry point is active, + as explained above, and the way in which return values are + handled might well be different from how they would be handled + for an equivalent single-entry function. + + @node Assigned Statement Labels + @section Assigned Statement Labels (ASSIGN and GOTO) + @cindex assigned statement labels + @cindex statement labels, assigned + @cindex ASSIGN statement + @cindex statements, ASSIGN + @cindex GOTO statement + @cindex statements, GOTO + + For portability to machines where a pointer (such as to a label, + which is how @code{g77} implements @samp{ASSIGN} and its cousin, the assigned + @samp{GOTO}) is wider (bitwise) than an @samp{INTEGER}, @code{g77} does not + necessarily use + the same memory location to hold the @samp{ASSIGN}ed value of a variable + as it does the numerical value in that variable, unless the + variable is wide enough (can hold enough bits). + + In particular, while @code{g77} implements + + @example + I = 10 + @end example + + @noindent + as, in C notation, @samp{i = 10;}, it might implement + + @example + ASSIGN 10 TO I + @end example + + @noindent + as, in GNU's extended C notation (for the label syntax), + @samp{__g77_ASSIGN_I = &&L10;} (where @samp{L10} is just a massaging + of the Fortran label @samp{10} to make the syntax C-like; @code{g77} doesn't + actually generate the name @samp{L10} or any other name like that, + since debuggers cannot access labels anyway). + + While this currently means that an @samp{ASSIGN} statement might not + overwrite the numeric contents of its target variable, @emph{do not} + write any code depending on this feature. + @code{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 @code{g77} somewhat easier. + If there's no debugger-visible variable named @samp{__g77_ASSIGN_I} + in a program unit that does @samp{ASSIGN 10 TO I}, that probably + means @code{g77} has decided it can store the pointer to the label directly + into @samp{I} itself. + + (Currently, @code{g77} always chooses to make the separate variable, + to improve the likelihood that @samp{-O -Wuninitialized} will + diagnose failures to do things like @samp{GOTO I} without + @samp{ASSIGN 10 TO I} despite doing @samp{I=5}.) + + @node Collected Fortran Wisdom + @chapter Collected Fortran Wisdom + @cindex wisdom + @cindex legacy code + @cindex code, legacy + @cindex writing code + @cindex code, writing + + Most users of @code{g77} can be divided into two camps: + + @itemize @bullet + @item + Those writing new Fortran code to be compiled by @code{g77}. + + @item + Those using @code{g77} to compile existing, ``legacy'' code. + @end itemize + + Users writing new code generally understand most of the necessary + aspects of Fortran to write ``mainstream'' code, but often need + help deciding how to handle problems, such as the construction + of libraries containing @samp{BLOCK DATA}. + + Users dealing with ``legacy'' code sometimes don't have much + experience with Fortran, but believe that the code they're compiling + already works when compiled by other compilers (and might + not understand why, as is sometimes the case, it doesn't work + when compiled by @code{g77}). + + The following information is designed to help users do a better job + coping with existing, ``legacy'' Fortran code, and with writing + new code as well. + + @menu + * Overly Convenient Options:: Temptations to avoid, habits to not form. + * Block Data and Libraries:: How @code{g77} solves a common problem. + * Faster Programs:: Everybody wants these, but at what cost? + * Working Programs:: Getting programs to work should be done first. + * Loops:: Fortran @samp{DO} loops surprise many people. + * Advantages Over f2c:: If @code{f2c} is so great, why @code{g77}? + @end menu + + @node Overly Convenient Options + @section Overly Convenient Command-line Options + @cindex overly convenient options + @cindex options, overly convenient + + These options should be used only as a quick-and-dirty way to determine + how well your program will run under different compilation models + without having to change the source. + Some are more problematic + than others, depending on how portable and maintainable you want the + program to be (and, of course, whether you are allowed to change it + at all is crucial). + + You should not continue to use these command-line options to compile + a given program, but rather should make changes to the source code: + + @table @code + @cindex -finit-local-zero option + @cindex options, -finit-local-zero + @item -finit-local-zero + (This option specifies that any uninitialized local variables + and arrays have default initialization to binary zeros.) + + Many other compilers do this automatically, which means lots of + Fortran code developed with those compilers depends on it. + + It is safer (and probably + would produce a faster program) to find the variables and arrays that + need such initialization and provide it explicitly via @samp{DATA}, so that + @samp{-finit-local-zero} is not needed. + + Consider using @samp{-Wuninitialized} (which requires @samp{-O}) to + find likely candidates, but + do not specify @samp{-finit-local-zero} or @samp{-fno-automatic}, + or this technique won't work. + + @cindex -fno-automatic option + @cindex options, -fno-automatic + @item -fno-automatic + (This option specifies that all local variables and arrays + are to be treated as if they were named in @samp{SAVE} statements.) + + Many other compilers do this automatically, which means lots of + Fortran code developed with those compilers depends on it. + + The effect of this is that all variables and arrays are made + static, that is, not placed on the stack or in heap storage. + This might cause a buggy program to appear to work better. + If so, rather than relying on this command-line option (and hoping all + compilers provide the equivalent one), add @samp{SAVE} + statements to some or all program unit sources, as appropriate. + Consider using @samp{-Wuninitialized} (which requires @samp{-O}) + to find likely candidates, but + do not specify @samp{-finit-local-zero} or @samp{-fno-automatic}, + or this technique won't work. + + The default is @samp{-fautomatic}, which tells @code{g77} to try + and put variables and arrays on the stack (or in fast registers) + where possible and reasonable. + This tends to make programs faster. + + @cindex -fugly option + @cindex options, -fugly + @item -fugly + Fix the source code so that @samp{-fno-ugly} will work. + Note that, for many programs, it is difficult to practically + avoid using the features enabled via @samp{-fugly-init}, and these + features pose the lowest risk of writing nonportable code, among the + various ``ugly'' features. + + @cindex -f@var{group}-intrinsics-hide option + @cindex options, -f@var{group}-intrinsics-hide + @item -f@var{group}-intrinsics-hide + Change the source code to use @samp{EXTERNAL} for any external procedure + that might be the name of an intrinsic. + It is easy to find these using @samp{-f@var{group}-intrinsics-disable}. + @end table + + @node Block Data and Libraries + @section Block Data and Libraries + @cindex block data and libraries + @cindex BLOCK DATA statement + @cindex statements, BLOCK DATA + @cindex libraries, containing BLOCK DATA + @cindex f2c compatibility + @cindex compatibility + + To ensure that block data program units are linked, especially a concern + when they are put into libraries, give each one a name (as in + @samp{BLOCK DATA FOO}) and make sure there is an @samp{EXTERNAL FOO} + statement in every program unit that uses any common block + initialized by the corresponding @samp{BLOCK DATA}. + @code{g77} currently compiles a @samp{BLOCK DATA} as if it were a + @samp{SUBROUTINE}, + that is, it generates an actual procedure having the appropriate name. + The procedure does nothing but return immediately if it happens to be + called. + For @samp{EXTERNAL FOO}, where @samp{FOO} is not otherwise referenced in the + same program unit, @code{g77} assumes there exists a @samp{BLOCK DATA FOO} + in the program and ensures that by generating a + reference to it so the linker will make sure it is present. + (Specifically, @code{g77} outputs in the data section a static pointer to the + external name @samp{FOO}.) + + The implementation @code{g77} currently uses to make this work is + one of the few things not compatible with @code{f2c} as currently + shipped. + @code{f2c} currently does nothing with @samp{EXTERNAL FOO} except + issue a warning that @samp{FOO} is not otherwise referenced, and for + @samp{BLOCK DATA FOO}, f2c doesn't generate a dummy procedure with the + name @samp{FOO}. + The upshot is that you shouldn't mix @samp{f2c} and @code{g77} in + this particular case. + If you use f2c to compile @samp{BLOCK DATA FOO}, + then any @code{g77}-compiled program unit that says @samp{EXTERNAL FOO} + will result in an unresolved reference when linked. + If you do the + opposite, then @samp{FOO} might not be linked in under various + circumstances (such as when @samp{FOO} is in a library, or you're + using a ``clever'' linker---so clever, it produces a broken program + with little or no warning by omitting initializations of global data + because they are contained in unreferenced procedures). + + The changes you make to your code to make @code{g77} handle this situation, + however, appear to be a widely portable way to handle it. + That is, many systems permit it (as they should, since the + FORTRAN 77 standard permits @samp{EXTERNAL FOO} when @samp{FOO} + is a block data program unit), and of the ones + that might not link @samp{BLOCK DATA FOO} under some circumstances, most of + them appear to do so once @samp{EXTERNAL FOO} is present in the appropriate + program units. + + @node Faster Programs + @section Faster Programs + @cindex speeding up programs + @cindex programs, speeding up + + Aside from the usual @samp{gcc} options, such as @samp{-O}, + @samp{-ffast-math}, and so on, consider trying: + + @table @code + @cindex -fno-f2c option + @cindex options, -fno-f2c + @item -fno-f2c + @cindex f2c compatibility + @cindex compatibility + Use this if you aren't linking with any code compiled using + @code{f2c}. + (Note that @code{libf2c} is @emph{not} an example of code + that is compiled using @code{f2c}---it is compiled by a C + compiler, usually @code{gcc}.) + @end table + + If you're using @samp{-fno-automatic} already, you probably + should change your code to allow compilation with @samp{-fautomatic} + (the default), to allow the program to run faster. + + Similarly, you should be able to use @samp{-fno-init-local-zero} + (the default) instead of @samp{-finit-local-zero}. + This is because it is rare that every variable affected by these + options in a given program actually needs to + be so affected. + + For example, @samp{-fno-automatic}, which effectively @samp{SAVE}s + every local variable and array, affects even things like @samp{DO} iteration + variables, which rarely need to be @samp{SAVE}d, and this often reduces + run-time performances. + Similarly, @samp{-fno-init-local-zero} forces such + variables to be initialized to zero---when @samp{SAVE}d (such as when + @samp{-fno-automatic}), this by itself generally affects only + startup time for a program, but when not @samp{SAVE}d, + it can slow down the procedure every time it is called. + + @xref{Overly Convenient Options,,Overly Convenient Command-Line Options}, + for information on the @samp{-fno-automatic} and + @samp{-finit-local-zero} options and how to convert + their use into selective changes in your own code. + + @node Working Programs + @section Working Programs + + Getting Fortran programs to work in the first place can be + quite a challenge---even when the programs already work on + other systems, or when using other compilers. + + @code{g77} offers some options that might be useful for + tracking down bugs in such programs. + @xref{Option Summary}, for a summary of these and other + options, and cross-references for each such option to + the pertinent material in this manual. + + @table @code + @item -finit-local-zero + A program that works better when compiled with this option + is depending on a particular system's, or compiler's, tendency + to initialize some variables to zero. + It might be worthwhile finding such cases and fixing them. + + @item -fno-automatic + A program that works better when compiled with this option + is depending on not having to use the @samp{SAVE} statement + as required by the Fortran standard. + It might be worthwhile finding such cases and fixing them. + + @item -Wimplicit + This might catch failures to properly specify the types of + variables, arrays, and functions in the code. + However, in code that makes heavy use of Fortran's + implicit-typing facility, this option might produce so + many warnings about cases that are working, it would be + hard to find the one or two that represent bugs. + + @item -Wunused + This can find bugs involving implicitly typing, sometimes + more easily than using -Wimplicit in code that makes + heavy use of implicit typing. + An unused variable or array might indicate that the + spelling for its declaration is different from that of + its intended uses. + + @item -Wuninitialized + This can find bugs involving uninitialized variables, which + can in turn result from misspellings in declaration statements. + + @item -Wsurprising + This can find bugs involving expression evaluation or in + the way @samp{DO} loops with non-integral iteration variables + are handled. + Cases found by this option might indicate a difference of + interpretation between the author of the code involved, and + a standard-conforming compiler such as @code{g77}. + Such a difference might produce actual bugs. + + In any case, changing the code to explicitly do what the + programmer might have expected it to do, so @code{g77} and + other compilers are more likely to follow the programmer's + expectations, might be worthwhile, especially if such changes + make the program work better. + + @item -W + It is possible that the ``extra'' warnings enabled by this + option could expose bugs in the code. + @end table + + @node Loops + @section Loops + @cindex DO statement + @cindex statements, DO + @cindex trips, number of + @cindex number of trips + + The meaning of a @samp{DO} loop in Fortran is precisely specified + in the Fortran standard@dots{}and is quite different from what + many programmers might expect. + + In particular, Fortran @samp{DO} loops are implemented as if + the number of trips through the loop is calculated @emph{before} + the loop is entered. + + The number of trips for a loop is calculated from the @var{start}, + @var{end}, and @var{increment} values specified in a statement such as: + + @example + DO @var{iter} = @var{start}, @var{end}, @var{increment} + @end example + + The trip count is evaluated using a fairly simple formula + based on the three values following the @samp{=} in the + statement, and it is that trip count that is effectively + decremented during each iteration of the loop. + If, at the beginning of an iteration of the loop, the + trip count is zero or negative, the loop terminates. + The per-loop-iteration modifications to @var{iter} are not + related to determining whether to terminate the loop. + + There are two important things to remember about the trip + count: + + @itemize @bullet + @item + It can be @emph{negative}, in which case it is + treated as if it was zero---meaning the loop is + not executed at all. + + @item + The type used to @emph{calculate} the trip count + the same type as @var{iter}, but the final + calculation, and thus the type of the trip + count itself, always is @samp{INTEGER}. + @end itemize + + These two items mean that there are loops that cannot + be written in straightforward fashion using the Fortran @samp{DO}. + + For example, on a system with the canonical 32-bit two's-complement + implementation of @samp{INTEGER}, the following loop will not work: + + @example + DO I = -2000000000, 2000000000 + @end example + + @noindent + Although the @var{start} and @var{end} values are well within + the range of @samp{INTEGER}, the @emph{trip count} is not. + The expected trip count is 40000000001, which is outside + the range of @samp{INTEGER} on many systems. + + Instead, the above loop should be constructed this way: + + @example + I = -2000000000 + DO + IF (I .GT. 2000000000) EXIT + @dots{} + I = I + 1 + END DO + @end example + + @noindent + The simple @samp{DO} construct and the @samp{EXIT} statement + (used to leave the innermost loop) + are F90 features that @code{g77} supports. + + Some Fortran compilers have buggy implementations of @samp{DO}, + in that they don't follow the standard. + They implement @samp{DO} as a straightforward translation + to what, in C, would be a @samp{for} statement. + Instead of creating a temporary variable to hold the trip count + as calculated at run time, these compilers + use the iteration variable @var{iter} to control + whether the loop continues at each iteration. + + The bug in such an implementation shows up when the + trip count is within the range of the type of @var{iter}, + but the magnitude of @samp{ABS(@var{end}) + ABS(@var{incr})} + exceeds that range. For example: + + @example + DO I = 2147483600, 2147483647 + @end example + + @noindent + A loop started by the above statement will work as implemented + by @code{g77}, but the use, by some compilers, of a + more C-like implementation akin to + + @example + for (i = 2147483600; i <= 2147483647; ++i) + @end example + + @noindent + produces a loop that does not terminate, because @samp{i} + can never be greater than 2147483647, since incrementing it + beyond that value overflows @samp{i}, setting it to -2147483648. + This is a large, negative number that still is less than 2147483647. + + Another example of unexpected behavior of @samp{DO} involves + using a nonintegral iteration variable @var{iter}, such as + a @samp{REAL} or @samp{DOUBLE PRECISION} variable. + Consider the following program: + + @smallexample + DATA BEGIN, END, STEP /.1, .31, .007/ + DO 10 R = BEGIN, END, STEP + IF (R .GT. END) PRINT *, R, ' .GT. ', END, '!!' + PRINT *,R + 10 CONTINUE + PRINT *,'LAST = ',R + IF (R .LE. END) PRINT *, R, ' .LE. ', END, '!!' + END + @end smallexample + + @noindent + A C-like view of @samp{DO} would hold that the two ``exclamatory'' + @samp{PRINT} are never executed. + However, this is the output of running the above program + as compiled by @code{g77} on a Linux ix86 system: + + @smallexample + .100000001 + .107000001 + .114 + .120999999 + @dots{} + .289000005 + .296000004 + .303000003 + LAST = .310000002 + .310000002 .LE. .310000002!! + @end smallexample + + Note that one of the two checks in the program turned up + an apparent violation of the programmer's expectation---yet, + the loop is correctly implemented by @code{g77}, in that + it has 30 iterations. + This trip count of 30 is correct when evaluated using + the floating-point representations for the @var{begin}, + @var{end}, and @var{incr} values (.1, .31, .007) on Linux + ix86 are used. + On other systems, an apparently more accurate trip count + of 31 might result, but, nevertheless, @code{g77} is + faithfully following the Fortran standard, and the result + is not what the author of the sample program above + apparently expected. + (Such other systems might, for different values in the @samp{DATA} + statement, violate the other programmer's expectation, + for example.) + + Due to this combination of imprecise representation + of floating-point values and the often-misunderstood + interpretation of @samp{DO} by standard-conforming + compilers such as @code{g77}, use of @samp{DO} loops + with @samp{REAL} or @samp{DOUBLE PRECISION} iteration + variables is not recommended. + Such use can be caught by specifying @samp{-Wsurprising}. + @xref{Warning Options}, for more information on this + option. + + @node Advantages Over f2c + @section Advantages Over f2c + + Without @code{f2c}, @code{g77} would have taken much longer to + do and probably not been as good for quite a while. + Sometimes people who notice how much @code{g77} depends on, and + documents encouragement to use, @code{f2c} ask why @code{g77} + was created if @code{f2c} already existed. + + This section gives some basic answers to these questions, though it + is not intended to be comprehensive. + + @menu + * Language Extensions:: Features used by Fortran code. + * Compiler Options:: Features helpful during development. + * Compiler Speed:: Speed of the compilation process. + * Program Speed:: Speed of the generated, optimized code. + * Ease of Debugging:: Debugging ease-of-use at the source level. + * Character and Hollerith Constants:: A byte saved is a byte earned. + @end menu + + @node Language Extensions + @subsection Language Extensions + + @code{g77} offers several extensions to the Fortran language that @code{f2c} + doesn't. + + However, @code{f2c} offers a few that @code{g77} doesn't, like + fairly complete support for @samp{INTEGER*2}. + It is expected that @code{g77} will offer some or all of these missing + features at some time in the future. + (Version 0.5.18 of @code{g77} offers some rudimentary support for some + of these features.) + + @node Compiler Options + @subsection Compiler Options + + @code{g77} offers a whole bunch of compiler options that @code{f2c} doesn't. + + However, @code{f2c} offers a few that @code{g77} doesn't, like an + option to generate code to check array subscripts at run time. + It is expected that @code{g77} will offer some or all of these + missing options at some time in the future. + + @node Compiler Speed + @subsection Compiler Speed + + Saving the steps of writing and then rereading C code is a big reason + why @code{g77} should be able to compile code much faster than using + @code{f2c} in conjunction with the equivalent invocation of @code{gcc}. + + However, due to @code{g77}'s youth, lots of self-checking is still being + performed. + As a result, this improvement is as yet unrealized + (though the potential seems to be there for quite a big speedup + in the future). + It is possible that, as of version 0.5.18, @code{g77} + is noticably faster compiling many Fortran source files than using + @code{f2c} in conjunction with @code{gcc}. + + @node Program Speed + @subsection Program Speed + + @code{g77} has the potential to better optimize code than @code{f2c}, + even when @code{gcc} is used to compile the output of @code{f2c}, + because @code{f2c} must necessarily + translate Fortran into a somewhat lower-level language (C) that cannot + preserve all the information that is potentially useful for optimization, + while @code{g77} can gather, preserve, and transmit that information directly + to the GBE. + + For example, @code{g77} implements @samp{ASSIGN} and assigned + @samp{GOTO} using direct assignment of pointers to labels and direct + jumps to labels, whereas @code{f2c} maps the assigned labels to + integer values and then uses a C @samp{switch} statement to encode + the assigned @samp{GOTO} statements. + + However, as is typical, theory and reality don't quite match, at least + not in all cases, so it is still the case that @code{f2c} plus @code{gcc} + can generate code that is faster than @code{g77}. + + It is hoped that version 0.5.18 of @code{g77} will offer default + settings and options that allow for better program speed, though + it is not yet known whether these same options, when applied to + a @code{gcc} compilation of @code{f2c} output, will improve the + speed of programs compiled using that method as well. + + @node Ease of Debugging + @subsection Ease of Debugging + + Because @code{g77} compiles directly to assembler code like @code{gcc}, + instead of translating to an intermediate language (C) as does @code{f2c}, + support for debugging can be better for @code{g77} than @code{f2c}. + + However, although @code{g77} might be somewhat more ``native'' in terms of + debugging support than @code{f2c} plus @code{gcc}, there still are a lot + of things ``not quite right''. + Many of the important ones should be resolved in the near future. + + For example, @code{g77} doesn't have to worry about reserved names + like @code{f2c} does. + Given @samp{FOR = WHILE}, @code{f2c} must necessarily + translate this to something @emph{other} than + @samp{for = while;}, because C reserves those words. + + However, @code{g77} does still uses things like an extra level of indirection + for @samp{ENTRY}-laden procedures---in this case, because the back end doesn't + yet support multiple entry points. + + Another example is that, given + + @example + COMMON A, B + EQUIVALENCE (B, C) + @end example + + @noindent + the @code{g77} user should be able to access the variables directly, by name, + without having to traverse C-like structures and unions, while @code{f2c} + is unlikely to ever offer this ability (due to limitations in the + C language). + + However, due to apparent bugs in the back end, @code{g77} currently doesn't + take advantage of this facility at all---it doesn't emit any debugging + information for @samp{COMMON} and @samp{EQUIVALENCE} areas, + other than information + on the array of @samp{char} it creates (and, in the case + of local @samp{EQUIVALENCE}, names) for each such area. + + Yet another example is arrays. + @code{g77} represents them to the debugger + using the same ``dimensionality'' as in the source code, while @code{f2c} + must necessarily convert them all to one-dimensional arrays to fit + into the confines of the C language. + However, the level of support + offered by debuggers for interactive Fortran-style access to arrays + as compiled by @code{g77} can vary widely. + In some cases, it can actually + be an advantage that @code{f2c} converts everything to widely supported + C semantics. + + In fairness, @code{g77} could do many of the things @code{f2c} does + to get things working at least as well as @code{f2c}---for now, + the maintainers have tended to prefer making @code{g77} work the + way they think it is supposed to, and find help improving the + other products (the GBE of @code{gcc}; @code{gdb}; and so on) + to get things working properly. + + @node Character and Hollerith Constants + @subsection Character and Hollerith Constants + @cindex character constants + @cindex constants, character + @cindex Hollerith constants + @cindex constants, Hollerith + @cindex trailing null byte + @cindex null byte, trailing + @cindex zero byte, trailing + + To avoid the extensive hassle that would be needed to avoid this, + @code{f2c} uses C character constants to encode character and Hollerith + constants. + That means a constant like @samp{'HELLO'} is translated to + @samp{"hello"} in C, which further means that an extra null byte is + present at the end of the constant. + This null byte is superfluous. + + @code{g77} does not generate such null bytes. + This represents significant + savings of resources, such as on systems where @file{/dev/null} or + @file{/dev/zero} represent bottlenecks in the systems' performance, + because @code{g77} simply asks for fewer zeros from the operating + system than @code{f2c}. + + @node Trouble + @chapter Known Causes of Trouble with GNU Fortran + @cindex bugs, known + @cindex installation trouble + @cindex known causes of trouble + + This section describes known problems that affect users of GNU Fortran. + Most of these are not GNU Fortran bugs per se---if they were, we would + fix them. + But the result for a user may be like the result of a bug. + + Some of these problems are due to bugs in other software, some are + missing features that are too much work to add, and some are places + where people's opinions differ as to what is best. + + Information on bugs that show up when configuring, porting, building, + or installing @code{g77} is not provided here. + @xref{Problems Installing}. + + (Note that some of this portion of the manual is lifted + directly from the @code{gcc} manual, with minor modifications + to tailor it to users of @code{g77}. + Anytime a bug seems to have more to do with the @code{gcc} + portion of @code{g77}, + @xref{Trouble,,Known Causes of Trouble with GNU CC, + gcc,Using and Porting GNU CC}.) + + @menu + * But-bugs:: Bugs really in other programs. + * Actual Bugs:: Bugs and misfeatures we will fix later. + * Missing Features:: Features we already know we want to add later. + * Disappointments:: Regrettable things we can't change. + * Non-bugs:: Things we think are right, but some others disagree. + * Warnings and Errors:: Which problems in your code get warnings, + and which get errors. + @end menu + + @node But-bugs + @section Bugs Not In GNU Fortran + @cindex but-bugs + + These are bugs to which the maintainers often have to reply, + ``but that isn't a bug in @code{g77}@dots{}''. + Some of these already are fixed in new versions of other + software; some still need to be fixed; some are problems + with how @code{g77} is installed or is being used; + some just cannot be addressed at this time until more + is known about the problem. + + Please don't re-report these bugs to the @code{g77} maintainers---if + you must remind someone how important it is to you that the problem + be fixed, talk to the people responsible for the other products + identified below, but preferably only after you've tried the + latest versions of those products. + The @code{g77} maintainers have their hands full working on + just fixing and improving @code{g77}, without serving as a + clearinghouse for all bugs that happen to affect @code{g77} + users. + + @xref{Collected Fortran Wisdom}, for information on behavior + of Fortran programs, and the programs that compile them, that + might be @emph{thought} to indicate bugs. + + @itemize @bullet + @item + @cindex common blocks, large + @cindex large common blocks + @cindex linker errors + @cindex ld errors + @cindex errors, linker + On some older Linux systems, programs with common blocks larger + than 16MB cannot be linked without some kind of error + message being produced. + + This is a bug in older versions of @code{ld}, fixed in + more recent versions of @code{binutils}, such as version 2.6. + + @cindex @code{gdb} support + @cindex support, @code{gdb} + @item + There are some known problems when using @code{gdb} on code + compiled by @code{g77}. + Inadequate investigation as of the release of 0.5.16 results in not + knowing which products are the culprit, but @file{gdb-4.14} definitely + crashes when, for example, an attempt is made to print the contents + of a @samp{COMPLEX*16} dummy array, on at least some Linux machines, plus + some others. + + @item + @cindex unresolved reference (various) + @cindex linking error for user code + @cindex code, user + @cindex ld error for user code + @cindex ld can't find strange names + On some systems, perhaps just those with out-of-date (shared?) + libraries, unresolved-reference errors happen when linking @code{g77}-compiled + programs (which should be done using @code{g77}). + + If this happens to you, try appending @samp{-lc} to the command you + use to link the program, e.g. @samp{g77 foo.f -lc}. + @code{g77} already specifies @samp{-lf2c -lm} when it calls the linker, + but it cannot also specify @samp{-lc} because not all systems have a + file named @file{libc.a}. + + It is unclear at this point whether there are legitimately installed + systems where @samp{-lf2c -lm} is insufficient to resolve code produced + by @code{g77}. + + @item + @cindex undefined reference (_main) + @cindex linking error for user code + @cindex ld error for user code + @cindex code, user + @cindex ld can't find _main + If your program doesn't link, due to unresolved references to names + like @samp{_main}, make sure you're using the @code{g77} command to do the + link, since this command ensures that the necessary libraries are + loaded by specifying @samp{-lf2c -lm} when it invokes the @code{gcc} + command to do the actual link. + (Use the @samp{-v} option to discover + more about what actually happens when you use the @code{g77} and @code{gcc} + commands.) + + Also, try specifying @samp{-lc} as the last item on the @code{g77} + command line, because some systems need it and @code{g77} doesn't do it + automatically. + + @item + Developers of Fortran code on NeXTStep (all architectures) have to + watch out for the following problem when writing programs with + large, statically allocated (i.e. non-stack based) data structures + (common blocks, saved arrays). + + Due to the way the native loader (@file{/bin/ld}) lays out + data structures in virtual memory, it is very easy to create an + executable wherein the @samp{__DATA} segment overlaps (has addresses in + common) with the @samp{UNIX STACK} segment. + + This leads to all sorts of trouble, from the executable simply not + executing, to bus errors. + The NeXTStep command line tool @code{ebadexec} points to + the problem as follows: + + @smallexample + % @kbd{/bin/ebadexec a.out} + /bin/ebadexec: __LINKEDIT segment (truncated address = 0x3de000 + rounded size = 0x2a000) of executable file: a.out overlaps with UNIX + STACK segment (truncated address = 0x400000 rounded size = + 0x3c00000) of executable file: a.out + @end smallexample + + (In the above case, it is the @samp{__LINKEDIT} segment that overlaps the + stack segment.) + + This can be cured by assigning the @samp{__DATA} segment + (virtual) addresses beyond the stack segment. + A conservative + estimate for this is from address 6000000 (hexadecimal) onwards---this + has always worked for me [Toon Moene]: + + @smallexample + % @kbd{g77 -segaddr __DATA 6000000 test.f} + % @kbd{ebadexec a.out} + ebadexec: file: a.out appears to be executable + % + @end smallexample + + Browsing through @file{gcc/f/Makefile.in}, + you will find that the @code{f771} program itself also has to be + linked with these flags---it has large statically allocated + data structures. + (Version 0.5.18 reduces this somewhat, but probably + not enough.) + + (The above item was contributed by Toon Moene + (@code{toon@@moene.indiv.nluug.nl}).) + + @item + @code{g77} rejects some particularly nonportable, + silent data-type conversions such as @samp{LOGICAL} + to @samp{REAL} (as in @samp{A=.FALSE.}, where @samp{A} + is type @samp{REAL}), that other compilers might + quietly accept. + + Some of these conversions are accepted by @code{g77} + when the @samp{-fugly} option is specified. + @end itemize + + @include bugs.texi + + @node Missing Features + @section Missing Features + + This section lists features we know are missing from @code{g77}, + and which we want to add someday. + (There is no priority implied in the ordering below.) + + @itemize @bullet + @item + @cindex Fortran 90 support + @cindex support, Fortran 90 + @code{g77} does not support many of the features that + distinguish Fortran 90 (and, now, Fortran 95) from + ANSI FORTRAN 77. + + Some Fortran 90 features are listed here, because they + make sense to offer even to die-hard users of F77. + For example, many of them codify various ways F77 has + been extended to meet users' needs during its tenure, + so @code{g77} might as well offer them as the primary + way to meet those same needs, even if it offers compatibility + with one or more of the ways those needs were met + by other F77 compilers in the industry. + + Still, many important F90 features are not listed here, + because no attempt has been made to research each and + every feature and assess its viability in @code{g77}. + In the meantime, users who need those features must + use Fortran 90 compilers anyway, and the best approach + to adding some F90 features to GNU Fortran might well be + to fund a comprehensive project to create GNU Fortran 95. + + @item + @cindex AND intrinsic + @cindex intrinsics, AND + @cindex OR intrinsic + @cindex intrinsics, OR + @cindex SHIFT intrinsic + @cindex intrinsics, SHIFT + @code{g77} does not allow @samp{REAL} and other non-integral types for + arguments to intrinsics like @samp{AND}, @samp{OR}, and @samp{SHIFT}. + + @item + @cindex INTEGER*2 support + @cindex LOGICAL*1 support + @code{g77} doesn't support @samp{INTEGER*2}, @samp{LOGICAL*1}, and similar. + Version 0.6 will provide full support for this extremely + important set of features. + In the meantime, version 0.5.18 provides rudimentary support + for them. + + @item + @code{g77} rejects things other compilers accept, + like @samp{INTRINSIC SIN,SIN}. + As time permits in the future, some of these things that are easy for + humans to read and write and unlikely to be intended to mean something + else will be accepted by @code{g77} (though @samp{-fpedantic} should + trigger warnings about such non-standard constructs). + + In the meantime, you might as well fix your code + to be more standard-conforming and portable. + + The kind of case that is important to except from the + recommendation to change your code is one where following + good coding rules would force you to write non-standard + code that nevertheless has a clear meaning. + + For example, when writing an @samp{INCLUDE} file that + defines a common block, it might be appropriate to + include a @samp{SAVE} statement for the common block + (such as @samp{SAVE /CBLOCK/}), so that variables + defined in the common block retain their values even + when all procedures declaring the common block become + inactive (return to their callers). + + However, putting @samp{SAVE} statements in an @samp{INCLUDE} + file would prevent otherwise standard-conforming code + from also specifying the @samp{SAVE} statement, by itself, + to indicate that all local variables and arrays are to + have the @samp{SAVE} attribute. + + For this reason, @code{g77} already has been changed to + allow this combination, because although the general + problem of gratuitously rejecting unambiguous and + ``safe'' constructs still exists in @code{g77}, this + particular construct was deemed useful enough that + it was worth fixing @code{g77} for just this case. + + So, while there is no need to change your code + to avoid using this particular construct, there + might be other, equally appropriate but non-standard + constructs, that you shouldn't have to stop using + just because @code{g77} (or any other compiler) + gratuitously rejects it. + + Until the general problem is solved, if you have + any such construct you believe is worthwhile + using (e.g. not just an arbitrary, redundant + specification of an attribute), please submit a + bug report with an explanation, so we can consider + fixing @code{g77} just for cases like yours. + + @item + @cindex PARAMETER statement + @cindex statements, PARAMETER + @code{g77} doesn't accept @samp{PARAMETER I=1}. + Supporting this obsolete form of + the @samp{PARAMETER} statement would not be particularly hard, as most of the + parsing code is already in place and working. + + Until time/money is + spent implementing it, you might as well fix your code to use the + standard form, @samp{PARAMETER (I=1)} (possibly needing + @samp{INTEGER I} preceding the @samp{PARAMETER} statement as well, + otherwise, in the obsolete form of @samp{PARAMETER}, the + type of the variable is set from the type of the constant being + assigned to it). + + @item + @cindex POINTER statement + @cindex statements, POINTER + @cindex Cray pointers + @code{g77} doesn't support pointers or allocatable objects. + This set of features is + probably considered just behind @samp{INTEGER*2} and intrinsics + in @samp{PARAMETER} statements on the list of large, + important things to add to @code{g77}. + + @cindex TYPE statement + @cindex statements, TYPE + @cindex ACCEPT statement + @cindex statements, ACCEPT + @item + @code{g77} doesn't support the I/O statements @samp{TYPE} and + @samp{ACCEPT}. + These are common extensions that should be easy to support, + but also are fairly easy to work around in user code. + + @cindex STRUCTURE statement + @cindex statements, STRUCTURE + @cindex UNION statement + @cindex statements, UNION + @cindex RECORD statement + @cindex statements, RECORD + @cindex MAP statement + @cindex statements, MAP + @item + @code{g77} doesn't support @samp{STRUCTURE}, @samp{UNION}, @samp{RECORD}, + @samp{MAP}. + This set of extensions is quite a bit + lower on the list of large, important things to add to @code{g77}, partly + because it requires a great deal of work either upgrading or + replacing @code{libf2c}. + + @cindex disposition of files + @cindex OPEN statement + @cindex statements, OPEN + @cindex CLOSE statement + @cindex statements, CLOSE + @cindex INQUIRE statement + @cindex statements, INQUIRE + @item + There is no support for keywords such as @samp{DISP='DELETE'} in + the @samp{OPEN}, @samp{CLOSE}, and @samp{INQUIRE} statements. + These extensions are easy to add to @code{g77} itself, but + require much more work on @code{libf2c}. + + @cindex PARAMETER statement + @cindex statements, PARAMETER + @item + @code{g77} doesn't allow intrinsics in @samp{PARAMETER} statements. + This feature is considered to be absolutely vital, even though it + is not standard-conforming, and is scheduled for version 0.6. + + Related to this, @code{g77} doesn't allow non-integral + exponentiation in @samp{PARAMETER} statements, such as + @samp{PARAMETER (R=2**.25)}. + It is unlikely @code{g77} will ever support this feature, + as doing it properly requires complete emulation of + a target computer's floating-point facilities when + building @code{g77} as a cross-compiler. + But, if the @code{gcc} back end is enhanced to provide + such a facility, @code{g77} will likely use that facility + in implementing this feature soon afterwards. + + @cindex FORMAT statement + @cindex statements, FORMAT + @item + @code{g77} doesn't support @samp{FORMAT(I)} and the like. + Supporting this requires a significant redesign or replacement + of @code{libf2c}. + + @item + Need option to suppress information messages (notes). + @samp{-w} does this but also suppresses warnings. + The default should be to suppress info messages. + + @item + Provide some way, a la @code{gcc}, for @code{g77} code to specify assembler + code. + + @item + Support @samp{INTEGER}, @samp{REAL}, and @samp{COMPLEX} equivalents + for all applicable back-end-supported types (@samp{char}, @samp{short int}, + @samp{int}, @samp{long int}, @samp{long long int}, and @samp{long double}). + This means providing intrinsic support, and maybe constant + support (using F90 syntax) as well, and, for most + machines will result in automatic support of @samp{INTEGER*1}, + @samp{INTEGER*2}, @samp{INTEGER*8}, and so on. + This is scheduled for version 0.6. + + @item + Provide as the default source-line model a ``pure visual'' mode, where + the interpretation of a source program in this mode can be accurately + determined by a user looking at a traditionally displayed rendition + of the program (assuming the user knows whether the program is fixed + or free form). + + That is, assume the user cannot tell tabs from spaces + and cannot see trailing spaces on lines, but has canonical tab stops + and, for fixed-form source, has the ability to always know exactly + where column 72 is. + + This would change the default treatment of fixed-form source + to not treat lines with tabs as if they were infinitely long---instead, + they would end at column 72 just as if the tabs were replaced + by spaces in the canonical way. + + As part of this, provide common alternate models (Digital, @code{f2c}, + and so on) via command-line options. + This includes allowing arbitrarily long + lines for free-form source as well as fixed-form source and providing + various limits and diagnostics as appropriate. + + @item + Support more general expressions to dimension + arrays, such as array element references, function + references, etc. + + @item + A @samp{FLUSH} statement that does what many systems provide via + @samp{CALL FLUSH}, + but that supports @samp{*} as the unit designator (same unit as for + @samp{PRINT}). + + @item + Finish support for old-style @samp{PARAMETER} statement (like F77 + @samp{PARAMETER}, but type of destination is set from type of + source expression). + + @item + Character-type selector/cases for @samp{SELECT CASE}. + + @item + Option to initialize everything not explicitly initialized to ``weird'' + (machine-dependent) values, e.g. NANs, bad (non-@samp{NULL}) pointers, and + largest-magnitude integers. + + @item + Add run-time bounds-checking of array/subscript references a la @code{f2c}. + + @item + Output labels for use by debuggers that know how to support them. + Same with weirder things like construct names. + It is not yet known if any debug formats or debuggers support these. + + @item + Support the POSIX standard for Fortran. + + @item + Support Digital-style lossage of virtual blanks at end of source line + if some command-line option specified. + + This affects cases where + a character constant is continued onto the next line in a fixed-form + source file, as in the following example: + + @example + 10 PRINT *,'HOW MANY + 1 SPACES?' + @end example + + @code{g77}, and many other compilers, virtually extend + the continued line through column 72 with blanks that become part + of the character constant, but Digital Fortran normally didn't, + leaving only one space between @samp{MANY} and @samp{SPACES?} + in the output of the above statement. + + Fairly recently, at least one version of Digital Fortran + was enhanced to provide the other behavior when a + command-line option is specified, apparently due to demand + from readers of the USENET group @file{comp.lang.fortran} + to offer conformance to this widespread practice in the + industry. + @code{g77} should return the favor by offering conformance + to Digital's approach to handling the above example. + + @item + Consider a preprocessor designed specifically for Fortran to replace + @samp{cpp -traditional}. + There are several out there worth evaluating, at least. + + @item + Have @samp{-Wunused} warn about unused labels. + + @item + Warn about assigned @samp{GOTO}/@samp{FORMAT} usage without any + @samp{ASSIGN} to variable. + (Actually, use of @samp{-O -Wuninitialized} should + take care of most of these.) + + @item + Add @samp{-Wintrinsics} to warn about use of + non-standard intrinsics without explicit @samp{INTRINSIC} statements for them + (to help find code that might fail silently when ported to another + compiler). + + @item + Support @samp{-fpedantic} more thoroughly, and use it only to generate + warnings instead of rejecting constructs outright. + Have it warn: + if a variable that dimensions an array is not a dummy or placed + explicitly in @samp{COMMON} (F77 does not allow it to be + placed in @samp{COMMON} via @samp{EQUIVALENCE}); if specification statements + follow statement-function-definition statements; about all sorts of + syntactic extensions. + + @item + Warn about modifying @samp{DO} variables via @samp{EQUIVALENCE}. + (This test might be useful in setting the + internal ``doiter'' flag for a variable or even array + reference within a loop, since that might produce faster code someday.) + + @item + Add @samp{-Wpromotions} to warn if source code appears + to expect automatic, silent, and + somewhat dangerous compiler-assisted conversion of @samp{REAL} + constants to @samp{DOUBLE PRECISION} based on context. + + For example, warn about cases like this: + + @example + DOUBLE PRECISION FOO + PARAMETER (PI = 3.14159) + FOO = PI * 3D0 + @end example + + @item + Generally continue processing for warnings and recoverable (user) + errors whenever possible---don't gratuitously make bad code. + + For example: + + @example + INTRINSIC ZABS + CALL FOO(ZABS) + END + @end example + + When compiling the above with @samp{-ff2c-intrinsics-disable}, + @code{g77} should indeed complain about passing @samp{ZABS}, + but it still should compile, instead of rejecting + the entire @samp{CALL} statement. + (Some of this is related to improving + the compiler internals to improve how statements are analyzed.) + + @item + If @samp{-fno-ugly}, reject badly designed trailing-radix quoted (typeless) + numbers, such as @samp{'123'O}. + + @item + Add @samp{-Wugly*}, @samp{-Wautomatic}, @samp{-Wvxt-not-f90}, @samp{-Wf90}, + and so on. + These would warn about places in the user's source where ambiguities + are found. + + One especially interesting case that @samp{-Wf90} would catch + is use of @samp{REAL(Z)}, where @samp{Z} is @samp{DOUBLE COMPLEX}. + Apparently, traditional extended F77 compilers treat this as + what all compilers should agree is @samp{REAL(REAL(Z))}, while + F90 compilers are required to treat @samp{REAL(Z)} as the same + as @samp{DBLE(Z)}, returning a @samp{DOUBLE PRECISION} result + rather than a @samp{REAL} result. + + @item + @samp{-Wconversion} and related should flag places where non-standard + conversions are found. + Perhaps much of this would be part of @samp{-Wugly*}. + + @item + Complain when list of dummies containing an adjustable dummy array does + not also contain every variable listed in the dimension list of the + adjustable array. + + Currently, @code{g77} does complain about a variable that + dimensions an array but doesn't appear in any dummy list or @samp{COMMON} + area, but this needs to be extended to catch cases where it doesn't appear in + every dummy list that also lists any arrays it dimensions. + + @item + Make sure things like @samp{RETURN 2HAB} are invalid in both source forms + (must be @samp{RETURN (2HAB)}, + which probably still makes no sense but at least can + be reliably parsed). + Fixed form rejects it, but not free form, except + in a way that is a bit difficult to understand. + + @item + The sort of routines usually found in the BSD-ish @code{libU77} should be + provided in addition to the few utility routines in @code{libf2c}. + Much of this work has already been done, and is awaiting + integration into @code{g77}. + @end itemize + + @node Disappointments + @section Disappointments and Misunderstandings + + These problems are perhaps regrettable, but we don't know any practical + way around them for now. + + @itemize @bullet + @item + @cindex IMPLICIT CHARACTER*(*) statement + @cindex statements, IMPLICIT CHARACTER*(*) + @code{g77} disallows @samp{IMPLICIT CHARACTER*(*)}. + This is not standard-conforming, + and there are some very good reasons for that. + When I next remember any, I'll try to write them down. + + @cindex block data + @cindex BLOCK DATA statement + @cindex statements, BLOCK DATA + @cindex COMMON statement + @cindex statements, COMMON + @cindex naming conflicts + @item + @code{g77} doesn't allow a common block and an external procedure or + @samp{BLOCK DATA} to have the same name. + Some systems allow this, but @code{g77} does not, + to be compatible with @code{f2c}. + + @code{g77} could special-case the way it handles + @samp{BLOCK DATA}, since it is not compatible with @code{f2c} in this + particular area (necessarily, since @code{g77} offers an + important feature here), but + it is likely that such special-casing would be very annoying to people + with programs that use @samp{EXTERNAL FOO}, with no other mention of + @samp{FOO} in the same program unit, to refer to external procedures, since + the result would be that @code{g77} would treat these references as requests to + force-load BLOCK DATA program units. + + In that case, if @code{g77} modified + names of @samp{BLOCK DATA} so they could have the same names as + @samp{COMMON}, users + would find that their programs wouldn't link because the @samp{FOO} procedure + didn't have its name translated the same way. + + (Strictly speaking, + @code{g77} could emit a null-but-externally-satisfying definition of + @samp{FOO} with its name transformed as if it had been a + @samp{BLOCK DATA}, but that probably invites more trouble than it's + worth.) + + @item + The current external-interface design, which includes naming of + external procedures, COMMON blocks, and the library interface, + has various usability problems, including things like adding + underscores where not really necessary (and preventing easier + inter-language operability) and yet not providing complete + namespace freedom for user C code linked with Fortran apps (due + to the naming of functions in the library, among other things). + + Project GNU should at least get all this ``right'' for systems + it fully controls, such as the Hurd, and provide defaults and + options for compatibility with existing systems and interoperability + with popular existing compilers. + @end itemize + + @node Non-bugs + @section Certain Changes We Don't Want to Make + + This section lists changes that people frequently request, but which + we do not make because we think GNU Fortran is better without them. + + @itemize @bullet + @cindex backslash + @cindex f77 support + @cindex support, f77 + @item + @samp{-fno-backslash} should be the default, not @samp{-fbackslash}. + + First of all, you can always specify + @samp{-fno-backslash} to turn off this processing. + + Despite not being within the spirit (though apparently within the + letter) of the ANSI FORTRAN 77 standard, @code{g77} defaults to + @samp{-fbackslash} because that is what most UNIX @code{f77} commands + default to, and apparently lots of code depends on this feature. + + This is a particularly troubling issue. + The use of a C construct in the midst of Fortran code + is bad enough, worse when it makes existing Fortran + programs stop working (as happens when programs written + for non-UNIX systems are ported to UNIX systems with + compilers that provide the @samp{-fbackslash} feature + as the default---sometimes with no option to turn it off). + + The author of GNU Fortran wished, for reasons of linguistic + purity, to make @samp{-fno-backslash} the default for GNU + Fortran and thus require users of UNIX @code{f77} and @code{f2c} + to specify @samp{-fbackslash} to get the UNIX behavior. + + However, the realization that @code{g77} is intended as + a replacement for @emph{UNIX} @code{f77}, caused the author + to choose to make @code{g77} as compatible with + @code{f77} as feasible, which meant making @samp{-fbackslash} + the default. + + The primary focus on compatibility is at the source-code + level, and the question became ``What will users expect + a replacement for @code{f77} to do, by default?'' + Although at least one UNIX @code{f77} does not provide + @samp{-fbackslash} as a default, it appears that, by far, + the majority of them do, which suggests that, by far, + the majority of code that is compiled by UNIX @code{f77} + compilers expects @samp{-fbackslash} to be the default. + + It is probably the case that more code exists + that would @emph{not} work with @samp{-fbackslash} + in force than code that requires it be in force. + + However, most of @emph{that} code is not being compiled + with @code{f77}, + and when it is, new build procedures (shell scripts, + makefiles, and so on) must be set up anyway so that + they work under UNIX. + That makes a much more natural and safe opportunity for + non-UNIX users to adapt their build procedures for + @code{g77}'s default of @samp{-fbackslash} than would + exist for the majority of UNIX @code{f77} users who + would have to modify existing, working build procedures + to explicitly specify @samp{-fbackslash} if that was + not the default. + + One suggestion has been to configure the default for + @samp{-fbackslash} (and perhaps other options as well) + based on the configuration of @code{g77}. + + This is technically quite straightforward, but will be avoided + even in cases where not configuring defaults to be + dependent on a particular configuration greatly inconveniences + some users of legacy code. + + Many users appreciate the GNU compilers because they provide an + environment that is uniform across machines. + These users would be + inconvenienced if the compiler treated things like the + format of the source code differently on certain machines. + + Occasionally users write programs intended only for a particular machine + type. + On these occasions, the users would benefit if the GNU Fortran compiler + were to support by default the same dialect as the other compilers on + that machine. + But such applications are rare. + And users writing a + program to run on more than one type of machine cannot possibly benefit + from this kind of compatibility. + (This is consistent with the design goals for @code{gcc}. + To change them for @code{g77}, you must first change them + for @code{gcc}. + Do not ask the maintainers of @code{g77} to do this for you, + or to disassociate @code{g77} from the widely understood, if + not widely agreed-upon, goals for GNU compilers in general.) + + This is why GNU Fortran does and will treat backslashes in the same + fashion on all types of machines (by default). + + Of course, users strongly concerned about portability should indicate + explicitly in their build procedures which options are expected + by their source code, or write source code that has as few such + expectations as possible. + + For example, avoid writing code that depends on backslash (@samp{\}) + being interpreted either way in particular, such as by + starting a program unit with: + + @example + CHARACTER BACKSL + PARAMETER (BACKSL = '\\') + @end example + + Then, use concatenation of @samp{BACKSL} anyplace a backslash + is desired. + (However, this technique does not work for Hollerith constants---which + is good, since the only generally portable uses for Hollerith + constants are in places where character constants can and should + be used instead, for readability.) + + In this way, users can write programs which have the same meaning + in many Fortran dialects. + + @item + @code{g77} does not use context to determine the types of + constants or named constants (@samp{PARAMETER}). + + For example, consider the following statement: + + @example + PRINT *, 3.1415926535 * 2D0 + @end example + + @code{g77} will interpret the (truncated) constant + @samp{3.1415926535} as a @samp{REAL}, not @samp{DOUBLE PRECISION}, + constant, because the suffix @samp{D0} is not specified. + + As a result, the output of the above statement when + compiled by @code{g77} will appear to have ``less precision'' + than when compiled by other compilers. + + In these and other cases, some compilers detect the + fact that a single-precision constant is used in + a double-precision context and therefore interpret the + single-precision constant as if it was @emph{explicitly} + specified as a double-precision constant. + (This has the effect of appending @emph{decimal}, not + @emph{binary}, zeros to the fractional part of the + number---producing different computational results.) + + The reason this misfeature is dangerous is that a slight, + apparently innocuous change to the source code can change + the computational results. Consider: + + @example + REAL ALMOST, CLOSE + DOUBLE PRECISION FIVE + PARAMETER (ALMOST = 5.000000000001) + FIVE = 5 + CLOSE = 5.000000000001 + PRINT *, 5.000000000001 - FIVE + PRINT *, ALMOST - FIVE + PRINT *, CLOSE - FIVE + END + @end example + + Running the above program should + result in the same value being + printed three times. + With @code{g77} as the compiler, + it does. + + However, compiled by many other compilers, + running the above program would print + two or three distinct values, because + in two or three of the statements, the + constant @samp{5.000000000001}, which + on most systems is exactly equal to @samp{5.} + when interpreted as a single-precision constant, + is instead interpreted as a double-precision + constant, preserving the represented + precision. + However, this ``clever'' promotion of + type does not extend to variables or, + in some compilers, to named constants. + + Since programmers often are encouraged to replace manifest + constants or permanently-assigned variables with named + constants (@samp{PARAMETER} in Fortran), and might need + to replace some constants with variables having the same + values for pertinent portions of code, + it is important that compilers treat code so modified in the + same way so that the results of such programs are the same. + @code{g77} helps in this regard by treating constants just + the same as variables in terms of determining their types + in a context-independent way. + + Still, there is a lot of existing Fortran code that has + been written to depend on the way other compilers freely + interpret constants' types based on context, so anything + @code{g77} can do to help flag cases of this in such code + could be very helpful. + + @item + @code{g77} treats procedure references to @emph{possible} intrinsic + names as always enabling their intrinsic nature, regardless of + whether the @emph{form} of the reference is valid for that + intrinsic. + + For example, @samp{CALL IFIX} is interpreted by @code{g77} first as + a reference to the @samp{IFIX} intrinsic, because the reference + is a procedure invocation (as compared to @samp{J=IFIX}); only + after establishing that, in the program unit being compiled, + @samp{IFIX} is in fact an intrinsic and not a local name that + happens to have the same name as an intrinsic, does @code{g77} + recognize that the form of the reference is invalid for that + particular intrinsic. + At that point, @code{g77} issues a diagnostic. + + Some users claim that it is ``obvious'' that @samp{CALL IFIX} + references an external subroutine of their own, not an + intrinsic function. + + However, @code{g77} knows about intrinsic + subroutines, not just functions, and is able to support both having + the same names, for example. + + As a result of this, @code{g77} rejects calls + to intrinsics that are not subroutines, and function invocations + of intrinsics that are not functions, just as it (and most compilers) + rejects invocations of intrinsics with the wrong number (or types) + of arguments. + + Use the @samp{EXTERNAL IFIX} statement in a program unit that calls + a user-written subroutine named @samp{IFIX}. + + @item + Allow @samp{DATA VAR/.../} to come before @samp{COMMON /.../ ...,VAR,...}. + + It is @emph{possible} @code{g77} will someday allow this. + + Then again, maybe it is better to have + @code{g77} always require placement of @samp{DATA} + so that it can possibly immediately write constants + to the output file, thus saving time and space. + + That is, @samp{DATA A/1000000*1/} should perhaps always + be immediately writable to canonical assembler, unless it's already known + to be in a @samp{COMMON} area following as-yet-uninitialized stuff, + and to do this it cannot be followed by @samp{COMMON A}. + + @item + Making side effects happen in the same order as in some other compiler. + + @cindex side effects, order of evaluation + @cindex order of evaluation, side effects + It is never safe to depend on the order of evaluation of side effects. + For example, an expression like this may very well behave differently + from one compiler to another: + + @example + J = IFUNC() - IFUNC() + @end example + + There is no guarantee that @samp{IFUNC} will be evaluated in any particular + order. + Either invocation might happen first. + If @samp{IFUNC} returns 5 the first time it is invoked, and + returns 12 the second time, @samp{J} might end up with the + value @samp{7}, or it might end up with @samp{-7}. + + Generally, in Fortran, procedures with side-effects intended to + be visible to the caller are best designed as @emph{subroutines}, + not functions. + Examples of such side-effects include: + + @itemize @bullet + @item + The generation of random numbers + that are intended to influence return values. + + @item + Performing I/O + (other than internal I/O to local variables). + + @item + Updating information in common blocks. + @end itemize + + An example of a side-effect that is not intended to be visible + to the caller is a function that maintains a cache of recently + calculated results, intended solely to speed repeated invocations + of the function with identical arguments. + Such a function can be safely used in expressions, because + if the compiler optimizes away one or more calls to the + function, operation of the program is unaffected (aside + from being speeded up). + @end itemize + + @node Warnings and Errors + @section Warning Messages and Error Messages + + @cindex error messages + @cindex warnings vs errors + @cindex messages, warning and error + The GNU compiler can produce two kinds of diagnostics: errors and + warnings. + Each kind has a different purpose: + + @itemize @w{} + @item + @emph{Errors} report problems that make it impossible to compile your + program. + GNU Fortran reports errors with the source file name, line + number, and column within the line where the problem is apparent. + + @item + @emph{Warnings} report other unusual conditions in your code that + @emph{might} indicate a problem, although compilation can (and does) + proceed. + Warning messages also report the source file name, line number, + and column information, + but include the text @samp{warning:} to distinguish them + from error messages. + @end itemize + + Warnings might indicate danger points where you should check to make sure + that your program really does what you intend; or the use of obsolete + features; or the use of nonstandard features of GNU Fortran. + Many warnings are issued only if you ask for them, with one of the + @samp{-W} options (for instance, @samp{-Wall} requests a variety of + useful warnings). + + @emph{Note:} Currently, the text of the line and a pointer to the column + is printed in most @code{g77} diagnostics. + Probably, as of version 0.6, @code{g77} will + no longer print the text of the source line, instead printing + the column number following the file name and line number in + a form that GNU Emacs recognizes. + This change is expected to speed up and reduce the memory usage + of the @code{g77} compiler. + @c + @c Say this when it is true -- hopefully 0.6, maybe 0.7 or later. --burley + @c + @c GNU Fortran always tries to compile your program if possible; it never + @c gratuitously rejects a program whose meaning is clear merely because + @c (for instance) it fails to conform to a standard. In some cases, + @c however, the Fortran standard specifies that certain extensions are + @c forbidden, and a diagnostic @emph{must} be issued by a conforming + @c compiler. The @samp{-pedantic} option tells GNU Fortran to issue warnings + @c in such cases; @samp{-pedantic-errors} says to make them errors instead. + @c This does not mean that @emph{all} non-ANSI constructs get warnings + @c or errors. + + @xref{Warning Options,,Options to Request or Suppress Warnings}, for + more detail on these and related command-line options. + + @node Open Questions + @chapter Open Questions + + Please consider offering useful answers to these questions! + + @itemize @bullet + @item + @code{g77} treats constants like @samp{Z'ABCD'} and @samp{'ABCD'Z} + as typeless. + It seems like maybe the prefix-letter form, @samp{Z'ABCD'}, should + be @samp{INTEGER} instead. + + You can test for yourself whether a particular compiler treats + the prefix form as @samp{INTEGER} or typeless by running the + following program: + + @smallexample + EQUIVALENCE (I, R) + R = Z'ABCD' + J = Z'ABCD' + IF (J .EQ. I) PRINT *, 'Prefix form is TYPELESS' + IF (J .NE. I) PRINT *, 'Prefix form is INTEGER' + END + @end smallexample + + If you wish to report the results of this test to the + maintainers of @code{g77}, please include full information + on the compiler, system, and version information you're + using. + (We already know how @code{g77} handles it, of course.) + + Perhaps this will be changed in version 0.6. + + @item + @samp{LOC()} and other intrinsics are probably somewhat misclassified. + Is the a need for more precise classification of intrinsics, and if so, + what are the appropriate groupings? + Is there a need to individually + enable/disable/delete/hide intrinsics from the command line? + @end itemize + + @node Bugs + @chapter Reporting Bugs + @cindex bugs + @cindex reporting bugs + + Your bug reports play an essential role in making GNU Fortran reliable. + + When you encounter a problem, the first thing to do is to see if it is + already known. + @xref{Trouble}. + If it isn't known, then you should report the problem. + + Reporting a bug might help you by bringing a solution to your problem, or + it might not. + (If it does not, look in the service directory; see + @ref{Service}.) + In any case, the principal function of a bug report is + to help the entire community by making the next version of GNU Fortran work + better. + Bug reports are your contribution to the maintenance of GNU Fortran. + + Since the maintainers are very overloaded, we cannot respond to every + bug report. + However, if the bug has not been fixed, we are likely to + send you a patch and ask you to tell us whether it works. + + In order for a bug report to serve its purpose, you must include the + information that makes for fixing the bug. + + @menu + * Criteria: Bug Criteria. Have you really found a bug? + * Where: Bug Lists. Where to send your bug report. + * Reporting: Bug Reporting. How to report a bug effectively. + * Patches: Sending Patches. How to send a patch for GNU Fortran. + * Known: Trouble. Known problems. + * Help: Service. Where to ask for help. + @end menu + + @node Bug Criteria + @section Have You Found a Bug? + @cindex bug criteria + + If you are not sure whether you have found a bug, here are some guidelines: + + @itemize @bullet + @cindex fatal signal + @cindex core dump + @item + If the compiler gets a fatal signal, for any input whatever, that is a + compiler bug. + Reliable compilers never crash---they just remain obsolete. + + @cindex invalid assembly code + @cindex assembly code, invalid + @item + If the compiler produces invalid assembly code, for any input whatever + (except an @code{asm} statement), that is a compiler bug, unless the + compiler reports errors (not just warnings) which would ordinarily + prevent the assembler from being run. + + @cindex undefined behavior + @cindex undefined function value + @item + If the compiler produces valid assembly code that does not correctly + execute the input source code, that is a compiler bug. + + However, you must double-check to make sure, because you might have run + into an incompatibility between GNU Fortran and traditional Fortran. + @c (@pxref{Incompatibilities}). + These incompatibilities might be considered + bugs, but they are inescapable consequences of valuable features. + + Or you might have a program whose behavior is undefined, which happened + by chance to give the desired results with another Fortran compiler. + It is best to check the relevant Fortran standard thoroughly if + it is possible that the program indeed does something undefined. + + After you have localized the error to a single source line, it should + be easy to check for these things. + If your program is correct and well defined, you have found + a compiler bug. + + It might help if, in your submission, you identified the specific + language in the relevant Fortran standard that specifies the + desired behavior, if it isn't likely to be obvious and agreed-upon + by all Fortran users. + + @item + If the compiler produces an error message for valid input, that is a + compiler bug. + + @cindex invalid input + @item + If the compiler does not produce an error message for invalid input, + that is a compiler bug. + However, you should note that your idea of + ``invalid input'' might be someone else's idea + of ``an extension'' or ``support for traditional practice''. + + @item + If you are an experienced user of Fortran compilers, your suggestions + for improvement of GNU Fortran are welcome in any case. + @end itemize + + @node Bug Lists + @section Where to Report Bugs + @cindex bug report mailing lists + @kindex fortran@@gnu.ai.mit.edu + Send bug reports for GNU Fortran to @samp{fortran@@gnu.ai.mit.edu}. + + Often people think of posting bug reports to a newsgroup instead of + mailing them. + This sometimes appears to work, but it has one problem which can be + crucial: a newsgroup posting does not contain a mail path back to the + sender. + Thus, if maintainers need more information, they may be unable + to reach you. For this reason, you should always send bug reports by + mail to the proper mailing list. + + As a last resort, send bug reports on paper to: + + @example + GNU Compiler Bugs + Free Software Foundation + 59 Temple Place - Suite 330 + Boston, MA 02111-1307, USA + @end example + + @node Bug Reporting + @section How to Report Bugs + @cindex compiler bugs, reporting + + The fundamental principle of reporting bugs usefully is this: + @strong{report all the facts}. + If you are not sure whether to state a + fact or leave it out, state it! + + Often people omit facts because they think they know what causes the + problem and they conclude that some details don't matter. + Thus, you might + assume that the name of the variable you use in an example does not matter. + Well, probably it doesn't, but one cannot be sure. + Perhaps the bug is a + stray memory reference which happens to fetch from the location where that + name is stored in memory; perhaps, if the name were different, the contents + of that location would fool the compiler into doing the right thing despite + the bug. + Play it safe and give a specific, complete example. + That is the + easiest thing for you to do, and the most helpful. + + Keep in mind that the purpose of a bug report is to enable someone to + fix the bug if it is not known. + It isn't very important what happens if + the bug is already known. + Therefore, always write your bug reports on + the assumption that the bug is not known. + + Sometimes people give a few sketchy facts and ask, ``Does this ring a + bell?'' + This cannot help us fix a bug, so it is rarely helpful. + We respond by asking for enough details to enable us to investigate. + You might as well expedite matters by sending them to begin with. + (Besides, there are enough bells ringing around here as it is.) + + Try to make your bug report self-contained. + If we have to ask you for + more information, it is best if you include all the previous information + in your response, as well as the information that was missing. + + Please report each bug in a separate message. + This makes it easier for + us to track which bugs have been fixed and to forward your bugs reports + to the appropriate maintainer. + + Do not compress and encode any part of your bug report using programs + such as @file{uuencode}. + If you do so it will slow down the processing + of your bug. + If you must submit multiple large files, use @file{shar}, + which allows us to read your message without having to run any + decompression programs. + + (As a special exception for GNU Fortran bug-reporting, at least + for now, if you are sending more than a few lines of code, if + your program's source file format contains ``interesting'' things + like trailing spaces or strange characters, or if you need to + include binary data files, it is acceptable to put all the + files together in a @code{tar} archive, and, whether you need to + do that, it is acceptable to then compress the single file (@code{tar} + archive or source file) + using @code{gzip} and encode it via @code{uuencode}. + Do not use any MIME stuff---the current maintainer can't decode this. + Using @code{compress} instead of @code{gzip} is acceptable, assuming + you have licensed the use of the patented algorithm in + @code{compress} from Unisys.) + + To enable someone to investigate the bug, you should include all these + things: + + @itemize @bullet + @item + The version of GNU Fortran. + You can get this by running @code{g77} with the @samp{-v} option. + (Ignore any error messages that might be displayed + when the linker is run.) + + Without this, we won't know whether there is any point in looking for + the bug in the current version of GNU Fortran. + + @item + @cindex preprocessor + @cindex cpp program + @cindex programs, cpp + A complete input file that will reproduce the bug. + If the bug is in the compiler proper (@file{f771}) and + you are using the C preprocessor, run your + source file through the C preprocessor by doing @samp{g77 -E + @var{sourcefile} > @var{outfile}}, then include the contents of + @var{outfile} in the bug report. (When you do this, use the same + @samp{-I}, @samp{-D} or @samp{-U} options that you used in actual + compilation.) + + A single statement is not enough of an example. + In order to compile it, + it must be embedded in a complete file of compiler input; and the bug + might depend on the details of how this is done. + + Without a real example one can compile, all anyone can do about your bug + report is wish you luck. It would be futile to try to guess how to + provoke the bug. For example, bugs in register allocation and reloading + frequently depend on every little detail of the function they happen in. + + @item + @cindex included files + @cindex INCLUDE statement + @cindex statements, INCLUDE + Note that you should include with your bug report any files + included by the source file (via the @samp{INCLUDE} statement) + that you send, and any files they @samp{INCLUDE}, + and so on. + + It is not necessary to replace the @samp{INCLUDE} statements + with the actual files in the version of the source file that + you send, but it might make submitting the bug report easier + on the ends. + However, be sure to @emph{reproduce} the bug using the @emph{exact} + version of the source material you submit, to avoid wild-goose + chases. + + @item + The command arguments you gave GNU Fortran to compile that example + and observe the bug. For example, did you use @samp{-O}? To guarantee + you won't omit something important, list all the options. + + If we were to try to guess the arguments, we would probably guess wrong + and then we would not encounter the bug. + + @item + The type of machine you are using, and the operating system name and + version number. + (Much of this information is printed by @samp{g77 -v}---if you + include that, send along any additional info you have that you + don't see clearly represented in that output.) + + @item + The operands you gave to the @code{configure} command when you installed + the compiler. + + @item + A complete list of any modifications you have made to the compiler + source. (We don't promise to investigate the bug unless it happens in + an unmodified compiler. But if you've made modifications and don't tell + us, then you are sending us on a wild-goose chase.) + + Be precise about these changes. A description in English is not + enough---send a context diff for them. + + Adding files of your own (such as a machine description for a machine we + don't support) is a modification of the compiler source. + + @item + Details of any other deviations from the standard procedure for installing + GNU Fortran. + + @item + A description of what behavior you observe that you believe is + incorrect. For example, ``The compiler gets a fatal signal,'' or, + ``The assembler instruction at line 208 in the output is incorrect.'' + + Of course, if the bug is that the compiler gets a fatal signal, then one + can't miss it. But if the bug is incorrect output, the maintainer might + not notice unless it is glaringly wrong. None of us has time to study + all the assembler code from a 50-line Fortran program just on the chance that + one instruction might be wrong. We need @emph{you} to do this part! + + Even if the problem you experience is a fatal signal, you should still + say so explicitly. Suppose something strange is going on, such as, your + copy of the compiler is out of synch, or you have encountered a bug in + the C library on your system. (This has happened!) Your copy might + crash and the copy here would not. If you @i{said} to expect a crash, + then when the compiler here fails to crash, we would know that the bug + was not happening. If you don't say to expect a crash, then we would + not know whether the bug was happening. We would not be able to draw + any conclusion from our observations. + + If the problem is a diagnostic when building GNU Fortran with some other + compiler, say whether it is a warning or an error. + + Often the observed symptom is incorrect output when your program is run. + Sad to say, this is not enough information unless the program is short + and simple. None of us has time to study a large program to figure out + how it would work if compiled correctly, much less which line of it was + compiled wrong. So you will have to do that. Tell us which source line + it is, and what incorrect result happens when that line is executed. A + person who understands the program can find this as easily as finding a + bug in the program itself. + + @item + If you send examples of assembler code output from GNU Fortran, + please use @samp{-g} when you make them. The debugging information + includes source line numbers which are essential for correlating the + output with the input. + + @item + If you wish to mention something in the GNU Fortran source, refer to it by + context, not by line number. + + The line numbers in the development sources don't match those in your + sources. Your line numbers would convey no convenient information to the + maintainers. + + @item + Additional information from a debugger might enable someone to find a + problem on a machine which he does not have available. However, you + need to think when you collect this information if you want it to have + any chance of being useful. + + @cindex backtrace for bug reports + For example, many people send just a backtrace, but that is never + useful by itself. A simple backtrace with arguments conveys little + about GNU Fortran because the compiler is largely data-driven; the same + functions are called over and over for different RTL insns, doing + different things depending on the details of the insn. + + Most of the arguments listed in the backtrace are useless because they + are pointers to RTL list structure. The numeric values of the + pointers, which the debugger prints in the backtrace, have no + significance whatever; all that matters is the contents of the objects + they point to (and most of the contents are other such pointers). + + In addition, most compiler passes consist of one or more loops that + scan the RTL insn sequence. The most vital piece of information about + such a loop---which insn it has reached---is usually in a local variable, + not in an argument. + + @findex debug_rtx + What you need to provide in addition to a backtrace are the values of + the local variables for several stack frames up. When a local + variable or an argument is an RTX, first print its value and then use + the GDB command @code{pr} to print the RTL expression that it points + to. (If GDB doesn't run on your machine, use your debugger to call + the function @code{debug_rtx} with the RTX as an argument.) In + general, whenever a variable is a pointer, its value is no use + without the data it points to. + @end itemize + + Here are some things that are not necessary: + + @itemize @bullet + @item + A description of the envelope of the bug. + + Often people who encounter a bug spend a lot of time investigating + which changes to the input file will make the bug go away and which + changes will not affect it. + + This is often time consuming and not very useful, because the way we + will find the bug is by running a single example under the debugger with + breakpoints, not by pure deduction from a series of examples. You might + as well save your time for something else. + + Of course, if you can find a simpler example to report @emph{instead} of + the original one, that is a convenience. Errors in the output will be + easier to spot, running under the debugger will take less time, etc. + Most GNU Fortran bugs involve just one function, so the most straightforward + way to simplify an example is to delete all the function definitions + except the one where the bug occurs. Those earlier in the file may be + replaced by external declarations if the crucial function depends on + them. (Exception: inline functions may affect compilation of functions + defined later in the file.) + + However, simplification is not vital; if you don't want to do this, + report the bug anyway and send the entire test case you used. + + @item + In particular, some people insert conditionals @samp{#ifdef BUG} around + a statement which, if removed, makes the bug not happen. These are just + clutter; we won't pay any attention to them anyway. Besides, you should + send us preprocessor output, and that can't have conditionals. + + @item + A patch for the bug. + + A patch for the bug is useful if it is a good one. But don't omit the + necessary information, such as the test case, on the assumption that a + patch is all we need. We might see problems with your patch and decide + to fix the problem another way, or we might not understand it at all. + + Sometimes with a program as complicated as GNU Fortran it is very hard to + construct an example that will make the program follow a certain path + through the code. If you don't send the example, we won't be able to + construct one, so we won't be able to verify that the bug is fixed. + + And if we can't understand what bug you are trying to fix, or why your + patch should be an improvement, we won't install it. A test case will + help us to understand. + + @xref{Sending Patches}, for guidelines on how to make it easy for us to + understand and install your patches. + + @item + A guess about what the bug is or what it depends on. + + Such guesses are usually wrong. Even the maintainer can't guess right + about such things without first using the debugger to find the facts. + + @item + A core dump file. + + We have no way of examining a core dump for your type of machine + unless we have an identical system---and if we do have one, + we should be able to reproduce the crash ourselves. + @end itemize + + @node Sending Patches,, Bug Reporting, Bugs + @section Sending Patches for GNU Fortran + + If you would like to write bug fixes or improvements for the GNU Fortran + compiler, that is very helpful. + Send suggested fixes to the bug report + mailing list, @code{fortran@@gnu.ai.mit.edu}. + + Please follow these guidelines so we can study your patches efficiently. + If you don't follow these guidelines, your information might still be + useful, but using it will take extra work. Maintaining GNU Fortran is a lot + of work in the best of circumstances, and we can't keep up unless you do + your best to help. + + @itemize @bullet + @item + Send an explanation with your changes of what problem they fix or what + improvement they bring about. For a bug fix, just include a copy of the + bug report, and explain why the change fixes the bug. + + (Referring to a bug report is not as good as including it, because then + we will have to look it up, and we have probably already deleted it if + we've already fixed the bug.) + + @item + Always include a proper bug report for the problem you think you have + fixed. We need to convince ourselves that the change is right before + installing it. Even if it is right, we might have trouble judging it if + we don't have a way to reproduce the problem. + + @item + Include all the comments that are appropriate to help people reading the + source in the future understand why this change was needed. + + @item + Don't mix together changes made for different reasons. + Send them @emph{individually}. + + If you make two changes for separate reasons, then we might not want to + install them both. We might want to install just one. If you send them + all jumbled together in a single set of diffs, we have to do extra work + to disentangle them---to figure out which parts of the change serve + which purpose. If we don't have time for this, we might have to ignore + your changes entirely. + + If you send each change as soon as you have written it, with its own + explanation, then the two changes never get tangled up, and we can + consider each one properly without any extra work to disentangle them. + + Ideally, each change you send should be impossible to subdivide into + parts that we might want to consider separately, because each of its + parts gets its motivation from the other parts. + + @item + Send each change as soon as that change is finished. Sometimes people + think they are helping us by accumulating many changes to send them all + together. As explained above, this is absolutely the worst thing you + could do. + + Since you should send each change separately, you might as well send it + right away. That gives us the option of installing it immediately if it + is important. + + @item + Use @samp{diff -c} to make your diffs. Diffs without context are hard + for us to install reliably. More than that, they make it hard for us to + study the diffs to decide whether we want to install them. Unidiff + format is better than contextless diffs, but not as easy to read as + @samp{-c} format. + + If you have GNU diff, use @samp{diff -cp}, which shows the name of the + function that each change occurs in. + (The maintainer of GNU Fortran currently uses @samp{diff -rcp2N}.) + + @item + Write the change log entries for your changes. We get lots of changes, + and we don't have time to do all the change log writing ourselves. + + Read the @file{ChangeLog} file to see what sorts of information to put + in, and to learn the style that we use. The purpose of the change log + is to show people where to find what was changed. So you need to be + specific about what functions you changed; in large functions, it's + often helpful to indicate where within the function the change was. + + On the other hand, once you have shown people where to find the change, + you need not explain its purpose. Thus, if you add a new function, all + you need to say about it is that it is new. If you feel that the + purpose needs explaining, it probably does---but the explanation will be + much more useful if you put it in comments in the code. + + If you would like your name to appear in the header line for who made + the change, send us the header line. + + @item + When you write the fix, keep in mind that we can't install a change that + would break other systems. + + People often suggest fixing a problem by changing machine-independent + files such as @file{toplev.c} to do something special that a particular + system needs. Sometimes it is totally obvious that such changes would + break GNU Fortran for almost all users. We can't possibly make a change like + that. At best it might tell us how to write another patch that would + solve the problem acceptably. + + Sometimes people send fixes that @emph{might} be an improvement in + general---but it is hard to be sure of this. It's hard to install + such changes because we have to study them very carefully. Of course, + a good explanation of the reasoning by which you concluded the change + was correct can help convince us. + + The safest changes are changes to the configuration files for a + particular machine. These are safe because they can't create new bugs + on other machines. + + Please help us keep up with the workload by designing the patch in a + form that is good to install. + @end itemize + + @node Service + @chapter How To Get Help with GNU Fortran + + If you need help installing, using or changing GNU Fortran, there are two + ways to find it: + + @itemize @bullet + @item + Look in the service directory for someone who might help you for a fee. + The service directory is found in the file named @file{SERVICE} in the + GNU CC distribution. + + @item + Send a message to @code{fortran@@gnu.ai.mit.edu}. + @end itemize + + @end ifset + @ifset INTERNALS + @node Adding Options + @chapter Adding Options + @cindex options, adding + @cindex adding options + + To add a new command-line option to @code{g77}, first decide + what kind of option you wish to add. + Search the @code{g77} and @code{gcc} documentation for one + or more options that is most closely like the one you want to add + (in terms of what kind of effect it has, and so on) to + help clarify its nature. + + @itemize @bullet + @item + @emph{Fortran options} are options that apply only + when compiling Fortran programs. + They are accepted by @code{g77} and @code{gcc}, but + they mean something only when these commands actually + compile Fortran programs. + + @item + @emph{Compiler options} are options that apply + when compiling most any kind of program. + @end itemize + + @emph{Fortran options} are listed in the file + @file{gcc/f/lang-options.h}, + which is used when during the build of @code{gcc} to + build a list of all options that are accepted by + at last one language's compiler. + This list goes into the @samp{lang_options} array + in @file{gcc/toplev.c}, which uses this array to + determine whether a particular option should be + offered to the linked-in front end for processing + by calling @samp{lang_option_decode}, which, for + @code{g77}, is in @file{gcc/f/com.c} and just + calls @samp{ffe_decode_option}. + + Even if the linked-in front end ``rejects'' a + particular option passed to it, @file{toplev.c} + just ignores the option, because @emph{some} + language's compiler is willing to accept it. + + This allows commands like @samp{gcc -fno-asm foo.c bar.f} + to work, even though Fortran compilation does + not currently support the @samp{-fno-asm} option; + even though the @code{f771} version of @samp{lang_decode_option} + rejects @samp{-fno-asm}, @file{toplev.c} doesn't + produce a diagnostic because some other language (C) + does accept it. + + This also means that commands like + @samp{g77 -fno-asm foo.f} yield no diagnostics, + despite the fact that no phase of the command was + able to recognize and process @samp{-fno-asm}---perhaps + a warning about this would be helpful if it were + possible. + + Code that processes Fortran options is found in + @file{gcc/f/top.c}, function @samp{ffe_decode_option}. + This code needs to check positive and negative forms + of each option. + + The defaults for Fortran options are set in their + global definitions, also found in @file{gcc/f/top.c}. + Some of these defaults are actually macros defined + in @file{gcc/f/target.h}, since they might be + machine-specific, although, in practice, GNU compilers + should behave the same way on all configurations + (especially when it comes to language constructs). + + Accessor macros for Fortran options, used by code + in the @code{g77} FFE, are defined in @file{gcc/f/top.h}. + + @emph{Compiler options} are listed in @file{gcc/toplev.c} + in the array @samp{f_options}. + An option not listed in @samp{lang_options} is + looked up in @samp{f_options} and handled from there. + + The defaults for compiler options are set in the + global definitions for the corresponding variables, + some of which are in @file{gcc/toplev.c}. + + You can set different defaults for @emph{Fortran-oriented} + or @emph{Fortran-reticent} compiler options by changing + the way @code{f771} handles the @samp{-fset-g77-defaults} + option, which is always provided as the first option when + called by @code{g77} or @code{gcc}. + + This code is in @samp{ffe_decode_options} in @file{gcc/f/top.c}. + Have it change just the variables that you want to default + to a different setting for Fortran compiles compared to + compiles of other languages. + + The @samp{-fset-g77-defaults} option is passed to @code{f771} + automatically because of the specification information + kept in @file{gcc/f/lang-specs.h}. + This file tells the @code{gcc} command how to recognize, + in this case, Fortran source files (those to be preprocessed, + and those that are not), and further, how to invoke the + appropriate programs (including @code{f771}) to process + those source files. + + It is in @file{gcc/f/lang-specs.h} that @samp{-fset-g77-defaults}, + @samp{-fversion}, and other options are passed, as appropriate, + even when the user has not explicitly specified them. + Other ``internal'' options such as @samp{-quiet} also + are passed via this mechanism. + + @node Projects + @chapter Projects + @cindex projects + + If you want to contribute to @code{g77} by doing research, + design, specification, documentation, coding, or testing, + the following information should give you some ideas. + + @menu + * Efficiency:: Make @code{g77} itself compile code faster. + * Better Optimization:: Teach @code{g77} to generate faster code. + * Simplify Porting:: Make @code{g77} easier to configure, build, + and install. + * More Extensions:: Features many users won't know to ask for. + * Machine Model:: @code{g77} should better leverage @code{gcc}. + * Internals Documentation:: Make maintenance easier. + * Internals Improvements:: Make internals more robust. + * Better Diagnostics:: Make using @code{g77} on new code easier. + @end menu + + @node Efficiency + @section Improve Efficiency + @cindex efficiency + + Don't bother doing any performance analysis until most of the + following items are taken care of, because there's no question + they represent serious space/time problems, although some of + them show up only given certain kinds of (popular) input. + + @itemize @bullet + @item + Improve @samp{malloc} package and its uses to specify more info about + memory pools and, where feasible, use obstacks to implement them. + + @item + Skip over uninitialized portions of aggregate areas (arrays, + @samp{COMMON} areas, @samp{EQUIVALENCE} areas) so zeros need not be output. + This would reduce memory usage for large initialized aggregate + areas, even ones with only one initialized element. + + As of version 0.5.18, a portion of this item has already been + accomplished. + + @item + Prescan the statement (in @file{sta.c}) so that the nature of the statement + is determined as much as possible by looking entirely at its form, + and not looking at any context (previous statements, including types + of symbols). + This would allow ripping out of the statement-confirmation, + symbol retraction/confirmation, and diagnostic inhibition + mechanisms. + Plus, it would result in much-improved diagnostics. + For example, @samp{CALL some-intrinsic(...)}, where the intrinsic + is not a subroutine intrinsic, would result actual error instead of the + unimplemented-statement catch-all. + + @item + Throughout @code{g77}, don't pass line/column pairs where + a simple @samp{ffewhere} type, which points to the error as much as is + desired by the configuration, will do, and don't pass @samp{ffelexToken} types + where a simple @samp{ffewhere} type will do. + Then, allow new default + configuration of @samp{ffewhere} such that the source line text is not + preserved, and leave it to things like Emacs' next-error function + to point to them (now that @samp{next-error} supports column, + or, perhaps, character-offset, numbers). + The change in calling sequences should improve performance somewhat, + as should not having to save source lines. + (Whether this whole + item will improve performance is questionable, but it should + improve maintainability.) + + @item + Handle @samp{DATA (A(I),I=1,1000000)/1000000*2/} more efficiently, especially + as regards the assembly output. + Some of this might require improving + the back end, but lots of improvement in space/time required in @code{g77} + itself can be fairly easily obtained without touching the back end. + Maybe type-conversion, where necessary, can be speeded up as well in + cases like the one shown (converting the @samp{2} into @samp{2.}). + + @item + If analysis shows it to be worthwhile, optimize @samp{lex.c}. + + @item + Consider redesigning @file{lex.c} to not need any feedback + during tokenization, by keeping track of enough parse state on its + own. + @end itemize + + @node Better Optimization + @section Better Optimization + @cindex optimization, better + @cindex code generation, improving + + Much of this work should be put off until after @code{g77} has + all the features necessary for its widespread acceptance as a + useful F77 compiler. + However, perhaps this work can be done in parallel during + the feature-adding work. + + @itemize @bullet + @item + Get the back end to produce at least as good code involving array + references as does @code{f2c} plus @code{gcc}. + (@emph{Note:} 0.5.18, with its improvements to the GBE for + versions 2.7.1 and 2.7.2 of @code{gcc}, should succeed at + doing this. + Please submit any cases where @code{g77} cannot be made to + generate as optimal code as @code{f2c} in combination with + the same version of @code{gcc}, but only for versions 2.7.1 and + greater of @code{gcc}.) + + @item + Do the equivalent of the trick of putting @samp{extern inline} in front + of every function definition in @code{libf2c} and #include'ing the resulting + file in @code{f2c}+@code{gcc}---that is, inline all run-time-library functions + that are at all worth inlining. + (Some of this has already been done, such as for integral exponentiation.) + + @item + When doing @samp{CHAR_VAR = CHAR_FUNC(@dots{})}, + and it's clear that types line up + and @samp{CHAR_VAR} is addressable or not a @samp{VAR_DECL}, + make @samp{CHAR_VAR}, not a + temporary, be the receiver for @samp{CHAR_FUNC}. + (This is now done for @samp{COMPLEX} variables.) + + @item + Design and implement Fortran-specific optimizations that don't + really belong in the back end, or where the front end needs to + give the back end more info than it currently does. + + @item + Design and implement a new run-time library interface, with the + code going into @code{libgcc} so no special linking is required to + link Fortran programs using standard language features. + This library + would speed up lots of things, from I/O (using precompiled formats, + doing just one, or, at most, very few, calls for arrays or array sections, + and so on) to general computing (array/section implementations of + various intrinsics, implementation of commonly performed loops that + aren't likely to be optimally compiled otherwise, etc.). + + Among + the important things the library would do are: + + @itemize @bullet + @item + Be a one-stop-shop-type + library, hence shareable and usable by all, in that what are now + library-build-time options in @code{libf2c} would be moved at least to the + @code{g77} compile phase, if not to finer grains (such as choosing how + list-directed I/O formatting is done by default at @samp{OPEN} time, for + preconnected units via options or even statements in the main program + unit, maybe even on a per-I/O basis with appropriate pragma-like + devices). + @end itemize + + @item + Probably requiring the new library design, change interface to + normally have @samp{COMPLEX} functions return their values in the way + @code{gcc} would if they were declared @samp{__complex__ float}, + rather than using + the mechanism currently used by @samp{CHARACTER} functions (whereby the + functions are compiled as returning void and their first arg is + a pointer to where to store the result). + (Don't append underscores to + external names for @samp{COMPLEX} functions in some cases once @code{g77} uses + @code{gcc} rather than @code{f2c} calling conventions.) + + @item + Do something useful with @samp{doiter} references where possible. + For example, @samp{CALL FOO(I)} cannot modify @samp{I} if within + a @samp{DO} loop that uses @samp{I} as the + iteration variable, and the back end might find that info useful + in determining whether it needs to read @samp{I} back into a register after + the call. + (It normally has to do that, unless it knows @samp{FOO} never + modifies its passed-by-reference argument, which is rarely the case + for Fortran-77 code.) + @end itemize + + @node Simplify Porting + @section Simplify Porting + @cindex porting, simplify + @cindex simplify porting + + Making @code{g77} easier to configure, port, build, and install, either + as a single-system compiler or as a cross-compiler, would be + very useful. + + @itemize @bullet + @item + A new library (replacing @code{libf2c}) should improve portability as well as + produce more optimal code. + Further, @code{g77} and the new library should + conspire to simplify naming of externals, such as by removing unnecessarily + added underscores, and to reduce/eliminate the possibility of naming + conflicts, while making debugger more straightforward. + + Also, it should + make multi-language applications more feasible, such as by providing + Fortran intrinsics that get Fortran unit numbers given C @samp{FILE *} + descriptors. + + @item + Possibly related to a new library, @code{g77} should produce the equivalent + of a @code{gcc} @samp{main(argc, argv)} function when it compiles a + main program unit, instead of compiling something that must be + called by a library + implementation of @samp{main()}. + + This would do many useful things such as + provide more flexibility in terms of setting up exception handling, + not requiring programmers to start their debugging sessions with + @kbd{breakpoint MAIN__} followed by @kbd{run}, and so on. + + @item + The GBE needs to understand the difference between alignment + requirements and desires. + For example, on Intel x86 machines, @code{g77} currently imposes + overly strict alignment requirements, due to the back end, but it + would be useful for Fortran and C programmers to be able to override + these @emph{recommendations} as long as they don't violate the actual + processor @emph{requirements}. + @end itemize + + @node More Extensions + @section More Extensions + @cindex extensions, more + + These extensions are not the sort of things users ask for ``by name'', + but they might improve the usability of @code{g77}, and Fortran in + general, in the long run. + Some of these items really pertain to improving @code{g77} internals + so that some popular extensions can be more easily supported. + + @itemize @bullet + @item + Consider adding a @samp{NUMERIC} type to designate typeless numeric constants, + named and unnamed. + The idea is to provide a forward-looking, effective + replacement for things like the old-style @samp{PARAMETER} statement + when people + really need typelessness in a maintainable, portable, clearly documented + way. + Maybe @samp{TYPELESS} would include @samp{CHARACTER}, @samp{POINTER}, + and whatever else might come along. + (This is not really a call for polymorphism per se, just + an ability to express limited, syntactic polymorphism.) + + @item + Support @samp{OPEN(...,KEY=(...),...)}. + + @item + @samp{OPEN(NOSPANBLOCKS,@dots{})} is treated as + @samp{OPEN(UNIT=NOSPANBLOCKS,@dots{})}, so a + later @samp{UNIT=} in the first example is invalid. + Make sure this is what users of this feature would expect. + + @item + Currently @code{g77} disallows @samp{READ(1'10)} since + it is an obnoxious syntax, but + supporting it might be pretty easy if needed. + More details are needed, such + as whether general expressions separated by an apostrophe are supported, + or maybe the record number can be a general expression, and so on. + + @item + Support @samp{STRUCTURE}, @samp{UNION}, @samp{MAP}, and @samp{RECORD} + fully. + Currently there is no support at all + for @samp{%FILL} in @samp{STRUCTURE} and related syntax, + whereas the rest of the + stuff has at least some parsing support. + This requires either major + changes to @code{libf2c} or its replacement. + + @item + F90 and @code{g77} probably disagree about label scoping relative to + @samp{INTERFACE} and @samp{END INTERFACE}, and their contained + procedure interface bodies (blocks?). + + @item + @samp{ENTRY} doesn't support F90 @samp{RESULT()} yet, + since that was added after S8.112. + + @item + Empty-statement handling (10 ;;CONTINUE;;) probably isn't consistent + with the final form of the standard (it was vague at S8.112). + + @item + It seems to be an ``open'' question whether a file, immediately after being + @samp{OPEN}ed,is positioned at the beginning, the end, or wherever---it + might be nice to offer an option of opening to ``undefined'' status, requiring + an explicit absolute-positioning operation to be performed before any + other (besides @samp{CLOSE}) to assist in making applications port to systems + (some IBM?) that @samp{OPEN} to the end of a file or some such thing. + @end itemize + + @node Machine Model + @section Machine Model + + This items pertain to generalizing @code{g77}'s view of + the machine model to more fully accept whatever the GBE + provides it via its configuration. + + @itemize @bullet + @item + Switch to using @samp{REAL_VALUE_TYPE} to represent floating-point constants + exclusively so the target float format need not be required. + This + means changing the way @code{g77} handles initialization of aggregate areas + having more than one type, such as @samp{REAL} and @samp{INTEGER}, + because currently + it initializes them as if they were arrays of @samp{char} and uses the + bit patterns of the constants of the various types in them to determine + what to stuff in elements of the arrays. + + @item + Rely more and more on back-end info and capabilities, especially in the + area of constants (where having the @code{g77} front-end's IL just store + the appropriate tree nodes containing constants might be best). + + @item + Suite of C and Fortran programs that a user/administrator can run on a + machine to help determine the configuration for @code{g77} before building + and help determine if the compiler works (especially with whatever + libraries are installed) after building. + @end itemize + + @node Internals Documentation + @section Internals Documentation + + Better info on how @code{g77} works and how to port it is needed. + + @node Internals Improvements + @section Internals Improvements + + Some more items that would make @code{g77} more reliable + and easier to maintain: + + @itemize @bullet + @item + Generally make expression handling focus + more on critical syntax stuff, leaving semantics to callers. + For example, + anything a caller can check, semantically, let it do so, rather + than having @file{expr.c} do it. + (Exceptions might include things like + diagnosing @samp{FOO(I--K:)=BAR} where @samp{FOO} is a @samp{PARAMETER}---if + it seems + important to preserve the left-to-right-in-source order of production + of diagnostics.) + + @item + Come up with better naming conventions for @samp{-D} to establish requirements + to achieve desired implementation dialect via @file{proj.h}. + + @item + Clean up used tokens and @samp{ffewhere}s in @samp{ffeglobal_terminate_1}. + + @item + Replace @file{sta.c} @samp{outpooldisp} mechanism with @samp{malloc_pool_use}. + + @item + Check for @samp{opANY} in more places in @file{com.c}, @file{std.c}, + and @file{ste.c}, and get rid of the @samp{opCONVERT(opANY)} kludge + (after determining if there is indeed no real need for it). + + @item + Utility to read and check @file{bad.def} messages and their references in the + code, to make sure calls are consistent with message templates. + + @item + Search and fix @samp{&ffe@dots{}} and similar so that + @samp{ffe@dots{}ptr@dots{}} macros are + available instead (a good argument for wishing this could have written all + this stuff in C++, perhaps). + On the other hand, it's questionable whether this sort of + improvement is really necessary, given the availability of + tools such as Emacs and perl, which making finding any + address-taking of structure members easy enough? + + @item + Some modules truly export the member names of their structures (and the + structures themselves), maybe fix this, and fix other modules that just + appear to as well (by appending @samp{_}, though it'd be ugly and probably + not worth the time). + + @item + Implement C macros @samp{RETURNS(value)} and @samp{SETS(something,value)} + in @file{proj.h} + and use them throughout @code{g77} source code (especially in the definitions + of access macros in @samp{.h} files) so they can be tailored + to catch code writing into a @samp{RETURNS()} or reading from a @samp{SETS()}. + + @item + Decorate throughout with @samp{const} and other such stuff. + + @item + All F90 notational derivations in the source code are still based + on the S8.112 version of the draft standard. + Probably should update + to the official standard, or put documentation of the rules as used + in the code...uh...in the code. + + @item + Some @samp{ffebld_new} calls (those outside of @file{ffeexpr.c} or + inside but invoked via paths not involving @samp{ffeexpr_lhs} or + @samp{ffeexpr_rhs}) might be creating things + in improper pools, leading to such things staying around too long or + (doubtful, but possible and dangerous) not long enough. + + @item + Some @samp{ffebld_list_new} (or whatever) calls might not be matched by + @samp{ffebld_list_bottom} (or whatever) calls, which might someday matter. + (It definitely is not a problem just yet.) + + @item + Probably not doing clean things when we fail to @samp{EQUIVALENCE} something + due to alignment/mismatch or other problems---they end up without + @samp{ffestorag} objects, so maybe the backend (and other parts of the front + end) can notice that and handle like an @samp{opANY} (do what it wants, just + don't complain or crash). + Most of this seems to have been addressed + by now, but a code review wouldn't hurt. + @end itemize + + @node Better Diagnostics + @section Better Diagnostics + + These are things users might not ask about, or that need to + be looked into, before worrying about. + Also here are items that involve reducing unnecessary diagnostic + clutter. + + @itemize @bullet + @item + Implement non-F90 messages (especially avoid mentioning F90 things @code{g77} + doesn't yet support). + Much of this has been done as of 0.5.14. + + @item + When @samp{FUNCTION} and @samp{ENTRY} point types disagree (@samp{CHARACTER} + lengths, type classes, and so on), + @samp{ANY}-ize the offending @samp{ENTRY} point and any @emph{new} dummies + it specifies. + + @item + Speed up and improve error handling for data when repeat-count is + specified. + For example, don't output 20 unnecessary messages after the + first necessary one for: + + @example + INTEGER X(20) + CONTINUE + DATA (X(I), J= 1, 20) /20*5/ + END + @end example + + (The @samp{CONTINUE} statement ensures the @samp{DATA} statement + is processed in the context of executable, not specification, + statements.) + @end itemize + @end ifset + + @node Index + @unnumbered Index + + @printindex cp + @summarycontents + @contents + @bye diff -rcp2N g77-0.5.17/f/gbe/2.7.1.diff g77-0.5.18/f/gbe/2.7.1.diff *** g77-0.5.17/f/gbe/2.7.1.diff Thu Nov 16 07:59:16 1995 --- g77-0.5.18/f/gbe/2.7.1.diff Thu Mar 7 17:35:53 1996 *************** *** 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! --- 1,6 ---- ! 1996-03-07 ! ! This file would have been 124K long in the g77-0.5.18 distribution, ! so, since 2.7.2.diff is available, this file has been omitted. ! If you insist on using gcc-2.7.1 with g77-0.5.18, you should be ! okay, except you won't get some of the nifty new optimizations. diff -rcp2N g77-0.5.17/f/gbe/2.7.2.diff g77-0.5.18/f/gbe/2.7.2.diff *** g77-0.5.17/f/gbe/2.7.2.diff Wed Dec 31 19:00:00 1969 --- g77-0.5.18/f/gbe/2.7.2.diff Mon Mar 25 21:18:33 1996 *************** *** 0 **** --- 1,801 ---- + *** gcc-2.7.2/flags.h Thu Jun 15 07:34:11 1995 + --- g77-new/flags.h Wed Mar 6 10:32:55 1996 + *************** extern int flag_unroll_loops; + *** 204,207 **** + --- 204,221 ---- + extern int flag_unroll_all_loops; + + + /* Nonzero forces all invariant computations in loops to be moved + + outside the loop. */ + + + + extern int flag_move_all_movables; + + + + /* Nonzero forces all general induction variables in loops to be + + strength reduced. */ + + + + extern int flag_reduce_all_givs; + + + + /* Nonzero gets another run of loop_optimize performed. */ + + + + extern int flag_rerun_loop_opt; + + + /* Nonzero for -fcse-follow-jumps: + have cse follow jumps to do a more extensive job. */ + *** gcc-2.7.2/gcc.info Wed Mar 6 10:23:38 1996 + --- g77-new/gcc.info Fri Mar 15 02:17:17 1996 + *************** Indirect: + *** 34,60 **** + gcc.info-1: 1382 + gcc.info-2: 42854 + ! gcc.info-3: 80578 + ! gcc.info-4: 127608 + ! gcc.info-5: 173792 + ! gcc.info-6: 214726 + ! gcc.info-7: 235436 + ! gcc.info-8: 285158 + ! gcc.info-9: 333642 + ! gcc.info-10: 382691 + ! gcc.info-11: 419654 + ! gcc.info-12: 468472 + ! gcc.info-13: 517503 + ! gcc.info-14: 564845 + ! gcc.info-15: 604398 + ! gcc.info-16: 654371 + ! gcc.info-17: 703324 + ! gcc.info-18: 751502 + ! gcc.info-19: 797360 + ! gcc.info-20: 846162 + ! gcc.info-21: 890260 + ! gcc.info-22: 933466 + ! gcc.info-23: 982355 + ! gcc.info-24: 1032258 + ! gcc.info-25: 1067513 +  + Tag Table: + --- 34,60 ---- + gcc.info-1: 1382 + gcc.info-2: 42854 + ! gcc.info-3: 80645 + ! gcc.info-4: 129158 + ! gcc.info-5: 175342 + ! gcc.info-6: 216276 + ! gcc.info-7: 236986 + ! gcc.info-8: 286708 + ! gcc.info-9: 335192 + ! gcc.info-10: 384241 + ! gcc.info-11: 421204 + ! gcc.info-12: 470022 + ! gcc.info-13: 519053 + ! gcc.info-14: 566395 + ! gcc.info-15: 605948 + ! gcc.info-16: 655921 + ! gcc.info-17: 704874 + ! gcc.info-18: 753052 + ! gcc.info-19: 798910 + ! gcc.info-20: 847712 + ! gcc.info-21: 891810 + ! gcc.info-22: 935016 + ! gcc.info-23: 983905 + ! gcc.info-24: 1033808 + ! gcc.info-25: 1069063 +  + Tag Table: + *************** Node: G++ and GCC37258 + *** 68,297 **** + Node: Invoking GCC39475 + Node: Option Summary42854 + ! Node: Overall Options53305 + ! Node: Invoking G++57868 + ! Node: C Dialect Options59742 + ! Node: C++ Dialect Options69842 + ! Node: Warning Options80578 + ! Node: Debugging Options95513 + ! Node: Optimize Options105094 + ! Node: Preprocessor Options115596 + ! Node: Assembler Options122059 + ! Node: Link Options122426 + ! Node: Directory Options127608 + ! Node: Target Options131100 + ! Node: Submodel Options134757 + ! Node: M680x0 Options136138 + ! Node: VAX Options139647 + ! Node: SPARC Options140182 + ! Node: Convex Options146602 + ! Node: AMD29K Options148783 + ! Node: ARM Options151814 + ! Node: M88K Options153231 + ! Node: RS/6000 and PowerPC Options161178 + ! Node: RT Options172088 + ! Node: MIPS Options173792 + ! Node: i386 Options181418 + ! Node: HPPA Options186857 + ! Node: Intel 960 Options189953 + ! Node: DEC Alpha Options192563 + ! Node: Clipper Options194235 + ! Node: H8/300 Options194634 + ! Node: System V Options195079 + ! Node: Code Gen Options195765 + ! Node: Environment Variables204274 + ! Node: Running Protoize208497 + ! Node: Installation214726 + ! Node: Configurations235436 + ! Node: Other Dir271347 + ! Node: Cross-Compiler273063 + ! Node: Steps of Cross274894 + ! Node: Configure Cross276012 + ! Node: Tools and Libraries276649 + ! Node: Cross Runtime279092 + ! Node: Cross Headers283173 + ! Node: Build Cross285158 + ! Node: Sun Install287034 + ! Node: VMS Install288166 + ! Node: Collect2298095 + ! Node: Header Dirs300804 + ! Node: C Extensions302218 + ! Node: Statement Exprs305497 + ! Node: Local Labels307391 + ! Node: Labels as Values309453 + ! Node: Nested Functions311318 + ! Node: Constructing Calls315174 + ! Node: Naming Types317231 + ! Node: Typeof318325 + ! Node: Lvalues320190 + ! Node: Conditionals322630 + ! Node: Long Long323521 + ! Node: Complex324965 + ! Node: Zero Length326827 + ! Node: Variable Length327501 + ! Node: Macro Varargs330026 + ! Node: Subscripting332129 + ! Node: Pointer Arith332612 + ! Node: Initializers333177 + ! Node: Constructors333642 + ! Node: Labeled Elements335336 + ! Node: Case Ranges337965 + ! Node: Cast to Union338646 + ! Node: Function Attributes339724 + ! Node: Function Prototypes348987 + ! Node: C++ Comments350786 + ! Node: Dollar Signs351322 + ! Node: Character Escapes352102 + ! Node: Alignment352383 + ! Node: Variable Attributes353855 + ! Node: Type Attributes361763 + ! Node: Inline368282 + ! Node: Extended Asm372159 + ! Node: Asm Labels382691 + ! Node: Explicit Reg Vars384010 + ! Node: Global Reg Vars385258 + ! Node: Local Reg Vars389823 + ! Node: Alternate Keywords391415 + ! Node: Incomplete Enums392817 + ! Node: Function Names393573 + ! Node: C++ Extensions394824 + ! Node: Naming Results396061 + ! Node: Min and Max399375 + ! Node: Destructors and Goto400825 + ! Node: C++ Interface401375 + ! Node: Template Instantiation406598 + ! Node: C++ Signatures412330 + ! Node: Trouble416674 + ! Node: Actual Bugs418385 + ! Node: Installation Problems419654 + ! Node: Cross-Compiler Problems433440 + ! Node: Interoperation434911 + ! Node: External Bugs448275 + ! Node: Incompatibilities450407 + ! Node: Fixed Headers458957 + ! Node: Standard Libraries461299 + ! Node: Disappointments462546 + ! Node: C++ Misunderstandings466771 + ! Node: Static Definitions467418 + ! Node: Temporaries468472 + ! Node: Protoize Caveats470676 + ! Node: Non-bugs474632 + ! Node: Warnings and Errors483592 + ! Node: Bugs485362 + ! Node: Bug Criteria486722 + ! Node: Bug Lists489152 + ! Node: Bug Reporting490545 + ! Node: Sending Patches502963 + ! Node: Service508350 + ! Node: VMS508911 + ! Node: Include Files and VMS509304 + ! Node: Global Declarations513194 + ! Node: VMS Misc517503 + ! Node: Portability521829 + ! Node: Interface523592 + ! Node: Passes528225 + ! Node: RTL545568 + ! Node: RTL Objects547456 + ! Node: Accessors550500 + ! Node: Flags555826 + ! Node: Machine Modes564845 + ! Node: Constants572479 + ! Node: Regs and Memory577667 + ! Node: Arithmetic589377 + ! Node: Comparisons595275 + ! Node: Bit Fields599337 + ! Node: Conversions600701 + ! Node: RTL Declarations603589 + ! Node: Side Effects604398 + ! Node: Incdec616945 + ! Node: Assembler619461 + ! Node: Insns620983 + ! Node: Calls641836 + ! Node: Sharing644431 + ! Node: Reading RTL647507 + ! Node: Machine Desc648446 + ! Node: Patterns650299 + ! Node: Example653243 + ! Node: RTL Template654371 + ! Node: Output Template666569 + ! Node: Output Statement670530 + ! Node: Constraints674243 + ! Node: Simple Constraints675246 + ! Node: Multi-Alternative686679 + ! Node: Class Preferences689515 + ! Node: Modifiers690395 + ! Node: Machine Constraints693555 + ! Node: No Constraints702203 + ! Node: Standard Names703324 + ! Node: Pattern Ordering731232 + ! Node: Dependent Patterns732458 + ! Node: Jump Patterns735273 + ! Node: Insn Canonicalizations741089 + ! Node: Peephole Definitions744584 + ! Node: Expander Definitions751502 + ! Node: Insn Splitting758948 + ! Node: Insn Attributes765962 + ! Node: Defining Attributes767009 + ! Node: Expressions769021 + ! Node: Tagging Insns775333 + ! Node: Attr Example779696 + ! Node: Insn Lengths782072 + ! Node: Constant Attributes785436 + ! Node: Delay Slots786596 + ! Node: Function Units789807 + ! Node: Target Macros795477 + ! Node: Driver797360 + ! Node: Run-time Target809090 + ! Node: Storage Layout814977 + ! Node: Type Layout828925 + ! Node: Registers835348 + ! Node: Register Basics836328 + ! Node: Allocation Order840365 + ! Node: Values in Registers841783 + ! Node: Leaf Functions846162 + ! Node: Stack Registers848637 + ! Node: Obsolete Register Macros849470 + ! Node: Register Classes852165 + ! Node: Stack and Calling871700 + ! Node: Frame Layout872136 + ! Node: Frame Registers875576 + ! Node: Elimination879386 + ! Node: Stack Arguments883642 + ! Node: Register Arguments890260 + ! Node: Scalar Return898935 + ! Node: Aggregate Return902898 + ! Node: Caller Saves906613 + ! Node: Function Entry907763 + ! Node: Profiling916691 + ! Node: Varargs919595 + ! Node: Trampolines927004 + ! Node: Library Calls933466 + ! Node: Addressing Modes941524 + ! Node: Condition Code949112 + ! Node: Costs955311 + ! Node: Sections963690 + ! Node: PIC968479 + ! Node: Assembler Format971189 + ! Node: File Framework972194 + ! Node: Data Output976431 + ! Node: Uninitialized Data982355 + ! Node: Label Output985062 + ! Node: Initialization994456 + ! Node: Macros for Initialization1000599 + ! Node: Instruction Output1005196 + ! Node: Dispatch Tables1013191 + ! Node: Alignment Output1015568 + ! Node: Debugging Info1017308 + ! Node: All Debuggers1017917 + ! Node: DBX Options1020331 + ! Node: DBX Hooks1025216 + ! Node: File Names and DBX1028555 + ! Node: SDB and DWARF1030528 + ! Node: Cross-compilation1032258 + ! Node: Misc1038705 + ! Node: Config1055831 + ! Node: Fragments1063276 + ! Node: Target Fragment1063873 + ! Node: Host Fragment1066911 + ! Node: Index1067513 +  + End Tag Table + --- 68,297 ---- + Node: Invoking GCC39475 + Node: Option Summary42854 + ! Node: Overall Options53372 + ! Node: Invoking G++57935 + ! Node: C Dialect Options59809 + ! Node: C++ Dialect Options69909 + ! Node: Warning Options80645 + ! Node: Debugging Options95580 + ! Node: Optimize Options105161 + ! Node: Preprocessor Options117146 + ! Node: Assembler Options123609 + ! Node: Link Options123976 + ! Node: Directory Options129158 + ! Node: Target Options132650 + ! Node: Submodel Options136307 + ! Node: M680x0 Options137688 + ! Node: VAX Options141197 + ! Node: SPARC Options141732 + ! Node: Convex Options148152 + ! Node: AMD29K Options150333 + ! Node: ARM Options153364 + ! Node: M88K Options154781 + ! Node: RS/6000 and PowerPC Options162728 + ! Node: RT Options173638 + ! Node: MIPS Options175342 + ! Node: i386 Options182968 + ! Node: HPPA Options188407 + ! Node: Intel 960 Options191503 + ! Node: DEC Alpha Options194113 + ! Node: Clipper Options195785 + ! Node: H8/300 Options196184 + ! Node: System V Options196629 + ! Node: Code Gen Options197315 + ! Node: Environment Variables205824 + ! Node: Running Protoize210047 + ! Node: Installation216276 + ! Node: Configurations236986 + ! Node: Other Dir272897 + ! Node: Cross-Compiler274613 + ! Node: Steps of Cross276444 + ! Node: Configure Cross277562 + ! Node: Tools and Libraries278199 + ! Node: Cross Runtime280642 + ! Node: Cross Headers284723 + ! Node: Build Cross286708 + ! Node: Sun Install288584 + ! Node: VMS Install289716 + ! Node: Collect2299645 + ! Node: Header Dirs302354 + ! Node: C Extensions303768 + ! Node: Statement Exprs307047 + ! Node: Local Labels308941 + ! Node: Labels as Values311003 + ! Node: Nested Functions312868 + ! Node: Constructing Calls316724 + ! Node: Naming Types318781 + ! Node: Typeof319875 + ! Node: Lvalues321740 + ! Node: Conditionals324180 + ! Node: Long Long325071 + ! Node: Complex326515 + ! Node: Zero Length328377 + ! Node: Variable Length329051 + ! Node: Macro Varargs331576 + ! Node: Subscripting333679 + ! Node: Pointer Arith334162 + ! Node: Initializers334727 + ! Node: Constructors335192 + ! Node: Labeled Elements336886 + ! Node: Case Ranges339515 + ! Node: Cast to Union340196 + ! Node: Function Attributes341274 + ! Node: Function Prototypes350537 + ! Node: C++ Comments352336 + ! Node: Dollar Signs352872 + ! Node: Character Escapes353652 + ! Node: Alignment353933 + ! Node: Variable Attributes355405 + ! Node: Type Attributes363313 + ! Node: Inline369832 + ! Node: Extended Asm373709 + ! Node: Asm Labels384241 + ! Node: Explicit Reg Vars385560 + ! Node: Global Reg Vars386808 + ! Node: Local Reg Vars391373 + ! Node: Alternate Keywords392965 + ! Node: Incomplete Enums394367 + ! Node: Function Names395123 + ! Node: C++ Extensions396374 + ! Node: Naming Results397611 + ! Node: Min and Max400925 + ! Node: Destructors and Goto402375 + ! Node: C++ Interface402925 + ! Node: Template Instantiation408148 + ! Node: C++ Signatures413880 + ! Node: Trouble418224 + ! Node: Actual Bugs419935 + ! Node: Installation Problems421204 + ! Node: Cross-Compiler Problems434990 + ! Node: Interoperation436461 + ! Node: External Bugs449825 + ! Node: Incompatibilities451957 + ! Node: Fixed Headers460507 + ! Node: Standard Libraries462849 + ! Node: Disappointments464096 + ! Node: C++ Misunderstandings468321 + ! Node: Static Definitions468968 + ! Node: Temporaries470022 + ! Node: Protoize Caveats472226 + ! Node: Non-bugs476182 + ! Node: Warnings and Errors485142 + ! Node: Bugs486912 + ! Node: Bug Criteria488272 + ! Node: Bug Lists490702 + ! Node: Bug Reporting492095 + ! Node: Sending Patches504513 + ! Node: Service509900 + ! Node: VMS510461 + ! Node: Include Files and VMS510854 + ! Node: Global Declarations514744 + ! Node: VMS Misc519053 + ! Node: Portability523379 + ! Node: Interface525142 + ! Node: Passes529775 + ! Node: RTL547118 + ! Node: RTL Objects549006 + ! Node: Accessors552050 + ! Node: Flags557376 + ! Node: Machine Modes566395 + ! Node: Constants574029 + ! Node: Regs and Memory579217 + ! Node: Arithmetic590927 + ! Node: Comparisons596825 + ! Node: Bit Fields600887 + ! Node: Conversions602251 + ! Node: RTL Declarations605139 + ! Node: Side Effects605948 + ! Node: Incdec618495 + ! Node: Assembler621011 + ! Node: Insns622533 + ! Node: Calls643386 + ! Node: Sharing645981 + ! Node: Reading RTL649057 + ! Node: Machine Desc649996 + ! Node: Patterns651849 + ! Node: Example654793 + ! Node: RTL Template655921 + ! Node: Output Template668119 + ! Node: Output Statement672080 + ! Node: Constraints675793 + ! Node: Simple Constraints676796 + ! Node: Multi-Alternative688229 + ! Node: Class Preferences691065 + ! Node: Modifiers691945 + ! Node: Machine Constraints695105 + ! Node: No Constraints703753 + ! Node: Standard Names704874 + ! Node: Pattern Ordering732782 + ! Node: Dependent Patterns734008 + ! Node: Jump Patterns736823 + ! Node: Insn Canonicalizations742639 + ! Node: Peephole Definitions746134 + ! Node: Expander Definitions753052 + ! Node: Insn Splitting760498 + ! Node: Insn Attributes767512 + ! Node: Defining Attributes768559 + ! Node: Expressions770571 + ! Node: Tagging Insns776883 + ! Node: Attr Example781246 + ! Node: Insn Lengths783622 + ! Node: Constant Attributes786986 + ! Node: Delay Slots788146 + ! Node: Function Units791357 + ! Node: Target Macros797027 + ! Node: Driver798910 + ! Node: Run-time Target810640 + ! Node: Storage Layout816527 + ! Node: Type Layout830475 + ! Node: Registers836898 + ! Node: Register Basics837878 + ! Node: Allocation Order841915 + ! Node: Values in Registers843333 + ! Node: Leaf Functions847712 + ! Node: Stack Registers850187 + ! Node: Obsolete Register Macros851020 + ! Node: Register Classes853715 + ! Node: Stack and Calling873250 + ! Node: Frame Layout873686 + ! Node: Frame Registers877126 + ! Node: Elimination880936 + ! Node: Stack Arguments885192 + ! Node: Register Arguments891810 + ! Node: Scalar Return900485 + ! Node: Aggregate Return904448 + ! Node: Caller Saves908163 + ! Node: Function Entry909313 + ! Node: Profiling918241 + ! Node: Varargs921145 + ! Node: Trampolines928554 + ! Node: Library Calls935016 + ! Node: Addressing Modes943074 + ! Node: Condition Code950662 + ! Node: Costs956861 + ! Node: Sections965240 + ! Node: PIC970029 + ! Node: Assembler Format972739 + ! Node: File Framework973744 + ! Node: Data Output977981 + ! Node: Uninitialized Data983905 + ! Node: Label Output986612 + ! Node: Initialization996006 + ! Node: Macros for Initialization1002149 + ! Node: Instruction Output1006746 + ! Node: Dispatch Tables1014741 + ! Node: Alignment Output1017118 + ! Node: Debugging Info1018858 + ! Node: All Debuggers1019467 + ! Node: DBX Options1021881 + ! Node: DBX Hooks1026766 + ! Node: File Names and DBX1030105 + ! Node: SDB and DWARF1032078 + ! Node: Cross-compilation1033808 + ! Node: Misc1040255 + ! Node: Config1057381 + ! Node: Fragments1064826 + ! Node: Target Fragment1065423 + ! Node: Host Fragment1068461 + ! Node: Index1069063 +  + End Tag Table + *** gcc-2.7.2/gcc.info-2 Wed Mar 6 10:23:35 1996 + --- g77-new/gcc.info-2 Fri Mar 15 02:17:16 1996 + *************** are in the following sections. + *** 92,95 **** + --- 92,96 ---- + -fschedule-insns2 -fstrength-reduce -fthread-jumps + -funroll-all-loops -funroll-loops + + -fmove-all-movables -freduce-all-givs -frerun-loop-opt + -O -O0 -O1 -O2 -O3 + + *** gcc-2.7.2/gcc.info-3 Wed Mar 6 10:23:35 1996 + --- g77-new/gcc.info-3 Fri Mar 15 02:17:16 1996 + *************** of optimizations to be performed is desi + *** 907,910 **** + --- 907,946 ---- + `-frerun-cse-after-loop'. + + + `-fmove-all-movables' + + Forces all invariant computations in loops to be moved outside the + + loop. This option is provided primarily to improve performance + + for some Fortran code, though it might improve code written in + + other languages. + + + + *Note:* When compiling programs written in Fortran, this option is + + enabled by default. + + + + Analysis of Fortran code optimization and the resulting + + optimizations triggered by this option, and the + + `-freduce-all-givs' and `-frerun-loop-opt' options as well, were + + contributed by Toon Moene (`toon@moene.indiv.nluug.nl'). + + + + Please let us (`fortran@gnu.ai.mit.edu') know how use of these + + options affects the performance of your production code. We're + + very interested in code that runs *slower* when these options are + + *enabled*. + + + + `-freduce-all-givs' + + Forces all general-induction variables in loops to be + + strength-reduced. This option is provided primarily to improve + + performance for some Fortran code, though it might improve code + + written in other languages. + + + + *Note:* When compiling programs written in Fortran, this option is + + enabled by default. + + + + `-frerun-loop-opt' + + Runs loop optimizations a second time. This option is provided + + primarily to improve performance for some Fortran code, though it + + might improve code written in other languages. + + + + *Note:* When compiling programs written in Fortran, this option is + + enabled by default. + + + `-fno-peephole' + Disable any machine-specific peephole optimizations. + *** gcc-2.7.2/gcc.texi Wed Mar 6 10:20:58 1996 + --- g77-new/gcc.texi Wed Mar 6 14:30:40 1996 + *************** original English. + *** 149,152 **** + --- 149,153 ---- + @sp 3 + @center Last updated 26 November 1995 + + @center (Revised for GNU Fortran 1996-03-06) + @sp 1 + @c The version number appears twice more in this file. + *** gcc-2.7.2/invoke.texi Tue Oct 3 11:40:43 1995 + --- g77-new/invoke.texi Fri Mar 15 01:49:11 1996 + *************** in the following sections. + *** 149,152 **** + --- 149,153 ---- + -fschedule-insns2 -fstrength-reduce -fthread-jumps + -funroll-all-loops -funroll-loops + + -fmove-all-movables -freduce-all-givs -frerun-loop-opt + -O -O0 -O1 -O2 -O3 + @end smallexample + *************** Perform the optimization of loop unrolli + *** 1940,1943 **** + --- 1941,1985 ---- + and usually makes programs run more slowly. @samp{-funroll-all-loops} + implies @samp{-fstrength-reduce} as well as @samp{-frerun-cse-after-loop}. + + + + @item -fmove-all-movables + + Forces all invariant computations in loops to be moved + + outside the loop. + + This option is provided primarily to improve performance + + for some Fortran code, though it might improve code written + + in other languages. + + + + @emph{Note:} When compiling programs written in Fortran, + + this option is enabled by default. + + + + Analysis of Fortran code optimization and the resulting + + optimizations triggered by this option, and the + + @samp{-freduce-all-givs} and @samp{-frerun-loop-opt} + + options as well, were + + contributed by Toon Moene (@code{toon@@moene.indiv.nluug.nl}). + + + + Please let us (@code{fortran@@gnu.ai.mit.edu}) + + know how use of these options affects + + the performance of your production code. + + We're very interested in code that runs @emph{slower} + + when these options are @emph{enabled}. + + + + @item -freduce-all-givs + + Forces all general-induction variables in loops to be + + strength-reduced. + + This option is provided primarily to improve performance + + for some Fortran code, though it might improve code written + + in other languages. + + + + @emph{Note:} When compiling programs written in Fortran, + + this option is enabled by default. + + + + @item -frerun-loop-opt + + Runs loop optimizations a second time. + + This option is provided primarily to improve performance + + for some Fortran code, though it might improve code written + + in other languages. + + + + @emph{Note:} When compiling programs written in Fortran, + + this option is enabled by default. + + @item -fno-peephole + *** gcc-2.7.2/loop.c Tue Oct 3 12:17:16 1995 + --- g77-new/loop.c Wed Mar 6 10:32:58 1996 + *************** move_movables (movables, threshold, insn + *** 1629,1632 **** + --- 1629,1633 ---- + + if (already_moved[regno] + + || flag_move_all_movables + || (threshold * savings * m->lifetime) >= insn_count + || (m->forces && m->forces->done + *************** strength_reduce (scan_start, end, loop_t + *** 3821,3826 **** + exit. */ + + ! if (v->lifetime * threshold * benefit < insn_count + ! && ! bl->reversed) + { + if (loop_dump_stream) + --- 3822,3827 ---- + exit. */ + + ! if ( ! flag_reduce_all_givs && v->lifetime * threshold * benefit < insn_count + ! && ! bl->reversed ) + { + if (loop_dump_stream) + *** gcc-2.7.2/toplev.c Fri Oct 20 17:56:35 1995 + --- g77-new/toplev.c Wed Mar 6 10:32:59 1996 + *************** int flag_unroll_loops; + *** 388,391 **** + --- 388,405 ---- + int flag_unroll_all_loops; + + + /* Nonzero forces all invariant computations in loops to be moved + + outside the loop. */ + + + + int flag_move_all_movables = 0; + + + + /* Nonzero forces all general induction variables in loops to be + + strength reduced. */ + + + + int flag_reduce_all_givs = 0; + + + + /* Nonzero gets another run of loop_optimize performed. */ + + + + int flag_rerun_loop_opt = 0; + + + /* Nonzero for -fwritable-strings: + store string constants in data segment and don't uniquize them. */ + *************** struct { char *string; int *variable; in + *** 542,545 **** + --- 556,562 ---- + {"unroll-loops", &flag_unroll_loops, 1}, + {"unroll-all-loops", &flag_unroll_all_loops, 1}, + + {"move-all-movables", &flag_move_all_movables, 1}, + + {"reduce-all-givs", &flag_reduce_all_givs, 1}, + + {"rerun-loop-opt", &flag_rerun_loop_opt, 1}, + {"writable-strings", &flag_writable_strings, 1}, + {"peephole", &flag_no_peephole, 0}, + *************** rest_of_compilation (decl) + *** 2894,2897 **** + --- 2911,2916 ---- + { + loop_optimize (insns, loop_dump_file); + + if (flag_rerun_loop_opt) + + loop_optimize (insns, loop_dump_file); + }); + } + *** gcc-2.7.2/tree.c Sun Oct 1 21:26:56 1995 + --- g77-new/tree.c Wed Mar 6 10:33:00 1996 + *************** saveable_tree_cons (purpose, value, chai + *** 1965,1968 **** + --- 1965,1992 ---- + } + + + /* Try to find out whether the type for which the size is to be determined + + is an ARRAY(of ARRAY(of ARRAY ... of something with a constant size + + which is an integral multiple of BITS_PER_UNIT)). + + In that case, the size in bytes can be determined using an EXACT_DIV_EXPR. + + */ + + enum tree_code + + which_div_expr(type) + + tree type; + + { + + tree t; + + + + if (TREE_CODE (type) != POINTER_TYPE && TREE_CODE (type) != ARRAY_TYPE) + + return CEIL_DIV_EXPR; + + + + for (t = TREE_TYPE (type); TREE_CODE (t) == ARRAY_TYPE; t = TREE_TYPE (t)) + + ; + + + + if (TYPE_SIZE (t) != 0 && TREE_CODE (TYPE_SIZE (t)) == INTEGER_CST && + + TREE_INT_CST_LOW (TYPE_SIZE (t)) % BITS_PER_UNIT == 0) + + return EXACT_DIV_EXPR; + + else + + return CEIL_DIV_EXPR; + + } + + + /* Return the size nominally occupied by an object of type TYPE + when it resides in memory. The value is measured in units of bytes, + *************** size_in_bytes (type) + *** 1985,1989 **** + return integer_zero_node; + } + ! t = size_binop (CEIL_DIV_EXPR, TYPE_SIZE (type), + size_int (BITS_PER_UNIT)); + if (TREE_CODE (t) == INTEGER_CST) + --- 2009,2013 ---- + return integer_zero_node; + } + ! t = size_binop (which_div_expr (type), TYPE_SIZE (type), + size_int (BITS_PER_UNIT)); + if (TREE_CODE (t) == INTEGER_CST) + *************** int_size_in_bytes (type) + *** 2009,2013 **** + if (TREE_INT_CST_HIGH (TYPE_SIZE (type)) != 0) + { + ! tree t = size_binop (CEIL_DIV_EXPR, TYPE_SIZE (type), + size_int (BITS_PER_UNIT)); + return TREE_INT_CST_LOW (t); + --- 2033,2037 ---- + if (TREE_INT_CST_HIGH (TYPE_SIZE (type)) != 0) + { + ! tree t = size_binop (which_div_expr (type), TYPE_SIZE (type), + size_int (BITS_PER_UNIT)); + return TREE_INT_CST_LOW (t); + *** gcc-2.7.2/version.c Wed Mar 6 10:21:01 1996 + --- g77-new/version.c Mon Mar 25 21:17:27 1996 + *************** + *** 1 **** + ! char *version_string = "2.7.2"; + --- 1 ---- + ! char *version_string = "2.7.2.f.1"; diff -rcp2N g77-0.5.17/f/info.c g77-0.5.18/f/info.c *** g77-0.5.17/f/info.c Wed Aug 30 15:53:36 1995 --- g77-0.5.18/f/info.c Mon Mar 25 18:14:53 1996 *************** ffeinfo_kind_string (ffeinfoKind kind) *** 210,213 **** --- 210,229 ---- } + ffeinfoKindtype + ffeinfo_kindtype_max(ffeinfoBasictype bt, + ffeinfoKindtype k1, + ffeinfoKindtype k2) + { + if ((bt == FFEINFO_basictypeANY) + || (k1 == FFEINFO_kindtypeANY) + || (k2 == FFEINFO_kindtypeANY)) + return FFEINFO_kindtypeANY; + + if (ffetype_size (ffeinfo_types_[bt][k1]) + > ffetype_size (ffeinfo_types_[bt][k2])) + return k1; + return k2; + } + /* ffeinfo_kindtype_string -- Return tiny string showing the kind type diff -rcp2N g77-0.5.17/f/info.h g77-0.5.18/f/info.h *** g77-0.5.17/f/info.h Wed Aug 30 15:53:36 1995 --- g77-0.5.18/f/info.h Mon Mar 25 15:56:20 1996 *************** void ffeinfo_init_0 (void); *** 132,135 **** --- 132,138 ---- char *ffeinfo_kind_message (ffeinfoKind kind); char *ffeinfo_kind_string (ffeinfoKind kind); + ffeinfoKindtype ffeinfo_kindtype_max(ffeinfoBasictype bt, + ffeinfoKindtype k1, + ffeinfoKindtype k2); char *ffeinfo_kindtype_string (ffeinfoKindtype kind_type); char *ffeinfo_where_string (ffeinfoWhere where); *************** ffetype ffeinfo_type (ffeinfoBasictype b *** 150,154 **** #define ffeinfo_kind(i) (i.kind) #define ffeinfo_kindtype(i) (i.kindtype) - #define ffeinfo_kindtype_max(bt,i,j) (((i) > (j)) ? (i) : (j)) #ifdef __GNUC__ #define ffeinfo_new(bt,kt,r,k,w,sz) \ --- 153,156 ---- diff -rcp2N g77-0.5.17/f/install.texi g77-0.5.18/f/install.texi *** g77-0.5.17/f/install.texi Wed Dec 31 19:00:00 1969 --- g77-0.5.18/f/install.texi Fri Mar 15 15:57:50 1996 *************** *** 0 **** --- 1,1719 ---- + @c Copyright (C) 1995, 1996 Free Software Foundation, Inc. + @c This is part of the G77 manual. + @c For copying conditions, see the file g77.texi. + + @c The text of this file appears in the file INSTALL + @c in the G77 distribution, as well as in the G77 manual. + + @c 1996-03-15 + + @ifclear INSTALLONLY + @node Installation + @chapter Installing GNU Fortran + @end ifclear + @cindex installing GNU Fortran + + @menu + * Prerequisites:: Make sure your system is ready for @code{g77}. + * Problems Installing:: Known trouble areas. + * Quick Start:: The easier procedure for non-experts. + * Complete Installation:: For experts, or those who want to be: the details. + * Distributing Binaries:: If you plan on distributing your @code{g77}. + * Settings:: Some notes on @code{g77} internals. + @end menu + + The following information describes how to install @code{g77}. + + The information in this file generally pertains to dealing + with @emph{source} distributions of @code{g77} and @code{gcc}. + It is possible that some of this information will be applicable + to some @emph{binary} distributions of these products---however, + since these distributions are not made by the maintainers of + @code{g77}, responsibility for binary distributions rests with + whoever built and first distributed them. + + Nevertheless, efforts to make @code{g77} easier to both build + and install from source and package up as a binary distribution + are ongoing. + + @node Prerequisites + @section Prerequisites + @cindex prerequisites + + The procedures described to unpack, configure, build, and + install @code{g77} assume your system has certain programs + already installed. + + The following prerequisites should be met by your + system before you follow the @code{g77} installation instructions: + + @table @asis + @item @code{gzip} + To unpack the @code{gcc} and @code{g77} distributions, + you'll need the @code{gunzip} utility in the @code{gzip} + distribution. + Most UNIX systems already have @code{gzip} installed. + If yours doesn't, you can get it from the FSF. + + Note that you'll need @code{tar} and other utilities + as well, but all UNIX systems have these. + There are GNU versions of all these available---in fact, + a complete GNU UNIX system can be put together on + most systems, if desired. + + @item @file{gcc-2.7.2.tar.gz} + You need to have this, or some other applicable, version + of @code{gcc} on your system. + The version should be an exact copy of a distribution + from the FSF. + It is approximately 7MB large. + + If you've already unpacked @file{gcc-2.7.2.tar.gz} into a + directory (named @file{gcc-2.7.2}) called the @dfn{source tree} + for @code{gcc}, you can delete the distribution + itself, but you'll need to remember to skip any instructions to unpack + this distribution. + + Without an applicable @code{gcc} source tree, you cannot + build @code{g77}. + You can obtain an FSF distribution of @code{gcc} from the FSF. + + @item @file{g77-0.5.18.tar.gz} + You probably have already unpacked this distribution, + or you are reading an advanced copy of this manual, + which is contained in this distribution. + This distribution approximately 1MB large. + + You can obtain an FSF distribution of @code{g77} from the FSF, + the same way you obtained @code{gcc}. + + @item 100MB disk space + For a complete @dfn{bootstrap} build, about 100MB + of disk space is required for @code{g77} by the author's + current Linux system. + + Some juggling can reduce the amount of space needed; + during the bootstrap process, once Stage 3 starts, + during which the version of @code{gcc} that has been copied + into the @file{stage2/} directory is used to rebuild the + system, you can delete the @file{stage1/} directory + to free up some space. + + It is likely that many systems don't require the complete + bootstrap build, as they already have a recent version of + @code{gcc} installed. + Such systems might be able to build @code{g77} with only + about 75MB of free space. + + @item @code{patch} + Although you can do everything @code{patch} does yourself, + by hand, without much trouble, having @code{patch} installed + makes installation of new versions of GNU utilities such as + @code{g77} so much easier that it is worth getting. + You can obtain @code{patch} the same way you obtained + @code{gcc} and @code{g77}. + + In any case, you can apply patches by hand---patch files + are designed for humans to read them. + + @item @code{make} + Your system must have @code{make}, and you will probably save + yourself a lot of trouble if it is GNU @code{make} (sometimes + referred to as @code{gmake}). + + @item @code{cc} + Your system must have a working C compiler. + + @xref{Installation,,Installing GNU CC,gcc,Using and Porting GNU CC}, + for more information on prerequisites for installing @code{gcc}. + + @item @code{bison} + If you do not have @code{bison} installed, you can usually + work around any need for it, since @code{g77} itself does + not use it, and @code{gcc} normally includes all files + generated by running it in its distribution. + You can obtain @code{bison} the same way you obtained + @code{gcc} and @code{g77}. + + @xref{Missing bison?}, + for information on how to work around not having @code{bison}. + + @item @code{makeinfo} + If you are missing @code{makeinfo}, you can usually work + around any need for it. + You can obtain @code{makeinfo} the same way you obtained + @code{gcc} and @code{g77}. + + @xref{Missing makeinfo?}, + for information on getting around the lack of @code{makeinfo}. + + @item @code{root} access + To perform the complete installation procedures on a system, + you need to have @code{root} access to that system, or + equivalent access. + + Portions of the procedure (such as configuring and building + @code{g77}) can be performed by any user with enough disk + space and virtual memory. + + However, these instructions are oriented towards less-experienced + users who want to install @code{g77} on their own personal + systems. + + System administrators with more experience will want to + determine for themselves how they want to modify the + procedures described below to suit the needs of their + installation. + @end table + + @node Problems Installing + @section Problems Installing + @cindex problems installing + @cindex installation problems + + This is a list of problems (and some apparent problems which don't + really mean anything is wrong) that show up when configuring, + building, installing, or porting GNU Fortran. + + @xref{Installation Problems,,,gcc,Using and Porting GNU CC}, + for more information on installation problems that can afflict + either @code{gcc} or @code{g77}. + + @menu + * General Problems:: Problems afflicting most or all systems. + * Cross-compiler Problems:: Problems afflicting cross-compilation setups. + @end menu + + @node General Problems + @subsection General Problems + + @itemize @bullet + @item + @cindex _strtoul + @cindex undefined reference (_strtoul) + @cindex f771, linking error for + @cindex linking error for f771 + @cindex ld error for f771 + @cindex ld can't find _strtoul + On SunOS systems, linking the @code{f771} program produces + an error message concerning an undefined symbol named + @samp{_strtoul}. + + This is not a @code{g77} bug. + @xref{Patching GNU Fortran}, for information on + a workaround provided by @code{g77}. + + The proper fix is either to upgrade your system to one that + provides a complete ANSI C environment, or improve @code{gcc} so + that it provides one for all the languages and configurations it supports. + + @emph{Note:} In earlier versions of @code{g77}, an automated + workaround for this problem was attempted. + It worked for systems without @samp{_strtoul}, substituting + the incomplete-yet-sufficient version supplied with @code{g77} + for those systems. + However, the automated workaround failed mysteriously for systems + that appeared to have conforming ANSI C environments, and it + was decided that, lacking resources to more fully investigate + the problem, it was better to not punish users of those systems + either by requiring them to work around the problem by hand or + by always substituting an incomplete @samp{strtoul()} implementation + when their systems had a complete, working one. + Unfortunately, this meant inconveniencing users of systems not + having @samp{strtoul()}, but they're using obsolete (and generally + unsupported) systems anyway. + + @item + It'd be helpful if @code{g77}'s @file{Makefile.in} or @file{Make-lang.in} + would create the various @file{stage@var{n}} directories and their + subdirectories, so expert installers wouldn't have to reconfigure + after cleaning up. + + @item + Improvements to the way @code{libf2c} is built could make + building @code{g77} as a cross-compiler easier---for example, + passing and using @samp{LD} and @samp{AR} in the appropriate + ways. + + @cindex patch files + @cindex GBE + @item + @code{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 @code{g77} and @code{gcc} might actually @emph{require} no + patches, but the patch files will be provided anyway as long as + there are more changes expected in subsequent releases. + These patch files might contain + unnecessary, but possibly helpful, patches. + As a result, it is possible this issue might never be + resolved, except by eliminating the need for the person + configuring @code{g77} to apply a patch by hand, by going + to a more automated approach (such as configure-time patching). + + @item + It should be possible to build the runtime without building @code{cc1} + and other non-Fortran items, but, for now, an easy way to do that + is not yet established. + + @cindex GNU C required + @cindex requirements, GNU C + @item + Compiling @code{g77} requires GNU C, not just ANSI C. + Fixing this wouldn't + be very hard (just tedious), but the code using GNU extensions to + the C language is expected to be rewritten for 0.6 anyway, + so there are no plans for an interim fix. + @end itemize + + @node Cross-compiler Problems + @subsection Cross-compiler Problems + @cindex cross-compilation + + @code{g77} has been in alpha testing since September of + 1992, and in public beta testing since February of 1995. + Alpha testing was done by a small number of people worldwide on a fairly + wide variety of machines, involving self-compilation in most or + all cases. + Beta testing has been done primarily via self-compilation, + but in more and more cases, cross-compilation (and ``criss-cross + compilation'', where a version of a compiler is built on one machine + to run on a second and generate code that runs on a third) has + been tried and has succeeded, to varying extents. + + Generally, @code{g77} can be ported to any configuration to which + @code{gcc}, @code{f2c}, and @code{libf2c} can be ported and made + to work together, aside from the known problems described in this + manual. + If you want to port @code{g77} to a particular configuration, + you should first make sure @code{gcc} and @code{libf2c} can be + ported to that configuration before focusing on @code{g77}, because + @code{g77} is so dependent on them. + + Even for cases where @code{gcc} and @code{libf2c} work, + you might run into problems with cross-compilation on certain machines, + for several reasons. + + @itemize @bullet + @item + There is one known bug + (a design bug to be fixed in 0.6) that prevents configuration of + @code{g77} as a cross-compiler in some cases, + though there are assumptions made during + configuration that probably make doing non-self-hosting builds + a hassle, requiring manual intervention. + + @item + @code{gcc} might still have some trouble being configured + for certain combinations of machines. + For example, it might not know how to handle floating-point + constants. + + @item + There are still some challenges putting together the right + run-time libraries (needed by @code{libf2c}) for a target + system, depending on the systems involved in the configuration. + (This is a general problem with cross-compilation, and with + @code{gcc} in particular.) + @end itemize + + @node Quick Start + @section Quick Start + @cindex quick start + + This procedure configures, builds, and installs @code{g77} + ``out of the box'' and works on most UNIX systems. + Each command is identified by a unique number, + used in the explanatory text that follows. + For the most part, the output of each command is not shown, + though indications of the types of responses are given in a + few cases. + + To perform this procedure, the installer must be logged + in as user @code{root}. + Much of it can be done while not logged in as @code{root}, + and users experienced with UNIX administration should be + able to modify the procedure properly to do so. + + Following traditional UNIX conventions, it is assumed that + the source trees for @code{g77} and @code{gcc} will be + placed in @file{/usr/src}. + It also is assumed that the source distributions themselves + already reside in @file{/usr/FSF}, a naming convention + used by the author of @code{g77} on his own system: + + @example + /usr/FSF/gcc-2.7.2.tar.gz + /usr/FSF/g77-0.5.18.tar.gz + @end example + + Users of the following systems should not blindly follow + these quick-start instructions, because of problems their + systems have coping with straightforward installation of + @code{g77}: + + @itemize @bullet + @item + SunOS + @item + Alpha + @end itemize + + Instead, see @ref{Complete Installation}, for detailed information + on how to configure, build, and install @code{g77} for your + particular system. + Also, see @ref{Trouble,,Known Causes of Trouble with GNU Fortran}, + for information on bugs and other problems known to afflict the + installation process, and how to report newly discovered ones. + + If your system is @emph{not} on the above list, and @emph{is} + a UNIX system or one of its variants, you should be able to + follow the instructions below. + If you vary @emph{any} of the steps below, you might run into + trouble, including possibly breaking existing programs for + other users of your system. + Before doing so, it is wise to review the explanations of some + of the steps. + These explanations follow this list of steps. + + @example + sh[ 1]# @kbd{cd /usr/src} + @set source-dir 1 + sh[ 2]# @kbd{gunzip -c < /usr/FSF/gcc-2.7.2.tar.gz | tar xf -} + @set unpack-gcc 2 + [Might say "Broken pipe"...that is normal on some systems.] + sh[ 3]# @kbd{gunzip -c < /usr/FSF/g77-0.5.18.tar.gz | tar xf -} + @set unpack-g77 3 + ["Broken pipe" again possible.] + sh[ 4]# @kbd{ln -s gcc-2.7.2 gcc} + @set link-gcc 4 + sh[ 5]# @kbd{ln -s g77-0.5.18 g77} + @set link-g77 5 + sh[ 6]# @kbd{mv -i g77/* gcc} + @set merge-g77 6 + [No questions should be asked by mv here; or, you made a mistake.] + sh[ 7]# @kbd{patch -p1 -V t -d gcc-2.7.2 < gcc-2.7.2/f/gbe/2.7.2.diff} + @set apply-patch 7 + [Unless patch complains about rejected patches, this step worked.] + sh[ 8]# @kbd{cd gcc} + sh[ 9]# @kbd{touch f77-install-ok} + @set f77-install-ok 9 + [Do not do the above if your system already has an f77 + command, unless you've checked that overwriting it + is okay.] + sh[10]# @kbd{touch f2c-install-ok} + @set f2c-install-ok 10 + [Do not do the above if your system already has an f2c + command, unless you've checked that overwriting it + is okay. Else, @kbd{touch f2c-exists-ok}.] + sh[11]# @kbd{./configure --prefix=/usr} + @set configure-gcc 11 + [Do not do the above if gcc is not installed in /usr/bin. + You might need a different @kbd{--prefix=@dots{}}, as + described below.] + sh[12]# @kbd{make bootstrap} + @set build-gcc 12 + [This takes a long time, and is where most problems occur.] + sh[13]# @kbd{rm -fr stage1} + @set rm-stage1 13 + sh[14]# @kbd{make -k install} + @set install-g77 14 + [The actual installation.] + sh[15]# @kbd{g77 -v} + @set show-version 15 + [Verify that g77 is installed, obtain version info.] + sh[16]# + @set end-procedure 16 + @end example + + @xref{Updating Documentation,,Updating Your Info Directory}, for + information on how to update your system's top-level @code{info} + directory to contain a reference to this manual, so that + users of @code{g77} can easily find documentation instead + of having to ask you for it. + + Elaborations of many of the above steps follows: + + @table @asis + @item Step @value{source-dir}: @kbd{cd /usr/src} + You can build @code{g77} pretty much anyplace. + By convention, this manual assumes @file{/usr/src}. + It might be helpful if other users on your system + knew where to look for the source code for the + installed version of @code{g77} and @code{gcc} in any case. + @c + @c @item Step @value{unpack-gcc}: @kbd{gunzip -d @dots{}} + @c Some systems have a version of @code{tar} that support + @c uncompressing @code{gzip} files. + @c + @c @item Step @value{unpack-g77}: @kbd{gunzip -d < /usr/FSF/g77-0.5.18.tar.gz | tar xf -} + + @item Step @value{link-gcc}: @kbd{ln -s gcc-2.7.2 gcc} + @item Step @value{link-g77}: @kbd{ln -s g77-0.5.18 g77} + These commands mainly help reduce typing, + and help reduce visual clutter in examples + in this manual showing what to type to install @code{g77}. + + @xref{Unpacking}, for information on + using distributions of @code{g77} made by organizations + other than the FSF. + + @item Step @value{merge-g77}: @kbd{mv -i g77/* gcc} + After doing this, you can, if you like, type + @samp{rm g77} and @samp{rmdir g77-0.5.18} to remove + the empty directory and the symbol link to it. + But, it might be helpful to leave them around as + quick reminders of which version(s) of @code{g77} are + installed on your system. + + @xref{Unpacking}, for information + on the contents of the @file{g77} directory (as merged + into the @file{gcc} directory). + + @item Step @value{apply-patch}: @kbd{patch -p1 @dots{}} + This can produce a wide variety of printed output, + from @samp{Hmm, I can't seem to find a patch in there anywhere...} + to long lists of messages indicated that patches are + being found, applied successfully, and so on. + + If messages about ``fuzz'', ``offset'', or + especially ``reject files'' are printed, it might + mean you applied the wrong patch file. + If you believe this is the case, it is best to restart + the sequence after deleting (or at least renaming to unused + names) the top-level directories for @code{g77} and @code{gcc} + and their symbolic links. + + After this command finishes, the @code{gcc} directory might + have old versions of several files as saved by @code{patch}. + To remove these, after @kbd{cd gcc}, type @kbd{rm -i *.~*~}. + + @xref{Merging Distributions}, for more information. + + @item Step @value{f77-install-ok}: @kbd{touch f77-install-ok} + Don't do this if you don't want to overwrite an existing + version of @code{f77} (such as a native compiler, or a + script that invokes @code{f2c}). + Otherwise, installation will overwrite the @code{f77} command + and the @code{f77} man pages with copies of the corresponding + @code{g77} material. + + @xref{Installing f77,,Installing @code{f77}}, for more + information. + + @item Step @value{f2c-install-ok}: @kbd{touch f2c-install-ok} + Don't do this if you don't want to overwrite an existing + installation of @code{libf2c} (though, chances are, you do). + Instead, @kbd{touch f2c-exists-ok} to allow the installation + to continue without any error messages about @file{/usr/lib/libf2c.a} + already existing. + + @xref{Installing f2c,,Installing @code{f2c}}, for more + information. + + @item Step @value{configure-gcc}: @kbd{./configure --prefix=/usr} + This is where you specify that the @file{g77} executable is to be + installed in @file{/usr/bin/}, the @file{libf2c.a} library is + to be installed in @file{/usr/lib/}, and so on. + + You should ensure that any existing installation of the @file{gcc} + executable is in @file{/usr/bin/}. + Otherwise, installing @code{g77} so that it does not fully + replace the existing installation of @code{gcc} is likely + to result in the inability to compile Fortran programs. + + @xref{Where to Install,,Where in the World Does Fortran (and GNU C) Go?}, + for more information on determining where to install @code{g77}. + @xref{Configuring gcc}, for more information on the + configuration process triggered by invoking the @file{./configure} + script. + + @item Step @value{build-gcc}: @kbd{make bootstrap} + @xref{Installation,,Installing GNU CC, + gcc,Using and Porting GNU CC}, for information + on the kinds of diagnostics you should expect during + this procedure. + + @xref{Building gcc}, for complete @code{g77}-specific + information on this step. + + @item Step @value{rm-stage1}: @kbd{rm -fr stage1} + You don't need to do this, but it frees up disk space. + + @item Step @value{install-g77}: @kbd{make -k install} + If this doesn't seem to work, try: + + @example + make -k install install-libf77 install-f2c-all + @end example + + @xref{Installation of Binaries}, for more information. + + @xref{Updating Documentation,,Updating Your Info Directory}, + for information on entering this manual into your + system's list of texinfo manuals. + @c + @c @item Step @value{show-version}: @kbd{g77 -v} + @end table + + @node Complete Installation + @section Complete Installation + + Here is the complete @code{g77}-specific information on how + to configure, build, and install @code{g77}. + + @menu + * Unpacking:: + * Merging Distributions:: + * f77: Installing f77. + * f2c: Installing f2c. + * Patching GNU Fortran:: + * Where to Install:: + * Configuring gcc:: + * Building gcc:: + * Pre-installation Checks:: + * Installation of Binaries:: + * Updating Documentation:: + * bison: Missing bison?. + * makeinfo: Missing makeinfo?. + @end menu + + @node Unpacking + @subsection Unpacking + @cindex unpacking distributions + @cindex distributions, unpacking + @cindex code, source + @cindex source code + @cindex source tree + @cindex packages + + The @code{gcc} source distribution is a stand-alone distribution. + It is designed to be unpacked (producing the @code{gcc} + source tree) and built as is, assuming certain + prerequisites are met (including the availability of compatible + UNIX programs such as @code{make}, @code{cc}, and so on). + + However, before building @code{gcc}, you will want to unpack + and merge the @code{g77} distribution in with it, so that you + build a Fortran-capable version of @code{gcc}, which includes + the @code{g77} command, the necessary run-time libraries, + and this manual. + + Unlike @code{gcc}, the @code{g77} source distribution + is @emph{not} a stand-alone distribution. + It is designed to be unpacked and, afterwards, immediately merged + into an applicable @code{gcc} source tree. + That is, the @code{g77} distribution @emph{augments} a + @code{gcc} distribution---without @code{gcc}, generally + only the documentation is immediately usable. + + A sequence of commands typically used to unpack @code{gcc} + and @code{g77} is: + + @example + sh# @kbd{cd /usr/src} + sh# @kbd{gunzip -d < /usr/FSF/gcc-2.7.2.tar.gz | tar xf -} + sh# @kbd{gunzip -d < /usr/FSF/g77-0.5.18.tar.gz | tar xf -} + sh# @kbd{ln -s gcc-2.7.2 gcc} + sh# @kbd{ln -s g77-0.5.18 g77} + sh# @kbd{mv -i g77/* gcc} + @end example + + @emph{Notes:} The commands beginning with @samp{gunzip@dots{}} might + print @samp{Broken pipe@dots{}} as they complete. + That is nothing to worry about, unless you actually + @emph{hear} a pipe breaking. + The @code{ln} commands are helpful in reducing typing + and clutter in installation examples in this manual. + Hereafter, the top level of @code{gcc} source tree is referred to + as @file{gcc}, and the top level of just the @code{g77} + source tree (prior to issuing the @code{mv} command, above) + is referred to as @file{g77}. + + There are three top-level names in a @code{g77} distribution: + + @example + g77/COPYING.g77 + g77/README.g77 + g77/f + @end example + + All three entries should be moved (or copied) into a @code{gcc} + source tree (typically named after its version number and + as it appears in the FSF distributions---e.g. @file{gcc-2.7.2}). + + @file{g77/f} is the subdirectory containing all of the + code, documentation, and other information that is specific + to @code{g77}. + The other two files exist to provide information on @code{g77} + to someone encountering a @code{gcc} source tree with @code{g77} + already present, who has not yet read these installation + instructions and thus needs help understanding that the + source tree they are looking at does not come from a single + FSF distribution. + They also help people encountering an unmerged @code{g77} source + tree for the first time. + + @cindex modifying @code{g77} + @cindex code, modifying + @cindex Pentium optimizations + @cindex optimizations, Pentium + @emph{Note:} Please use @strong{only} @code{gcc} and @code{g77} + source trees as distributed by the FSF. + Use of modified versions, such as the Pentium-specific-optimization + port of @code{gcc}, is likely to result in problems that appear to be + in the @code{g77} code but, in fact, are not. + Do not use such modified versions + unless you understand all the differences between them and the versions + the FSF distributes---in which case you should be able to modify the + @code{g77} (or @code{gcc}) source trees appropriately so @code{g77} + and @code{gcc} can coexist as they do in the stock FSF distributions. + + @node Merging Distributions + @subsection Merging Distributions + @cindex merging distributions + @cindex @code{gcc} versions supported by @code{g77} + @cindex versions of @code{gcc} + @cindex support for @code{gcc} versions + + After merging the @code{g77} source tree into the @code{gcc} + source tree, the final merge step is done by applying the + pertinent patches the @code{g77} distribution provides for + the @code{gcc} source tree. + + Read the file @file{gcc/f/gbe/README}, and apply the appropriate + patch file for the version of the GNU CC compiler you have, if + that exists. + If the directory exists but the appropriate file + does not exist, you are using either an old, unsupported version, + or a release one that is newer than the newest @code{gcc} version + supported by the version of @code{g77} you have. + + GNU version numbers make it easy to figure out whether a + particular version of a distribution is newer or older than + some other version of that distribution. + The format is, + generally, @var{major}.@var{minor}.@var{patch}, with + each field being a decimal number. + (You can safely ignore + leading zeros; for example, 1.5.3 is the same as 1.5.03.) + The @var{major} field only increases with time. + The other two fields are reset to 0 when the field to + their left is incremented; otherwise, they, too, only + increase with time. + So, version 2.6.2 is newer than version 2.5.8, and + version 3.0 is newer than both. + (Trailing @samp{.0} fields often are omitted in + announcements and in names for distributions and + the directories they create.) + + If your version of @code{gcc} is older than the oldest version + supported by @code{g77} (as casually determined by listing + the contents of @file{gcc/f/gbe/}), you should obtain a newer, + supported version of @code{gcc}. + (You could instead obtain an older version of @code{g77}, + or try and get your @code{g77} to work with the old + @code{gcc}, but neither approach is recommended, and + you shouldn't bother reporting any bugs you find if you + take either approach, because they're probably already + fixed in the newer versions you're not using.) + + If your version of @code{gcc} is newer than the newest version + supported by @code{g77}, it is possible that your @code{g77} + will work with it anyway. + If the version number for @code{gcc} differs only in the + @var{patch} field, you might as well try applying the @code{g77} patch + that is for the newest version of @code{gcc} having the same + @var{major} and @var{minor} fields, as this is likely to work. + + So, for example, if @code{g77} has support for versions 2.7.0 and 2.7.1, + it is likely that @file{gcc-2.7.2} would work well with @code{g77} + by using the @file{2.7.1.diff} patch file provided + with @code{g77} (aside from some offsets reported by @code{patch}, + which usually are harmless). + + However, @file{gcc-2.8.0} would almost certainly + not work with that version of @code{g77} no matter which patch file was + used, so a new version of @code{g77} would be needed (and you should + wait for it rather than bothering the maintainers---@pxref{Changes,, + User-Visible Changes}). + + @cindex distributions, why separate + @cindex separate distributions + @cindex why separate distributions + This complexity is the result of @code{gcc} and @code{g77} being + separate distributions. + By keeping them separate, each product is able to be independently + improved and distributed to its user base more frequently. + + However, @code{g77} often requires changes to contemporary + versions of @code{gcc}. + Also, the GBE interface defined by @code{gcc} typically + undergoes some incompatible changes at least every time the + @var{minor} field of the version number is incremented, + and such changes require corresponding changes to + the @code{g77} front end (FFE). + + It is hoped that the GBE interface, and the @code{gcc} and + @code{g77} products in general, will stabilize sufficiently + for the need for hand-patching to disappear. + + Invoking @code{patch} as described in @file{gcc/f/gbe/README} + can produce a wide variety of printed output, + from @samp{Hmm, I can't seem to find a patch in there anywhere...} + to long lists of messages indicated that patches are + being found, applied successfully, and so on. + + If messages about ``fuzz'', ``offset'', or + especially ``reject files'' are printed, it might + mean you applied the wrong patch file. + If you believe this is the case, it is best to restart + the sequence after deleting (or at least renaming to unused + names) the top-level directories for @code{g77} and @code{gcc} + and their symbolic links. + That is because @code{patch} might have partially patched + some @code{gcc} source files, so reapplying the correct + patch file might result in the correct patches being + applied incorrectly (due to the way @code{patch} necessarily + works). + + After @code{patch} finishes, the @code{gcc} directory might + have old versions of several files as saved by @code{patch}. + To remove these, after @kbd{cd gcc}, type @kbd{rm -i *.~*~}. + + @pindex config-lang.in + @emph{Note:} @code{g77}'s configuration file @file{gcc/f/config-lang.in} + ensures that the source code for the version of @code{gcc} + being configured has at least one GBE function required specifically + by @code{g77}. + This function was added to @file{gcc-2.7.1}, making + the patch file @file{g77-0.5.17/f/gbe/2.7.1.diff} empty of + actual patches. + + For @file{gcc-2.7.0} and earlier, this configuration-time + checking should catch failure to apply the correct patch and, + if so caught, it should abort the configuration with an explanation. + @emph{Please} do not try to disable the check, + otherwise @code{g77} might well appear to build + and install correctly, and even appear to compile correctly, + but could easily produce broken code. + + @cindex creating patch files + @cindex patch files, creating + @pindex gcc/f/gbe/ + @samp{diff -rcp2N} is used to create the patch files + in @file{gcc/f/gbe/}. + + @node Installing f77 + @subsection Installing @code{f77} + @cindex f77 command + @cindex commands, f77 + @cindex native compiler + + You should decide whether you want installation of @code{g77} + to also install an @code{f77} command. + On systems with a native @code{f77}, this is not + normally desired, so @code{g77} does not do this by + default. + + @pindex f77-install-ok + @vindex F77_INSTALL_FLAG + If you want @code{f77} installed, create the file @file{f77-install-ok} + (e.g. via the UNIX command @samp{touch f77-install-ok}) in the + source or build top-level directory (the same directory in + which the @code{g77} @file{f} directory resides, not the @file{f} directory + itself), or edit @file{gcc/f/Make-lang.in} and change the definition + of the @samp{F77_INSTALL_FLAG} macro appropriately. + + Usually, this means that, after typing @samp{cd gcc}, you + would type @samp{touch f77-install-ok}. + + When you enable installation of @code{f77}, either a link to or a + direct copy of the @code{g77} command is made. + Similarly, @file{f77.1} is installed as a man page. + + (The @samp{uninstall} target in the @file{gcc/Makefile} also tests + this macro and file, when invoked, to determine whether to delete the + installed copies of @code{f77} and @file{f77.1}.) + + @emph{Note:} No attempt is yet made + to install a program (like a shell script) that provides + compatibility with any other @code{f77} programs. + Only the most rudimentary invocations of @code{f77} will + work the same way with @code{g77}. + + @node Installing f2c + @subsection Installing @code{f2c} + + Currently, @code{g77} does not include @code{f2c} itself in its + distribution. + However, it does include a modified version of the @code{libf2c}. + This version is normally compatible with @code{f2c}, but has been + modified to meet the needs of @code{g77} in ways that might possibly + be incompatible with some versions or configurations of @code{f2c}. + + Decide how installation of @code{g77} should affect any existing installation + of @code{f2c} on your system. + + @pindex f2c + @pindex f2c.h + @pindex libf2c.a + @pindex libF77.a + @pindex libI77.a + If you do not have @code{f2c} on your system (e.g. no @file{/usr/bin/f2c}, + no @file{/usr/include/f2c.h}, and no @file{/usr/lib/libf2c.a}, + @file{/usr/lib/libF77.a}, or @file{/usr/lib/libI77.a}), you don't need to + be concerned with this item. + + If you do have @code{f2c} on your system, you need to decide how users + of @code{f2c} will be affected by your installing @code{g77}. + Since @code{g77} is + currently designed to be object-code-compatible with @code{f2c} (with + very few, clear exceptions), users of @code{f2c} might want to combine + @code{f2c}-compiled object files with @code{g77}-compiled object files in a + single executable. + + To do this, users of @code{f2c} should use the same copies of @file{f2c.h} and + @file{libf2c.a} that @code{g77} uses (and that get built as part of + @code{g77}). + + If you do nothing here, the @code{g77} installation process will not + overwrite the @file{include/f2c.h} and @file{lib/libf2c.a} files with its + own versions, and in fact will not even install @file{libf2c.a} for use + with the newly installed versions of @code{gcc} and @code{g77} if it sees + that @file{lib/libf2c.a} exists---instead, it will print an explanatory + message and skip this part of the installation. + + @pindex f2c-install-ok + @vindex F2C_INSTALL_FLAG + To install @code{g77}'s versions of @file{f2c.h} and @file{libf2c.a} + in the appropriate + places, create the file @file{f2c-install-ok} (e.g. via the UNIX + command @samp{touch f2c-install-ok}) in the source or build top-level + directory (the same directory in which the @code{g77} @file{f} directory + resides, not the @file{f} directory itself), or edit @file{gcc/f/Make-lang.in} + and change the definition of the @samp{F2C_INSTALL_FLAG} macro appropriately. + + Usually, this means that, after typing @samp{cd gcc}, you + would type @samp{touch f2c-install-ok}. + + Make sure that when you enable the overwriting of @file{f2c.h} + and @file{libf2c.a} + as used by @code{f2c}, you have a recent and properly configured version of + @file{bin/f2c} so that it generates code that is compatible with @code{g77}. + + @pindex f2c-exists-ok + @vindex F2CLIBOK + If you don't want installation of @code{g77} to overwrite @code{f2c}'s existing + installation, but you do want @code{g77} installation to proceed with + installation of its own versions of @file{f2c.h} and @file{libf2c.a} in places + where @code{g77} will pick them up (even when linking @code{f2c}-compiled + object files---which might lead to incompatibilities), create + the file @file{f2c-exists-ok} (e.g. via the UNIX command + @samp{touch f2c-exists-ok}) in the source or build top-level directory, + or edit @file{gcc/f/Make-lang.in} and change the definition of the + @samp{F2CLIBOK} macro appropriately. + + @node Patching GNU Fortran + @subsection Patching GNU Fortran + + If you're using a SunOS system, you'll need to make the following + change to @file{gcc/f/proj.h}: edit the line reading + + @example + #define FFEPROJ_STRTOUL 1 @dots{} + @end example + + @noindent + by replacing the @samp{1} with @samp{0}. + + This causes a minimal version of @samp{strtoul()} provided + as part of the @code{g77} distribution to be compiled and + linked into whatever @code{g77} programs need it, since + some systems (like SunOS) do not provide this function + in their system libraries. + + Similarly, a minimal version of @samp{bsearch()} is available + and can be enabled by editing a line similar to the one + for @samp{strtoul()} above in @file{gcc/f/proj.h}, if + your system libraries lack @samp{bsearch()}. + + These are not problems with @code{g77}, which requires an + ANSI C environment. + You should upgrade your system to one that provides + a full ANSI C environment, or encourage the maintainers + of @code{gcc} to provide one to all @code{gcc}-based + compilers in future @code{gcc} distributions. + + @xref{Problems Installing}, for more information on + why @samp{strtoul()} comes up missing and on approaches + to dealing with this problem that have already been tried. + + @node Where to Install + @subsection Where in the World Does Fortran (and GNU C) Go? + + Before configuring, you should make sure you know + where you want the @code{g77} and @code{gcc} + binaries to be installed after they're built, + because this information is given to the configuration + tool and used during the build itself. + + A @code{g77} installation necessarily requires installation of + a @code{g77}-aware version of @code{gcc}, so that the @code{gcc} + command recognizes Fortran source files and knows how to compile + them. + + For this to work, the version of @code{gcc} that you will be building + as part of @code{g77} @strong{must} be installed as the ``active'' + version of @code{gcc} on the system. + + Sometimes people make the mistake of installing @code{gcc} as + @file{/usr/local/bin/gcc}, + leaving an older, non-Fortran-aware version in @file{/usr/bin/gcc}. + (Or, the opposite happens.) + This can result in @code{g77} being unable to compile Fortran + source files, because when it calls on @code{gcc} to do the + actual compilation, @code{gcc} complains that it does not + recognize the language, or the file name suffix. + + So, determine whether @code{gcc} already is installed on your system, + and, if so, @emph{where} it is installed, and prepare to configure the + new version of @code{gcc} you'll be building so that it installs + over the existing version of @code{gcc}. + + You might want to back up your existing copy of @file{bin/gcc}, and + the entire @file{lib/} directory, before + you perform the actual installation (as described in this manual). + + Existing @code{gcc} installations typically are + found in @file{/usr} or @file{/usr/local}. + If you aren't certain where the currently + installed version of @code{gcc} and its + related programs reside, look at the output + of this command: + + @example + gcc -v -o /tmp/delete-me -xc /dev/null -xnone + @end example + + All sorts of interesting information on the locations of various + @code{gcc}-related programs and data files should be visible + in the output of the above command. + However, you do have to sift through it yourself; @code{gcc} + currently provides no easy way to ask it where it is installed + and where it looks for the various programs and data files it + calls on to do its work. + + Just @emph{building} @code{g77} should not overwrite any installed + programs---but, usually, after you build @code{g77}, you will want + to install it, so backing up anything it might overwrite is + a good idea. + (This is true for any package, not just @code{g77}, + though in this case it is intentional that @code{g77} overwrites + @code{gcc} if it is already installed---it is unusual that + the installation process for one distribution intentionally + overwrites a program or file installed by another distribution.) + + Another reason to back up the existing version first, + or make sure you can restore it easily, is that it might be + an older version on which other users have come to depend + for certain behaviors. + However, even the new version of @code{gcc} you install + will offer users the ability to specify an older version of + the actual compilation programs if desired, and these + older versions need not include any @code{g77} components. + @xref{Target Options,,Specifying Target Machine and Compiler Version, + gcc,Using and Porting GNU CC}, for information on the @samp{-V} + option of @code{gcc}. + + @node Configuring gcc + @subsection Configuring GNU CC + + @code{g77} is configured automatically when you configure + @code{gcc}. + There are two parts of @code{g77} that are configured in two + different ways---@code{g77}, which ``camps on'' to the + @code{gcc} configuration mechanism, and @code{libf2c}, which + uses a variation of the GNU @code{autoconf} configuration + system. + + Generally, you shouldn't have to be concerned with + either @code{g77} or @code{libf2c} configuration, unless + you're configuring @code{g77} as a cross-compiler. + In this case, the @code{libf2c} configuration, and possibly the + @code{g77} and @code{gcc} configurations as well, + might need special attention. + (This also might be the case if you're porting @code{gcc} to + a whole new system---even if it is just a new operating system + on an existing, supported CPU.) + + To configure the system, see + @ref{Installation,,Installing GNU CC,gcc,Using and Porting GNU CC}, + following the instructions for running @file{./configure}. + Pay special attention to the @samp{--prefix=} option, which + you almost certainly will need to specify. + + (Note that @code{gcc} installation information is provided + as a straight text file in @file{gcc/INSTALL}.) + + The information printed by the invocation of @file{./configure} + should show that the @file{f} directory (the Fortran language) + has been configured. + If it does not, there is a problem. + + @emph{Note:} Configuring with the @samp{--srcdir} argument is known + to work with GNU @samp{make}, but it is not known to work with + other variants of @samp{make}. + Irix5.2 and SunOS4.1 versions of @samp{make} definitely + won't work outside the source directory at present. + @code{g77}'s + portion of the @file{configure} script issues a warning message + about this when you configure for building binaries outside + the source directory. + + @node Building gcc + @subsection Building GNU CC + @cindex building @code{gcc} + @cindex building @code{g77} + + @vindex LANGUAGES + Building @code{g77} requires building enough of @code{gcc} that + these instructions assume you're going to build all of + @code{gcc}, including @code{g++}, @code{protoize}, and so on. + You can save a little time and disk space by changes the + @samp{LANGUAGES} macro definition in @code{gcc/Makefile.in} + or @code{gcc/Makefile}, but if you do that, you're on your own. + One change is almost @emph{certainly} going to cause failures: + removing @samp{c} or @samp{f77} from the definition of the + @samp{LANGUAGES} macro. + + After configuring @code{gcc}, which configures @code{g77} and + @code{libf2c} automatically, you're ready to start the actual + build by invoking @code{make}. + + @pindex configure + @emph{Note:} You @strong{must} have run @file{./configure} + before you run @code{make}, even if you're + using an already existing @code{gcc} development directory, because + @file{./configure} does the work to recognize that you've added + @code{g77} to the configuration. + + There are two general approaches to building GNU CC from + scratch: + + @table @dfn + @item bootstrap + This method uses minimal native system facilities to + build a barebones, unoptimized @code{gcc}, that is then + used to compile (``bootstrap'') the entire system. + + @item straight + This method assumes a more complete native system + exists, and uses that just once to build the entire + system. + @end table + + On all systems without a recent version of @code{gcc} + already installed, the @i{bootstrap} method must be + used. + In particular, @code{g77} uses extensions to the C + language offered, apparently, only by @code{gcc}. + + On most systems with a recent version of @code{gcc} + already installed, the @i{straight} method can be + used. + This is an advantage, because it takes less CPU time + and disk space for the build. + However, it does require that the system have fairly + recent versions of many GNU programs and other + programs, which are not enumerated here. + + @menu + * Bootstrap Build:: For all systems. + * Straight Build:: For systems with a recent version of @code{gcc}. + @end menu + + @node Bootstrap Build + @subsubsection Bootstrap Build + @cindex bootstrap build + @cindex build, bootstrap + + A complete bootstrap build is done by issuing a command + beginning with @samp{make bootstrap @dots{}}, as + described in @ref{Installation,,Installing GNU CC, + gcc,Using and Porting GNU CC}. + This is the most reliable form of build, but it does require + the most disk space and CPU time, since the complete system + is built twice (in Stages 2 and 3), after an initial build + (during Stage 1) of a minimal @code{gcc} compiler using + the native compiler and libraries. + + You might have to, or want to, control the way a bootstrap + build is done by entering the @code{make} commands to build + each stage one at a time, as described in the @code{gcc} + manual. + For example, to save time or disk space, you might want + to not bother doing the Stage 3 build, in which case you + are assuming that the @code{gcc} compiler you have built + is basically sound (because you are giving up the opportunity + to compare a large number of object files to ensure they're + identical). + + To save some disk space during installation, after Stage 2 + is built, you can type @samp{rm -fr stage1} to remove the + binaries built during Stage 1. + + @pindex zzz.o + @pindex zzz.c + @emph{Note:} If you do build Stage 3 + and you compare the object files produced by various stages, + the file @file{gcc/f/zzz.o} @strong{will} be different. + That is because it + contains a string with an expansion of the @samp{__TIME__} macro, + which expands to the current time of day. + It is nothing to worry about, since + @file{gcc/f/zzz.c} doesn't contain any actual code. + It does allow you to override its use of @samp{__DATE__} and + @samp{__TIME__} by defining macros for the compilation---see the + source code for details. + + @xref{Installation,,Installing GNU CC,gcc,Using and Porting GNU CC}, + for important information on building @code{gcc} that is + not described in this @code{g77} manual. + For example, explanations of diagnostic messages + and whether they're expected, or indicate trouble, + are found there. + + @node Straight Build + @subsubsection Straight Build + @cindex straight build + @cindex build, straight + + If you have a recent version of @code{gcc} + already installed on your system, and if you're + reasonably certain it produces code that is + object-compatible with the version of @code{gcc} + you want to build as part of building @code{g77}, + you can save time and disk space by doing a straight + build. + + To build just the C and Fortran compilers and the + necessary run-time libraries, issue the following + command: + + @example + make -k CC=gcc LANGUAGES=f77 all g77 + @end example + + (The @samp{g77} target is necessary because the @code{gcc} + build procedures apparently do not automatically build + command drivers for languages in subdirectories. + It's the @samp{all} target that triggers building + everything except, apparently, the @code{g77} command + itself.) + + If you run into problems using this method, you have + two options: + + @itemize @bullet + @item + Abandon this approach and do a bootstrap build. + + @item + Try to make this approach work by diagnosing the + problems you're running into and retrying. + @end itemize + + Especially if you do the latter, you might consider + submitting any solutions as bug/fix reports. + @xref{Trouble,,Known Causes of Trouble with GNU Fortran}. + + However, understand that many problems preventing a + straight build from working are not @code{g77} problems, + and, in such cases, are not likely to be addressed in + future versions of @code{g77}. + + @node Pre-installation Checks + @subsection Pre-installation Checks + @cindex pre-installation checks + @cindex installing, checking before + + Before installing the system, which includes installing + @code{gcc}, you might want to do some minimum checking + to ensure that some basic things work. + + Here are some commands you can try, and output typically + printed by them when they work: + + @example + sh# @kbd{cd /usr/src/gcc} + sh# @kbd{./g77 --driver=./xgcc -B./ -v} + ./xgcc -B./ -v -fnull-version -o /tmp/gfa03648 @dots{} + Reading specs from ./specs + gcc version 2.7.1 + ./cpp -lang-c -v -isystem ./include -undef @dots{} + GNU CPP version 2.7.1 (80386, BSD syntax) + #include "..." search starts here: + #include <...> search starts here: + ./include + /usr/include + /usr/i486-unknown-linuxaout/include + /usr/lib/gcc-lib/i486-unknown-linuxaout/2.7.1/include + /usr/include + End of search list. + ./f771 /tmp/cca03648.i -quiet -dumpbase null.F -version @dots{} + GNU F77 version 2.7.1 (80386, BSD syntax) compiled @dots{} + GNU Fortran Front End version 0.5.18 compiled: @dots{} + as -o /tmp/cca036481.o /tmp/cca03648.s + ld -m i386linux -o /tmp/gfa03648 /usr/lib/crt0.o -L. @dots{} + /usr/lib/crt0.o(.text+0x35): undefined reference to `main' + sh# @kbd{./xgcc -B./ -v -o /tmp/delete-me -xc /dev/null -xnone} + Reading specs from ./specs + gcc version 2.7.1 + ./cpp -lang-c -v -isystem ./include -undef @dots{} + GNU CPP version 2.7.1 (80386, BSD syntax) + #include "..." search starts here: + #include <...> search starts here: + ./include + /usr/include + /usr/i486-unknown-linuxaout/include + /usr/lib/gcc-lib/i486-unknown-linuxaout/2.7.1/include + /usr/include + End of search list. + ./cc1 /tmp/cca03659.i -quiet -dumpbase null.c -version @dots{} + GNU C version 2.7.1 (80386, BSD syntax) compiled @dots{} + as -o /tmp/cca036591.o /tmp/cca03659.s + ld -m i386linux -o /tmp/delete-me /usr/lib/crt0.o -L. @dots{} + /usr/lib/crt0.o(.text+0x35): undefined reference to `main' + sh# + @end example + + (Note that long lines have been truncated, and @samp{@dots{}} + used to indicate such truncations.) + + The above two commands test whether @code{g77} and @code{gcc}, + respectively, are able to compile empty (null) source files, + whether invocation of the C preprocessor works, whether libraries + can be linked (even though there is an undefined reference due + to there being no main program unit), and so on. + + If the output you get from either of the above two commands + is noticably different, especially if it is shorter or longer + in ways that do not look consistent with the above sample + output, you probably should not install @code{gcc} and @code{g77} + until you have investigated further. + + For example, you could try compiling actual applications and + seeing how that works. + (You might want to do that anyway, even if the above tests + work.) + + To compile using the not-yet-installed versions of @code{gcc} + and @code{g77}, use the following commands to invoke them. + + To invoke @code{g77}, type: + + @example + /usr/src/gcc/g77 --driver=/usr/src/gcc/xgcc -B/usr/src/gcc/ @dots{} + @end example + + To invoke @code{gcc}, type: + + @example + /usr/src/gcc/xgcc -B/usr/src/gcc/ @dots{} + @end example + + @node Installation of Binaries + @subsection Installation of Binaries + @cindex installation of binaries + @cindex @code{g77}, installation of + @cindex @code{gcc}, installation of + + After configuring, building, and testing @code{g77} and @code{gcc}, + when you are ready to install them on your system, type: + + @example + make -k CC=gcc LANGUAGES=f77 install + @end example + + As described in @ref{Installation,,Installing GNU CC, + gcc,Using and Porting GNU CC}, the values for + the @samp{CC} and @samp{LANGUAGES} macros should + be the same as those you supplied for the build + itself. + + So, the details of the above command might vary + if you used a bootstrap build (where you might be + able to omit both definitions, or might have to + supply the same definitions you used when building + the final stage) or if you deviated from the + instructions for a straight build. + + If the above command does not install @file{libf2c.a} + as expected, try this: + + @example + make -k @dots{} install install-libf77 install-f2c-all + @end example + + We don't know why some non-GNU versions of @code{make} sometimes + require this alternate command, but they do. + (Remember to supply the appropriate definitions for @samp{CC} and + @samp{LANGUAGES} where you see @samp{@dots{}} in the above command.) + + Note that using the @samp{-k} option tells @code{make} to + continue after some installation problems, like not having + @code{makeinfo} installed on your system. + It might not be necessary. + + @node Updating Documentation + @subsection Updating Your Info Directory + @cindex updating info directory + @cindex info, updating directory + @cindex directory, updating info + @pindex /usr/info/dir + @pindex g77.info + @cindex texinfo + @cindex documentation + + As part of installing @code{g77}, you should make sure users + of @code{info} can easily access this manual on-line. + Do this by making sure a line such as the following exists + in @file{/usr/info/dir}, or in whatever file is the top-level + file in the @code{info} directory on your system (perhaps + @file{/usr/local/info/dir}: + + @example + * g77: (g77). The GNU Fortran programming language. + @end example + + If the menu in @file{dir} is organized into sections, @code{g77} + probably belongs in a section with a name such as the following: + + @itemize @bullet + @item + Writing Programs + @item + Programming Languages + @item + Languages Other Than C + @item + Scientific/Engineering Tools + @item + GNU Compilers + @end itemize + + @node Missing bison? + @subsection Missing @code{bison}? + @cindex @code{bison} + @cindex missing @code{bison} + + If you cannot install @code{bison}, make sure you have started + with a @emph{fresh} distribution of @code{gcc}, do @emph{not} + do @samp{make maintainer-clean} (in other versions of @code{gcc}, + this was called @samp{make realclean}), and, to ensure that + @code{bison} is not invoked by @code{make} during the build, + type these commands: + + @example + sh# @kbd{cd gcc} + sh# @kbd{touch bi-parser.c bi-parser.h c-parse.c c-parse.h cexp.c} + sh# @kbd{touch cp/parse.c cp/parse.h objc-parse.c} + sh# + @end example + + These commands update the date-time-modified information for + all the files produced by the various invocations of @code{bison} + in the current versions of @code{gcc}, so that @code{make} no + longer believes it needs to update them. + All of these files should already exist in a @code{gcc} + distribution, but the application of patches to upgrade + to a newer version can leave the modification information + set such that the @code{bison} input files look more ``recent'' + than the corresponding output files. + + @emph{Note:} New versions of @code{gcc} might change the set of + files it generates by invoking @code{bison}---if you cannot figure + out for yourself how to handle such a situation, try an + older version of @code{gcc} until you find someone who can + (or until you obtain and install @code{bison}). + + @node Missing makeinfo? + @subsection Missing @code{makeinfo}? + @cindex @code{makeinfo} + @cindex missing @code{makeinfo} + + If you cannot install @code{makeinfo}, either use the @code{-k} option when + invoking make to specify any of the @samp{install} or related targets, + or specify @samp{MAKEINFO=echo} on the @code{make} command line. + + If you fail to do one of these things, some files, like @file{libf2c.a}, + might not be installed, because the failed attempt by @code{make} to + invoke @code{makeinfo} causes it to cancel any further processing. + + @node Distributing Binaries + @section Distributing Binaries + @cindex binaries, distributing + @cindex code, distributing + + If you are building @code{g77} for distribution to others in binary form, + first make sure you are aware of your legal responsibilities (read + the file @file{gcc/COPYING} thoroughly). + + Then, consider your target audience and decide where @code{g77} should + be installed. + + For systems like Linux that have no native Fortran compiler (or + where @code{g77} could be considered the native compiler for Fortran and + @code{gcc} for C, etc.), you should definitely configure + @code{g77} for installation + in @file{/usr/bin} instead of @file{/usr/local/bin}. + Specify the + @samp{--prefix=/usr} option when running @file{./configure}. + You might + also want to set up the distribution so the @code{f77} command is a + link to @code{g77}---just make an empty file named @file{f77-install-ok} in + the source or build directory (the one in which the @file{f} directory + resides, not the @file{f} directory itself) when you specify one of the + @file{install} or @file{uninstall} targets in a @code{make} command. + + For a system that might already have @code{f2c} installed, you definitely + will want to make another empty file (in the same directory) named + either @file{f2c-exists-ok} or @file{f2c-install-ok}. + Use the former if you + don't want your distribution to overwrite @code{f2c}-related files in existing + systems; use the latter if you want to improve the likelihood that + users will be able to use both @code{f2c} and @code{g77} to compile code for a + single program without encountering link-time or run-time + incompatibilities. + + (Make sure you clearly document, in the ``advertising'' for + your distribution, how installation of your distribution will + affect existing installations of @code{gcc}, @code{f2c}, + @code{f77}, @file{libf2c.a}, and so on. + Similarly, you should clearly document any requirements + you assume are met by users of your distribution.) + + For other systems with native @code{f77} (and @code{cc}) compilers, + configure @code{g77} as you (or most of your audience) would + configure @code{gcc} for their installations. + Typically this is for installation in + @file{/usr/local}, and would not include a copy of + @code{g77} named @code{f77}, so + users could still use the native @code{f77}. + + In any case, for @code{g77} to work properly, you @strong{must} ensure + that the binaries you distribute include: + + @table @file + @item bin/g77 + This is the command most users use to compile Fortran. + + @item bin/gcc + This is the command all users use to compile Fortran, either + directly or indirectly via the @code{g77} command. + The @file{bin/gcc} executable file must have been built + from a @code{gcc} source tree into which a @code{g77} source + tree was merged and configured, or it will not know how + to compile Fortran programs. + + @item bin/f77 + In installations with no non-GNU native Fortran + compiler, this is the same as @file{bin/g77}. + Otherwise, it should be omitted from the distribution, + so the one on already on a particular system does + not get overwritten. + + @item info/g77.info* + This is the documentation for @code{g77}. + + Please edit this documentation (by editing @file{gcc/f/*.texi} + and doing @samp{make doc} from the @file{/usr/src/gcc} directory) + to reflect any changes you've made to @code{g77}, or at + least to encourage users of your binary distribution to + report bugs to you first. + + Also, whether you distribute binaries or install @code{g77} + on your own system, it might be helpful for everyone to + add a line listing this manual by name and topic to the + top-level @code{info} node in @file{/usr/info/dir}. + That way, users can find @code{g77} documentation more + easily. + @xref{Updating Documentation,,Updating Your Info Directory}. + + @item man/man1/g77.1 + This is the short man page for @code{g77}. + + @item man/man1/f77.1 + In installations where @code{f77} is the same as @code{g77}, + this is the same as @file{man/man1/g77.1}. + Otherwise, it should be omitted from the distribution, + so the one already on a particular system does not + get overwritten. + + @item lib/gcc-lib/@dots{}/f771 + This is the actual Fortran compiler. + + @item lib/gcc-lib/@dots{}/libf2c.a + This is the run-time library for @code{g77}-compiled programs. + @end table + + Whether you want to include the slightly updated (and possibly + improved) versions of @code{cc1}, @code{cc1plus}, and whatever other + binaries get rebuilt with the changes the GNU Fortran distribution + makes to the GNU back end, is up to you. + These changes are + highly unlikely to break any compilers, and it is possible + they'll fix back-end bugs that can be demonstrated using front + ends other than GNU Fortran's. + + Please assure users that unless + they have a specific need for their existing, + older versions of @code{gcc} command, + they are unlikely to experience any problems by overwriting + it with your version---though they could certainly protect + themselves by making backup copies first! + Otherwise, users might try and install your binaries + in a ``safe'' place, find they cannot compile Fortran + programs with your distribution (because, perhaps, they're + picking up their old version of the @code{gcc} command, + which does not recognize Fortran programs), and assume + that your binaries (or, more generally, GNU Fortran + distributions in general) are broken, at least for their + system. + + Finally, @strong{please} ask for bug reports to go to you first, at least + until you're sure your distribution is widely used and has been + well tested. + This especially goes for those of you making any + changes to the @code{g77} sources to port @code{g77}, e.g. to OS/2. + @samp{fortran@@gnu.ai.mit.edu} has received a fair amount of bug + reports that turned out to be problems with other peoples' ports + and distributions, about which nothing could be done for the + user. + Once you are quite certain a bug report does not involve + your efforts, you can forward it to us. + + @node Settings + @section Changing Settings Before Building + + Here are some internal @code{g77} settings that can be changed + by editing source files in @file{gcc/f/} before building. + + This information, and perhaps even these settings, represent + stop-gap solutions to problems people doing various ports + of @code{g77} have encountered. + As such, none of the following information is expected to + be pertinent in future versions of @code{g77}. + + @menu + * Maximum Stackable Size:: Large arrays are forced off the stack frame. + * Floating-point Bit Patterns:: Possible programs building cross-compiler. + * Large Initialization:: Large arrays with @samp{DATA} initialization. + * Alpha Problems:: Problems with 64-bit systems like Alphas. + @end menu + + @node Maximum Stackable Size + @subsection Maximum Stackable Size + + @vindex FFECOM_sizeMAXSTACKITEM + @cindex code, stack variables + @cindex maximum stackable size + @code{g77}, on most machines, puts many variables and arrays on the stack + where possible, and can be configured (by changing + @samp{FFECOM_sizeMAXSTACKITEM} in @file{gcc/f/com.c}) to force + smaller-sized entities into static storage (saving + on stack space) or permit larger-sized entities to be put on the + stack (which can improve run-time performance, as it presents + more opportunities for the GBE to optimize the generated code). + + @node Floating-point Bit Patterns + @subsection Floating-point Bit Patterns + + @cindex cross-compiler, building + @cindex floating-point bit patterns + @cindex bit patterns + The @code{g77} build will crash if an attempt is made to build + it as a cross-compiler + for a target when @code{g77} cannot reliably determine the bit pattern of + floating-point constants for the target. + Planned improvements for g77-0.6 + will give it the capabilities it needs to not have to crash the build + but rather generate correct code for the target. + (Currently, @code{g77} + would generate bad code under such circumstances if it didn't crash + during the build, e.g. when compiling a source file that does + something like @samp{EQUIVALENCE (I,R)} and @samp{DATA R/3.1415926535/}.) + + @node Large Initialization + @subsection Initialization of Large Aggregate Areas + + @cindex speed, compiler + @cindex slow compiler + @cindex memory utilization + @cindex large initialization + @cindex aggregate initialization + A warning message is issued when @code{g77} sees code that provides + initial values (e.g. via @samp{DATA}) to an aggregate area (@samp{COMMON} + or @samp{EQUIVALENCE}, or even a large enough array or @samp{CHARACTER} + variable) + that is large enough to increase @code{g77}'s compile time by roughly + a factor of 10. + + This size currently is quite small, since @code{g77} + currently has a known bug requiring too much memory + and time to handle such cases. + In @file{gcc/f/data.c}, the macro + @samp{FFEDATA_sizeTOO_BIG_INIT_} is defined + to the minimum size for the warning to appear. + The size is specified in storage units, + which can be bytes, words, or whatever, on a case-by-case basis. + + After changing this macro definition, you must + (of course) rebuild and reinstall @code{g77} for + the change to take effect. + + Note that, as of version 0.5.18, improvements have + reduced the scope of the problem for @emph{sparse} + initialization of large arrays, especially those + with large, contiguous uninitialized areas. + However, the warning is issued at a point prior to + when @code{g77} knows whether the initialization is sparse, + and delaying the warning could mean it is produced + too late to be helpful. + + Therefore, the macro definition should not be adjusted to + reflect sparse cases. + Instead, adjust it to generate the warning when densely + initialized arrays begin to cause responses noticably slower + than linear performance would suggest. + + @node Alpha Problems + @subsection Alpha Problems + + @cindex Alpha, bugs + @cindex 64-bit systems + @code{g77} might warn when it is used to compile Fortran code + for a target configuration that is not basically a 32-bit + machine (such as an Alpha, which is a 64-bit machine, especially + if it has a 64-bit operating system running on it). + This is because @code{g77} is known to not work + properly on such configurations, although the reasons + for this are not fully explored. + This is expected to be fixed + at 0.6, at which point the warning would be dropped. + (The reason the unexplored problems are expected to be + fixed at 0.6 is because some known internal design + problems @code{g77} has, which reduce portability and + the ability to configure it as a cross-compiler, are + presumed to be at least partly responsible for the + problems being encountered on the Alpha. + The problems remain unexplored partly because the + known problems exist and are scheduled to be addressed + anyway. + Plus, the @code{g77} maintainer does not yet possess + an Alpha workstation of his own.) + + diff -rcp2N g77-0.5.17/f/install0.texi g77-0.5.18/f/install0.texi *** g77-0.5.17/f/install0.texi Wed Dec 31 19:00:00 1969 --- g77-0.5.18/f/install0.texi Mon Mar 4 16:37:40 1996 *************** *** 0 **** --- 1,14 ---- + @setfilename INSTALL + @set INSTALLONLY + + @c The immediately following lines apply to the INSTALL file + @c which is generated using this file. + This file contains installation information for the GNU Fortran compiler. + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + You may copy, distribute, and modify it freely as long as you preserve + this copyright notice and permission notice. + + @node Top,,, (dir) + @chapter Installing GNU Fortran + @include install.texi + @bye diff -rcp2N g77-0.5.17/f/intrin.c g77-0.5.18/f/intrin.c *** g77-0.5.17/f/intrin.c Thu Nov 2 05:22:50 1995 --- g77-0.5.18/f/intrin.c Mon Mar 25 21:07:55 1996 *************** the Free Software Foundation, 59 Temple *** 25,28 **** --- 25,29 ---- #include #include "intrin.h" + #include "expr.h" #include "info.h" #include "src.h" *************** struct _ffeintrin_gen_ *** 42,46 **** { char *name; /* Name as seen in program. */ ! ffeintrinSpec specs[14]; }; --- 43,47 ---- { char *name; /* Name as seen in program. */ ! ffeintrinSpec specs[2]; }; *************** struct _ffeintrin_imp_ *** 58,437 **** { char *name; /* Name of implementation. */ #if FFECOM_targetCURRENT == FFECOM_targetGCC ffecomGfrt gfrt; /* gfrt index in library. */ #endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */ ! ffeinfoBasictype basictype; ! ffeinfoKindtype kindtype; ! ffetargetCharacterSize size; ! ffebad (*check) (ffebld arglist); }; ! static ffebad ffeintrin_check_0_ (ffebld arglist); ! static ffebad ffeintrin_check_1_ (ffebld arglist, ffebld *xarg1); ! static ffebad ffeintrin_check_1or2_ (ffebld arglist, ffebld *xarg1, ! ffebld *xarg2); ! static ffebad ffeintrin_check_2_ (ffebld arglist, ffebld *xarg1, ! ffebld *xarg2); ! static ffebad ffeintrin_check_2or3_ (ffebld arglist, ffebld *xarg1, ! ffebld *xarg2, ffebld *xarg3); ! static ffebad ffeintrin_check_3_ (ffebld arglist, ffebld *xarg1, ! ffebld *xarg2, ffebld *xarg3); ! static ffebad ffeintrin_check_5_ (ffebld arglist, ffebld *xarg1, ! ffebld *xarg2, ffebld *xarg3, ! ffebld *xarg4, ffebld *xarg5); static bool ffeintrin_check_any_ (ffebld arglist); - static ffebad ffeintrin_check_char_1_ (ffebld arglist); - static ffebad ffeintrin_check_char_2_ (ffebld arglist); - static ffebad ffeintrin_check_cmplx_1_ (ffebld arglist); - static ffebad ffeintrin_check_cmplx_1or2_ (ffebld arglist); - static ffebad ffeintrin_check_dcmplx_1_ (ffebld arglist); - static ffebad ffeintrin_check_dcmplx_1or2_ (ffebld arglist); - static ffebad ffeintrin_check_getarg_ (ffebld arglist); - static ffebad ffeintrin_check_getenv_ (ffebld arglist); - static ffebad ffeintrin_check_int_1_ (ffebld arglist); - static ffebad ffeintrin_check_int_1_o_ (ffebld arglist); - static ffebad ffeintrin_check_int_1or2_ (ffebld arglist); - static ffebad ffeintrin_check_int_2_ (ffebld arglist); - static ffebad ffeintrin_check_int_2p_ (ffebld arglist); - static ffebad ffeintrin_check_int_3_ (ffebld arglist); - static ffebad ffeintrin_check_loc_ (ffebld arglist); - static ffebad ffeintrin_check_log_1_ (ffebld arglist); - #if 0 - static ffebad ffeintrin_check_log_1or2_ (ffebld arglist); - #endif - static ffebad ffeintrin_check_log_2_ (ffebld arglist); - #if 0 - static ffebad ffeintrin_check_log_2p_ (ffebld arglist); - #endif - static ffebad ffeintrin_check_mvbits_ (ffebld arglist); - static ffebad ffeintrin_check_procedure_ (ffeintrinImp imp, ffebldOp op); - static ffebad ffeintrin_check_real_1_ (ffebld arglist); - static ffebad ffeintrin_check_real_1or2_ (ffebld arglist); - static ffebad ffeintrin_check_real_2_ (ffebld arglist); - static ffebad ffeintrin_check_real_2p_ (ffebld arglist); - static ffebad ffeintrin_check_realdbl_1_ (ffebld arglist); - static ffebad ffeintrin_check_realdbl_1or2_ (ffebld arglist); - static ffebad ffeintrin_check_realdbl_2_ (ffebld arglist); - static ffebad ffeintrin_check_realdbl_2p_ (ffebld arglist); - static ffebad ffeintrin_check_signal_ (ffebld arglist); - static ffebad ffeintrin_check_system_ (ffebld arglist); - static ffebad ffeintrin_check_void_ (ffebld arglist); static int ffeintrin_cmp_name_ (const void *name, const void *intrinsic); - #define ffeintrin_check_exit_ ffeintrin_check_int_1_o_ - #define ffeintrin_check_flush_ ffeintrin_check_int_1_o_ - static struct _ffeintrin_name_ ffeintrin_names_[] = { /* Alpha order. */ ! {"ABORT", "abort", "Abort", FFEINTRIN_genNONE, FFEINTRIN_specABORT,}, /* UNIX */ ! {"ABS", "abs", "Abs", FFEINTRIN_genABS, FFEINTRIN_specABS,}, ! {"ACHAR", "achar", "AChar", FFEINTRIN_genACHAR, FFEINTRIN_specNONE,}, /* F90, F2C */ ! {"ACOS", "acos", "ACos", FFEINTRIN_genACOS, FFEINTRIN_specACOS,}, ! {"ACOSD", "acosd", "ACosD", FFEINTRIN_genACOSD, FFEINTRIN_specACOSD,}, /* VXT */ ! {"ADJUSTL", "adjustl", "AdjustL", FFEINTRIN_genADJUSTL, FFEINTRIN_specNONE,}, /* F90 */ ! {"ADJUSTR", "adjustr", "AdjustR", FFEINTRIN_genADJUSTR, FFEINTRIN_specNONE,}, /* F90 */ ! {"AIMAG", "aimag", "AImag", FFEINTRIN_genAIMAG, FFEINTRIN_specAIMAG,}, ! {"AIMAX0", "aimax0", "AIMax0", FFEINTRIN_genNONE, FFEINTRIN_specAIMAX0,}, /* VXT */ ! {"AIMIN0", "aimin0", "AIMin0", FFEINTRIN_genNONE, FFEINTRIN_specAIMIN0,}, /* VXT */ ! {"AINT", "aint", "AInt", FFEINTRIN_genAINT, FFEINTRIN_specAINT,}, ! {"AJMAX0", "ajmax0", "AJMax0", FFEINTRIN_genNONE, FFEINTRIN_specAJMAX0,}, /* VXT */ ! {"AJMIN0", "ajmin0", "AJMin0", FFEINTRIN_genNONE, FFEINTRIN_specAJMIN0,}, /* VXT */ ! {"ALL", "all", "All", FFEINTRIN_genALL, FFEINTRIN_specNONE,}, /* F90 */ ! {"ALLOCATED", "allocated", "Allocated", FFEINTRIN_genALLOCATED, FFEINTRIN_specNONE,}, /* F90 */ ! {"ALOG", "alog", "ALog", FFEINTRIN_genNONE, FFEINTRIN_specALOG,}, ! {"ALOG10", "alog10", "ALog10", FFEINTRIN_genNONE, FFEINTRIN_specALOG10,}, ! {"AMAX0", "amax0", "AMax0", FFEINTRIN_genAMAX0, FFEINTRIN_specAMAX0,}, ! {"AMAX1", "amax1", "AMax1", FFEINTRIN_genNONE, FFEINTRIN_specAMAX1,}, ! {"AMIN0", "amin0", "AMin0", FFEINTRIN_genAMIN0, FFEINTRIN_specAMIN0,}, ! {"AMIN1", "amin1", "AMin1", FFEINTRIN_genNONE, FFEINTRIN_specAMIN1,}, ! {"AMOD", "amod", "AMod", FFEINTRIN_genNONE, FFEINTRIN_specAMOD,}, ! {"AND", "and", "And", FFEINTRIN_genAND, FFEINTRIN_specNONE,}, /* F2C */ ! {"ANINT", "anint", "ANInt", FFEINTRIN_genANINT, FFEINTRIN_specANINT,}, ! {"ANY", "any", "Any", FFEINTRIN_genANY, FFEINTRIN_specNONE,}, /* F90 */ ! {"ASIN", "asin", "ASin", FFEINTRIN_genASIN, FFEINTRIN_specASIN,}, ! {"ASIND", "asind", "ASinD", FFEINTRIN_genASIND, FFEINTRIN_specASIND,}, /* VXT */ ! {"ASSOCIATED", "associated", "Associated", FFEINTRIN_genASSOCIATED, FFEINTRIN_specNONE,}, /* F90 */ ! {"ATAN", "atan", "ATan", FFEINTRIN_genATAN, FFEINTRIN_specATAN,}, ! {"ATAN2", "atan2", "ATan2", FFEINTRIN_genATAN2, FFEINTRIN_specATAN2,}, ! {"ATAN2D", "atan2d", "ATan2D", FFEINTRIN_genATAN2D, FFEINTRIN_specATAN2D,}, /* VXT */ ! {"ATAND", "atand", "ATanD", FFEINTRIN_genATAND, FFEINTRIN_specATAND,}, /* VXT */ ! {"BITEST", "bitest", "BITest", FFEINTRIN_genNONE, FFEINTRIN_specBITEST,}, /* VXT */ ! {"BIT_SIZE", "bit_size", "Bit_Size", FFEINTRIN_genBIT_SIZE, FFEINTRIN_specNONE,}, /* F90 */ ! {"BJTEST", "bjtest", "BJTest", FFEINTRIN_genNONE, FFEINTRIN_specBJTEST,}, /* VXT */ ! {"BTEST", "btest", "BTest", FFEINTRIN_genBTEST, FFEINTRIN_specNONE,}, /* F90, VXT */ ! {"CABS", "cabs", "CAbs", FFEINTRIN_genNONE, FFEINTRIN_specCABS,}, ! {"CCOS", "ccos", "CCos", FFEINTRIN_genNONE, FFEINTRIN_specCCOS,}, ! {"CDABS", "cdabs", "CDAbs", FFEINTRIN_genNONE, FFEINTRIN_specCDABS,}, /* VXT */ ! {"CDCOS", "cdcos", "CDCos", FFEINTRIN_genNONE, FFEINTRIN_specCDCOS,}, /* VXT */ ! {"CDEXP", "cdexp", "CDExp", FFEINTRIN_genNONE, FFEINTRIN_specCDEXP,}, /* VXT */ ! {"CDLOG", "cdlog", "CDLog", FFEINTRIN_genNONE, FFEINTRIN_specCDLOG,}, /* VXT */ ! {"CDSIN", "cdsin", "CDSin", FFEINTRIN_genNONE, FFEINTRIN_specCDSIN,}, /* VXT */ ! {"CDSQRT", "cdsqrt", "CDSqRt", FFEINTRIN_genNONE, FFEINTRIN_specCDSQRT,}, /* VXT */ ! {"CEILING", "ceiling", "Ceiling", FFEINTRIN_genCEILING, FFEINTRIN_specNONE,}, /* F90 */ ! {"CEXP", "cexp", "CExp", FFEINTRIN_genNONE, FFEINTRIN_specCEXP,}, ! {"CHAR", "char", "Char", FFEINTRIN_genCHAR, FFEINTRIN_specCHAR,}, ! {"CLOG", "clog", "CLog", FFEINTRIN_genNONE, FFEINTRIN_specCLOG,}, ! {"CMPLX", "cmplx", "Cmplx", FFEINTRIN_genCMPLX, FFEINTRIN_specNONE,}, ! {"CONJG", "conjg", "Conjg", FFEINTRIN_genCONJG, FFEINTRIN_specCONJG,}, ! {"COS", "cos", "Cos", FFEINTRIN_genCOS, FFEINTRIN_specCOS,}, ! {"COSD", "cosd", "CosD", FFEINTRIN_genCOSD, FFEINTRIN_specCOSD,}, /* VXT */ ! {"COSH", "cosh", "CosH", FFEINTRIN_genCOSH, FFEINTRIN_specCOSH,}, ! {"COUNT", "count", "Count", FFEINTRIN_genCOUNT, FFEINTRIN_specNONE,}, /* F90 */ ! {"CSHIFT", "cshift", "CShift", FFEINTRIN_genCSHIFT, FFEINTRIN_specNONE,}, /* F90 */ ! {"CSIN", "csin", "CSin", FFEINTRIN_genNONE, FFEINTRIN_specCSIN,}, ! {"CSQRT", "csqrt", "CSqRt", FFEINTRIN_genNONE, FFEINTRIN_specCSQRT,}, ! {"DABS", "dabs", "DAbs", FFEINTRIN_genNONE, FFEINTRIN_specDABS,}, ! {"DACOS", "dacos", "DACos", FFEINTRIN_genNONE, FFEINTRIN_specDACOS,}, ! {"DACOSD", "dacosd", "DACosD", FFEINTRIN_genNONE, FFEINTRIN_specDACOSD,}, /* VXT */ ! {"DASIN", "dasin", "DASin", FFEINTRIN_genNONE, FFEINTRIN_specDASIN,}, ! {"DASIND", "dasind", "DASinD", FFEINTRIN_genNONE, FFEINTRIN_specDASIND,}, /* VXT */ ! {"DATAN", "datan", "DATan", FFEINTRIN_genNONE, FFEINTRIN_specDATAN,}, ! {"DATAN2", "datan2", "DATan2", FFEINTRIN_genNONE, FFEINTRIN_specDATAN2,}, ! {"DATAN2D", "datan2d", "DATan2D", FFEINTRIN_genNONE, FFEINTRIN_specDATAN2D,}, /* VXT */ ! {"DATAND", "datand", "DATanD", FFEINTRIN_genNONE, FFEINTRIN_specDATAND,}, /* VXT */ ! {"DATE_AND_TIME", "date_and_time", "Date_and_Time", FFEINTRIN_genNONE, FFEINTRIN_specDATE_AND_TIME,}, /* F90 */ ! {"DBLE", "dble", "Dble", FFEINTRIN_genDBLE, FFEINTRIN_specDBLE,}, ! {"DBLEQ", "dbleq", "DbleQ", FFEINTRIN_genNONE, FFEINTRIN_specDBLEQ,}, /* VXT */ ! {"DCMPLX", "dcmplx", "DCmplx", FFEINTRIN_genDCMPLX, FFEINTRIN_specNONE,}, /* F2C, VXT */ ! {"DCONJG", "dconjg", "DConjg", FFEINTRIN_genNONE, FFEINTRIN_specDCONJG,}, /* F2C, VXT */ ! {"DCOS", "dcos", "DCos", FFEINTRIN_genNONE, FFEINTRIN_specDCOS,}, ! {"DCOSD", "dcosd", "DCosD", FFEINTRIN_genNONE, FFEINTRIN_specDCOSD,}, /* VXT */ ! {"DCOSH", "dcosh", "DCosH", FFEINTRIN_genNONE, FFEINTRIN_specDCOSH,}, ! {"DDIM", "ddim", "DDim", FFEINTRIN_genNONE, FFEINTRIN_specDDIM,}, ! {"DERF", "derf", "DErF", FFEINTRIN_genNONE, FFEINTRIN_specDERF,}, /* UNIX */ ! {"DERFC", "derfc", "DErFC", FFEINTRIN_genNONE, FFEINTRIN_specDERFC,}, /* UNIX */ ! {"DEXP", "dexp", "DExp", FFEINTRIN_genNONE, FFEINTRIN_specDEXP,}, ! {"DFLOAT", "dfloat", "DFloat", FFEINTRIN_genDFLOAT, FFEINTRIN_specNONE,}, /* F2C, VXT */ ! {"DFLOTI", "dfloti", "DFlotI", FFEINTRIN_genNONE, FFEINTRIN_specDFLOTI,}, /* VXT */ ! {"DFLOTJ", "dflotj", "DFlotJ", FFEINTRIN_genNONE, FFEINTRIN_specDFLOTJ,}, /* VXT */ ! {"DIGITS", "digits", "Digits", FFEINTRIN_genDIGITS, FFEINTRIN_specNONE,}, /* F90 */ ! {"DIM", "dim", "DiM", FFEINTRIN_genDIM, FFEINTRIN_specDIM,}, ! {"DIMAG", "dimag", "DImag", FFEINTRIN_genNONE, FFEINTRIN_specDIMAG,}, /* VXT */ ! {"DINT", "dint", "DInt", FFEINTRIN_genNONE, FFEINTRIN_specDINT,}, ! {"DLOG", "dlog", "DLog", FFEINTRIN_genNONE, FFEINTRIN_specDLOG,}, ! {"DLOG10", "dlog10", "DLog10", FFEINTRIN_genNONE, FFEINTRIN_specDLOG10,}, ! {"DMAX1", "dmax1", "DMax1", FFEINTRIN_genNONE, FFEINTRIN_specDMAX1,}, ! {"DMIN1", "dmin1", "DMin1", FFEINTRIN_genNONE, FFEINTRIN_specDMIN1,}, ! {"DMOD", "dmod", "DMod", FFEINTRIN_genNONE, FFEINTRIN_specDMOD,}, ! {"DNINT", "dnint", "DNInt", FFEINTRIN_genNONE, FFEINTRIN_specDNINT,}, ! {"DOT_PRODUCT", "dot_product", "Dot_Product", FFEINTRIN_genDOT_PRODUCT, FFEINTRIN_specNONE,}, /* F90 */ ! {"DPROD", "dprod", "DProd", FFEINTRIN_genDPROD, FFEINTRIN_specDPROD,}, ! {"DREAL", "dreal", "DReal", FFEINTRIN_genNONE, FFEINTRIN_specDREAL,}, /* VXT */ ! {"DSIGN", "dsign", "DSign", FFEINTRIN_genNONE, FFEINTRIN_specDSIGN,}, ! {"DSIN", "dsin", "DSin", FFEINTRIN_genNONE, FFEINTRIN_specDSIN,}, ! {"DSIND", "dsind", "DSinD", FFEINTRIN_genNONE, FFEINTRIN_specDSIND,}, /* VXT */ ! {"DSINH", "dsinh", "DSinH", FFEINTRIN_genNONE, FFEINTRIN_specDSINH,}, ! {"DSQRT", "dsqrt", "DSqRt", FFEINTRIN_genNONE, FFEINTRIN_specDSQRT,}, ! {"DTAN", "dtan", "DTan", FFEINTRIN_genNONE, FFEINTRIN_specDTAN,}, ! {"DTAND", "dtand", "DTanD", FFEINTRIN_genNONE, FFEINTRIN_specDTAND,}, /* VXT */ ! {"DTANH", "dtanh", "DTanH", FFEINTRIN_genNONE, FFEINTRIN_specDTANH,}, ! {"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,}, ! {"EXPONENT", "exponent", "Exponent", FFEINTRIN_genEXPONENT, FFEINTRIN_specNONE,}, /* F90 */ ! {"FLOAT", "float", "Float", FFEINTRIN_genFLOAT, FFEINTRIN_specFLOAT,}, ! {"FLOATI", "floati", "FloatI", FFEINTRIN_genNONE, FFEINTRIN_specFLOATI,}, /* VXT */ ! {"FLOATJ", "floatj", "FloatJ", FFEINTRIN_genNONE, FFEINTRIN_specFLOATJ,}, /* VXT */ ! {"FLOOR", "floor", "Floor", FFEINTRIN_genFLOOR, FFEINTRIN_specNONE,}, /* F90 */ ! {"FLUSH", "flush", "Flush", FFEINTRIN_genNONE, FFEINTRIN_specFLUSH,}, /* UNIX */ ! {"FPABSP", "fpabsp", "FPAbsP", FFEINTRIN_genFPABSP, FFEINTRIN_specNONE,}, /* F2C */ ! {"FPEXPN", "fpexpn", "FPExpn", FFEINTRIN_genFPEXPN, FFEINTRIN_specNONE,}, /* F2C */ ! {"FPFRAC", "fpfrac", "FPFrac", FFEINTRIN_genFPFRAC, FFEINTRIN_specNONE,}, /* F2C */ ! {"FPMAKE", "fpmake", "FPMake", FFEINTRIN_genFPMAKE, FFEINTRIN_specNONE,}, /* F2C */ ! {"FPRRSP", "fprrsp", "FPRRSp", FFEINTRIN_genFPRRSP, FFEINTRIN_specNONE,}, /* F2C */ ! {"FPSCAL", "fpscal", "FPScal", FFEINTRIN_genFPSCAL, FFEINTRIN_specNONE,}, /* F2C */ ! {"FRACTION", "fraction", "Fraction", FFEINTRIN_genFRACTION, FFEINTRIN_specNONE,}, /* F90 */ ! {"GETARG", "getarg", "GetArg", FFEINTRIN_genNONE, FFEINTRIN_specGETARG,}, /* UNIX */ ! {"GETENV", "getenv", "GetEnv", FFEINTRIN_genNONE, FFEINTRIN_specGETENV,}, /* UNIX */ ! {"HUGE", "huge", "Huge", FFEINTRIN_genHUGE, FFEINTRIN_specNONE,}, /* F90 */ ! {"IABS", "iabs", "IAbs", FFEINTRIN_genIABS, FFEINTRIN_specIABS,}, ! {"IACHAR", "iachar", "IAChar", FFEINTRIN_genIACHAR, FFEINTRIN_specNONE,}, /* F90, F2C */ ! {"IAND", "iand", "IAnd", FFEINTRIN_genIAND, FFEINTRIN_specNONE,}, /* F90, VXT */ ! {"IARGC", "iargc", "IArgC", FFEINTRIN_genNONE, FFEINTRIN_specIARGC,}, /* UNIX */ ! {"IBCLR", "ibclr", "IBClr", FFEINTRIN_genIBCLR, FFEINTRIN_specNONE,}, /* F90, VXT */ ! {"IBITS", "ibits", "IBits", FFEINTRIN_genIBITS, FFEINTRIN_specNONE,}, /* F90, VXT */ ! {"IBSET", "ibset", "IBSet", FFEINTRIN_genIBSET, FFEINTRIN_specNONE,}, /* F90, VXT */ ! {"ICHAR", "ichar", "IChar", FFEINTRIN_genICHAR, FFEINTRIN_specICHAR,}, ! {"IDIM", "idim", "IDiM", FFEINTRIN_genIDIM, FFEINTRIN_specIDIM,}, ! {"IDINT", "idint", "IDInt", FFEINTRIN_genIDINT, FFEINTRIN_specIDINT,}, ! {"IDNINT", "idnint", "IDNInt", FFEINTRIN_genIDNINT, FFEINTRIN_specIDNINT,}, ! {"IEOR", "ieor", "IEOr", FFEINTRIN_genIEOR, FFEINTRIN_specNONE,}, /* F90, VXT */ ! {"IFIX", "ifix", "IFix", FFEINTRIN_genIFIX, FFEINTRIN_specIFIX,}, ! {"IIABS", "iiabs", "IIAbs", FFEINTRIN_genNONE, FFEINTRIN_specIIABS,}, /* VXT */ ! {"IIAND", "iiand", "IIAnd", FFEINTRIN_genNONE, FFEINTRIN_specIIAND,}, /* VXT */ ! {"IIBCLR", "iibclr", "IIBClr", FFEINTRIN_genNONE, FFEINTRIN_specIIBCLR,}, /* VXT */ ! {"IIBITS", "iibits", "IIBits", FFEINTRIN_genNONE, FFEINTRIN_specIIBITS,}, /* VXT */ ! {"IIBSET", "iibset", "IIBSet", FFEINTRIN_genNONE, FFEINTRIN_specIIBSET,}, /* VXT */ ! {"IIDIM", "iidim", "IIDiM", FFEINTRIN_genNONE, FFEINTRIN_specIIDIM,}, /* VXT */ ! {"IIDINT", "iidint", "IIDint", FFEINTRIN_genNONE, FFEINTRIN_specIIDINT,}, /* VXT */ ! {"IIDNNT", "iidnnt", "IIDNnt", FFEINTRIN_genNONE, FFEINTRIN_specIIDNNT,}, /* VXT */ ! {"IIEOR", "iieor", "IIEOr", FFEINTRIN_genNONE, FFEINTRIN_specIIEOR,}, /* VXT */ ! {"IIFIX", "iifix", "IIFix", FFEINTRIN_genNONE, FFEINTRIN_specIIFIX,}, /* VXT */ ! {"IINT", "iint", "IInt", FFEINTRIN_genNONE, FFEINTRIN_specIINT,}, /* VXT */ ! {"IIOR", "iior", "IIOr", FFEINTRIN_genNONE, FFEINTRIN_specIIOR,}, /* VXT */ ! {"IIQINT", "iiqint", "IIQint", FFEINTRIN_genNONE, FFEINTRIN_specIIQINT,}, /* VXT */ ! {"IIQNNT", "iiqnnt", "IIQNnt", FFEINTRIN_genNONE, FFEINTRIN_specIIQNNT,}, /* VXT */ ! {"IISHFT", "iishft", "IIShft", FFEINTRIN_genNONE, FFEINTRIN_specNONE,}, /* VXT */ ! {"IISHFTC", "iishftc", "IIShftC", FFEINTRIN_genNONE, FFEINTRIN_specIISHFTC,}, /* VXT */ ! {"IISIGN", "iisign", "IISign", FFEINTRIN_genNONE, FFEINTRIN_specIISIGN,}, /* VXT */ ! {"IMAG", "imag", "Imag", FFEINTRIN_genIMAG, FFEINTRIN_spec_IMAG_C_F2C,}, /* F2C */ ! {"IMAX0", "imax0", "IMax0", FFEINTRIN_genNONE, FFEINTRIN_specIMAX0,}, /* VXT */ ! {"IMAX1", "imax1", "IMax1", FFEINTRIN_genNONE, FFEINTRIN_specIMAX1,}, /* VXT */ ! {"IMIN0", "imin0", "IMin0", FFEINTRIN_genNONE, FFEINTRIN_specIMIN0,}, /* VXT */ ! {"IMIN1", "imin1", "IMin1", FFEINTRIN_genNONE, FFEINTRIN_specIMIN1,}, /* VXT */ ! {"IMOD", "imod", "IMod", FFEINTRIN_genNONE, FFEINTRIN_specIMOD,}, /* VXT */ ! {"INDEX", "index", "Index", FFEINTRIN_genINDEX, FFEINTRIN_specINDEX,}, ! {"ININT", "inint", "INInt", FFEINTRIN_genNONE, FFEINTRIN_specININT,}, /* VXT */ ! {"INOT", "inot", "INot", FFEINTRIN_genNONE, FFEINTRIN_specINOT,}, /* VXT */ ! {"INT", "int", "Int", FFEINTRIN_genINT, FFEINTRIN_specINT,}, ! {"IOR", "ior", "IOr", FFEINTRIN_genIOR, FFEINTRIN_specNONE,}, /* F90, VXT */ ! {"ISHFT", "ishft", "IShft", FFEINTRIN_genISHFT, FFEINTRIN_specNONE,}, /* F90 */ ! {"ISHFTC", "ishftc", "IShftC", FFEINTRIN_genISHFTC, FFEINTRIN_specNONE,}, /* F90, VXT */ ! {"ISIGN", "isign", "ISign", FFEINTRIN_genNONE, FFEINTRIN_specISIGN,}, ! {"IZEXT", "izext", "IZExt", FFEINTRIN_genNONE, FFEINTRIN_specIZEXT,}, /* VXT */ ! {"JIABS", "jiabs", "JIAbs", FFEINTRIN_genNONE, FFEINTRIN_specJIABS,}, /* VXT */ ! {"JIAND", "jiand", "JIAnd", FFEINTRIN_genNONE, FFEINTRIN_specJIAND,}, /* VXT */ ! {"JIBCLR", "jibclr", "JIBClr", FFEINTRIN_genNONE, FFEINTRIN_specJIBCLR,}, /* VXT */ ! {"JIBITS", "jibits", "JIBits", FFEINTRIN_genNONE, FFEINTRIN_specJIBITS,}, /* VXT */ ! {"JIBSET", "jibset", "JIBSet", FFEINTRIN_genNONE, FFEINTRIN_specJIBSET,}, /* VXT */ ! {"JIDIM", "jidim", "JIDiM", FFEINTRIN_genNONE, FFEINTRIN_specJIDIM,}, /* VXT */ ! {"JIDINT", "jidint", "JIDint", FFEINTRIN_genNONE, FFEINTRIN_specJIDINT,}, /* VXT */ ! {"JIDNNT", "jidnnt", "JIDNnt", FFEINTRIN_genNONE, FFEINTRIN_specJIDNNT,}, /* VXT */ ! {"JIEOR", "jieor", "JIEOr", FFEINTRIN_genNONE, FFEINTRIN_specJIEOR,}, /* VXT */ ! {"JIFIX", "jifix", "JIFix", FFEINTRIN_genNONE, FFEINTRIN_specJIFIX,}, /* VXT */ ! {"JINT", "jint", "JInt", FFEINTRIN_genNONE, FFEINTRIN_specJINT,}, /* VXT */ ! {"JIOR", "jior", "JIOr", FFEINTRIN_genNONE, FFEINTRIN_specJIOR,}, /* VXT */ ! {"JIQINT", "jiqint", "JIQint", FFEINTRIN_genNONE, FFEINTRIN_specJIQINT,}, /* VXT */ ! {"JIQNNT", "jiqnnt", "JIQNnt", FFEINTRIN_genNONE, FFEINTRIN_specJIQNNT,}, /* VXT */ ! {"JISHFT", "jishft", "JIShft", FFEINTRIN_genNONE, FFEINTRIN_specJISHFT,}, /* VXT */ ! {"JISHFTC", "jishftc", "JIShftC", FFEINTRIN_genNONE, FFEINTRIN_specJISHFTC,}, /* VXT */ ! {"JISIGN", "jisign", "JISign", FFEINTRIN_genNONE, FFEINTRIN_specJISIGN,}, /* VXT */ ! {"JMAX0", "jmax0", "JMax0", FFEINTRIN_genNONE, FFEINTRIN_specJMAX0,}, /* VXT */ ! {"JMAX1", "jmax1", "JMax1", FFEINTRIN_genNONE, FFEINTRIN_specJMAX1,}, /* VXT */ ! {"JMIN0", "jmin0", "JMin0", FFEINTRIN_genNONE, FFEINTRIN_specJMIN0,}, /* VXT */ ! {"JMIN1", "jmin1", "JMin1", FFEINTRIN_genNONE, FFEINTRIN_specJMIN1,}, /* VXT */ ! {"JMOD", "jmod", "JMod", FFEINTRIN_genNONE, FFEINTRIN_specJMOD,}, /* VXT */ ! {"JNINT", "jnint", "JNInt", FFEINTRIN_genNONE, FFEINTRIN_specJNINT,}, /* VXT */ ! {"JNOT", "jnot", "JNot", FFEINTRIN_genNONE, FFEINTRIN_specJNOT,}, /* VXT */ ! {"JZEXT", "jzext", "JZExt", FFEINTRIN_genNONE, FFEINTRIN_specJZEXT,}, /* VXT */ ! {"KIND", "kind", "Kind", FFEINTRIN_genKIND, FFEINTRIN_specNONE,}, /* F90 */ ! {"LBOUND", "lbound", "LBound", FFEINTRIN_genLBOUND, FFEINTRIN_specNONE,}, /* F90 */ ! {"LEN", "len", "Len", FFEINTRIN_genLEN, FFEINTRIN_specLEN,}, ! {"LEN_TRIM", "len_trim", "Len_Trim", FFEINTRIN_genLEN_TRIM, FFEINTRIN_specNONE,}, /* F90 */ ! {"LGE", "lge", "LGe", FFEINTRIN_genLGE, FFEINTRIN_specLGE,}, ! {"LGT", "lgt", "LGt", FFEINTRIN_genLGT, FFEINTRIN_specLGT,}, ! {"LLE", "lle", "LLe", FFEINTRIN_genLLE, FFEINTRIN_specLLE,}, ! {"LLT", "llt", "LLt", FFEINTRIN_genLLT, FFEINTRIN_specLLT,}, ! {"LOC", "loc", "Loc", FFEINTRIN_genNONE, FFEINTRIN_specLOC,}, /* VXT */ ! {"LOG", "log", "Log", FFEINTRIN_genLOG, FFEINTRIN_specNONE,}, ! {"LOG10", "log10", "Log10", FFEINTRIN_genLOG10, FFEINTRIN_specNONE,}, ! {"LOGICAL", "logical", "Logical", FFEINTRIN_genLOGICAL, FFEINTRIN_specNONE,}, /* F90 */ ! {"LSHIFT", "lshift", "LShift", FFEINTRIN_genLSHIFT, FFEINTRIN_specNONE,}, /* F2C */ ! {"MATMUL", "matmul", "MatMul", FFEINTRIN_genMATMUL, FFEINTRIN_specNONE,}, /* F90 */ ! {"MAX", "max", "Max", FFEINTRIN_genMAX, FFEINTRIN_specNONE,}, ! {"MAX0", "max0", "Max0", FFEINTRIN_genMAX0, FFEINTRIN_specMAX0,}, ! {"MAX1", "max1", "Max1", FFEINTRIN_genMAX1, FFEINTRIN_specMAX1,}, ! {"MAXEXPONENT", "maxexponent", "MaxExponent", FFEINTRIN_genMAXEXPONENT, FFEINTRIN_specNONE,}, /* F90 */ ! {"MAXLOC", "maxloc", "MaxLoc", FFEINTRIN_genMAXLOC, FFEINTRIN_specNONE,}, /* F90 */ ! {"MAXVAL", "maxval", "MaxVal", FFEINTRIN_genMAXVAL, FFEINTRIN_specNONE,}, /* F90 */ ! {"MERGE", "merge", "Merge", FFEINTRIN_genMERGE, FFEINTRIN_specNONE,}, /* F90 */ ! {"MIN", "min", "Min", FFEINTRIN_genMIN, FFEINTRIN_specNONE,}, ! {"MIN0", "min0", "Min0", FFEINTRIN_genMIN0, FFEINTRIN_specMIN0,}, ! {"MIN1", "min1", "Min1", FFEINTRIN_genMIN1, FFEINTRIN_specMIN1,}, ! {"MINEXPONENT", "minexponent", "MinExponent", FFEINTRIN_genMINEXPONENT, FFEINTRIN_specNONE,}, /* F90 */ ! {"MINLOC", "minloc", "MinLoc", FFEINTRIN_genMINLOC, FFEINTRIN_specNONE,}, /* F90 */ ! {"MINVAL", "minval", "MinVal", FFEINTRIN_genMINVAL, FFEINTRIN_specNONE,}, /* F90 */ ! {"MOD", "mod", "Mod", FFEINTRIN_genMOD, FFEINTRIN_specMOD,}, ! {"MODULO", "modulo", "Modulo", FFEINTRIN_genMODULO, FFEINTRIN_specNONE,}, /* F90 */ ! {"MVBITS", "mvbits", "MvBits", FFEINTRIN_genMVBITS, FFEINTRIN_specNONE,}, /* F90 */ ! {"NEAREST", "nearest", "Nearest", FFEINTRIN_genNEAREST, FFEINTRIN_specNONE,}, /* F90 */ ! {"NINT", "nint", "NInt", FFEINTRIN_genNINT, FFEINTRIN_specNINT,}, ! {"NOT", "not", "Not", FFEINTRIN_genNOT, FFEINTRIN_specNONE,}, /* F2C, F90, VXT */ ! {"OR", "or", "Or", FFEINTRIN_genOR, FFEINTRIN_specNONE,}, /* F2C */ ! {"PACK", "pack", "Pack", FFEINTRIN_genPACK, FFEINTRIN_specNONE,}, /* F90 */ ! {"PRECISION", "precision", "Precision", FFEINTRIN_genPRECISION, FFEINTRIN_specNONE,}, /* F90 */ ! {"PRESENT", "present", "Present", FFEINTRIN_genPRESENT, FFEINTRIN_specNONE,}, /* F90 */ ! {"PRODUCT", "product", "Product", FFEINTRIN_genPRODUCT, FFEINTRIN_specNONE,}, /* F90 */ ! {"QABS", "qabs", "QAbs", FFEINTRIN_genNONE, FFEINTRIN_specQABS,}, /* VXT */ ! {"QACOS", "qacos", "QACos", FFEINTRIN_genNONE, FFEINTRIN_specQACOS,}, /* VXT */ ! {"QACOSD", "qacosd", "QACosD", FFEINTRIN_genNONE, FFEINTRIN_specQACOSD,}, /* VXT */ ! {"QASIN", "qasin", "QASin", FFEINTRIN_genNONE, FFEINTRIN_specQASIN,}, /* VXT */ ! {"QASIND", "qasind", "QASinD", FFEINTRIN_genNONE, FFEINTRIN_specQASIND,}, /* VXT */ ! {"QATAN", "qatan", "QATan", FFEINTRIN_genNONE, FFEINTRIN_specQATAN,}, /* VXT */ ! {"QATAN2", "qatan2", "QATan2", FFEINTRIN_genNONE, FFEINTRIN_specQATAN2,}, /* VXT */ ! {"QATAN2D", "qatan2d", "QATan2D", FFEINTRIN_genNONE, FFEINTRIN_specQATAN2D,}, /* VXT */ ! {"QATAND", "qatand", "QATanD", FFEINTRIN_genNONE, FFEINTRIN_specQATAND,}, /* VXT */ ! {"QCOS", "qcos", "QCos", FFEINTRIN_genNONE, FFEINTRIN_specQCOS,}, /* VXT */ ! {"QCOSD", "qcosd", "QCosD", FFEINTRIN_genNONE, FFEINTRIN_specQCOSD,}, /* VXT */ ! {"QCOSH", "qcosh", "QCosH", FFEINTRIN_genNONE, FFEINTRIN_specQCOSH,}, /* VXT */ ! {"QDIM", "qdim", "QDiM", FFEINTRIN_genNONE, FFEINTRIN_specQDIM,}, /* VXT */ ! {"QEXP", "qexp", "QExp", FFEINTRIN_genNONE, FFEINTRIN_specQEXP,}, /* VXT */ ! {"QEXT", "qext", "QExt", FFEINTRIN_genQEXT, FFEINTRIN_specQEXT,}, /* VXT */ ! {"QEXTD", "qextd", "QExtD", FFEINTRIN_genNONE, FFEINTRIN_specQEXTD,}, /* VXT */ ! {"QFLOAT", "qfloat", "QFloat", FFEINTRIN_genQFLOAT, FFEINTRIN_specNONE,}, /* VXT */ ! {"QINT", "qint", "QInt", FFEINTRIN_genNONE, FFEINTRIN_specQINT,}, /* VXT */ ! {"QLOG", "qlog", "QLog", FFEINTRIN_genNONE, FFEINTRIN_specQLOG,}, /* VXT */ ! {"QLOG10", "qlog10", "QLog10", FFEINTRIN_genNONE, FFEINTRIN_specQLOG10,}, /* VXT */ ! {"QMAX1", "qmax1", "QMax1", FFEINTRIN_genNONE, FFEINTRIN_specQMAX1,}, /* VXT */ ! {"QMIN1", "qmin1", "QMin1", FFEINTRIN_genNONE, FFEINTRIN_specQMIN1,}, /* VXT */ ! {"QMOD", "qmod", "QMod", FFEINTRIN_genNONE, FFEINTRIN_specQMOD,}, /* VXT */ ! {"QNINT", "qnint", "QNInt", FFEINTRIN_genNONE, FFEINTRIN_specQNINT,}, /* VXT */ ! {"QSIN", "qsin", "QSin", FFEINTRIN_genNONE, FFEINTRIN_specQSIN,}, /* VXT */ ! {"QSIND", "qsind", "QSinD", FFEINTRIN_genNONE, FFEINTRIN_specQSIND,}, /* VXT */ ! {"QSINH", "qsinh", "QSinH", FFEINTRIN_genNONE, FFEINTRIN_specQSINH,}, /* VXT */ ! {"QSQRT", "qsqrt", "QSqRt", FFEINTRIN_genNONE, FFEINTRIN_specQSQRT,}, /* VXT */ ! {"QTAN", "qtan", "QTan", FFEINTRIN_genNONE, FFEINTRIN_specQTAN,}, /* VXT */ ! {"QTAND", "qtand", "QTanD", FFEINTRIN_genNONE, FFEINTRIN_specQTAND,}, /* VXT */ ! {"QTANH", "qtanh", "QTanH", FFEINTRIN_genNONE, FFEINTRIN_specQTANH,}, /* VXT */ ! {"RADIX", "radix", "Radix", FFEINTRIN_genRADIX, FFEINTRIN_specNONE,}, /* F90 */ ! {"RANDOM_NUMBER", "random_number", "Random_Number", FFEINTRIN_genNONE, FFEINTRIN_specRANDOM_NUMBER,}, /* F90 */ ! {"RANDOM_SEED", "random_seed", "Random_Seed", FFEINTRIN_genNONE, FFEINTRIN_specRANDOM_SEED,}, /* F90 */ ! {"RANGE", "range", "Range", FFEINTRIN_genRANGE, FFEINTRIN_specNONE,}, /* F90 */ ! {"REAL", "real", "Real", FFEINTRIN_genREAL, FFEINTRIN_specREAL,}, ! {"REPEAT", "repeat", "Repeat", FFEINTRIN_genREPEAT, FFEINTRIN_specNONE,}, /* F90 */ ! {"RESHAPE", "reshape", "Reshape", FFEINTRIN_genRESHAPE, FFEINTRIN_specNONE,}, /* F90 */ ! {"RRSPACING", "rrspacing", "RRSpacing", FFEINTRIN_genRRSPACING, FFEINTRIN_specNONE,}, /* F90 */ ! {"RSHIFT", "rshift", "RShift", FFEINTRIN_genRSHIFT, FFEINTRIN_specNONE,}, /* F2C */ ! {"SCALE", "scale", "Scale", FFEINTRIN_genSCALE, FFEINTRIN_specNONE,}, /* F90 */ ! {"SCAN", "scan", "Scan", FFEINTRIN_genSCAN, FFEINTRIN_specNONE,}, /* F90 */ ! {"SELECTED_INT_KIND", "selected_int_kind", "Selected_Int_Kind", FFEINTRIN_genSEL_INT_KIND, FFEINTRIN_specNONE,}, /* F90 */ ! {"SELECTED_REAL_KIND", "selected_real_kind", "Selected_Real_Kind", FFEINTRIN_genSEL_REAL_KIND, FFEINTRIN_specNONE,}, /* F90 */ ! {"SET_EXPONENT", "set_exponent", "Set_Exponent", FFEINTRIN_genSET_EXPONENT, FFEINTRIN_specNONE,}, /* F90 */ ! {"SHAPE", "shape", "Shape", FFEINTRIN_genSHAPE, FFEINTRIN_specNONE,}, /* F90 */ ! {"SIGN", "sign", "Sign", FFEINTRIN_genSIGN, FFEINTRIN_specSIGN,}, ! {"SIGNAL", "signal", "Signal", FFEINTRIN_genNONE, FFEINTRIN_specSIGNAL,}, /* UNIX */ ! {"SIN", "sin", "Sin", FFEINTRIN_genSIN, FFEINTRIN_specSIN,}, ! {"SIND", "sind", "SinD", FFEINTRIN_genSIND, FFEINTRIN_specSIND,}, /* VXT */ ! {"SINH", "sinh", "SinH", FFEINTRIN_genSINH, FFEINTRIN_specSINH,}, ! {"SNGL", "sngl", "Sngl", FFEINTRIN_genNONE, FFEINTRIN_specSNGL,}, ! {"SNGLQ", "snglq", "SnglQ", FFEINTRIN_genNONE, FFEINTRIN_specSNGLQ,}, /* VXT */ ! {"SPACING", "spacing", "Spacing", FFEINTRIN_genSPACING, FFEINTRIN_specNONE,}, /* F90 */ ! {"SPREAD", "spread", "Spread", FFEINTRIN_genSPREAD, FFEINTRIN_specNONE,}, /* F90 */ ! {"SQRT", "sqrt", "SqRt", FFEINTRIN_genSQRT, FFEINTRIN_specSQRT,}, ! {"SUM", "sum", "Sum", FFEINTRIN_genSUM, FFEINTRIN_specNONE,}, /* F90 */ ! {"SYSTEM", "system", "System", FFEINTRIN_genNONE, FFEINTRIN_specSYSTEM,}, /* UNIX */ ! {"SYSTEM_CLOCK", "system_clock", "System_Clock", FFEINTRIN_genNONE, FFEINTRIN_specSYSTEM_CLOCK,}, /* F90 */ ! {"TAN", "tan", "Tan", FFEINTRIN_genTAN, FFEINTRIN_specTAN,}, ! {"TAND", "tand", "TanD", FFEINTRIN_genTAND, FFEINTRIN_specTAND,}, /* VXT */ ! {"TANH", "tanh", "TanH", FFEINTRIN_genTANH, FFEINTRIN_specTANH,}, ! {"TINY", "tiny", "Tiny", FFEINTRIN_genTINY, FFEINTRIN_specNONE,}, /* F90 */ ! {"TRANSFER", "transfer", "Transfer", FFEINTRIN_genTRANSFER, FFEINTRIN_specNONE,}, /* F90 */ ! {"TRANSPOSE", "transpose", "Transpose", FFEINTRIN_genTRANSPOSE, FFEINTRIN_specNONE,}, /* F90 */ ! {"TRIM", "trim", "Trim", FFEINTRIN_genTRIM, FFEINTRIN_specNONE,}, /* F90 */ ! {"UBOUND", "ubound", "UBound", FFEINTRIN_genUBOUND, FFEINTRIN_specNONE,}, /* F90 */ ! {"UNPACK", "unpack", "Unpack", FFEINTRIN_genUNPACK, FFEINTRIN_specNONE,}, /* F90 */ ! {"VERIFY", "verify", "Verify", FFEINTRIN_genVERIFY, FFEINTRIN_specNONE,}, /* F90 */ ! {"XOR", "xor", "XOr", FFEINTRIN_genXOR, FFEINTRIN_specNONE,}, /* F2C */ ! {"ZABS", "zabs", "ZAbs", FFEINTRIN_genNONE, FFEINTRIN_specZABS,}, /* F2C */ ! {"ZCOS", "zcos", "ZCos", FFEINTRIN_genNONE, FFEINTRIN_specZCOS,}, /* F2C */ ! {"ZEXP", "zexp", "ZExp", FFEINTRIN_genNONE, FFEINTRIN_specZEXP,}, /* F2C */ ! {"ZEXT", "zext", "ZExt", FFEINTRIN_genZEXT, FFEINTRIN_specZEXT,}, /* VXT */ ! {"ZLOG", "zlog", "ZLog", FFEINTRIN_genNONE, FFEINTRIN_specZLOG,}, /* F2C */ ! {"ZSIN", "zsin", "ZSin", FFEINTRIN_genNONE, FFEINTRIN_specZSIN,}, /* F2C */ ! {"ZSQRT", "zsqrt", "ZSqRt", FFEINTRIN_genNONE, FFEINTRIN_specZSQRT,}, /* F2C */ }; --- 59,93 ---- { char *name; /* Name of implementation. */ + ffeintrinImp cg_imp; /* Unique code-generation code. */ #if FFECOM_targetCURRENT == FFECOM_targetGCC ffecomGfrt gfrt; /* gfrt index in library. */ #endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */ ! char *control; }; ! static ffebad ffeintrin_check_ (ffeintrinImp imp, ffebldOp op, ! ffebld args, ffeinfoBasictype *xbt, ! ffeinfoKindtype *xkt, ! ffetargetCharacterSize *xsz, ! ffelexToken t, ! bool commit); static bool ffeintrin_check_any_ (ffebld arglist); static int ffeintrin_cmp_name_ (const void *name, const void *intrinsic); static struct _ffeintrin_name_ ffeintrin_names_[] = { /* Alpha order. */ ! #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) \ ! { UPPER, LOWER, MIXED, FFEINTRIN_ ## GEN, FFEINTRIN_ ## SPEC }, ! #define DEFGEN(CODE,NAME,SPEC1,SPEC2) ! #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) ! #define DEFIMP(CODE,NAME,GFRT,CONTROL) ! #define DEFIMQ(CODE,NAME,GFRT,CONTROL,CGIMP) ! #include "intrin.def" ! #undef DEFNAME ! #undef DEFGEN ! #undef DEFSPEC ! #undef DEFIMP ! #undef DEFIMQ }; *************** static struct _ffeintrin_gen_ ffeintrin_ *** 439,452 **** = { ! #define DEFGEN(CODE,NAME,SPEC1,SPEC2,SPEC3,SPEC4,SPEC5,SPEC6, \ ! SPEC7,SPEC8,SPEC9,SPEC10,SPEC11,SPEC12,SPEC13,SPEC14) \ ! { NAME, { SPEC1, SPEC2, SPEC3, SPEC4, SPEC5, SPEC6, \ ! SPEC7, SPEC8, SPEC9, SPEC10, SPEC11, SPEC12, SPEC13, SPEC14, }, }, ! #define DEFIMP(CODE,NAME,GFRT,RETURNS,EXPECTS) #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) #include "intrin.def" #undef DEFGEN - #undef DEFIMP #undef DEFSPEC }; --- 95,110 ---- = { ! #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) ! #define DEFGEN(CODE,NAME,SPEC1,SPEC2) \ ! { NAME, { SPEC1, SPEC2, }, }, #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) + #define DEFIMP(CODE,NAME,GFRT,CONTROL) + #define DEFIMQ(CODE,NAME,GFRT,CONTROL,CGIMP) #include "intrin.def" + #undef DEFNAME #undef DEFGEN #undef DEFSPEC + #undef DEFIMP + #undef DEFIMQ }; *************** static struct _ffeintrin_imp_ ffeintrin_ *** 454,473 **** = { ! #define DEFGEN(CODE,NAME,SPEC1,SPEC2,SPEC3,SPEC4,SPEC5,SPEC6, \ ! SPEC7,SPEC8,SPEC9,SPEC10,SPEC11,SPEC12,SPEC13,SPEC14) #if FFECOM_targetCURRENT == FFECOM_targetGCC ! #define DEFIMP(CODE,NAME,GFRT,RETURNS,EXPECTS) \ ! { NAME, GFRT, RETURNS, EXPECTS }, #elif FFECOM_targetCURRENT == FFECOM_targetFFE ! #define DEFIMP(CODE,NAME,GFRT,RETURNS,EXPECTS) \ ! { NAME, RETURNS, EXPECTS }, #else #error #endif - #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) #include "intrin.def" #undef DEFGEN - #undef DEFIMP #undef DEFSPEC }; --- 112,137 ---- = { ! #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) ! #define DEFGEN(CODE,NAME,SPEC1,SPEC2) ! #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) #if FFECOM_targetCURRENT == FFECOM_targetGCC ! #define DEFIMP(CODE,NAME,GFRT,CONTROL) \ ! { NAME, FFEINTRIN_imp ## CODE, FFECOM_gfrt ## GFRT, CONTROL }, ! #define DEFIMQ(CODE,NAME,GFRT,CONTROL,CGIMP) \ ! { NAME, FFEINTRIN_imp ## CGIMP, FFECOM_gfrt ## GFRT, CONTROL }, #elif FFECOM_targetCURRENT == FFECOM_targetFFE ! #define DEFIMP(CODE,NAME,GFRT,CONTROL) \ ! { NAME, CODE, CONTROL }, ! #define DEFIMQ(CODE,NAME,GFRT,CONTROL,CGIMP) \ ! { NAME, CGIMP, CONTROL }, #else #error #endif #include "intrin.def" + #undef DEFNAME #undef DEFGEN #undef DEFSPEC + #undef DEFIMP + #undef DEFIMQ }; *************** static struct _ffeintrin_spec_ ffeintrin *** 475,1606 **** = { ! #define DEFGEN(CODE,NAME,SPEC1,SPEC2,SPEC3,SPEC4,SPEC5,SPEC6, \ ! SPEC7,SPEC8,SPEC9,SPEC10,SPEC11,SPEC12,SPEC13,SPEC14) ! #define DEFIMP(CODE,NAME,GFRT,RETURNS,EXPECTS) #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) \ { NAME, CALLABLE, FAMILY, IMP, }, #include "intrin.def" #undef DEFGEN - #undef DEFIMP #undef DEFSPEC }; static ffebad ! ffeintrin_check_0_ (ffebld arglist) ! { ! if (arglist != NULL) ! return FFEBAD_INTRINSIC_TOOMANY; ! ! return FFEBAD; ! } ! ! static ffebad ! ffeintrin_check_1_ (ffebld arglist, ffebld *xarg1) ! { ! ffebld arg1; ! ! arg1 = arglist; ! if (arg1 == NULL) ! return FFEBAD_INTRINSIC_TOOFEW; ! ! if (ffebld_trail (arg1) != NULL) ! return FFEBAD_INTRINSIC_TOOMANY; ! ! if ((arg1 = ffebld_head (arg1)) == NULL) ! return FFEBAD_INTRINSIC_REF; ! ! *xarg1 = arg1; ! return FFEBAD; ! } ! ! static ffebad ! ffeintrin_check_1or2_ (ffebld arglist, ffebld *xarg1, ffebld *xarg2) ! { ! ffebld arg1; ! ffebld arg2; ! ! arg1 = arglist; ! if (arg1 == NULL) ! return FFEBAD_INTRINSIC_TOOFEW; ! ! arg2 = ffebld_trail (arg1); ! if ((arg2 != NULL) ! && (ffebld_trail (arg2) != NULL)) ! return FFEBAD_INTRINSIC_TOOMANY; ! ! if (((arg1 = ffebld_head (arg1)) == NULL) ! || ((arg2 != NULL) ! && ((arg2 = ffebld_head (arg2)) == NULL))) ! return FFEBAD_INTRINSIC_REF; ! ! *xarg1 = arg1; ! *xarg2 = arg2; ! return FFEBAD; ! } ! ! static ffebad ! ffeintrin_check_2_ (ffebld arglist, ffebld *xarg1, ffebld *xarg2) ! { ! ffebld arg1; ! ffebld arg2; ! ! arg1 = arglist; ! if (arg1 == NULL) ! return FFEBAD_INTRINSIC_TOOFEW; ! ! arg2 = ffebld_trail (arg1); ! if (arg2 == NULL) ! return FFEBAD_INTRINSIC_TOOFEW; ! ! if (ffebld_trail (arg2) != NULL) ! return FFEBAD_INTRINSIC_TOOMANY; ! ! if (((arg1 = ffebld_head (arg1)) == NULL) ! || ((arg2 = ffebld_head (arg2)) == NULL)) ! return FFEBAD_INTRINSIC_REF; ! ! *xarg1 = arg1; ! *xarg2 = arg2; ! return FFEBAD; ! } ! ! static ffebad ! ffeintrin_check_2or3_ (ffebld arglist, ffebld *xarg1, ffebld *xarg2, ! ffebld *xarg3) ! { ! ffebld arg1; ! ffebld arg2; ! ffebld arg3; ! ! arg1 = arglist; ! if (arg1 == NULL) ! return FFEBAD_INTRINSIC_TOOFEW; ! ! arg2 = ffebld_trail (arg1); ! if (arg2 == NULL) ! return FFEBAD_INTRINSIC_TOOFEW; ! ! arg3 = ffebld_trail (arg2); ! if ((arg3 != NULL) ! && (ffebld_trail (arg3) != NULL)) ! return FFEBAD_INTRINSIC_TOOMANY; ! ! if (((arg1 = ffebld_head (arg1)) == NULL) ! || ((arg2 = ffebld_head (arg2)) == NULL) ! || ((arg3 != NULL) ! && ((arg3 = ffebld_head (arg3)) == NULL))) ! return FFEBAD_INTRINSIC_REF; ! ! *xarg1 = arg1; ! *xarg2 = arg2; ! *xarg3 = arg3; ! return FFEBAD; ! } ! ! static ffebad ! ffeintrin_check_3_ (ffebld arglist, ffebld *xarg1, ffebld *xarg2, ! ffebld *xarg3) ! { ! ffebld arg1; ! ffebld arg2; ! ffebld arg3; ! ! arg1 = arglist; ! if (arg1 == NULL) ! return FFEBAD_INTRINSIC_TOOFEW; ! ! arg2 = ffebld_trail (arg1); ! if (arg2 == NULL) ! return FFEBAD_INTRINSIC_TOOFEW; ! ! arg3 = ffebld_trail (arg2); ! if (arg3 == NULL) ! return FFEBAD_INTRINSIC_TOOFEW; ! ! if (ffebld_trail (arg3) != NULL) ! return FFEBAD_INTRINSIC_TOOMANY; ! ! if (((arg1 = ffebld_head (arg1)) == NULL) ! || ((arg2 = ffebld_head (arg2)) == NULL) ! || ((arg3 = ffebld_head (arg3)) == NULL)) ! return FFEBAD_INTRINSIC_REF; ! ! *xarg1 = arg1; ! *xarg2 = arg2; ! *xarg3 = arg3; ! return FFEBAD; ! } ! ! static ffebad ! ffeintrin_check_5_ (ffebld arglist, ffebld *xarg1, ffebld *xarg2, ! ffebld *xarg3, ffebld *xarg4, ffebld *xarg5) ! { ! ffebld arg1; ! ffebld arg2; ! ffebld arg3; ! ffebld arg4; ! ffebld arg5; ! ! arg1 = arglist; ! if (arg1 == NULL) ! return FFEBAD_INTRINSIC_TOOFEW; ! ! arg2 = ffebld_trail (arg1); ! if (arg2 == NULL) ! return FFEBAD_INTRINSIC_TOOFEW; ! ! arg3 = ffebld_trail (arg2); ! if (arg3 == NULL) ! return FFEBAD_INTRINSIC_TOOFEW; ! ! arg4 = ffebld_trail (arg3); ! if (arg4 == NULL) ! return FFEBAD_INTRINSIC_TOOFEW; ! ! arg5 = ffebld_trail (arg4); ! if (arg5 == NULL) ! return FFEBAD_INTRINSIC_TOOFEW; ! ! if (ffebld_trail (arg5) != NULL) ! return FFEBAD_INTRINSIC_TOOMANY; ! if (((arg1 = ffebld_head (arg1)) == NULL) ! || ((arg2 = ffebld_head (arg2)) == NULL) ! || ((arg3 = ffebld_head (arg3)) == NULL) ! || ((arg4 = ffebld_head (arg4)) == NULL) ! || ((arg5 = ffebld_head (arg5)) == NULL)) ! return FFEBAD_INTRINSIC_REF; ! *xarg1 = arg1; ! *xarg2 = arg2; ! *xarg3 = arg3; ! *xarg4 = arg4; ! *xarg5 = arg5; ! return FFEBAD; ! } ! ! static bool ! ffeintrin_check_any_ (ffebld arglist) ! { ! ffebld item; ! ! for (; arglist != NULL; arglist = ffebld_trail (arglist)) { ! item = ffebld_head (arglist); ! if ((item != NULL) ! && (ffebld_op (item) == FFEBLD_opANY)) ! return TRUE; } ! ! return FALSE; ! } ! ! static ffebad ! ffeintrin_check_char_1_ (ffebld arglist) ! { ! ffebld arg1; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_1_ (arglist, &arg1); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeCHARACTER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeCHARACTERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_char_2_ (ffebld arglist) ! { ! ffebld arg1; ! ffebld arg2; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_2_ (arglist, &arg1, &arg2); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeCHARACTER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeCHARACTERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! info = ffebld_info (arg2); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeCHARACTER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeCHARACTERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_cmplx_1_ (ffebld arglist) ! { ! ffebld arg1; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_1_ (arglist, &arg1); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeCOMPLEX) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeREALDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_cmplx_1or2_ (ffebld arglist) ! { ! ffebld arg1; ! ffebld arg2; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_1or2_ (arglist, &arg1, &arg2); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeCOMPLEX) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeREALDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! if (arg2 == NULL) ! return FFEBAD; /* Ok. */ ! info = ffebld_info (arg2); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeCOMPLEX) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeREALDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_dcmplx_1_ (ffebld arglist) ! { ! ffebld arg1; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_1_ (arglist, &arg1); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeCOMPLEX) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeREALDOUBLE) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_dcmplx_1or2_ (ffebld arglist) ! { ! ffebld arg1; ! ffebld arg2; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_1or2_ (arglist, &arg1, &arg2); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeCOMPLEX) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeREALDOUBLE) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! if (arg2 == NULL) ! return FFEBAD; /* Ok. */ ! info = ffebld_info (arg2); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeCOMPLEX) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeREALDOUBLE) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_getarg_ (ffebld arglist) ! { ! ffebld arg1; ! ffebld arg2; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_2_ (arglist, &arg1, &arg2); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! info = ffebld_info (arg2); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeCHARACTER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeCHARACTERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY) ! || ((ffebld_op (arg2) != FFEBLD_opSYMTER) ! && (ffebld_op (arg2) != FFEBLD_opARRAYREF) ! && (ffebld_op (arg2) != FFEBLD_opSUBSTR))) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_getenv_ (ffebld arglist) ! { ! ffebld arg1; ! ffebld arg2; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_2_ (arglist, &arg1, &arg2); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeCHARACTER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeCHARACTERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! info = ffebld_info (arg2); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeCHARACTER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeCHARACTERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY) ! || ((ffebld_op (arg2) != FFEBLD_opSYMTER) ! && (ffebld_op (arg2) != FFEBLD_opARRAYREF) ! && (ffebld_op (arg2) != FFEBLD_opSUBSTR))) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_int_1_o_ (ffebld arglist) ! { ! ffebld arg1; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_0_ (arglist); ! if (bad == FFEBAD) ! return bad; ! ! bad = ffeintrin_check_1_ (arglist, &arg1); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_int_1_ (ffebld arglist) ! { ! ffebld arg1; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_1_ (arglist, &arg1); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_int_1or2_ (ffebld arglist) ! { ! ffebld arg1; ! ffebld arg2; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_1or2_ (arglist, &arg1, &arg2); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! if (arg2 == NULL) ! return FFEBAD; /* Ok. */ ! info = ffebld_info (arg2); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_int_2_ (ffebld arglist) ! { ! ffebld arg1; ! ffebld arg2; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_2_ (arglist, &arg1, &arg2); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! info = ffebld_info (arg2); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_int_2p_ (ffebld arglist) ! { ! ffebld arg; ! ffebldListLength length = 0; ! ffeinfo info; ! for (; arglist != NULL; ++length, arglist = ffebld_trail (arglist)) ! { ! if ((arg = ffebld_head (arglist)) == NULL) ! return FFEBAD_INTRINSIC_REF; ! info = ffebld_info (arg); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; } ! if (length < 2) ! return FFEBAD_INTRINSIC_TOOFEW; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_int_3_ (ffebld arglist) ! { ! ffebld arg1; ! ffebld arg2; ! ffebld arg3; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_3_ (arglist, &arg1, &arg2, &arg3); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! info = ffebld_info (arg2); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! info = ffebld_info (arg3); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_loc_ (ffebld arglist) ! { ! ffebld arg1; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_1_ (arglist, &arg1); ! if (bad != FFEBAD) ! return bad; ! ! /* See also ffeexpr_finished_, case FFEEXPR_contextLOC_. */ ! info = ffebld_info (arg1); ! if ((ffeinfo_kind (info) != FFEINFO_kindENTITY) ! || ((ffebld_op (arg1) != FFEBLD_opSYMTER) ! && (ffebld_op (arg1) != FFEBLD_opSUBSTR) ! && (ffebld_op (arg1) != FFEBLD_opARRAYREF))) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_log_1_ (ffebld arglist) ! { ! ffebld arg1; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_1_ (arglist, &arg1); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeLOGICAL) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeLOGICALDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! #if 0 ! static ffebad ! ffeintrin_check_log_1or2_ (ffebld arglist) ! { ! ffebld arg1; ! ffebld arg2; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_1or2_ (arglist, &arg1, &arg2); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeLOGICAL) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeLOGICALDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! if (arg2 == NULL) ! return FFEBAD; /* Ok. */ ! info = ffebld_info (arg2); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeLOGICAL) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeLOGICALDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! #endif ! static ffebad ! ffeintrin_check_log_2_ (ffebld arglist) ! { ! ffebld arg1; ! ffebld arg2; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_2_ (arglist, &arg1, &arg2); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeLOGICAL) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeLOGICALDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! info = ffebld_info (arg2); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeLOGICAL) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeLOGICALDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! #if 0 ! static ffebad ! ffeintrin_check_log_2p_ (ffebld arglist) ! { ! ffebld arg; ! ffebldListLength length = 0; ! ffeinfo info; ! for (; arglist != NULL; ++length, arglist = ffebld_trail (arglist)) ! { ! if ((arg = ffebld_head (arglist)) == NULL) ! return FFEBAD_INTRINSIC_REF; ! info = ffebld_info (arg); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeLOGICAL) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeLOGICALDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) return FFEBAD_INTRINSIC_REF; } ! if (length < 2) ! return FFEBAD_INTRINSIC_TOOFEW; ! ! return FFEBAD; /* Ok. */ ! } ! ! #endif ! static ffebad ! ffeintrin_check_mvbits_ (ffebld arglist) ! { ! ffebld arg1; ! ffebld arg2; ! ffebld arg3; ! ffebld arg4; ! ffebld arg5; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_5_ (arglist, &arg1, &arg2, &arg3, &arg4, &arg5); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! ! info = ffebld_info (arg2); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! ! info = ffebld_info (arg3); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! ! info = ffebld_info (arg4); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY) ! || ((ffebld_op (arg4) != FFEBLD_opSYMTER) ! && (ffebld_op (arg4) != FFEBLD_opARRAYREF))) ! return FFEBAD_INTRINSIC_REF; ! ! info = ffebld_info (arg5); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! ! return FFEBAD; /* Ok. */ ! } ! ! static ffebad ! ffeintrin_check_procedure_ (ffeintrinImp imp, ffebldOp op) ! { ! bool subr = (ffeintrin_imps_[imp].basictype == FFEINFO_basictypeNONE); ! ! if ((op == FFEBLD_opSUBRREF) && !subr) ! return FFEBAD_INTRINSIC_IS_FUNC; ! if ((op == FFEBLD_opFUNCREF) && subr) ! return FFEBAD_INTRINSIC_IS_SUBR; ! ! return FFEBAD; ! } ! static ffebad ! ffeintrin_check_real_1_ (ffebld arglist) ! { ! ffebld arg1; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_1_ (arglist, &arg1); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeREAL) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeREALDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_real_1or2_ (ffebld arglist) ! { ! ffebld arg1; ! ffebld arg2; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_1or2_ (arglist, &arg1, &arg2); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeREAL) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeREALDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! if (arg2 == NULL) ! return FFEBAD; /* Ok. */ ! info = ffebld_info (arg2); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeREAL) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeREALDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_real_2_ (ffebld arglist) ! { ! ffebld arg1; ! ffebld arg2; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_2_ (arglist, &arg1, &arg2); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeREAL) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeREALDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! info = ffebld_info (arg2); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeREAL) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeREALDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_real_2p_ (ffebld arglist) ! { ! ffebld arg; ! ffebldListLength length = 0; ! ffeinfo info; ! for (; arglist != NULL; ++length, arglist = ffebld_trail (arglist)) ! { ! if ((arg = ffebld_head (arglist)) == NULL) ! return FFEBAD_INTRINSIC_REF; ! info = ffebld_info (arg); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeREAL) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeREALDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! } ! if (length < 2) ! return FFEBAD_INTRINSIC_TOOFEW; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_realdbl_1_ (ffebld arglist) ! { ! ffebld arg1; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_1_ (arglist, &arg1); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeREAL) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeREALDOUBLE) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_realdbl_1or2_ (ffebld arglist) ! { ! ffebld arg1; ! ffebld arg2; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_1or2_ (arglist, &arg1, &arg2); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeREAL) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeREALDOUBLE) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! if (arg2 == NULL) ! return FFEBAD; /* Ok. */ ! info = ffebld_info (arg2); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeREAL) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeREALDOUBLE) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_realdbl_2_ (ffebld arglist) ! { ! ffebld arg1; ! ffebld arg2; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_2_ (arglist, &arg1, &arg2); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeREAL) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeREALDOUBLE) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! info = ffebld_info (arg2); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeREAL) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeREALDOUBLE) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_realdbl_2p_ (ffebld arglist) ! { ! ffebld arg; ! ffebldListLength length = 0; ! ffeinfo info; ! for (; arglist != NULL; ++length, arglist = ffebld_trail (arglist)) ! { ! if ((arg = ffebld_head (arglist)) == NULL) ! return FFEBAD_INTRINSIC_REF; ! info = ffebld_info (arg); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeREAL) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeREALDOUBLE) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! } ! if (length < 2) ! return FFEBAD_INTRINSIC_TOOFEW; ! return FFEBAD; /* Ok. */ ! } ! static ffebad ! ffeintrin_check_signal_ (ffebld arglist) ! { ! ffebld arg1; ! ffebld arg2; ! ffebld arg3; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_2or3_ (arglist, &arg1, &arg2, &arg3); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! /* Second arg is either a dummy/external subroutine or an integer ! (for SIG_DFL, SIG_IGN, SIG_ERR). */ ! info = ffebld_info (arg2); ! if (((((ffeinfo_basictype (info) != FFEINFO_basictypeNONE) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeNONE) ! || (ffeinfo_kind (info) != FFEINFO_kindSUBROUTINE)) ! && ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_kind (info) != FFEINFO_kindFUNCTION)) ! && (ffeinfo_kind (info) != FFEINFO_kindNONE)) /* Procedure. */ ! || (ffeinfo_rank (info) != 0) ! || ((ffeinfo_where (info) != FFEINFO_whereDUMMY) ! && (ffeinfo_where (info) != FFEINFO_whereGLOBAL))) ! && ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY))) ! return FFEBAD_INTRINSIC_REF; ! /* Third arg, if present, is a place to put the returned value. */ ! if (arg3 != NULL) ! { ! info = ffebld_info (arg3); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY) ! || ((ffebld_op (arg3) != FFEBLD_opSYMTER) ! && (ffebld_op (arg3) != FFEBLD_opARRAYREF))) ! return FFEBAD_INTRINSIC_REF; } ! return FFEBAD; /* Ok. */ } ! static ffebad ! ffeintrin_check_system_ (ffebld arglist) { ! ffebld arg1; ! ffebld arg2; ! ffeinfo info; ! ffebad bad; ! ! bad = ffeintrin_check_1or2_ (arglist, &arg1, &arg2); ! if (bad != FFEBAD) ! return bad; ! ! info = ffebld_info (arg1); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeCHARACTER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeCHARACTERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY)) ! return FFEBAD_INTRINSIC_REF; ! ! /* Second arg, if present, is a place to put the returned value. */ ! if (arg2 != NULL) { ! info = ffebld_info (arg2); ! if ((ffeinfo_basictype (info) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_rank (info) != 0) ! || (ffeinfo_kind (info) != FFEINFO_kindENTITY) ! || ((ffebld_op (arg2) != FFEBLD_opSYMTER) ! && (ffebld_op (arg2) != FFEBLD_opARRAYREF))) ! return FFEBAD_INTRINSIC_REF; } ! return FFEBAD; /* Ok. */ ! } ! ! static ffebad ! ffeintrin_check_void_ (ffebld arglist UNUSED) ! { ! return FFEBAD; /* Ok. */ } --- 139,969 ---- = { ! #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) ! #define DEFGEN(CODE,NAME,SPEC1,SPEC2) #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) \ { NAME, CALLABLE, FAMILY, IMP, }, + #define DEFIMP(CODE,NAME,GFRT,CONTROL) + #define DEFIMQ(CODE,NAME,GFRT,CONTROL,CGIMP) #include "intrin.def" #undef DEFGEN #undef DEFSPEC + #undef DEFIMP + #undef DEFIMQ }; static ffebad ! ffeintrin_check_ (ffeintrinImp imp, ffebldOp op, ! ffebld args, ffeinfoBasictype *xbt, ! ffeinfoKindtype *xkt, ! ffetargetCharacterSize *xsz, ! ffelexToken t, ! bool commit) ! { ! char *c = ffeintrin_imps_[imp].control; ! bool subr = (c[0] == '-'); ! char *argc; ! ffebld arg; ! ffeinfoBasictype bt; ! ffeinfoKindtype kt; ! ffetargetCharacterSize sz = FFETARGET_charactersizeNONE; ! ffeinfoKindtype firstarg_kt; ! bool need_col; ! ffeinfoBasictype col_bt = FFEINFO_basictypeNONE; ! ffeinfoKindtype col_kt = FFEINFO_kindtypeNONE; ! /* Check procedure type (function vs. subroutine) against ! invocation. */ ! if (op == FFEBLD_opSUBRREF) { ! if (!subr) ! return FFEBAD_INTRINSIC_IS_FUNC; } ! else if (op == FFEBLD_opFUNCREF) ! { ! if (subr) ! return FFEBAD_INTRINSIC_IS_SUBR; ! } ! else return FFEBAD_INTRINSIC_REF; ! /* Check the arglist for validity. */ ! if ((args != NULL) ! && (ffebld_head (args) != NULL)) ! firstarg_kt = ffeinfo_kindtype (ffebld_info (ffebld_head (args))); ! else ! firstarg_kt = FFEINFO_kindtype; ! for (argc = &c[5], ! arg = args; ! *argc != '\0'; ! ) ! { ! char optional = '\0'; ! char required = '\0'; ! char extra = '\0'; ! char basic; ! char kind; ! bool lastarg_complex = FALSE; ! /* We don't do anything with keywords yet. */ ! do ! { ! } while (*(++argc) != '='); ! ++argc; ! if ((*argc == '?') ! || (*argc == '!') ! || (*argc == '*')) ! optional = *(argc++); ! if ((*argc == '+') ! || (*argc == 'n') ! || (*argc == 'p')) ! required = *(argc++); ! basic = *(argc++); ! kind = *(argc++); ! if ((*argc == '&') ! || (*argc == 'w') ! || (*argc == 'x')) ! extra = *(argc++); ! if (*argc == ',') ! ++argc; ! /* Break out of this loop only when current arg spec completely ! processed. */ ! do ! { ! bool okay; ! ffebld a; ! ffeinfo i; ! bool anynum; ! ffeinfoBasictype abt = FFEINFO_basictypeNONE; ! ffeinfoKindtype akt = FFEINFO_kindtypeNONE; ! if ((arg == NULL) ! || (ffebld_head (arg) == NULL)) ! { ! if (required != '\0') ! return FFEBAD_INTRINSIC_TOOFEW; ! if (optional == '\0') ! return FFEBAD_INTRINSIC_TOOFEW; ! if (arg != NULL) ! arg = ffebld_trail (arg); ! break; /* Try next argspec. */ ! } ! a = ffebld_head (arg); ! i = ffebld_info (a); ! anynum = (ffeinfo_basictype (i) == FFEINFO_basictypeHOLLERITH) ! || (ffeinfo_basictype (i) == FFEINFO_basictypeTYPELESS); ! /* See how well the arg matches up to the spec. */ ! switch (basic) ! { ! case 'A': ! okay = ffeinfo_basictype (i) == FFEINFO_basictypeCHARACTER; ! break; ! case 'C': ! okay = anynum ! || (ffeinfo_basictype (i) == FFEINFO_basictypeCOMPLEX); ! abt = FFEINFO_basictypeCOMPLEX; ! break; ! case 'I': ! okay = anynum ! || (ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER); ! abt = FFEINFO_basictypeINTEGER; ! break; ! case 'L': ! okay = anynum ! || (ffeinfo_basictype (i) == FFEINFO_basictypeLOGICAL); ! abt = FFEINFO_basictypeLOGICAL; ! break; ! case 'R': ! okay = anynum ! || (ffeinfo_basictype (i) == FFEINFO_basictypeREAL); ! abt = FFEINFO_basictypeREAL; ! break; ! case 'B': ! okay = anynum ! || (ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER) ! || (ffeinfo_basictype (i) == FFEINFO_basictypeLOGICAL); ! break; ! case 'F': ! okay = anynum ! || (ffeinfo_basictype (i) == FFEINFO_basictypeCOMPLEX) ! || (ffeinfo_basictype (i) == FFEINFO_basictypeREAL); ! break; ! case 'N': ! okay = anynum ! || (ffeinfo_basictype (i) == FFEINFO_basictypeCOMPLEX) ! || (ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER) ! || (ffeinfo_basictype (i) == FFEINFO_basictypeREAL); ! break; ! case 'S': ! okay = anynum ! || (ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER) ! || (ffeinfo_basictype (i) == FFEINFO_basictypeREAL); ! break; ! case '-': ! default: ! okay = TRUE; ! break; ! } ! switch (kind) ! { ! case '1': ! okay &= anynum || (ffeinfo_kindtype (i) == 1); ! akt = 1; ! break; ! case '2': ! okay &= anynum || (ffeinfo_kindtype (i) == 2); ! akt = 2; ! break; ! case '3': ! okay &= anynum || (ffeinfo_kindtype (i) == 3); ! akt = 3; ! break; ! case 'A': ! okay &= anynum || (ffeinfo_kindtype (i) == firstarg_kt); ! akt = (firstarg_kt == FFEINFO_kindtype) ? FFEINFO_kindtypeNONE ! : firstarg_kt; ! break; ! case 's': ! if (((((ffeinfo_basictype (i) != FFEINFO_basictypeNONE) ! || (ffeinfo_kindtype (i) != FFEINFO_kindtypeNONE) ! || (ffeinfo_kind (i) != FFEINFO_kindSUBROUTINE)) ! && ((ffeinfo_basictype (i) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (i) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_kind (i) != FFEINFO_kindFUNCTION)) ! && (ffeinfo_kind (i) != FFEINFO_kindNONE)) ! || ((ffeinfo_where (i) != FFEINFO_whereDUMMY) ! && (ffeinfo_where (i) != FFEINFO_whereGLOBAL))) ! && ((ffeinfo_basictype (i) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kind (i) != FFEINFO_kindENTITY))) ! okay = FALSE; ! break; ! case '0': ! default: ! break; ! } ! switch (extra) ! { ! case '&': ! if ((ffeinfo_kind (i) != FFEINFO_kindENTITY) ! || ((ffebld_op (a) != FFEBLD_opSYMTER) ! && (ffebld_op (a) != FFEBLD_opSUBSTR) ! && (ffebld_op (a) != FFEBLD_opARRAYREF))) ! okay = FALSE; ! break; ! case 'w': ! case 'x': ! if ((ffeinfo_kind (i) != FFEINFO_kindENTITY) ! || (ffeinfo_rank (i) != 0) ! || ((ffebld_op (a) != FFEBLD_opSYMTER) ! && (ffebld_op (a) != FFEBLD_opARRAYREF) ! && (ffebld_op (a) != FFEBLD_opSUBSTR))) ! okay = FALSE; ! break; ! default: ! if ((ffeinfo_kind (i) != FFEINFO_kindENTITY) ! || (ffeinfo_rank (i) != 0)) ! okay = FALSE; ! break; ! } ! if ((optional == '!') ! && lastarg_complex) ! okay = FALSE; ! if (!okay) ! { ! /* If it wasn't optional, it's an error, ! else maybe it could match a later argspec. */ ! if (optional == '\0') ! return FFEBAD_INTRINSIC_REF; ! break; /* Try next argspec. */ ! } ! lastarg_complex ! = (ffeinfo_basictype (i) == FFEINFO_basictypeCOMPLEX); ! if (anynum) ! { ! /* If we know dummy arg type, convert to that now. */ ! if ((abt != FFEINFO_basictypeNONE) ! && (akt != FFEINFO_kindtypeNONE) ! && commit) ! { ! /* We have a known type, convert hollerith/typeless ! to it. */ ! a = ffeexpr_convert (a, t, NULL, ! abt, akt, 0, ! FFETARGET_charactersizeNONE, ! FFEEXPR_contextLET); ! ffebld_set_head (arg, a); ! } ! } ! arg = ffebld_trail (arg); /* Arg accepted, now move on. */ ! ! if (optional == '*') ! continue; /* Go ahead and try another arg. */ ! if (required == '\0') ! break; ! if ((required == 'n') ! || (required == '+')) ! { ! optional = '*'; ! required = '\0'; ! } ! else if (required == 'p') ! required = 'n'; ! } while (TRUE); } ! /* Ignore explicit trailing omitted args. */ ! while ((arg != NULL) && (ffebld_head (arg) == NULL)) ! arg = ffebld_trail (arg); ! if (arg != NULL) ! return FFEBAD_INTRINSIC_TOOMANY; ! /* Set up the initial type for the return value of the function. */ ! need_col = FALSE; ! switch (c[0]) ! { ! case 'A': ! bt = FFEINFO_basictypeCHARACTER; ! sz = 1; ! break; ! ! case 'C': ! bt = FFEINFO_basictypeCOMPLEX; ! break; ! ! case 'I': ! bt = FFEINFO_basictypeINTEGER; ! break; ! ! case 'L': ! bt = FFEINFO_basictypeLOGICAL; ! break; ! ! case 'R': ! bt = FFEINFO_basictypeREAL; ! break; ! ! case 'B': ! case 'F': ! case 'N': ! case 'S': ! need_col = TRUE; ! /* Fall through. */ ! case '-': ! default: ! bt = FFEINFO_basictypeNONE; ! break; ! } ! switch (c[1]) ! { ! case '1': ! kt = 1; ! break; ! ! case '2': ! kt = 2; ! break; ! ! case '3': ! kt = 3; ! break; ! ! case 'C': ! if (ffe_is_90 ()) ! need_col = TRUE; ! kt = 1; ! break; ! ! case '0': ! need_col = TRUE; ! /* Fall through. */ ! case '-': ! default: ! kt = FFEINFO_kindtypeNONE; ! break; ! } ! /* Determine collective type of COL, if there is one. */ ! if (need_col || c[3] != '-') ! { ! bool okay = TRUE; ! bool have_anynum = FALSE; ! for (arg = args; ! arg != NULL; ! arg = (c[3] == '*') ? ffebld_trail (arg) : NULL) ! { ! ffebld a = ffebld_head (arg); ! ffeinfo i; ! bool anynum; ! if (a == NULL) ! continue; ! i = ffebld_info (a); ! anynum = (ffeinfo_basictype (i) == FFEINFO_basictypeHOLLERITH) ! || (ffeinfo_basictype (i) == FFEINFO_basictypeTYPELESS); ! if (anynum) ! { ! have_anynum = TRUE; ! continue; ! } ! if ((col_bt == FFEINFO_basictypeNONE) ! && (col_kt == FFEINFO_kindtypeNONE)) ! { ! col_bt = ffeinfo_basictype (i); ! col_kt = ffeinfo_kindtype (i); ! } ! else ! { ! ffeexpr_type_combine (&col_bt, &col_kt, ! col_bt, col_kt, ! ffeinfo_basictype (i), ! ffeinfo_kindtype (i), ! NULL); ! if ((col_bt == FFEINFO_basictypeNONE) ! || (col_kt == FFEINFO_kindtypeNONE)) ! return FFEBAD_INTRINSIC_REF; ! } ! } ! if (have_anynum ! && ((col_bt == FFEINFO_basictypeNONE) ! || (col_kt == FFEINFO_kindtypeNONE))) ! { ! /* No type, but have hollerith/typeless. Use type of return ! value to determine type of COL. */ ! switch (c[0]) ! { ! case 'A': ! return FFEBAD_INTRINSIC_REF; ! case 'B': ! case 'I': ! case 'L': ! if ((col_bt != FFEINFO_basictypeNONE) ! && (col_bt != FFEINFO_basictypeINTEGER)) ! return FFEBAD_INTRINSIC_REF; ! /* Fall through. */ ! case 'N': ! case 'S': ! case '-': ! default: ! col_bt = FFEINFO_basictypeINTEGER; ! col_kt = FFEINFO_kindtypeINTEGER1; ! break; ! case 'C': ! if ((col_bt != FFEINFO_basictypeNONE) ! && (col_bt != FFEINFO_basictypeCOMPLEX)) ! return FFEBAD_INTRINSIC_REF; ! col_bt = FFEINFO_basictypeCOMPLEX; ! col_kt = FFEINFO_kindtypeREAL1; ! break; ! case 'R': ! if ((col_bt != FFEINFO_basictypeNONE) ! && (col_bt != FFEINFO_basictypeREAL)) ! return FFEBAD_INTRINSIC_REF; ! /* Fall through. */ ! case 'F': ! col_bt = FFEINFO_basictypeREAL; ! col_kt = FFEINFO_kindtypeREAL1; ! break; ! } ! } ! switch (c[0]) ! { ! case 'B': ! okay = (col_bt == FFEINFO_basictypeINTEGER) ! || (col_bt == FFEINFO_basictypeLOGICAL); ! if (need_col) ! bt = col_bt; ! break; ! ! case 'F': ! okay = (col_bt == FFEINFO_basictypeCOMPLEX) ! || (col_bt == FFEINFO_basictypeREAL); ! if (need_col) ! bt = col_bt; ! break; ! ! case 'N': ! okay = (col_bt == FFEINFO_basictypeCOMPLEX) ! || (col_bt == FFEINFO_basictypeINTEGER) ! || (col_bt == FFEINFO_basictypeREAL); ! if (need_col) ! bt = col_bt; ! break; ! ! case 'S': ! okay = (col_bt == FFEINFO_basictypeINTEGER) ! || (col_bt == FFEINFO_basictypeREAL) ! || (col_bt == FFEINFO_basictypeCOMPLEX); ! if (need_col) ! bt = ((col_bt != FFEINFO_basictypeCOMPLEX) ? col_bt ! : FFEINFO_basictypeREAL); ! break; ! } ! switch (c[1]) ! { ! case '0': ! if (need_col) ! kt = col_kt; ! break; ! ! case 'C': ! if (need_col && (col_bt == FFEINFO_basictypeCOMPLEX)) ! kt = col_kt; ! break; ! } ! if (!okay) return FFEBAD_INTRINSIC_REF; } ! /* Now, convert args in the arglist to the final type of the COL. */ ! for (argc = &c[5], ! arg = args; ! *argc != '\0'; ! ) ! { ! char optional = '\0'; ! char required = '\0'; ! char extra = '\0'; ! char basic; ! char kind; ! bool lastarg_complex = FALSE; ! /* We don't do anything with keywords yet. */ ! do ! { ! } while (*(++argc) != '='); ! ++argc; ! if ((*argc == '?') ! || (*argc == '!') ! || (*argc == '*')) ! optional = *(argc++); ! if ((*argc == '+') ! || (*argc == 'n') ! || (*argc == 'p')) ! required = *(argc++); ! basic = *(argc++); ! kind = *(argc++); ! if ((*argc == '&') ! || (*argc == 'w') ! || (*argc == 'x')) ! extra = *(argc++); ! if (*argc == ',') ! ++argc; ! /* Break out of this loop only when current arg spec completely ! processed. */ ! do ! { ! bool okay; ! ffebld a; ! ffeinfo i; ! bool anynum; ! ffeinfoBasictype abt; ! ffeinfoKindtype akt; ! if ((arg == NULL) ! || (ffebld_head (arg) == NULL)) ! { ! if (arg != NULL) ! arg = ffebld_trail (arg); ! break; /* Try next argspec. */ ! } ! a = ffebld_head (arg); ! i = ffebld_info (a); ! anynum = (ffeinfo_basictype (i) == FFEINFO_basictypeHOLLERITH) ! || (ffeinfo_basictype (i) == FFEINFO_basictypeTYPELESS); ! ! /* Determine what the default type for anynum would be. */ ! ! abt = FFEINFO_basictypeNONE; ! akt = FFEINFO_kindtypeNONE; ! if (anynum) ! { ! switch (c[3]) ! { ! case '-': ! break; ! case '1': ! if (arg != args) ! break; ! case '*': ! abt = col_bt; ! akt = col_kt; ! break; ! } ! } ! /* Again, match arg up to the spec. We go through all of ! this again to properly follow the contour of optional ! arguments. Probably this level of flexibility is not ! needed, perhaps it's even downright naughty. */ ! switch (basic) ! { ! case 'A': ! okay = ffeinfo_basictype (i) == FFEINFO_basictypeCHARACTER; ! break; ! case 'C': ! okay = anynum ! || (ffeinfo_basictype (i) == FFEINFO_basictypeCOMPLEX); ! abt = FFEINFO_basictypeCOMPLEX; ! break; ! case 'I': ! okay = anynum ! || (ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER); ! abt = FFEINFO_basictypeINTEGER; ! break; ! case 'L': ! okay = anynum ! || (ffeinfo_basictype (i) == FFEINFO_basictypeLOGICAL); ! abt = FFEINFO_basictypeLOGICAL; ! break; ! case 'R': ! okay = anynum ! || (ffeinfo_basictype (i) == FFEINFO_basictypeREAL); ! abt = FFEINFO_basictypeREAL; ! break; ! case 'B': ! okay = anynum ! || (ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER) ! || (ffeinfo_basictype (i) == FFEINFO_basictypeLOGICAL); ! break; ! case 'F': ! okay = anynum ! || (ffeinfo_basictype (i) == FFEINFO_basictypeCOMPLEX) ! || (ffeinfo_basictype (i) == FFEINFO_basictypeREAL); ! break; ! case 'N': ! okay = anynum ! || (ffeinfo_basictype (i) == FFEINFO_basictypeCOMPLEX) ! || (ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER) ! || (ffeinfo_basictype (i) == FFEINFO_basictypeREAL); ! break; ! case 'S': ! okay = anynum ! || (ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER) ! || (ffeinfo_basictype (i) == FFEINFO_basictypeREAL); ! break; ! case '-': ! default: ! okay = TRUE; ! break; ! } ! switch (kind) ! { ! case '1': ! okay &= anynum || (ffeinfo_kindtype (i) == 1); ! akt = 1; ! break; ! case '2': ! okay &= anynum || (ffeinfo_kindtype (i) == 2); ! akt = 2; ! break; ! case '3': ! okay &= anynum || (ffeinfo_kindtype (i) == 3); ! akt = 3; ! break; ! case 'A': ! okay &= anynum || (ffeinfo_kindtype (i) == firstarg_kt); ! akt = (firstarg_kt == FFEINFO_kindtype) ? FFEINFO_kindtypeNONE ! : firstarg_kt; ! break; ! case 's': ! if (((((ffeinfo_basictype (i) != FFEINFO_basictypeNONE) ! || (ffeinfo_kindtype (i) != FFEINFO_kindtypeNONE) ! || (ffeinfo_kind (i) != FFEINFO_kindSUBROUTINE)) ! && ((ffeinfo_basictype (i) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kindtype (i) != FFEINFO_kindtypeINTEGERDEFAULT) ! || (ffeinfo_kind (i) != FFEINFO_kindFUNCTION)) ! && (ffeinfo_kind (i) != FFEINFO_kindNONE)) ! || ((ffeinfo_where (i) != FFEINFO_whereDUMMY) ! && (ffeinfo_where (i) != FFEINFO_whereGLOBAL))) ! && ((ffeinfo_basictype (i) != FFEINFO_basictypeINTEGER) ! || (ffeinfo_kind (i) != FFEINFO_kindENTITY))) ! okay = FALSE; ! break; ! case '0': ! default: ! break; ! } ! switch (extra) ! { ! case '&': ! if ((ffeinfo_kind (i) != FFEINFO_kindENTITY) ! || ((ffebld_op (a) != FFEBLD_opSYMTER) ! && (ffebld_op (a) != FFEBLD_opSUBSTR) ! && (ffebld_op (a) != FFEBLD_opARRAYREF))) ! okay = FALSE; ! break; ! case 'w': ! case 'x': ! if ((ffeinfo_kind (i) != FFEINFO_kindENTITY) ! || (ffeinfo_rank (i) != 0) ! || ((ffebld_op (a) != FFEBLD_opSYMTER) ! && (ffebld_op (a) != FFEBLD_opARRAYREF) ! && (ffebld_op (a) != FFEBLD_opSUBSTR))) ! okay = FALSE; ! break; ! default: ! if ((ffeinfo_kind (i) != FFEINFO_kindENTITY) ! || (ffeinfo_rank (i) != 0)) ! okay = FALSE; ! break; ! } ! if ((optional == '!') ! && lastarg_complex) ! okay = FALSE; ! if (!okay) ! { ! /* If it wasn't optional, it's an error, ! else maybe it could match a later argspec. */ ! if (optional == '\0') ! return FFEBAD_INTRINSIC_REF; ! break; /* Try next argspec. */ ! } ! lastarg_complex ! = (ffeinfo_basictype (i) == FFEINFO_basictypeCOMPLEX); ! if (anynum && commit) ! { ! /* If we know dummy arg type, convert to that now. */ ! if (abt == FFEINFO_basictypeNONE) ! abt = FFEINFO_basictypeINTEGER; ! if (akt == FFEINFO_kindtypeNONE) ! akt = FFEINFO_kindtypeINTEGER1; ! ! /* We have a known type, convert hollerith/typeless to it. */ ! ! a = ffeexpr_convert (a, t, NULL, ! abt, akt, 0, ! FFETARGET_charactersizeNONE, ! FFEEXPR_contextLET); ! ffebld_set_head (arg, a); ! } ! else if ((c[3] == '*') && commit) ! { ! /* This is where we promote types to the consensus ! type for the COL. Maybe this is where -fpedantic ! should issue a warning as well. */ ! ! a = ffeexpr_convert (a, t, NULL, ! col_bt, col_kt, 0, ! ffeinfo_size (i), ! FFEEXPR_contextLET); ! ffebld_set_head (arg, a); ! } ! arg = ffebld_trail (arg); /* Arg accepted, now move on. */ ! if (optional == '*') ! continue; /* Go ahead and try another arg. */ ! if (required == '\0') ! break; ! if ((required == 'n') ! || (required == '+')) ! { ! optional = '*'; ! required = '\0'; ! } ! else if (required == 'p') ! required = 'n'; ! } while (TRUE); } ! *xbt = bt; ! *xkt = kt; ! *xsz = sz; ! return FFEBAD; } ! static bool ! ffeintrin_check_any_ (ffebld arglist) { ! ffebld item; ! for (; arglist != NULL; arglist = ffebld_trail (arglist)) { ! item = ffebld_head (arglist); ! if ((item != NULL) ! && (ffebld_op (item) == FFEBLD_opANY)) ! return TRUE; } ! return FALSE; } *************** ffeintrin_cmp_name_ (const void *name, c *** 1620,1627 **** ffeinfoBasictype ! ffeintrin_basictype (ffeintrinImp imp) { assert (imp < FFEINTRIN_imp); ! return ffeintrin_imps_[imp].basictype; } --- 983,1019 ---- ffeinfoBasictype ! ffeintrin_basictype (ffeintrinSpec spec) ! { ! assert (spec < FFEINTRIN_spec); ! return FFEINTRIN_specNONE; ! } ! ! /* Return code-generation implementation of intrinsic. ! ! The idea is that an intrinsic might have its own implementation ! (defined by the DEFIMP macro) or might defer to the implementation ! of another intrinsic (defined by the DEFIMQ macro), and this is ! what points to that other implementation. ! ! The reason for this extra level of indirection, rather than ! just adding "case" statements to the big switch in com.c's ! ffecom_expr_intrinsic_ function, is so that generic disambiguation ! can ensure that it doesn't have an ambiguity on its hands. ! E.g. Both ABS and DABS might cope with a DOUBLE PRECISION, ! etc. Previously, the implementation itself was used to allow ! multiple specific intrinsics to "accept" the argument list ! if they all agreed on implementation. But, since implementation ! includes type signature and run-time-library function, another ! level was needed to say "maybe two intrinsics would be handled ! as two _different_ library references or involve different types ! in general, but the specific code involved to implement them is ! the same, so it is okay if a generic function reference can be ! satisfied by either intrinsic". */ ! ! ffeintrinImp ! ffeintrin_codegen_imp (ffeintrinImp imp) { assert (imp < FFEINTRIN_imp); ! return ffeintrin_imps_[imp].cg_imp; } *************** ffeintrin_fulfill_generic (ffebld *expr, *** 1654,1661 **** --- 1046,1058 ---- ffeintrinGen gen; ffeintrinSpec spec = FFEINTRIN_specNONE; + ffeinfoBasictype bt = FFEINFO_basictypeNONE; + ffeinfoKindtype kt = FFEINFO_kindtypeNONE; + ffetargetCharacterSize sz = FFETARGET_charactersizeNONE; ffeintrinImp imp; ffeintrinSpec tspec; + ffeintrinImp nimp = FFEINTRIN_impNONE; ffebad error; bool any = FALSE; + bool highly_specific = FALSE; char *name = NULL; int i; *************** ffeintrin_fulfill_generic (ffebld *expr, *** 1671,1680 **** error = FFEBAD; for (i = 0; (((size_t) i) < ARRAY_SIZE (ffeintrin_gens_[gen].specs)) ! && ((tspec = ffeintrin_gens_[gen].specs[i]) != FFEINTRIN_specNONE); ++i) { ffeintrinImp timp = ffeintrin_specs_[tspec].implementation; ffeIntrinsicState state = ffeintrin_state_family (ffeintrin_specs_[tspec].family); --- 1068,1083 ---- error = FFEBAD; + any = ffeintrin_check_any_ (ffebld_right (*expr)); + for (i = 0; (((size_t) i) < ARRAY_SIZE (ffeintrin_gens_[gen].specs)) ! && ((tspec = ffeintrin_gens_[gen].specs[i]) != FFEINTRIN_specNONE) ! && !any; ++i) { ffeintrinImp timp = ffeintrin_specs_[tspec].implementation; + ffeinfoBasictype tbt; + ffeinfoKindtype tkt; + ffetargetCharacterSize tsz; ffeIntrinsicState state = ffeintrin_state_family (ffeintrin_specs_[tspec].family); *************** ffeintrin_fulfill_generic (ffebld *expr, *** 1696,1726 **** else { ! terror = ffeintrin_check_procedure_ (timp, ffebld_op (*expr)); if (terror == FFEBAD) { - any = ffeintrin_check_any_ (ffebld_right (*expr)); - if (!any) - terror = (*ffeintrin_imps_[timp].check) (ffebld_right (*expr)); - } - if (!any && (terror == FFEBAD) && (timp != imp)) - { if (imp != FFEINTRIN_impNONE) { ! ffebad_start (FFEBAD_INTRINSIC_AMBIG); ! ffebad_here (0, ffelex_token_where_line (t), ! ffelex_token_where_column (t)); ! ffebad_string (ffeintrin_gens_[gen].name); ! ffebad_string (ffeintrin_specs_[spec].name); ! ffebad_string (ffeintrin_specs_[tspec].name); ! ffebad_finish (); } else { imp = timp; spec = tspec; error = terror; } } ! else if (!any && (terror != FFEBAD)) { /* This error has precedence over others. */ if ((error == FFEBAD_INTRINSIC_DISABLED) --- 1099,1151 ---- else { ! terror = ffeintrin_check_ (timp, ffebld_op (*expr), ! ffebld_right (*expr), ! &tbt, &tkt, &tsz, t, FALSE); if (terror == FFEBAD) { if (imp != FFEINTRIN_impNONE) { ! if (ffeintrin_imps_[timp].cg_imp ! == ffeintrin_imps_[imp].cg_imp) ! { ! if (ffebld_symter_specific (ffebld_left (*expr)) ! == tspec) ! { ! highly_specific = TRUE; ! imp = timp; ! spec = tspec; ! bt = tbt; ! kt = tkt; ! sz = tkt; ! error = terror; ! } ! else if (nimp == FFEINTRIN_impNONE) ! nimp = timp; ! } ! else ! { ! ffebad_start (FFEBAD_INTRINSIC_AMBIG); ! ffebad_here (0, ffelex_token_where_line (t), ! ffelex_token_where_column (t)); ! ffebad_string (ffeintrin_gens_[gen].name); ! ffebad_string (ffeintrin_specs_[spec].name); ! ffebad_string (ffeintrin_specs_[tspec].name); ! ffebad_finish (); ! } } else { + if (ffebld_symter_specific (ffebld_left (*expr)) + == tspec) + highly_specific = TRUE; imp = timp; spec = tspec; + bt = tbt; + kt = tkt; + sz = tkt; error = terror; } } ! else if (terror != FFEBAD) { /* This error has precedence over others. */ if ((error == FFEBAD_INTRINSIC_DISABLED) *************** ffeintrin_fulfill_generic (ffebld *expr, *** 1730,1734 **** } ! if (!any && (error == FFEBAD)) { error = terror; --- 1155,1159 ---- } ! if (error == FFEBAD) { error = terror; *************** ffeintrin_fulfill_generic (ffebld *expr, *** 1757,1779 **** else { ! *info = ffeinfo_new (ffeintrin_imps_[imp].basictype, ! ffeintrin_imps_[imp].kindtype, 0, FFEINFO_kindENTITY, FFEINFO_whereFLEETING, ! ffeintrin_imps_[imp].size); symter = ffebld_left (*expr); ffebld_symter_set_specific (symter, spec); ffebld_symter_set_implementation (symter, imp); ffebld_set_info (symter, ! ffeinfo_new (ffeintrin_imps_[imp].basictype, ! ffeintrin_imps_[imp].kindtype, 0, ! (ffeintrin_imps_[imp].basictype ! == FFEINFO_basictypeNONE) ? FFEINFO_kindSUBROUTINE : FFEINFO_kindFUNCTION, FFEINFO_whereINTRINSIC, ! ffeintrin_imps_[imp].size)); } } --- 1182,1217 ---- else { ! if (!highly_specific && (nimp != FFEINTRIN_impNONE)) ! { ! fprintf (stderr, "lineno=%ld, gen=%s, imp=%s, timp=%s\n", ! (long) lineno, ! ffeintrin_gens_[gen].name, ! ffeintrin_imps_[imp].name, ! ffeintrin_imps_[nimp].name); ! assert ("Ambiguous generic reference" == NULL); ! abort (); ! } ! error = ffeintrin_check_ (imp, ffebld_op (*expr), ! ffebld_right (*expr), ! &bt, &kt, &sz, t, TRUE); ! assert (error == FFEBAD); ! *info = ffeinfo_new (bt, ! kt, 0, FFEINFO_kindENTITY, FFEINFO_whereFLEETING, ! sz); symter = ffebld_left (*expr); ffebld_symter_set_specific (symter, spec); ffebld_symter_set_implementation (symter, imp); ffebld_set_info (symter, ! ffeinfo_new (bt, ! kt, 0, ! (bt == FFEINFO_basictypeNONE) ? FFEINFO_kindSUBROUTINE : FFEINFO_kindFUNCTION, FFEINFO_whereINTRINSIC, ! sz)); } } *************** ffeintrin_fulfill_specific (ffebld *expr *** 1801,1804 **** --- 1239,1245 ---- ffeintrinSpec spec; ffeintrinImp imp; + ffeinfoBasictype bt = FFEINFO_basictypeNONE; + ffeinfoKindtype kt = FFEINFO_kindtypeNONE; + ffetargetCharacterSize sz = FFETARGET_charactersizeNONE; ffeIntrinsicState state; ffebad error; *************** ffeintrin_fulfill_specific (ffebld *expr *** 1816,1840 **** imp = ffeintrin_specs_[spec].implementation; if (state == FFE_intrinsicstateDISABLED) error = FFEBAD_INTRINSIC_DISABLED; else if (imp == FFEINTRIN_impNONE) error = FFEBAD_INTRINSIC_UNIMPL; ! else { ! error = ffeintrin_check_procedure_ (imp, ffebld_op (*expr)); ! if (error == FFEBAD) ! { ! any = ffeintrin_check_any_ (ffebld_right (*expr)); ! if (!any) ! error = (*ffeintrin_imps_[imp].check) (ffebld_right (*expr)); ! } } if (any || (error != FFEBAD)) { - char *name; - if (!any) { ffebad_start (error); ffebad_here (0, ffelex_token_where_line (t), --- 1257,1279 ---- imp = ffeintrin_specs_[spec].implementation; + any = ffeintrin_check_any_ (ffebld_right (*expr)); + if (state == FFE_intrinsicstateDISABLED) error = FFEBAD_INTRINSIC_DISABLED; else if (imp == FFEINTRIN_impNONE) error = FFEBAD_INTRINSIC_UNIMPL; ! else if (!any) { ! error = ffeintrin_check_ (imp, ffebld_op (*expr), ! ffebld_right (*expr), ! &bt, &kt, &sz, t, TRUE); } if (any || (error != FFEBAD)) { if (!any) { + char *name; + ffebad_start (error); ffebad_here (0, ffelex_token_where_line (t), *************** ffeintrin_fulfill_specific (ffebld *expr *** 1853,1873 **** else { ! *info = ffeinfo_new (ffeintrin_imps_[imp].basictype, ! ffeintrin_imps_[imp].kindtype, 0, FFEINFO_kindENTITY, FFEINFO_whereFLEETING, ! ffeintrin_imps_[imp].size); symter = ffebld_left (*expr); ffebld_set_info (symter, ! ffeinfo_new (ffeintrin_imps_[imp].basictype, ! ffeintrin_imps_[imp].kindtype, 0, ! (ffeintrin_imps_[imp].basictype ! == FFEINFO_basictypeNONE) ? FFEINFO_kindSUBROUTINE : FFEINFO_kindFUNCTION, FFEINFO_whereINTRINSIC, ! ffeintrin_imps_[imp].size)); } } --- 1292,1311 ---- else { ! *info = ffeinfo_new (bt, ! kt, 0, FFEINFO_kindENTITY, FFEINFO_whereFLEETING, ! sz); symter = ffebld_left (*expr); ffebld_set_info (symter, ! ffeinfo_new (bt, ! kt, 0, ! (bt == FFEINFO_basictypeNONE) ? FFEINFO_kindSUBROUTINE : FFEINFO_kindFUNCTION, FFEINFO_whereINTRINSIC, ! sz)); } } *************** ffeintrin_init_0 () *** 1892,1895 **** --- 1330,1336 ---- char *p3; + if (!ffe_is_do_internal_checks()) + return; + assert (FFEINTRIN_gen == ARRAY_SIZE (ffeintrin_gens_)); assert (FFEINTRIN_imp == ARRAY_SIZE (ffeintrin_imps_)); *************** ffeintrin_init_0 () *** 1921,1924 **** --- 1362,1472 ---- assert ((*p1 == *p2) && (*p1 == *p3) && (*p1 == '\0')); } + + for (i = 0; ((size_t) i) < ARRAY_SIZE (ffeintrin_imps_); ++i) + { + char *c = ffeintrin_imps_[i].control; + + if (c[0] == '\0') + continue; + + if ((c[0] != '-') + && (c[0] != 'A') + && (c[0] != 'C') + && (c[0] != 'I') + && (c[0] != 'L') + && (c[0] != 'R') + && (c[0] != 'B') + && (c[0] != 'F') + && (c[0] != 'N') + && (c[0] != 'S')) + { + fprintf (stderr, "%s: bad return-base-type\n", + ffeintrin_imps_[i].name); + continue; + } + if ((c[1] != '-') + && (c[1] != '0') + && (c[1] != '1') + && (c[1] != '2') + && (c[1] != '3') + && (c[1] != 'C')) + { + fprintf (stderr, "%s: bad return-kind-type\n", + ffeintrin_imps_[i].name); + continue; + } + if ((c[2] != ':') || (c[4] != ':')) + { + fprintf (stderr, "%s: bad control\n", + ffeintrin_imps_[i].name); + continue; + } + if ((c[3] != '-') + && (c[3] != '*') + && (c[3] != '1')) + { + fprintf (stderr, "%s: bad COL-spec\n", + ffeintrin_imps_[i].name); + continue; + } + c += 5; + while (c[0] != '\0') + { + while ((c[0] != '=') + && (c[0] != ',') + && (c[0] != '\0')) + ++c; + if (c[0] != '=') + { + fprintf (stderr, "%s: bad keyword\n", + ffeintrin_imps_[i].name); + break; + } + if ((c[1] == '?') + || (c[1] == '!') + || (c[1] == '!') + || (c[1] == '+') + || (c[1] == '*') + || (c[1] == 'n') + || (c[1] == 'p')) + ++c; + if (((c[1] != '-') + && (c[1] != 'A') + && (c[1] != 'C') + && (c[1] != 'I') + && (c[1] != 'L') + && (c[1] != 'R') + && (c[1] != 'B') + && (c[1] != 'F') + && (c[1] != 'N') + && (c[1] != 'S')) + || ((c[2] != '0') + && (c[2] != '1') + && (c[2] != '2') + && (c[2] != '3') + && (c[2] != 'A') + && (c[2] != 's'))) + { + fprintf (stderr, "%s: bad arg-type\n", + ffeintrin_imps_[i].name); + break; + } + if ((c[3] == '&') + || (c[3] == 'w') + || (c[3] == 'x')) + ++c; + if (c[3] == ',') + { + c += 4; + break; + } + if (c[3] != '\0') + { + fprintf (stderr, "%s: bad arg-list\n", + ffeintrin_imps_[i].name); + } + break; + } + } } *************** ffeintrin_is_intrinsic (char *name, ffel *** 2101,2105 **** continue; ! if (ffeintrin_imps_[timp].basictype == FFEINFO_basictypeNONE) tkind = FFEINFO_kindSUBROUTINE; else --- 1649,1653 ---- continue; ! if (ffeintrin_imps_[timp].control[0] == '-') tkind = FFEINFO_kindSUBROUTINE; else *************** ffeintrin_is_intrinsic (char *name, ffel *** 2114,2118 **** else /* Have specific, use that. */ kind ! = (ffeintrin_imps_[imp].basictype == FFEINFO_basictypeNONE) ? FFEINFO_kindSUBROUTINE : FFEINFO_kindFUNCTION; --- 1662,1666 ---- else /* Have specific, use that. */ kind ! = (ffeintrin_imps_[imp].control[0] == '-') ? FFEINFO_kindSUBROUTINE : FFEINFO_kindFUNCTION; *************** ffeintrin_is_intrinsic (char *name, ffel *** 2128,2135 **** ffeinfoKindtype ! ffeintrin_kindtype (ffeintrinImp imp) { ! assert (imp < FFEINTRIN_imp); ! return ffeintrin_imps_[imp].kindtype; } --- 1676,1683 ---- ffeinfoKindtype ! ffeintrin_kindtype (ffeintrinSpec spec) { ! assert (spec < FFEINTRIN_spec); ! return FFEINFO_kindtypeNONE; } diff -rcp2N g77-0.5.17/f/intrin.def g77-0.5.18/f/intrin.def *** g77-0.5.17/f/intrin.def Thu Nov 2 05:25:06 1995 --- g77-0.5.18/f/intrin.def Fri Mar 15 02:02:54 1996 *************** the Free Software Foundation, 59 Temple *** 26,2459 **** */ ! /* Throughout this file, g77 internal codes often use the following ! letters to mean the following types: ! I -- INTEGER*4 ! J -- INTEGER*2 ! K -- INTEGER*1 ! R -- REAL*4 ! D -- REAL*8 ! Q -- REAL*16 ! C -- COMPLEX*8 ! E -- COMPLEX*16 ! F -- COMPLEX*32 ! A -- CHARACTER ! L -- LOGICAL*4 ! M -- LOGICAL*2 ! N -- LOGICAL*1 ! B -- Boolean (INTEGER or LOGICAL) ! Note that the above aren't blessed by any standard, and conflict ! in some ways with various popular compilers (e.g. VAX/VMS FORTRAN ! switches I and J; f2c/f77 uses Z instead of E). But it makes sense ! to pick one naming convention for internal use and stick to it, and ! have intrinsic-name and library-name issues be separate. ! FFEINTRIN_genXYZZY and FFEINTRIN_specXYZZY are keywords referring ! to XYZZY as external (i.e. user-visible) names, while FFEINTRIN_gen_XYZZY, ! FFEINTRIN_spec_XYZZY, and FFEINTRIN_impXYZZY all are keywords referring ! to XYZZY as g77-internal and thus XYZZY is named according to the ! above mapping. ! So the keyword FFEINTRIN_specJFOO refers to some language's definition ! of JFOO, thus that language's use of J prevails for that keyword ! (e.g. for VAX FORTRAN, it means INTEGER*4), whereas the keyword ! FFEINTRIN_spec_JFOO_C, being an internal name, refers to g77's ! definition of _JFOO_C, thus it means it's a FOO taking COMPLEX args ! and returning INTEGER*2. Sigh. Being compatible is really annoying! */ ! ! /* Generic intrinsics listed in any order. ! This list corresponds to the names of generic intrinsics as seen ! in source code, and should thus be consulted only when an intrinsic ! invocation of the form "MAYBEGENERIC(...)" or "INTRINSIC MAYBEGENERIC" ! is seen. */ ! ! /* Currently this list starts with the list of F77-standard intrinsics ! in alphabetical order, then continues with the list of all other ! intrinsics. So, unless mistakes are made in the first portion, no ! new intrinsics should be added to that portion (since F77 isn't ! changing). */ ! ! DEFGEN (FFEINTRIN_genABS, "ABS", ! FFEINTRIN_specIABS, /* F77. */ ! FFEINTRIN_specABS, /* F77. */ ! FFEINTRIN_specDABS, /* F77. */ ! FFEINTRIN_specCABS, /* F77. */ ! FFEINTRIN_specIIABS, ! FFEINTRIN_specJIABS, ! FFEINTRIN_specQABS, ! FFEINTRIN_specCDABS, ! FFEINTRIN_specZABS, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genACOS, "ACOS", ! FFEINTRIN_specACOS, /* F77. */ ! FFEINTRIN_specDACOS, /* F77. */ ! FFEINTRIN_specQACOS, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genAIMAG, "AIMAG", ! FFEINTRIN_specAIMAG, /* F77. */ ! FFEINTRIN_spec_IMAG_E, ! 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_genAINT, "AINT", ! FFEINTRIN_specAINT, /* F77. */ ! FFEINTRIN_specDINT, /* F77. */ ! FFEINTRIN_specQINT, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genAMAX0, "AMAX0", ! FFEINTRIN_specAMAX0, /* F77. */ ! FFEINTRIN_specAIMAX0, ! FFEINTRIN_specAJMAX0, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genAMIN0, "AMIN0", ! FFEINTRIN_specAMIN0, /* F77. */ ! FFEINTRIN_specAIMIN0, ! FFEINTRIN_specAJMIN0, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genANINT, "ANINT", ! FFEINTRIN_specANINT, /* F77. */ ! FFEINTRIN_specDNINT, /* F77. */ ! FFEINTRIN_specQNINT, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genASIN, "ASIN", ! FFEINTRIN_specASIN, /* F77. */ ! FFEINTRIN_specDASIN, /* F77. */ ! FFEINTRIN_specQASIN, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genATAN, "ATAN", ! FFEINTRIN_specATAN, /* F77. */ ! FFEINTRIN_specDATAN, /* F77. */ ! FFEINTRIN_specQATAN, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genATAN2, "ATAN2", ! FFEINTRIN_specATAN2, /* F77. */ ! FFEINTRIN_specDATAN2, /* F77. */ ! FFEINTRIN_specQATAN2, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genCHAR, "CHAR", ! FFEINTRIN_specCHAR, /* F77. */ ! FFEINTRIN_spec_CHAR_N, ! FFEINTRIN_spec_CHAR_J, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genCMPLX, "CMPLX", ! FFEINTRIN_spec_CMPLX_I, /* F77. */ ! FFEINTRIN_spec_CMPLX_R, /* F77. */ ! FFEINTRIN_spec_CMPLX_D, /* F77. */ ! FFEINTRIN_spec_CMPLX_C, /* F77. */ ! FFEINTRIN_spec_CMPLX_J, ! FFEINTRIN_spec_CMPLX_Q, ! FFEINTRIN_spec_CMPLX_E, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genCONJG, "CONJG", ! FFEINTRIN_specCONJG, /* F77. */ ! FFEINTRIN_specDCONJG, ! 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_genCOS, "COS", ! FFEINTRIN_specCOS, /* F77. */ ! FFEINTRIN_specDCOS, /* F77. */ ! FFEINTRIN_specCCOS, /* F77. */ ! FFEINTRIN_specQCOS, ! FFEINTRIN_specCDCOS, ! FFEINTRIN_specZCOS, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genCOSH, "COSH", ! FFEINTRIN_specCOSH, /* F77. */ ! FFEINTRIN_specDCOSH, /* F77. */ ! FFEINTRIN_specQCOSH, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genDBLE, "DBLE", ! FFEINTRIN_spec_DBLE_I, /* F77. */ ! FFEINTRIN_spec_DBLE_R, /* F77. */ ! FFEINTRIN_spec_DBLE_D, /* F77. */ ! FFEINTRIN_spec_DBLE_C, /* F77. */ ! FFEINTRIN_spec_DBLE_J, /* F77. */ ! FFEINTRIN_specDBLEQ, ! FFEINTRIN_spec_DBLE_E, ! FFEINTRIN_specDBLE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genDIM, "DIM", ! FFEINTRIN_specIDIM, /* F77. */ ! FFEINTRIN_specDIM, /* F77. */ ! FFEINTRIN_specDDIM, /* F77. */ ! FFEINTRIN_specIIDIM, ! FFEINTRIN_specJIDIM, ! FFEINTRIN_specQDIM, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genDPROD, "DPROD", ! FFEINTRIN_specDPROD, /* F77. */ ! FFEINTRIN_specNONE, ! 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_genEXP, "EXP", ! FFEINTRIN_specEXP, /* F77. */ ! FFEINTRIN_specDEXP, /* F77. */ ! FFEINTRIN_specCEXP, /* F77. */ ! FFEINTRIN_specQEXP, ! FFEINTRIN_specCDEXP, ! FFEINTRIN_specZEXP, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genFLOAT, "FLOAT", ! FFEINTRIN_specFLOAT, /* F77. */ ! FFEINTRIN_specFLOATI, ! FFEINTRIN_specFLOATJ, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genIABS, "IABS", ! FFEINTRIN_specIABS, /* F77. */ ! FFEINTRIN_specIIABS, ! FFEINTRIN_specJIABS, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genICHAR, "ICHAR", ! FFEINTRIN_specICHAR, /* F77. */ ! FFEINTRIN_specNONE, ! 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_genIDIM, "IDIM", ! FFEINTRIN_specIDIM, /* F77. */ ! FFEINTRIN_specIIDIM, ! FFEINTRIN_specJIDIM, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genIDINT, "IDINT", ! FFEINTRIN_specIDINT, /* F77. */ ! FFEINTRIN_specIIDINT, ! FFEINTRIN_specJIDINT, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genIDNINT, "IDNINT", ! FFEINTRIN_specIDNINT, /* F77. */ ! FFEINTRIN_specIIDNNT, ! FFEINTRIN_specJIDNNT, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genIFIX, "IFIX", ! FFEINTRIN_specIFIX, /* F77. */ ! FFEINTRIN_specIIFIX, ! FFEINTRIN_specJIFIX, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genINDEX, "INDEX", ! FFEINTRIN_specINDEX, /* F77. */ ! FFEINTRIN_specNONE, ! 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_genINT, "INT", ! FFEINTRIN_spec_INT_I, /* F77. */ ! FFEINTRIN_specINT, /* F77. */ ! FFEINTRIN_specIDINT, /* F77. */ ! FFEINTRIN_spec_INT_C, /* F77. */ ! FFEINTRIN_specIINT, ! FFEINTRIN_specJINT, ! FFEINTRIN_specIIDINT, ! FFEINTRIN_specJIDINT, ! FFEINTRIN_specIIQINT, ! FFEINTRIN_specJIQINT, ! FFEINTRIN_spec_JINT_C, ! FFEINTRIN_spec_IINT_C, ! FFEINTRIN_spec_JINT_E, ! FFEINTRIN_spec_IINT_E ! ) ! DEFGEN (FFEINTRIN_genISIGN, "ISIGN", ! FFEINTRIN_specISIGN, /* F77. */ ! FFEINTRIN_specIISIGN, ! FFEINTRIN_specJISIGN, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genLEN, "LEN", ! FFEINTRIN_specLEN, /* F77. */ ! FFEINTRIN_specNONE, ! 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_genLGE, "LGE", ! FFEINTRIN_specLGE, /* F77. */ ! FFEINTRIN_specNONE, ! 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_genLGT, "LGT", ! FFEINTRIN_specLGT, /* F77. */ ! FFEINTRIN_specNONE, ! 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_genLLE, "LLE", ! FFEINTRIN_specLLE, /* F77. */ ! FFEINTRIN_specNONE, ! 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_genLLT, "LLT", ! FFEINTRIN_specLLT, /* F77. */ ! FFEINTRIN_specNONE, ! 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_genLOG, "LOG", ! FFEINTRIN_specALOG, /* F77. */ ! FFEINTRIN_specDLOG, /* F77. */ ! FFEINTRIN_specCLOG, /* F77. */ ! FFEINTRIN_specQLOG, ! FFEINTRIN_specCDLOG, ! FFEINTRIN_specZLOG, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genLOG10, "LOG10", ! FFEINTRIN_specALOG10, /* F77. */ ! FFEINTRIN_specDLOG10, /* F77. */ ! FFEINTRIN_specQLOG10, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genMAX, "MAX", ! FFEINTRIN_specMAX0, /* F77. */ ! FFEINTRIN_specAMAX1, /* F77. */ ! FFEINTRIN_specDMAX1, /* F77. */ ! FFEINTRIN_specIMAX0, ! FFEINTRIN_specJMAX0, ! FFEINTRIN_specQMAX1, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genMAX0, "MAX0", ! FFEINTRIN_specMAX0, /* F77. */ ! FFEINTRIN_specIMAX0, ! FFEINTRIN_specJMAX0, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genMAX1, "MAX1", ! FFEINTRIN_specMAX1, /* F77. */ ! FFEINTRIN_specIMAX1, ! FFEINTRIN_specJMAX1, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genMIN, "MIN", ! FFEINTRIN_specMIN0, /* F77. */ ! FFEINTRIN_specAMIN1, /* F77. */ ! FFEINTRIN_specDMIN1, /* F77. */ ! FFEINTRIN_specIMIN0, ! FFEINTRIN_specJMIN0, ! FFEINTRIN_specQMIN1, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genMIN0, "MIN0", ! FFEINTRIN_specMIN0, /* F77. */ ! FFEINTRIN_specIMIN0, ! FFEINTRIN_specJMIN0, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genMIN1, "MIN1", ! FFEINTRIN_specMIN1, /* F77. */ ! FFEINTRIN_specIMIN1, ! FFEINTRIN_specJMIN1, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genMOD, "MOD", ! FFEINTRIN_specMOD, /* F77. */ ! FFEINTRIN_specAMOD, /* F77. */ ! FFEINTRIN_specDMOD, /* F77. */ ! FFEINTRIN_specIMOD, ! FFEINTRIN_specJMOD, ! FFEINTRIN_specQMOD, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genNINT, "NINT", ! FFEINTRIN_specNINT, /* F77. */ ! FFEINTRIN_specIDNINT, /* F77. */ ! FFEINTRIN_specININT, ! FFEINTRIN_specJNINT, ! FFEINTRIN_specIIDNNT, ! FFEINTRIN_specJIDNNT, ! FFEINTRIN_specIIQNNT, ! FFEINTRIN_specJIQNNT, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genREAL, "REAL", ! FFEINTRIN_specREAL, /* F77. */ ! FFEINTRIN_specFLOAT, /* F77. */ ! FFEINTRIN_spec_REAL_R, /* F77. */ ! FFEINTRIN_specSNGL, /* F77. */ ! FFEINTRIN_spec_REAL_C, /* F77. */ ! FFEINTRIN_specFLOATI, ! FFEINTRIN_specFLOATJ, ! FFEINTRIN_specSNGLQ, ! FFEINTRIN_spec_REAL_E, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genSIGN, "SIGN", ! FFEINTRIN_specISIGN, /* F77. */ ! FFEINTRIN_specSIGN, /* F77. */ ! FFEINTRIN_specDSIGN, /* F77. */ ! FFEINTRIN_specIISIGN, ! FFEINTRIN_specJISIGN, ! FFEINTRIN_specQSIGN, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genSIN, "SIN", ! FFEINTRIN_specSIN, /* F77. */ ! FFEINTRIN_specDSIN, /* F77. */ ! FFEINTRIN_specCSIN, /* F77. */ ! FFEINTRIN_specQSIN, ! FFEINTRIN_specCDSIN, ! FFEINTRIN_specZSIN, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genSINH, "SINH", ! FFEINTRIN_specSINH, /* F77. */ ! FFEINTRIN_specDSINH, /* F77. */ ! FFEINTRIN_specQSINH, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genSQRT, "SQRT", ! FFEINTRIN_specSQRT, /* F77. */ ! FFEINTRIN_specDSQRT, /* F77. */ ! FFEINTRIN_specCSQRT, /* F77. */ ! FFEINTRIN_specQSQRT, ! FFEINTRIN_specCDSQRT, ! FFEINTRIN_specZSQRT, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genTAN, "TAN", ! FFEINTRIN_specTAN, /* F77. */ ! FFEINTRIN_specDTAN, /* F77. */ ! FFEINTRIN_specQTAN, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genTANH, "TANH", ! FFEINTRIN_specTANH, /* F77. */ ! FFEINTRIN_specDTANH, /* F77. */ ! FFEINTRIN_specQTANH, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genACHAR, "ACHAR", /* F90, F2C */ ! FFEINTRIN_specACHAR, ! FFEINTRIN_specNONE, ! 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_genACOSD, "ACOSD", /* VXT */ ! FFEINTRIN_specACOSD, ! FFEINTRIN_specDACOSD, ! FFEINTRIN_specQACOSD, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genADJUSTL, "ADJUSTL", /* F90 */ ! FFEINTRIN_specADJUSTL, ! FFEINTRIN_specNONE, ! 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_genADJUSTR, "ADJUSTR", /* F90 */ ! FFEINTRIN_specADJUSTR, ! FFEINTRIN_specNONE, ! 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_genALL, "ALL", /* F90 */ ! FFEINTRIN_specALL, ! FFEINTRIN_specNONE, ! 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_genALLOCATED, "ALLOCATED", /* F90 */ ! FFEINTRIN_specALLOCATED, ! FFEINTRIN_specNONE, ! 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_genAND, "AND", /* F2C */ ! FFEINTRIN_spec_AND_I, ! FFEINTRIN_spec_AND_L, ! 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_genANY, "ANY", /* F90 */ ! FFEINTRIN_specANY, ! FFEINTRIN_specNONE, ! 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_genASIND, "ASIND", /* VXT */ ! FFEINTRIN_specASIND, ! FFEINTRIN_specDASIND, ! FFEINTRIN_specQASIND, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genASSOCIATED, "ASSOCIATED", /* F90 */ ! FFEINTRIN_specASSOCIATED, ! FFEINTRIN_specNONE, ! 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_genATAN2D, "ATAN2D", /* VXT */ ! FFEINTRIN_specATAN2D, ! FFEINTRIN_specDATAN2D, ! FFEINTRIN_specQATAN2D, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genATAND, "ATAND", /* VXT */ ! FFEINTRIN_specATAND, ! FFEINTRIN_specDATAND, ! FFEINTRIN_specQATAND, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genBIT_SIZE, "BIT_SIZE", /* F90 */ ! FFEINTRIN_specBIT_SIZE, ! FFEINTRIN_specNONE, ! 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_genBTEST, "BTEST", /* F90, VXT */ ! FFEINTRIN_specBTEST, ! FFEINTRIN_specBITEST, ! FFEINTRIN_specBJTEST, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genCEILING, "CEILING", /* F90 */ ! FFEINTRIN_specCEILING, ! FFEINTRIN_specNONE, ! 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_genCOSD, "COSD", /* VXT */ ! FFEINTRIN_specCOSD, ! FFEINTRIN_specDCOSD, ! FFEINTRIN_specQCOSD, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genCOUNT, "COUNT", /* F90 */ ! FFEINTRIN_specCOUNT, ! FFEINTRIN_specNONE, ! 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_genCSHIFT, "CSHIFT", /* F90 */ ! FFEINTRIN_specCSHIFT, ! FFEINTRIN_specNONE, ! 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_genDCMPLX, "DCMPLX", /* F2C, VXT */ ! FFEINTRIN_spec_DCMPLX_J, ! FFEINTRIN_spec_DCMPLX_I, ! FFEINTRIN_spec_DCMPLX_R, ! FFEINTRIN_spec_DCMPLX_D, ! FFEINTRIN_spec_DCMPLX_Q, ! FFEINTRIN_spec_DCMPLX_C, ! FFEINTRIN_spec_DCMPLX_E, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genDFLOAT, "DFLOAT", /* F2C, VXT */ ! FFEINTRIN_specDFLOAT, ! FFEINTRIN_specDFLOTI, ! FFEINTRIN_specDFLOTJ, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genDIGITS, "DIGITS", /* F90 */ ! FFEINTRIN_specDIGITS, ! FFEINTRIN_specNONE, ! 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_genDOT_PRODUCT, "DOT_PRODUCT", /* F90 */ ! FFEINTRIN_specDOT_PRODUCT, ! FFEINTRIN_specNONE, ! 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_genEOSHIFT, "EOSHIFT", /* F90 */ ! FFEINTRIN_specEOSHIFT, ! FFEINTRIN_specNONE, ! 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_genEPSILON, "EPSILON", /* F90 */ ! FFEINTRIN_specEPSILON, ! FFEINTRIN_specNONE, ! 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_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, ! FFEINTRIN_specNONE, ! 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_genFLOOR, "FLOOR", /* F90 */ ! FFEINTRIN_specFLOOR, ! FFEINTRIN_specNONE, ! 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_genFPABSP, "FPABSP", /* F2C */ ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! 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_genFPEXPN, "FPEXPN", /* F2C */ ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! 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_genFPFRAC, "FPFRAC", /* F2C */ ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! 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_genFPMAKE, "FPMAKE", /* F2C */ ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! 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_genFPRRSP, "FPRRSP", /* F2C */ ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! 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_genFPSCAL, "FPSCAL", /* F2C */ ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! 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_genFRACTION, "FRACTION", /* F90 */ ! FFEINTRIN_specFRACTION, ! FFEINTRIN_specNONE, ! 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_genHUGE, "HUGE", /* F90 */ ! FFEINTRIN_specHUGE, ! FFEINTRIN_specNONE, ! 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_genIACHAR, "IACHAR", /* F90, F2C */ ! FFEINTRIN_specIACHAR, ! FFEINTRIN_specNONE, ! 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_genIAND, "IAND", /* F90, VXT */ ! FFEINTRIN_specIAND, ! FFEINTRIN_specIIAND, ! FFEINTRIN_specJIAND, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genIBCLR, "IBCLR", /* F90, VXT */ ! FFEINTRIN_specIBCLR, ! FFEINTRIN_specIIBCLR, ! FFEINTRIN_specJIBCLR, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genIBITS, "IBITS", /* F90, VXT */ ! FFEINTRIN_specIBITS, ! FFEINTRIN_specIIBITS, ! FFEINTRIN_specJIBITS, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genIBSET, "IBSET", /* F90, VXT */ ! FFEINTRIN_specIBSET, ! FFEINTRIN_specIIBSET, ! FFEINTRIN_specJIBSET, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genIEOR, "IEOR", /* F90, VXT */ ! FFEINTRIN_specIEOR, ! FFEINTRIN_specIIEOR, ! FFEINTRIN_specJIEOR, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genIMAG, "IMAG", ! FFEINTRIN_spec_IMAG_C_F2C, ! FFEINTRIN_spec_IMAG_E_F2C, ! 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_genIOR, "IOR", /* F90, VXT */ ! FFEINTRIN_specIOR, ! FFEINTRIN_specIIOR, ! FFEINTRIN_specJIOR, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genIQINT, "IQINT", ! FFEINTRIN_specIIQINT, ! FFEINTRIN_specJIQINT, ! 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_genIQNINT, "IQNINT", ! FFEINTRIN_specIIQNNT, ! FFEINTRIN_specJIQNNT, ! 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_genISHFT, "ISHFT", /* F90 */ ! FFEINTRIN_specISHFT, ! FFEINTRIN_specIISHFT, ! FFEINTRIN_specJISHFT, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genISHFTC, "ISHFTC", /* F90, VXT */ ! FFEINTRIN_specISHFTC, ! FFEINTRIN_specIISHFTC, ! FFEINTRIN_specJISHFTC, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genKIND, "KIND", /* F90 */ ! FFEINTRIN_specKIND, ! FFEINTRIN_specNONE, ! 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_genLBOUND, "LBOUND", /* F90 */ ! FFEINTRIN_specLBOUND, ! FFEINTRIN_specNONE, ! 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_genLEN_TRIM, "LEN_TRIM", /* F90 */ ! FFEINTRIN_specLEN_TRIM, ! FFEINTRIN_specNONE, ! 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_genLOGICAL, "LOGICAL", /* F90 */ ! FFEINTRIN_specLOGICAL, ! FFEINTRIN_specNONE, ! 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_genLSHIFT, "LSHIFT", /* F2C */ ! FFEINTRIN_spec_LSHIFT_I, ! FFEINTRIN_spec_LSHIFT_L, ! 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_genMATMUL, "MATMUL", /* F90 */ ! FFEINTRIN_specMATMUL, ! FFEINTRIN_specNONE, ! 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_genMAXEXPONENT, "MAXEXPONENT", /* F90 */ ! FFEINTRIN_specMAXEXPONENT, ! FFEINTRIN_specNONE, ! 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_genMAXLOC, "MAXLOC", /* F90 */ ! FFEINTRIN_specMAXLOC, ! FFEINTRIN_specNONE, ! 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_genMAXVAL, "MAXVAL", /* F90 */ ! FFEINTRIN_specMAXVAL, ! FFEINTRIN_specNONE, ! 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_genMERGE, "MERGE", /* F90 */ ! FFEINTRIN_specMERGE, ! FFEINTRIN_specNONE, ! 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_genMINEXPONENT, "MINEXPONENT", /* F90 */ ! FFEINTRIN_specMINEXPONENT, ! FFEINTRIN_specNONE, ! 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_genMINLOC, "MINLOC", /* F90 */ ! FFEINTRIN_specMINLOC, ! FFEINTRIN_specNONE, ! 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_genMINVAL, "MINVAL", /* F90 */ ! FFEINTRIN_specMINVAL, ! FFEINTRIN_specNONE, ! 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_genMODULO, "MODULO", /* F90 */ ! FFEINTRIN_specMODULO, ! FFEINTRIN_specNONE, ! 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_genMVBITS, "MVBITS", ! FFEINTRIN_specMVBITS, ! FFEINTRIN_specNONE, ! 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_genNEAREST, "NEAREST", /* F90 */ ! FFEINTRIN_specNEAREST, ! FFEINTRIN_specNONE, ! 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_genNOT, "NOT", /* F2C, F90, VXT */ ! FFEINTRIN_specNOT, ! FFEINTRIN_spec_NOT_I, ! FFEINTRIN_spec_NOT_L, ! FFEINTRIN_specINOT, ! FFEINTRIN_specJNOT, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genOR, "OR", /* F2C */ ! FFEINTRIN_spec_OR_I, ! FFEINTRIN_spec_OR_L, ! 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_genPACK, "PACK", /* F90 */ ! FFEINTRIN_specPACK, ! FFEINTRIN_specNONE, ! 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_genPRECISION, "PRECISION", /* F90 */ ! FFEINTRIN_specPRECISION, ! FFEINTRIN_specNONE, ! 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_genPRESENT, "PRESENT", /* F90 */ ! FFEINTRIN_specPRESENT, ! FFEINTRIN_specNONE, ! 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_genPRODUCT, "PRODUCT", /* F90 */ ! FFEINTRIN_specPRODUCT, ! FFEINTRIN_specNONE, ! 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_genQEXT, "QEXT", /* VXT */ ! FFEINTRIN_spec_QEXT_J, ! FFEINTRIN_spec_QEXT_I, ! FFEINTRIN_specQEXT, ! FFEINTRIN_specQEXTD, ! FFEINTRIN_spec_QEXT_Q, ! FFEINTRIN_spec_QEXT_C, ! FFEINTRIN_spec_QEXT_E, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genQFLOAT, "QFLOAT", /* VXT */ ! FFEINTRIN_spec_QFLOAT_J, ! FFEINTRIN_spec_QFLOAT_I, ! 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_genRADIX, "RADIX", /* F90 */ ! FFEINTRIN_specRADIX, ! FFEINTRIN_specNONE, ! 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_genRANGE, "RANGE", /* F90 */ ! FFEINTRIN_specRANGE, ! FFEINTRIN_specNONE, ! 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_genREPEAT, "REPEAT", /* F90 */ ! FFEINTRIN_specREPEAT, ! FFEINTRIN_specNONE, ! 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_genRESHAPE, "RESHAPE", /* F90 */ ! FFEINTRIN_specRESHAPE, ! FFEINTRIN_specNONE, ! 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_genRRSPACING, "RRSPACING", /* F90 */ ! FFEINTRIN_specRRSPACING, ! FFEINTRIN_specNONE, ! 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_genRSHIFT, "RSHIFT", /* F2C */ ! FFEINTRIN_spec_RSHIFT_I, ! FFEINTRIN_spec_RSHIFT_L, ! 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_genSCALE, "SCALE", /* F90 */ ! FFEINTRIN_specSCALE, ! FFEINTRIN_specNONE, ! 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_genSCAN, "SCAN", /* F90 */ ! FFEINTRIN_specSCAN, ! FFEINTRIN_specNONE, ! 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_genSEL_INT_KIND, "SEL_INT_KIND", /* F90 */ ! FFEINTRIN_specSEL_INT_KIND, ! FFEINTRIN_specNONE, ! 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_genSEL_REAL_KIND, "SEL_REAL_KIND", /* F90 */ ! FFEINTRIN_specSEL_REAL_KIND, ! FFEINTRIN_specNONE, ! 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_genSET_EXPONENT, "SET_EXPONENT", /* F90 */ ! FFEINTRIN_specSET_EXPONENT, ! FFEINTRIN_specNONE, ! 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_genSHAPE, "SHAPE", /* F90 */ ! FFEINTRIN_specSHAPE, ! FFEINTRIN_specNONE, ! 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_genSIND, "SIND", /* VXT */ ! FFEINTRIN_specSIND, ! FFEINTRIN_specDSIND, ! FFEINTRIN_specQSIND, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genSPACING, "SPACING", /* F90 */ ! FFEINTRIN_specSPACING, ! FFEINTRIN_specNONE, ! 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_genSPREAD, "SPREAD", /* F90 */ ! FFEINTRIN_specSPREAD, ! FFEINTRIN_specNONE, ! 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_genSUM, "SUM", /* F90 */ ! FFEINTRIN_specSUM, ! FFEINTRIN_specNONE, ! 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_genTAND, "TAND", /* VXT */ ! FFEINTRIN_specTAND, ! FFEINTRIN_specDTAND, ! FFEINTRIN_specQTAND, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE ! ) ! DEFGEN (FFEINTRIN_genTINY, "TINY", /* F90 */ ! FFEINTRIN_specTINY, ! FFEINTRIN_specNONE, ! 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_genTRANSFER, "TRANSFER", /* F90 */ ! FFEINTRIN_specTRANSFER, ! FFEINTRIN_specNONE, ! 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_genTRANSPOSE, "TRANSPOSE", /* F90 */ ! FFEINTRIN_specTRANSPOSE, ! FFEINTRIN_specNONE, ! 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_genTRIM, "TRIM", /* F90 */ ! FFEINTRIN_specTRIM, ! FFEINTRIN_specNONE, ! 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_genUBOUND, "UBOUND", /* F90 */ ! FFEINTRIN_specUBOUND, ! FFEINTRIN_specNONE, ! 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_genUNPACK, "UNPACK", /* F90 */ ! FFEINTRIN_specUNPACK, ! FFEINTRIN_specNONE, ! 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_genVERIFY, "VERIFY", /* F90 */ ! FFEINTRIN_specVERIFY, ! FFEINTRIN_specNONE, ! 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_genXOR, "XOR", /* F2C */ ! FFEINTRIN_spec_XOR_I, ! FFEINTRIN_spec_XOR_L, ! 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_genZEXT, "ZEXT", /* VXT */ ! FFEINTRIN_spec_JZEXT_N, ! FFEINTRIN_spec_JZEXT_M, ! FFEINTRIN_spec_JZEXT_J, ! FFEINTRIN_spec_IZEXT_N, ! FFEINTRIN_spec_IZEXT_M, ! FFEINTRIN_spec_IZEXT_L, ! FFEINTRIN_spec_IZEXT_J, ! FFEINTRIN_spec_IZEXT_I, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, ! FFEINTRIN_specNONE, FFEINTRIN_specNONE, FFEINTRIN_specNONE --- 26,371 ---- */ ! /* Intrinsic names listed in alphabetical order, sorted by uppercase name. ! This list is keyed to the names of intrinsics as seen in source code. */ ! DEFNAME ("ABORT", "abort", "Abort", genNONE, specABORT) /* UNIX */ ! DEFNAME ("ABS", "abs", "Abs", genNONE, specABS) ! DEFNAME ("ACHAR", "achar", "AChar", genNONE, specACHAR) /* F90, F2C */ ! DEFNAME ("ACOS", "acos", "ACos", genNONE, specACOS) ! DEFNAME ("ACOSD", "acosd", "ACosD", genNONE, specACOSD) /* VXT */ ! DEFNAME ("ADJUSTL", "adjustl", "AdjustL", genNONE, specADJUSTL) /* F90 */ ! DEFNAME ("ADJUSTR", "adjustr", "AdjustR", genNONE, specADJUSTR) /* F90 */ ! DEFNAME ("AIMAG", "aimag", "AImag", genNONE, specAIMAG) ! DEFNAME ("AIMAX0", "aimax0", "AIMax0", genNONE, specAIMAX0) /* VXT */ ! DEFNAME ("AIMIN0", "aimin0", "AIMin0", genNONE, specAIMIN0) /* VXT */ ! DEFNAME ("AINT", "aint", "AInt", genNONE, specAINT) ! DEFNAME ("AJMAX0", "ajmax0", "AJMax0", genNONE, specAJMAX0) /* VXT */ ! DEFNAME ("AJMIN0", "ajmin0", "AJMin0", genNONE, specAJMIN0) /* VXT */ ! DEFNAME ("ALL", "all", "All", genNONE, specALL) /* F90 */ ! DEFNAME ("ALLOCATED", "allocated", "Allocated", genNONE, specALLOCATED) /* F90 */ ! DEFNAME ("ALOG", "alog", "ALog", genNONE, specALOG) ! DEFNAME ("ALOG10", "alog10", "ALog10", genNONE, specALOG10) ! DEFNAME ("AMAX0", "amax0", "AMax0", genNONE, specAMAX0) ! DEFNAME ("AMAX1", "amax1", "AMax1", genNONE, specAMAX1) ! DEFNAME ("AMIN0", "amin0", "AMin0", genNONE, specAMIN0) ! DEFNAME ("AMIN1", "amin1", "AMin1", genNONE, specAMIN1) ! DEFNAME ("AMOD", "amod", "AMod", genNONE, specAMOD) ! DEFNAME ("AND", "and", "And", genNONE, specAND) /* F2C */ ! DEFNAME ("ANINT", "anint", "ANInt", genNONE, specANINT) ! DEFNAME ("ANY", "any", "Any", genNONE, specANY) /* F90 */ ! DEFNAME ("ASIN", "asin", "ASin", genNONE, specASIN) ! DEFNAME ("ASIND", "asind", "ASinD", genNONE, specASIND) /* VXT */ ! DEFNAME ("ASSOCIATED", "associated", "Associated", genNONE, specASSOCIATED) /* F90 */ ! DEFNAME ("ATAN", "atan", "ATan", genNONE, specATAN) ! DEFNAME ("ATAN2", "atan2", "ATan2", genNONE, specATAN2) ! DEFNAME ("ATAN2D", "atan2d", "ATan2D", genNONE, specATAN2D) /* VXT */ ! DEFNAME ("ATAND", "atand", "ATanD", genNONE, specATAND) /* VXT */ ! DEFNAME ("BITEST", "bitest", "BITest", genNONE, specBITEST) /* VXT */ ! DEFNAME ("BIT_SIZE", "bit_size", "Bit_Size", genNONE, specBIT_SIZE) /* F90 */ ! DEFNAME ("BJTEST", "bjtest", "BJTest", genNONE, specBJTEST) /* VXT */ ! DEFNAME ("BTEST", "btest", "BTest", genNONE, specBTEST) /* F90, VXT */ ! DEFNAME ("CABS", "cabs", "CAbs", genNONE, specCABS) ! DEFNAME ("CCOS", "ccos", "CCos", genNONE, specCCOS) ! DEFNAME ("CDABS", "cdabs", "CDAbs", genNONE, specCDABS) /* VXT */ ! DEFNAME ("CDCOS", "cdcos", "CDCos", genNONE, specCDCOS) /* VXT */ ! DEFNAME ("CDEXP", "cdexp", "CDExp", genNONE, specCDEXP) /* VXT */ ! DEFNAME ("CDLOG", "cdlog", "CDLog", genNONE, specCDLOG) /* VXT */ ! DEFNAME ("CDSIN", "cdsin", "CDSin", genNONE, specCDSIN) /* VXT */ ! DEFNAME ("CDSQRT", "cdsqrt", "CDSqRt", genNONE, specCDSQRT) /* VXT */ ! DEFNAME ("CEILING", "ceiling", "Ceiling", genNONE, specCEILING) /* F90 */ ! DEFNAME ("CEXP", "cexp", "CExp", genNONE, specCEXP) ! DEFNAME ("CHAR", "char", "Char", genNONE, specCHAR) ! DEFNAME ("CLOG", "clog", "CLog", genNONE, specCLOG) ! DEFNAME ("CMPLX", "cmplx", "Cmplx", genNONE, specCMPLX) ! DEFNAME ("CONJG", "conjg", "Conjg", genNONE, specCONJG) ! DEFNAME ("COS", "cos", "Cos", genNONE, specCOS) ! DEFNAME ("COSD", "cosd", "CosD", genNONE, specCOSD) /* VXT */ ! DEFNAME ("COSH", "cosh", "CosH", genNONE, specCOSH) ! DEFNAME ("COUNT", "count", "Count", genNONE, specCOUNT) /* F90 */ ! DEFNAME ("CSHIFT", "cshift", "CShift", genNONE, specCSHIFT) /* F90 */ ! DEFNAME ("CSIN", "csin", "CSin", genNONE, specCSIN) ! DEFNAME ("CSQRT", "csqrt", "CSqRt", genNONE, specCSQRT) ! DEFNAME ("DABS", "dabs", "DAbs", genNONE, specDABS) ! DEFNAME ("DACOS", "dacos", "DACos", genNONE, specDACOS) ! DEFNAME ("DACOSD", "dacosd", "DACosD", genNONE, specDACOSD) /* VXT */ ! DEFNAME ("DASIN", "dasin", "DASin", genNONE, specDASIN) ! DEFNAME ("DASIND", "dasind", "DASinD", genNONE, specDASIND) /* VXT */ ! DEFNAME ("DATAN", "datan", "DATan", genNONE, specDATAN) ! DEFNAME ("DATAN2", "datan2", "DATan2", genNONE, specDATAN2) ! DEFNAME ("DATAN2D", "datan2d", "DATan2D", genNONE, specDATAN2D) /* VXT */ ! DEFNAME ("DATAND", "datand", "DATanD", genNONE, specDATAND) /* VXT */ ! DEFNAME ("DATE_AND_TIME", "date_and_time", "Date_and_Time", genNONE, specDATE_AND_TIME) /* F90 */ ! DEFNAME ("DBLE", "dble", "Dble", genNONE, specDBLE) ! DEFNAME ("DBLEQ", "dbleq", "DbleQ", genNONE, specDBLEQ) /* VXT */ ! DEFNAME ("DCMPLX", "dcmplx", "DCmplx", genNONE, specDCMPLX) /* F2C, VXT */ ! DEFNAME ("DCONJG", "dconjg", "DConjg", genNONE, specDCONJG) /* F2C, VXT */ ! DEFNAME ("DCOS", "dcos", "DCos", genNONE, specDCOS) ! DEFNAME ("DCOSD", "dcosd", "DCosD", genNONE, specDCOSD) /* VXT */ ! DEFNAME ("DCOSH", "dcosh", "DCosH", genNONE, specDCOSH) ! DEFNAME ("DDIM", "ddim", "DDim", genNONE, specDDIM) ! DEFNAME ("DERF", "derf", "DErF", genNONE, specDERF) /* UNIX */ ! DEFNAME ("DERFC", "derfc", "DErFC", genNONE, specDERFC) /* UNIX */ ! DEFNAME ("DEXP", "dexp", "DExp", genNONE, specDEXP) ! DEFNAME ("DFLOAT", "dfloat", "DFloat", genNONE, specDFLOAT) /* F2C, VXT */ ! DEFNAME ("DFLOTI", "dfloti", "DFlotI", genNONE, specDFLOTI) /* VXT */ ! DEFNAME ("DFLOTJ", "dflotj", "DFlotJ", genNONE, specDFLOTJ) /* VXT */ ! DEFNAME ("DIGITS", "digits", "Digits", genNONE, specDIGITS) /* F90 */ ! DEFNAME ("DIM", "dim", "DiM", genNONE, specDIM) ! DEFNAME ("DIMAG", "dimag", "DImag", genNONE, specDIMAG) /* VXT */ ! DEFNAME ("DINT", "dint", "DInt", genNONE, specDINT) ! DEFNAME ("DLOG", "dlog", "DLog", genNONE, specDLOG) ! DEFNAME ("DLOG10", "dlog10", "DLog10", genNONE, specDLOG10) ! DEFNAME ("DMAX1", "dmax1", "DMax1", genNONE, specDMAX1) ! DEFNAME ("DMIN1", "dmin1", "DMin1", genNONE, specDMIN1) ! DEFNAME ("DMOD", "dmod", "DMod", genNONE, specDMOD) ! DEFNAME ("DNINT", "dnint", "DNInt", genNONE, specDNINT) ! DEFNAME ("DOT_PRODUCT", "dot_product", "Dot_Product", genNONE, specDOT_PRODUCT) /* F90 */ ! DEFNAME ("DPROD", "dprod", "DProd", genNONE, specDPROD) ! DEFNAME ("DREAL", "dreal", "DReal", genNONE, specDREAL) /* VXT */ ! DEFNAME ("DSIGN", "dsign", "DSign", genNONE, specDSIGN) ! DEFNAME ("DSIN", "dsin", "DSin", genNONE, specDSIN) ! DEFNAME ("DSIND", "dsind", "DSinD", genNONE, specDSIND) /* VXT */ ! DEFNAME ("DSINH", "dsinh", "DSinH", genNONE, specDSINH) ! DEFNAME ("DSQRT", "dsqrt", "DSqRt", genNONE, specDSQRT) ! DEFNAME ("DTAN", "dtan", "DTan", genNONE, specDTAN) ! DEFNAME ("DTAND", "dtand", "DTanD", genNONE, specDTAND) /* VXT */ ! DEFNAME ("DTANH", "dtanh", "DTanH", genNONE, specDTANH) ! DEFNAME ("EOSHIFT", "eoshift", "EOShift", genNONE, specEOSHIFT) /* F90 */ ! DEFNAME ("EPSILON", "epsilon", "Epsilon", genNONE, specEPSILON) /* F90 */ ! DEFNAME ("ERF", "erf", "ErF", genNONE, specERF) /* UNIX */ ! DEFNAME ("ERFC", "erfc", "ErFC", genNONE, specERFC) /* UNIX */ ! DEFNAME ("EXIT", "exit", "Exit", genNONE, specEXIT) /* UNIX */ ! DEFNAME ("EXP", "exp", "Exp", genNONE, specEXP) ! DEFNAME ("EXPONENT", "exponent", "Exponent", genNONE, specEXPONENT) /* F90 */ ! DEFNAME ("FLOAT", "float", "Float", genNONE, specFLOAT) ! DEFNAME ("FLOATI", "floati", "FloatI", genNONE, specFLOATI) /* VXT */ ! DEFNAME ("FLOATJ", "floatj", "FloatJ", genNONE, specFLOATJ) /* VXT */ ! DEFNAME ("FLOOR", "floor", "Floor", genNONE, specFLOOR) /* F90 */ ! DEFNAME ("FLUSH", "flush", "Flush", genNONE, specFLUSH) /* UNIX */ ! DEFNAME ("FPABSP", "fpabsp", "FPAbsP", genFPABSP, specNONE) /* F2C */ ! DEFNAME ("FPEXPN", "fpexpn", "FPExpn", genFPEXPN, specNONE) /* F2C */ ! DEFNAME ("FPFRAC", "fpfrac", "FPFrac", genFPFRAC, specNONE) /* F2C */ ! DEFNAME ("FPMAKE", "fpmake", "FPMake", genFPMAKE, specNONE) /* F2C */ ! DEFNAME ("FPRRSP", "fprrsp", "FPRRSp", genFPRRSP, specNONE) /* F2C */ ! DEFNAME ("FPSCAL", "fpscal", "FPScal", genFPSCAL, specNONE) /* F2C */ ! DEFNAME ("FRACTION", "fraction", "Fraction", genNONE, specFRACTION) /* F90 */ ! DEFNAME ("GETARG", "getarg", "GetArg", genNONE, specGETARG) /* UNIX */ ! DEFNAME ("GETENV", "getenv", "GetEnv", genNONE, specGETENV) /* UNIX */ ! DEFNAME ("HUGE", "huge", "Huge", genNONE, specHUGE) /* F90 */ ! DEFNAME ("IABS", "iabs", "IAbs", genNONE, specIABS) ! DEFNAME ("IACHAR", "iachar", "IAChar", genNONE, specIACHAR) /* F90, F2C */ ! DEFNAME ("IAND", "iand", "IAnd", genNONE, specIAND) /* F90, VXT */ ! DEFNAME ("IARGC", "iargc", "IArgC", genNONE, specIARGC) /* UNIX */ ! DEFNAME ("IBCLR", "ibclr", "IBClr", genNONE, specIBCLR) /* F90, VXT */ ! DEFNAME ("IBITS", "ibits", "IBits", genNONE, specIBITS) /* F90, VXT */ ! DEFNAME ("IBSET", "ibset", "IBSet", genNONE, specIBSET) /* F90, VXT */ ! DEFNAME ("ICHAR", "ichar", "IChar", genNONE, specICHAR) ! DEFNAME ("IDIM", "idim", "IDiM", genNONE, specIDIM) ! DEFNAME ("IDINT", "idint", "IDInt", genNONE, specIDINT) ! DEFNAME ("IDNINT", "idnint", "IDNInt", genNONE, specIDNINT) ! DEFNAME ("IEOR", "ieor", "IEOr", genNONE, specIEOR) /* F90, VXT */ ! DEFNAME ("IFIX", "ifix", "IFix", genNONE, specIFIX) ! DEFNAME ("IIABS", "iiabs", "IIAbs", genNONE, specIIABS) /* VXT */ ! DEFNAME ("IIAND", "iiand", "IIAnd", genNONE, specIIAND) /* VXT */ ! DEFNAME ("IIBCLR", "iibclr", "IIBClr", genNONE, specIIBCLR) /* VXT */ ! DEFNAME ("IIBITS", "iibits", "IIBits", genNONE, specIIBITS) /* VXT */ ! DEFNAME ("IIBSET", "iibset", "IIBSet", genNONE, specIIBSET) /* VXT */ ! DEFNAME ("IIDIM", "iidim", "IIDiM", genNONE, specIIDIM) /* VXT */ ! DEFNAME ("IIDINT", "iidint", "IIDint", genNONE, specIIDINT) /* VXT */ ! DEFNAME ("IIDNNT", "iidnnt", "IIDNnt", genNONE, specIIDNNT) /* VXT */ ! DEFNAME ("IIEOR", "iieor", "IIEOr", genNONE, specIIEOR) /* VXT */ ! DEFNAME ("IIFIX", "iifix", "IIFix", genNONE, specIIFIX) /* VXT */ ! DEFNAME ("IINT", "iint", "IInt", genNONE, specIINT) /* VXT */ ! DEFNAME ("IIOR", "iior", "IIOr", genNONE, specIIOR) /* VXT */ ! DEFNAME ("IIQINT", "iiqint", "IIQint", genNONE, specIIQINT) /* VXT */ ! DEFNAME ("IIQNNT", "iiqnnt", "IIQNnt", genNONE, specIIQNNT) /* VXT */ ! DEFNAME ("IISHFT", "iishft", "IIShft", genNONE, specNONE) /* VXT */ ! DEFNAME ("IISHFTC", "iishftc", "IIShftC", genNONE, specIISHFTC) /* VXT */ ! DEFNAME ("IISIGN", "iisign", "IISign", genNONE, specIISIGN) /* VXT */ ! DEFNAME ("IMAG", "imag", "Imag", genNONE, specIMAG) /* F2C */ ! DEFNAME ("IMAX0", "imax0", "IMax0", genNONE, specIMAX0) /* VXT */ ! DEFNAME ("IMAX1", "imax1", "IMax1", genNONE, specIMAX1) /* VXT */ ! DEFNAME ("IMIN0", "imin0", "IMin0", genNONE, specIMIN0) /* VXT */ ! DEFNAME ("IMIN1", "imin1", "IMin1", genNONE, specIMIN1) /* VXT */ ! DEFNAME ("IMOD", "imod", "IMod", genNONE, specIMOD) /* VXT */ ! DEFNAME ("INDEX", "index", "Index", genNONE, specINDEX) ! DEFNAME ("ININT", "inint", "INInt", genNONE, specININT) /* VXT */ ! DEFNAME ("INOT", "inot", "INot", genNONE, specINOT) /* VXT */ ! DEFNAME ("INT", "int", "Int", genNONE, specINT) ! DEFNAME ("IOR", "ior", "IOr", genNONE, specIOR) /* F90, VXT */ ! DEFNAME ("ISHFT", "ishft", "IShft", genNONE, specISHFT) /* F90 */ ! DEFNAME ("ISHFTC", "ishftc", "IShftC", genNONE, specISHFTC) /* F90, VXT */ ! DEFNAME ("ISIGN", "isign", "ISign", genNONE, specISIGN) ! DEFNAME ("IZEXT", "izext", "IZExt", genNONE, specIZEXT) /* VXT */ ! DEFNAME ("JIABS", "jiabs", "JIAbs", genNONE, specJIABS) /* VXT */ ! DEFNAME ("JIAND", "jiand", "JIAnd", genNONE, specJIAND) /* VXT */ ! DEFNAME ("JIBCLR", "jibclr", "JIBClr", genNONE, specJIBCLR) /* VXT */ ! DEFNAME ("JIBITS", "jibits", "JIBits", genNONE, specJIBITS) /* VXT */ ! DEFNAME ("JIBSET", "jibset", "JIBSet", genNONE, specJIBSET) /* VXT */ ! DEFNAME ("JIDIM", "jidim", "JIDiM", genNONE, specJIDIM) /* VXT */ ! DEFNAME ("JIDINT", "jidint", "JIDint", genNONE, specJIDINT) /* VXT */ ! DEFNAME ("JIDNNT", "jidnnt", "JIDNnt", genNONE, specJIDNNT) /* VXT */ ! DEFNAME ("JIEOR", "jieor", "JIEOr", genNONE, specJIEOR) /* VXT */ ! DEFNAME ("JIFIX", "jifix", "JIFix", genNONE, specJIFIX) /* VXT */ ! DEFNAME ("JINT", "jint", "JInt", genNONE, specJINT) /* VXT */ ! DEFNAME ("JIOR", "jior", "JIOr", genNONE, specJIOR) /* VXT */ ! DEFNAME ("JIQINT", "jiqint", "JIQint", genNONE, specJIQINT) /* VXT */ ! DEFNAME ("JIQNNT", "jiqnnt", "JIQNnt", genNONE, specJIQNNT) /* VXT */ ! DEFNAME ("JISHFT", "jishft", "JIShft", genNONE, specJISHFT) /* VXT */ ! DEFNAME ("JISHFTC", "jishftc", "JIShftC", genNONE, specJISHFTC) /* VXT */ ! DEFNAME ("JISIGN", "jisign", "JISign", genNONE, specJISIGN) /* VXT */ ! DEFNAME ("JMAX0", "jmax0", "JMax0", genNONE, specJMAX0) /* VXT */ ! DEFNAME ("JMAX1", "jmax1", "JMax1", genNONE, specJMAX1) /* VXT */ ! DEFNAME ("JMIN0", "jmin0", "JMin0", genNONE, specJMIN0) /* VXT */ ! DEFNAME ("JMIN1", "jmin1", "JMin1", genNONE, specJMIN1) /* VXT */ ! DEFNAME ("JMOD", "jmod", "JMod", genNONE, specJMOD) /* VXT */ ! DEFNAME ("JNINT", "jnint", "JNInt", genNONE, specJNINT) /* VXT */ ! DEFNAME ("JNOT", "jnot", "JNot", genNONE, specJNOT) /* VXT */ ! DEFNAME ("JZEXT", "jzext", "JZExt", genNONE, specJZEXT) /* VXT */ ! DEFNAME ("KIND", "kind", "Kind", genNONE, specKIND) /* F90 */ ! DEFNAME ("LBOUND", "lbound", "LBound", genNONE, specLBOUND) /* F90 */ ! DEFNAME ("LEN", "len", "Len", genNONE, specLEN) ! DEFNAME ("LEN_TRIM", "len_trim", "Len_Trim", genNONE, specLEN_TRIM) /* F90 */ ! DEFNAME ("LGE", "lge", "LGe", genNONE, specLGE) ! DEFNAME ("LGT", "lgt", "LGt", genNONE, specLGT) ! DEFNAME ("LLE", "lle", "LLe", genNONE, specLLE) ! DEFNAME ("LLT", "llt", "LLt", genNONE, specLLT) ! DEFNAME ("LOC", "loc", "Loc", genNONE, specLOC) /* VXT */ ! DEFNAME ("LOG", "log", "Log", genNONE, specLOG) ! DEFNAME ("LOG10", "log10", "Log10", genNONE, specLOG10) ! DEFNAME ("LOGICAL", "logical", "Logical", genNONE, specLOGICAL) /* F90 */ ! DEFNAME ("LSHIFT", "lshift", "LShift", genNONE, specLSHIFT) /* F2C */ ! DEFNAME ("MATMUL", "matmul", "MatMul", genNONE, specMATMUL) /* F90 */ ! DEFNAME ("MAX", "max", "Max", genNONE, specMAX) ! DEFNAME ("MAX0", "max0", "Max0", genNONE, specMAX0) ! DEFNAME ("MAX1", "max1", "Max1", genNONE, specMAX1) ! DEFNAME ("MAXEXPONENT", "maxexponent", "MaxExponent", genNONE, specMAXEXPONENT) /* F90 */ ! DEFNAME ("MAXLOC", "maxloc", "MaxLoc", genNONE, specMAXLOC) /* F90 */ ! DEFNAME ("MAXVAL", "maxval", "MaxVal", genNONE, specMAXVAL) /* F90 */ ! DEFNAME ("MERGE", "merge", "Merge", genNONE, specMERGE) /* F90 */ ! DEFNAME ("MIN", "min", "Min", genNONE, specMIN) ! DEFNAME ("MIN0", "min0", "Min0", genNONE, specMIN0) ! DEFNAME ("MIN1", "min1", "Min1", genNONE, specMIN1) ! DEFNAME ("MINEXPONENT", "minexponent", "MinExponent", genNONE, specMINEXPONENT) /* F90 */ ! DEFNAME ("MINLOC", "minloc", "MinLoc", genNONE, specMINLOC) /* F90 */ ! DEFNAME ("MINVAL", "minval", "MinVal", genNONE, specMINVAL) /* F90 */ ! DEFNAME ("MOD", "mod", "Mod", genNONE, specMOD) ! DEFNAME ("MODULO", "modulo", "Modulo", genNONE, specMODULO) /* F90 */ ! DEFNAME ("MVBITS", "mvbits", "MvBits", genNONE, specMVBITS) /* F90 */ ! DEFNAME ("NEAREST", "nearest", "Nearest", genNONE, specNEAREST) /* F90 */ ! DEFNAME ("NINT", "nint", "NInt", genNONE, specNINT) ! DEFNAME ("NOT", "not", "Not", genNONE, specNOT) /* F2C, F90, VXT */ ! DEFNAME ("OR", "or", "Or", genNONE, specOR) /* F2C */ ! DEFNAME ("PACK", "pack", "Pack", genNONE, specPACK) /* F90 */ ! DEFNAME ("PRECISION", "precision", "Precision", genNONE, specPRECISION) /* F90 */ ! DEFNAME ("PRESENT", "present", "Present", genNONE, specPRESENT) /* F90 */ ! DEFNAME ("PRODUCT", "product", "Product", genNONE, specPRODUCT) /* F90 */ ! DEFNAME ("QABS", "qabs", "QAbs", genNONE, specQABS) /* VXT */ ! DEFNAME ("QACOS", "qacos", "QACos", genNONE, specQACOS) /* VXT */ ! DEFNAME ("QACOSD", "qacosd", "QACosD", genNONE, specQACOSD) /* VXT */ ! DEFNAME ("QASIN", "qasin", "QASin", genNONE, specQASIN) /* VXT */ ! DEFNAME ("QASIND", "qasind", "QASinD", genNONE, specQASIND) /* VXT */ ! DEFNAME ("QATAN", "qatan", "QATan", genNONE, specQATAN) /* VXT */ ! DEFNAME ("QATAN2", "qatan2", "QATan2", genNONE, specQATAN2) /* VXT */ ! DEFNAME ("QATAN2D", "qatan2d", "QATan2D", genNONE, specQATAN2D) /* VXT */ ! DEFNAME ("QATAND", "qatand", "QATanD", genNONE, specQATAND) /* VXT */ ! DEFNAME ("QCOS", "qcos", "QCos", genNONE, specQCOS) /* VXT */ ! DEFNAME ("QCOSD", "qcosd", "QCosD", genNONE, specQCOSD) /* VXT */ ! DEFNAME ("QCOSH", "qcosh", "QCosH", genNONE, specQCOSH) /* VXT */ ! DEFNAME ("QDIM", "qdim", "QDiM", genNONE, specQDIM) /* VXT */ ! DEFNAME ("QEXP", "qexp", "QExp", genNONE, specQEXP) /* VXT */ ! DEFNAME ("QEXT", "qext", "QExt", genNONE, specQEXT) /* VXT */ ! DEFNAME ("QEXTD", "qextd", "QExtD", genNONE, specQEXTD) /* VXT */ ! DEFNAME ("QFLOAT", "qfloat", "QFloat", genNONE, specQFLOAT) /* VXT */ ! DEFNAME ("QINT", "qint", "QInt", genNONE, specQINT) /* VXT */ ! DEFNAME ("QLOG", "qlog", "QLog", genNONE, specQLOG) /* VXT */ ! DEFNAME ("QLOG10", "qlog10", "QLog10", genNONE, specQLOG10) /* VXT */ ! DEFNAME ("QMAX1", "qmax1", "QMax1", genNONE, specQMAX1) /* VXT */ ! DEFNAME ("QMIN1", "qmin1", "QMin1", genNONE, specQMIN1) /* VXT */ ! DEFNAME ("QMOD", "qmod", "QMod", genNONE, specQMOD) /* VXT */ ! DEFNAME ("QNINT", "qnint", "QNInt", genNONE, specQNINT) /* VXT */ ! DEFNAME ("QSIN", "qsin", "QSin", genNONE, specQSIN) /* VXT */ ! DEFNAME ("QSIND", "qsind", "QSinD", genNONE, specQSIND) /* VXT */ ! DEFNAME ("QSINH", "qsinh", "QSinH", genNONE, specQSINH) /* VXT */ ! DEFNAME ("QSQRT", "qsqrt", "QSqRt", genNONE, specQSQRT) /* VXT */ ! DEFNAME ("QTAN", "qtan", "QTan", genNONE, specQTAN) /* VXT */ ! DEFNAME ("QTAND", "qtand", "QTanD", genNONE, specQTAND) /* VXT */ ! DEFNAME ("QTANH", "qtanh", "QTanH", genNONE, specQTANH) /* VXT */ ! DEFNAME ("RADIX", "radix", "Radix", genNONE, specRADIX) /* F90 */ ! DEFNAME ("RANDOM_NUMBER", "random_number", "Random_Number", genNONE, specRANDOM_NUMBER) /* F90 */ ! DEFNAME ("RANDOM_SEED", "random_seed", "Random_Seed", genNONE, specRANDOM_SEED) /* F90 */ ! DEFNAME ("RANGE", "range", "Range", genNONE, specRANGE) /* F90 */ ! DEFNAME ("REAL", "real", "Real", genNONE, specREAL) ! DEFNAME ("REPEAT", "repeat", "Repeat", genNONE, specREPEAT) /* F90 */ ! DEFNAME ("RESHAPE", "reshape", "Reshape", genNONE, specRESHAPE) /* F90 */ ! DEFNAME ("RRSPACING", "rrspacing", "RRSpacing", genNONE, specRRSPACING) /* F90 */ ! DEFNAME ("RSHIFT", "rshift", "RShift", genNONE, specRSHIFT) /* F2C */ ! DEFNAME ("SCALE", "scale", "Scale", genNONE, specSCALE) /* F90 */ ! DEFNAME ("SCAN", "scan", "Scan", genNONE, specSCAN) /* F90 */ ! DEFNAME ("SELECTED_INT_KIND", "selected_int_kind", "Selected_Int_Kind", genNONE, specSEL_INT_KIND) /* F90 */ ! DEFNAME ("SELECTED_REAL_KIND", "selected_real_kind", "Selected_Real_Kind", genNONE, specSEL_REAL_KIND) /* F90 */ ! DEFNAME ("SET_EXPONENT", "set_exponent", "Set_Exponent", genNONE, specSET_EXPONENT) /* F90 */ ! DEFNAME ("SHAPE", "shape", "Shape", genNONE, specSHAPE) /* F90 */ ! DEFNAME ("SIGN", "sign", "Sign", genNONE, specSIGN) ! DEFNAME ("SIGNAL", "signal", "Signal", genNONE, specSIGNAL) /* UNIX */ ! DEFNAME ("SIN", "sin", "Sin", genNONE, specSIN) ! DEFNAME ("SIND", "sind", "SinD", genNONE, specSIND) /* VXT */ ! DEFNAME ("SINH", "sinh", "SinH", genNONE, specSINH) ! DEFNAME ("SNGL", "sngl", "Sngl", genNONE, specSNGL) ! DEFNAME ("SNGLQ", "snglq", "SnglQ", genNONE, specSNGLQ) /* VXT */ ! DEFNAME ("SPACING", "spacing", "Spacing", genNONE, specSPACING) /* F90 */ ! DEFNAME ("SPREAD", "spread", "Spread", genNONE, specSPREAD) /* F90 */ ! DEFNAME ("SQRT", "sqrt", "SqRt", genNONE, specSQRT) ! DEFNAME ("SUM", "sum", "Sum", genNONE, specSUM) /* F90 */ ! DEFNAME ("SYSTEM", "system", "System", genNONE, specSYSTEM) /* UNIX */ ! DEFNAME ("SYSTEM_CLOCK", "system_clock", "System_Clock", genNONE, specSYSTEM_CLOCK) /* F90 */ ! DEFNAME ("TAN", "tan", "Tan", genNONE, specTAN) ! DEFNAME ("TAND", "tand", "TanD", genNONE, specTAND) /* VXT */ ! DEFNAME ("TANH", "tanh", "TanH", genNONE, specTANH) ! DEFNAME ("TINY", "tiny", "Tiny", genNONE, specTINY) /* F90 */ ! DEFNAME ("TRANSFER", "transfer", "Transfer", genNONE, specTRANSFER) /* F90 */ ! DEFNAME ("TRANSPOSE", "transpose", "Transpose", genNONE, specTRANSPOSE) /* F90 */ ! DEFNAME ("TRIM", "trim", "Trim", genNONE, specTRIM) /* F90 */ ! DEFNAME ("UBOUND", "ubound", "UBound", genNONE, specUBOUND) /* F90 */ ! DEFNAME ("UNPACK", "unpack", "Unpack", genNONE, specUNPACK) /* F90 */ ! DEFNAME ("VERIFY", "verify", "Verify", genNONE, specVERIFY) /* F90 */ ! DEFNAME ("XOR", "xor", "XOr", genNONE, specXOR) /* F2C */ ! DEFNAME ("ZABS", "zabs", "ZAbs", genNONE, specZABS) /* F2C */ ! DEFNAME ("ZCOS", "zcos", "ZCos", genNONE, specZCOS) /* F2C */ ! DEFNAME ("ZEXP", "zexp", "ZExp", genNONE, specZEXP) /* F2C */ ! DEFNAME ("ZEXT", "zext", "ZExt", genNONE, specZEXT) /* VXT */ ! DEFNAME ("ZLOG", "zlog", "ZLog", genNONE, specZLOG) /* F2C */ ! DEFNAME ("ZSIN", "zsin", "ZSin", genNONE, specZSIN) /* F2C */ ! DEFNAME ("ZSQRT", "zsqrt", "ZSqRt", genNONE, specZSQRT) /* F2C */ ! /* Internally generic intrinsics. ! Should properly be called "mapped" intrinsics. These are intrinsics ! that map to one or more generally different implementations -- e.g. ! that have differing interpretations depending on the Fortran dialect ! being used. Also, this includes the placeholder intrinsics that ! have no specific versions, but we want to reserve the names for now. */ ! DEFGEN (FFEINTRIN_genFPABSP, "FPABSP", /* F2C */ FFEINTRIN_specNONE, FFEINTRIN_specNONE ) ! DEFGEN (FFEINTRIN_genFPEXPN, "FPEXPN", /* F2C */ FFEINTRIN_specNONE, FFEINTRIN_specNONE ) ! DEFGEN (FFEINTRIN_genFPFRAC, "FPFRAC", /* F2C */ FFEINTRIN_specNONE, FFEINTRIN_specNONE ) ! DEFGEN (FFEINTRIN_genFPMAKE, "FPMAKE", /* F2C */ FFEINTRIN_specNONE, FFEINTRIN_specNONE ) ! DEFGEN (FFEINTRIN_genFPRRSP, "FPRRSP", /* F2C */ FFEINTRIN_specNONE, FFEINTRIN_specNONE ) ! DEFGEN (FFEINTRIN_genFPSCAL, "FPSCAL", /* F2C */ FFEINTRIN_specNONE, FFEINTRIN_specNONE *************** DEFGEN (FFEINTRIN_genZEXT, "ZEXT", /* VX *** 2461,2711 **** DEFGEN (FFEINTRIN_genNONE, "none", FFEINTRIN_specNONE, - FFEINTRIN_specNONE, - FFEINTRIN_specNONE, - FFEINTRIN_specNONE, - FFEINTRIN_specNONE, - FFEINTRIN_specNONE, - FFEINTRIN_specNONE, - FFEINTRIN_specNONE, - FFEINTRIN_specNONE, - FFEINTRIN_specNONE, - FFEINTRIN_specNONE, - FFEINTRIN_specNONE, - FFEINTRIN_specNONE, FFEINTRIN_specNONE ) ! /* Start off with specific intrinsic implementations in any order ! (currently alpha). This list corresponds to actual implementations ! of specific intrinsics, so there is no redundancy -- e.g. instead ! of FLOAT and REAL, there is only _REAL_I. We use this non- ! redundancy when determining which specific intrinsic is meant ! by a generic -- REAL(I) can match either specific REAL or FLOAT, ! but rather than complain about that, we see that the implementations ! are the same. This approach should allow lots of extensions in ! the form of possibly conflicting intrinsic sets with complaints ! arising only when those sets are enabled and the potentially ! conflicting intrinsics are actually referenced. */ ! ! #define I_ FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGERDEFAULT, NC_ ! #define L_ FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICALDEFAULT, NC_ ! #define R_ FFEINFO_basictypeREAL, FFEINFO_kindtypeREALDEFAULT, NC_ ! #define D_ FFEINFO_basictypeREAL, FFEINFO_kindtypeREALDOUBLE, NC_ ! #define C_ FFEINFO_basictypeCOMPLEX, FFEINFO_kindtypeREALDEFAULT, NC_ ! #define E_ FFEINFO_basictypeCOMPLEX, FFEINFO_kindtypeREALDOUBLE, NC_ ! #define A_ FFEINFO_basictypeCHARACTER, FFEINFO_kindtypeCHARACTERDEFAULT, 1 ! #define VOID_ FFEINFO_basictypeNONE, FFEINFO_kindtypeNONE, NC_ ! #define NC_ FFETARGET_charactersizeNONE ! #define c0_ ffeintrin_check_0_ ! #define cI1_ ffeintrin_check_int_1_ ! #define cL1_ ffeintrin_check_log_1_ ! #define cR1_ ffeintrin_check_real_1_ ! #define cD1_ ffeintrin_check_realdbl_1_ ! #define cC1_ ffeintrin_check_cmplx_1_ ! #define cE1_ ffeintrin_check_dcmplx_1_ ! #define cA1_ ffeintrin_check_char_1_ ! #define cI1or2_ ffeintrin_check_int_1or2_ ! #define cL1or2_ ffeintrin_check_log_1or2_ ! #define cR1or2_ ffeintrin_check_real_1or2_ ! #define cD1or2_ ffeintrin_check_realdbl_1or2_ ! #define cC1or2_ ffeintrin_check_cmplx_1or2_ ! #define cE1or2_ ffeintrin_check_dcmplx_1or2_ ! #define cI2_ ffeintrin_check_int_2_ ! #define cL2_ ffeintrin_check_log_2_ ! #define cR2_ ffeintrin_check_real_2_ ! #define cD2_ ffeintrin_check_realdbl_2_ ! #define cA2_ ffeintrin_check_char_2_ ! #define cI2p_ ffeintrin_check_int_2p_ ! #define cL2p_ ffeintrin_check_log_2p_ ! #define cR2p_ ffeintrin_check_real_2p_ ! #define cD2p_ ffeintrin_check_realdbl_2p_ ! #define cI2or3_ ffeintrin_check_int_2or3_ ! #define cL2or3_ ffeintrin_check_log_2or3_ ! #define cR2or3_ ffeintrin_check_real_2or3_ ! #define cD2or3_ ffeintrin_check_realdbl_2or3_ ! #define cC2or3_ ffeintrin_check_cmplx_2or3_ ! #define cE2or3_ ffeintrin_check_dcmplx_2or3_ ! #define cI3_ ffeintrin_check_int_3_ ! #define cL3_ ffeintrin_check_log_3_ ! #define cR3_ ffeintrin_check_real_3_ ! #define cD3_ ffeintrin_check_realdbl_3_ ! #define cA3_ ffeintrin_check_char_3_ ! #define Void_ ffeintrin_check_void_ ! ! DEFIMP (FFEINTRIN_impABS, "ABS", FFECOM_gfrtABS, R_, cR1_) ! DEFIMP (FFEINTRIN_impACOS, "ACOS", FFECOM_gfrtACOS, R_, cR1_) ! DEFIMP (FFEINTRIN_impAIMAG, "AIMAG", FFECOM_gfrtAIMAG, R_, cC1_) ! DEFIMP (FFEINTRIN_impAINT, "AINT", FFECOM_gfrtAINT, R_, cR1_) ! DEFIMP (FFEINTRIN_impALOG, "ALOG", FFECOM_gfrtALOG, R_, cR1_) ! DEFIMP (FFEINTRIN_impALOG10, "ALOG10", FFECOM_gfrtALOG10, R_, cR1_) ! DEFIMP (FFEINTRIN_impAMAX0, "AMAX0", FFECOM_gfrt, R_, cI2p_) ! DEFIMP (FFEINTRIN_impAMAX1, "AMAX1", FFECOM_gfrt, R_, cR2p_) ! DEFIMP (FFEINTRIN_impAMIN0, "AMIN0", FFECOM_gfrt, R_, cI2p_) ! DEFIMP (FFEINTRIN_impAMIN1, "AMIN1", FFECOM_gfrt, R_, cR2p_) ! DEFIMP (FFEINTRIN_impAMOD, "AMOD", FFECOM_gfrtAMOD, R_, cR2_) ! DEFIMP (FFEINTRIN_impANINT, "ANINT", FFECOM_gfrtANINT, R_, cR1_) ! DEFIMP (FFEINTRIN_impASIN, "ASIN", FFECOM_gfrtASIN, R_, cR1_) ! DEFIMP (FFEINTRIN_impATAN, "ATAN", FFECOM_gfrtATAN, R_, cR1_) ! DEFIMP (FFEINTRIN_impATAN2, "ATAN2", FFECOM_gfrtATAN2, R_, cR2_) ! DEFIMP (FFEINTRIN_impCABS, "CABS", FFECOM_gfrtCABS, R_, cC1_) ! DEFIMP (FFEINTRIN_impCCOS, "CCOS", FFECOM_gfrtCCOS, C_, cC1_) ! DEFIMP (FFEINTRIN_impCEXP, "CEXP", FFECOM_gfrtCEXP, C_, cC1_) ! DEFIMP (FFEINTRIN_impCHAR, "CHAR", FFECOM_gfrt, A_, cI1_) ! DEFIMP (FFEINTRIN_impCLOG, "CLOG", FFECOM_gfrtCLOG, C_, cC1_) ! DEFIMP (FFEINTRIN_impCONJG, "CONJG", FFECOM_gfrtCONJG, C_, cC1_) ! DEFIMP (FFEINTRIN_impCOS, "COS", FFECOM_gfrtCOS, R_, cR1_) ! DEFIMP (FFEINTRIN_impCOSH, "COSH", FFECOM_gfrtCOSH, R_, cR1_) ! DEFIMP (FFEINTRIN_impCSIN, "CSIN", FFECOM_gfrtCSIN, C_, cC1_) ! DEFIMP (FFEINTRIN_impCSQRT, "CSQRT", FFECOM_gfrtCSQRT, C_, cC1_) ! DEFIMP (FFEINTRIN_impDABS, "DABS", FFECOM_gfrtDABS, D_, cD1_) ! DEFIMP (FFEINTRIN_impDACOS, "DACOS", FFECOM_gfrtDACOS, D_, cD1_) ! DEFIMP (FFEINTRIN_impDASIN, "DASIN", FFECOM_gfrtDASIN, D_, cD1_) ! DEFIMP (FFEINTRIN_impDATAN, "DATAN", FFECOM_gfrtDATAN, D_, cD1_) ! DEFIMP (FFEINTRIN_impDATAN2, "DATAN2", FFECOM_gfrtDATAN2, D_, cD2_) ! DEFIMP (FFEINTRIN_impDCOS, "DCOS", FFECOM_gfrtDCOS, D_, cD1_) ! DEFIMP (FFEINTRIN_impDCOSH, "DCOSH", FFECOM_gfrtDCOSH, D_, cD1_) ! DEFIMP (FFEINTRIN_impDDIM, "DDIM", FFECOM_gfrtDDIM, D_, cD2_) ! DEFIMP (FFEINTRIN_impDEXP, "DEXP", FFECOM_gfrtDEXP, D_, cD1_) ! DEFIMP (FFEINTRIN_impDIM, "DIM", FFECOM_gfrtDIM, R_, cR2_) ! DEFIMP (FFEINTRIN_impDINT, "DINT", FFECOM_gfrtDINT, D_, cD1_) ! DEFIMP (FFEINTRIN_impDLOG, "DLOG", FFECOM_gfrtDLOG, D_, cD1_) ! DEFIMP (FFEINTRIN_impDLOG10, "DLOG10", FFECOM_gfrtDLOG10, D_, cD1_) ! DEFIMP (FFEINTRIN_impDMAX1, "DMAX1", FFECOM_gfrt, D_, cD2p_) ! DEFIMP (FFEINTRIN_impDMIN1, "DMIN1", FFECOM_gfrt, D_, cD2p_) ! DEFIMP (FFEINTRIN_impDMOD, "DMOD", FFECOM_gfrtDMOD, D_, cD2_) ! DEFIMP (FFEINTRIN_impDNINT, "DNINT", FFECOM_gfrtDNINT, D_, cD1_) ! DEFIMP (FFEINTRIN_impDPROD, "DPROD", FFECOM_gfrtDPROD, D_, cR2_) ! DEFIMP (FFEINTRIN_impDSIGN, "DSIGN", FFECOM_gfrtDSIGN, D_, cD2_) ! DEFIMP (FFEINTRIN_impDSIN, "DSIN", FFECOM_gfrtDSIN, D_, cD1_) ! DEFIMP (FFEINTRIN_impDSINH, "DSINH", FFECOM_gfrtDSINH, D_, cD1_) ! DEFIMP (FFEINTRIN_impDSQRT, "DSQRT", FFECOM_gfrtDSQRT, D_, cD1_) ! DEFIMP (FFEINTRIN_impDTAN, "DTAN", FFECOM_gfrtDTAN, D_, cD1_) ! DEFIMP (FFEINTRIN_impDTANH, "DTANH", FFECOM_gfrtDTANH, D_, cD1_) ! DEFIMP (FFEINTRIN_impEXP, "EXP", FFECOM_gfrtEXP, R_, cR1_) ! DEFIMP (FFEINTRIN_impIABS, "IABS", FFECOM_gfrtIABS, I_, cI1_) ! DEFIMP (FFEINTRIN_impICHAR, "ICHAR", FFECOM_gfrt, I_, cA1_) ! DEFIMP (FFEINTRIN_impIDIM, "IDIM", FFECOM_gfrtIDIM, I_, cI2_) ! DEFIMP (FFEINTRIN_impIDNINT, "IDNINT", FFECOM_gfrtIDNINT, I_, cD1_) ! DEFIMP (FFEINTRIN_impINDEX, "INDEX", FFECOM_gfrtINDEX, I_, cA2_) ! DEFIMP (FFEINTRIN_impISIGN, "ISIGN", FFECOM_gfrtISIGN, I_, cI2_) ! DEFIMP (FFEINTRIN_impLEN, "LEN", FFECOM_gfrtLEN, I_, cA1_) ! DEFIMP (FFEINTRIN_impLGE, "LGE", FFECOM_gfrtLGE, L_, cA2_) ! DEFIMP (FFEINTRIN_impLGT, "LGT", FFECOM_gfrtLGT, L_, cA2_) ! DEFIMP (FFEINTRIN_impLLE, "LLE", FFECOM_gfrtLLE, L_, cA2_) ! DEFIMP (FFEINTRIN_impLLT, "LLT", FFECOM_gfrtLLT, L_, cA2_) ! DEFIMP (FFEINTRIN_impMAX0, "MAX0", FFECOM_gfrt, I_, cI2p_) ! DEFIMP (FFEINTRIN_impMAX1, "MAX1", FFECOM_gfrt, I_, cR2p_) ! DEFIMP (FFEINTRIN_impMIN0, "MIN0", FFECOM_gfrt, I_, cI2p_) ! DEFIMP (FFEINTRIN_impMIN1, "MIN1", FFECOM_gfrt, I_, cR2p_) ! DEFIMP (FFEINTRIN_impMOD, "MOD", FFECOM_gfrtMOD, I_, cI2_) ! DEFIMP (FFEINTRIN_impNINT, "NINT", FFECOM_gfrtNINT, I_, cR1_) ! DEFIMP (FFEINTRIN_impSIGN, "SIGN", FFECOM_gfrtSIGN, R_, cR2_) ! DEFIMP (FFEINTRIN_impSIN, "SIN", FFECOM_gfrtSIN, R_, cR1_) ! DEFIMP (FFEINTRIN_impSINH, "SINH", FFECOM_gfrtSINH, R_, cR1_) ! DEFIMP (FFEINTRIN_impSQRT, "SQRT", FFECOM_gfrtSQRT, R_, cR1_) ! DEFIMP (FFEINTRIN_impTAN, "TAN", FFECOM_gfrtTAN, R_, cR1_) ! DEFIMP (FFEINTRIN_impTANH, "TANH", FFECOM_gfrtTANH, R_, cR1_) ! DEFIMP (FFEINTRIN_imp_CMPLX_C, "cmplx_c", FFECOM_gfrt, C_, cC1or2_) ! DEFIMP (FFEINTRIN_imp_CMPLX_D, "cmplx_d", FFECOM_gfrt, C_, cD1or2_) ! DEFIMP (FFEINTRIN_imp_CMPLX_I, "cmplx_i", FFECOM_gfrt, C_, cI1or2_) ! DEFIMP (FFEINTRIN_imp_CMPLX_R, "cmplx_r", FFECOM_gfrt, C_, cR1or2_) ! DEFIMP (FFEINTRIN_imp_DBLE_C, "dble_c", FFECOM_gfrt, D_, cC1_) ! DEFIMP (FFEINTRIN_imp_DBLE_D, "dble_d", FFECOM_gfrt, D_, cD1_) ! DEFIMP (FFEINTRIN_imp_DBLE_I, "dble_i", FFECOM_gfrt, D_, cI1_) ! DEFIMP (FFEINTRIN_imp_DBLE_R, "dble_r", FFECOM_gfrt, D_, cR1_) ! DEFIMP (FFEINTRIN_imp_INT_C, "int_c", FFECOM_gfrt, I_, cC1_) ! DEFIMP (FFEINTRIN_imp_INT_D, "int_d", FFECOM_gfrt, I_, cD1_) ! DEFIMP (FFEINTRIN_imp_INT_I, "int_i", FFECOM_gfrt, I_, cI1_) ! DEFIMP (FFEINTRIN_imp_INT_R, "int_r", FFECOM_gfrt, I_, cR1_) ! DEFIMP (FFEINTRIN_imp_REAL_C, "real_c", FFECOM_gfrt, R_, cC1_) ! DEFIMP (FFEINTRIN_imp_REAL_D, "real_d", FFECOM_gfrt, R_, cD1_) ! DEFIMP (FFEINTRIN_imp_REAL_I, "real_i", FFECOM_gfrt, R_, cI1_) ! DEFIMP (FFEINTRIN_imp_REAL_R, "real_r", FFECOM_gfrt, R_, cR1_) ! DEFIMP (FFEINTRIN_impABORT, "ABORT", FFECOM_gfrtABORT, VOID_, c0_) ! DEFIMP (FFEINTRIN_impACHAR, "ACHAR", FFECOM_gfrt, A_, cI1_) ! DEFIMP (FFEINTRIN_impBIT_SIZE, "BIT_SIZE", FFECOM_gfrt, I_, cI1_) ! DEFIMP (FFEINTRIN_impBTEST, "BTEST", FFECOM_gfrt, L_, cI2_) ! DEFIMP (FFEINTRIN_impCDABS, "CDABS", FFECOM_gfrtCDABS, D_, cE1_) ! DEFIMP (FFEINTRIN_impCDCOS, "CDCOS", FFECOM_gfrtCDCOS, E_, cE1_) ! DEFIMP (FFEINTRIN_impCDEXP, "CDEXP", FFECOM_gfrtCDEXP, E_, cE1_) ! DEFIMP (FFEINTRIN_impCDLOG, "CDLOG", FFECOM_gfrtCDLOG, E_, cE1_) ! DEFIMP (FFEINTRIN_impCDSIN, "CDSIN", FFECOM_gfrtCDSIN, E_, cE1_) ! DEFIMP (FFEINTRIN_impCDSQRT, "CDSQRT", FFECOM_gfrtCDSQRT, E_, cE1_) ! DEFIMP (FFEINTRIN_impDCONJG, "DCONJG", FFECOM_gfrtDCONJG, E_, cE1_) ! DEFIMP (FFEINTRIN_impDERF, "DERF", FFECOM_gfrtDERF, D_, cD1_) ! DEFIMP (FFEINTRIN_impDERFC, "DERFC", FFECOM_gfrtDERFC, D_, cD1_) ! DEFIMP (FFEINTRIN_impDIMAG, "DIMAG", FFECOM_gfrtDIMAG, D_, cE1_) ! DEFIMP (FFEINTRIN_impERF, "ERF", FFECOM_gfrtERF, R_, cR1_) ! DEFIMP (FFEINTRIN_impERFC, "ERFC", FFECOM_gfrtERFC, R_, cR1_) ! DEFIMP (FFEINTRIN_impEXIT, "EXIT", FFECOM_gfrtEXIT, VOID_, ffeintrin_check_exit_) ! DEFIMP (FFEINTRIN_impFLUSH, "FLUSH", FFECOM_gfrtFLUSH, VOID_, ffeintrin_check_flush_) ! DEFIMP (FFEINTRIN_impGETARG, "GETARG", FFECOM_gfrtGETARG, VOID_, ffeintrin_check_getarg_) ! DEFIMP (FFEINTRIN_impGETENV, "GETENV", FFECOM_gfrtGETENV, VOID_, ffeintrin_check_getenv_) ! DEFIMP (FFEINTRIN_impIACHAR, "IACHAR", FFECOM_gfrt, I_, cA1_) ! DEFIMP (FFEINTRIN_impIAND, "IAND", FFECOM_gfrt, I_, cI2_) ! DEFIMP (FFEINTRIN_impIARGC, "IARGC", FFECOM_gfrtIARGC, I_, c0_) ! DEFIMP (FFEINTRIN_impIBCLR, "IBCLR", FFECOM_gfrt, I_, cI2_) ! DEFIMP (FFEINTRIN_impIBITS, "IBITS", FFECOM_gfrt, I_, cI3_) ! DEFIMP (FFEINTRIN_impIBSET, "IBSET", FFECOM_gfrt, I_, cI2_) ! DEFIMP (FFEINTRIN_impIEOR, "IEOR", FFECOM_gfrt, I_, cI2_) ! DEFIMP (FFEINTRIN_impIOR, "IOR", FFECOM_gfrt, I_, cI2_) ! DEFIMP (FFEINTRIN_impISHFT, "ISHFT", FFECOM_gfrt, I_, cI2_) ! DEFIMP (FFEINTRIN_impISHFTC, "ISHFTC", FFECOM_gfrt, I_, cI3_) ! DEFIMP (FFEINTRIN_impLOC, "LOC", FFECOM_gfrt, I_, ffeintrin_check_loc_) ! DEFIMP (FFEINTRIN_impMVBITS, "MVBITS", FFECOM_gfrt, VOID_, ffeintrin_check_mvbits_) ! DEFIMP (FFEINTRIN_impNOT, "NOT", FFECOM_gfrt, I_, cI1_) ! DEFIMP (FFEINTRIN_impSIGNAL, "SIGNAL", FFECOM_gfrt, VOID_, ffeintrin_check_signal_) ! DEFIMP (FFEINTRIN_impSYSTEM, "SYSTEM", FFECOM_gfrt, VOID_, ffeintrin_check_system_) ! DEFIMP (FFEINTRIN_imp_AND_L, "and_l", FFECOM_gfrt, L_, cL2_) ! DEFIMP (FFEINTRIN_imp_CMPLX_E, "cmplx_e", FFECOM_gfrt, C_, cE1or2_) ! DEFIMP (FFEINTRIN_imp_DBLE_E, "dble_e", FFECOM_gfrt, D_, cE1_) ! DEFIMP (FFEINTRIN_imp_DCMPLX_C, "dcmplx_c", FFECOM_gfrt, E_, cC1or2_) ! DEFIMP (FFEINTRIN_imp_DCMPLX_D, "dcmplx_d", FFECOM_gfrt, E_, cD1or2_) ! DEFIMP (FFEINTRIN_imp_DCMPLX_E, "dcmplx_e", FFECOM_gfrt, E_, cE1or2_) ! DEFIMP (FFEINTRIN_imp_DCMPLX_I, "dcmplx_i", FFECOM_gfrt, E_, cI1or2_) ! DEFIMP (FFEINTRIN_imp_DCMPLX_R, "dcmplx_r", FFECOM_gfrt, E_, cR1or2_) ! DEFIMP (FFEINTRIN_imp_INT_E, "int_e", FFECOM_gfrt, I_, cE1_) ! DEFIMP (FFEINTRIN_imp_LSHIFT_I, "lshift_i", FFECOM_gfrt, I_, cI2_) ! DEFIMP (FFEINTRIN_imp_LSHIFT_L, "lshift_l", FFECOM_gfrt, L_, cL2_) ! DEFIMP (FFEINTRIN_imp_NOT_L, "not_l", FFECOM_gfrt, L_, cL1_) ! DEFIMP (FFEINTRIN_imp_OR_L, "or_l", FFECOM_gfrt, L_, cL2_) ! DEFIMP (FFEINTRIN_imp_REAL_E, "real_e", FFECOM_gfrt, R_, cE1_) ! DEFIMP (FFEINTRIN_imp_RSHIFT_I, "rshift_i", FFECOM_gfrt, I_, cI2_) ! DEFIMP (FFEINTRIN_imp_RSHIFT_L, "rshift_l", FFECOM_gfrt, L_, cL2_) ! DEFIMP (FFEINTRIN_imp_XOR_L, "xor_l", FFECOM_gfrt, L_, cL2_) ! DEFIMP (FFEINTRIN_impNONE, "none", FFECOM_gfrt, VOID_, Void_) ! ! #undef I_ ! #undef L_ ! #undef R_ ! #undef D_ ! #undef C_ ! #undef A_ ! #undef NC_ ! #undef cI1_ ! #undef cR1_ ! #undef cD1_ ! #undef cC1_ ! #undef cA1_ ! #undef cI1or2_ ! #undef cR1or2_ ! #undef cD1or2_ ! #undef cC1or2_ ! ! /* Start off with named specific intrinsics in any order (currently ! alpha). This list corresponds to both named intrinsics in the ! source code (as in "INTRINSIC FOO", "CALL X(FOO)", and "FOO(...)") ! and named/unnamed intrinsics accessed via generic intrinsics ! (as in "INT((1.,2.))", which corresponds to an unnamed specific ! intrinsic that converts a COMPLEX to an INTEGER). There is ! redundancy of implementation in this list, as in FLOAT and REAL ! meaning the same thing (convert INTEGER to REAL). */ ! ! /* Currently this list starts with the list of F77-standard intrinsics in alphabetical order, then continues with the list of all other ! intrinsics. So, unless mistakes are made in the first portion, no ! new intrinsics should be added to that portion (since F77 isn't ! changing). */ DEFSPEC (FFEINTRIN_specABS, --- 373,387 ---- DEFGEN (FFEINTRIN_genNONE, "none", FFEINTRIN_specNONE, FFEINTRIN_specNONE ) ! /* Specific intrinsic information. ! Currently this list starts with the list of F77-standard intrinsics in alphabetical order, then continues with the list of all other ! intrinsics. ! ! The second boolean argument specifies whether the intrinsic is ! allowed by the standard to be passed as an actual argument. */ DEFSPEC (FFEINTRIN_specABS, *************** DEFSPEC (FFEINTRIN_specCLOG, *** 2829,2832 **** --- 505,514 ---- FFEINTRIN_impCLOG ) + DEFSPEC (FFEINTRIN_specCMPLX, + "CMPLX", + FALSE, + FFEINTRIN_familyF77, + FFEINTRIN_impCMPLX + ) DEFSPEC (FFEINTRIN_specCONJG, "CONJG", *************** DEFSPEC (FFEINTRIN_specDATAN2, *** 2889,2892 **** --- 571,580 ---- FFEINTRIN_impDATAN2 ) + DEFSPEC (FFEINTRIN_specDBLE, + "DBLE", + FALSE, + FFEINTRIN_familyF77, + FFEINTRIN_impDBLE + ) DEFSPEC (FFEINTRIN_specDCOS, "DCOS", *************** DEFSPEC (FFEINTRIN_specFLOAT, *** 3013,3017 **** FALSE, FFEINTRIN_familyF77, ! FFEINTRIN_imp_REAL_I ) DEFSPEC (FFEINTRIN_specIABS, --- 701,705 ---- FALSE, FFEINTRIN_familyF77, ! FFEINTRIN_impREAL ) DEFSPEC (FFEINTRIN_specIABS, *************** DEFSPEC (FFEINTRIN_specIDINT, *** 3037,3041 **** FALSE, FFEINTRIN_familyF77, ! FFEINTRIN_imp_INT_D ) DEFSPEC (FFEINTRIN_specIDNINT, --- 725,729 ---- FALSE, FFEINTRIN_familyF77, ! FFEINTRIN_impINT ) DEFSPEC (FFEINTRIN_specIDNINT, *************** DEFSPEC (FFEINTRIN_specIFIX, *** 3049,3053 **** FALSE, FFEINTRIN_familyF77, ! FFEINTRIN_imp_INT_R ) DEFSPEC (FFEINTRIN_specINDEX, --- 737,741 ---- FALSE, FFEINTRIN_familyF77, ! FFEINTRIN_impINT ) DEFSPEC (FFEINTRIN_specINDEX, *************** DEFSPEC (FFEINTRIN_specINT, *** 3061,3065 **** FALSE, FFEINTRIN_familyF77, ! FFEINTRIN_imp_INT_R ) DEFSPEC (FFEINTRIN_specISIGN, --- 749,753 ---- FALSE, FFEINTRIN_familyF77, ! FFEINTRIN_impINT ) DEFSPEC (FFEINTRIN_specISIGN, *************** DEFSPEC (FFEINTRIN_specLLT, *** 3099,3102 **** --- 787,808 ---- FFEINTRIN_impLLT ) + DEFSPEC (FFEINTRIN_specLOG, + "LOG", + FALSE, + FFEINTRIN_familyF77, + FFEINTRIN_impLOG + ) + DEFSPEC (FFEINTRIN_specLOG10, + "LOG10", + FALSE, + FFEINTRIN_familyF77, + FFEINTRIN_impLOG10 + ) + DEFSPEC (FFEINTRIN_specMAX, + "MAX", + FALSE, + FFEINTRIN_familyF77, + FFEINTRIN_impMAX + ) DEFSPEC (FFEINTRIN_specMAX0, "MAX0", *************** DEFSPEC (FFEINTRIN_specMAX1, *** 3111,3114 **** --- 817,826 ---- FFEINTRIN_impMAX1 ) + DEFSPEC (FFEINTRIN_specMIN, + "MIN", + FALSE, + FFEINTRIN_familyF77, + FFEINTRIN_impMIN + ) DEFSPEC (FFEINTRIN_specMIN0, "MIN0", *************** DEFSPEC (FFEINTRIN_specREAL, *** 3139,3143 **** FALSE, FFEINTRIN_familyF77, ! FFEINTRIN_imp_REAL_I ) DEFSPEC (FFEINTRIN_specSIGN, --- 851,855 ---- FALSE, FFEINTRIN_familyF77, ! FFEINTRIN_impREAL ) DEFSPEC (FFEINTRIN_specSIGN, *************** DEFSPEC (FFEINTRIN_specSNGL, *** 3163,3167 **** FALSE, FFEINTRIN_familyF77, ! FFEINTRIN_imp_REAL_D ) DEFSPEC (FFEINTRIN_specSQRT, --- 875,879 ---- FALSE, FFEINTRIN_familyF77, ! FFEINTRIN_impREAL ) DEFSPEC (FFEINTRIN_specSQRT, *************** DEFSPEC (FFEINTRIN_specSQRT, *** 3173,3264 **** DEFSPEC (FFEINTRIN_specTAN, "TAN", ! TRUE, ! FFEINTRIN_familyF77, ! FFEINTRIN_impTAN ! ) ! DEFSPEC (FFEINTRIN_specTANH, ! "TANH", ! TRUE, ! FFEINTRIN_familyF77, ! FFEINTRIN_impTANH ! ) ! DEFSPEC (FFEINTRIN_spec_CMPLX_C, ! "cmplx_c", ! FALSE, ! FFEINTRIN_familyF77, ! FFEINTRIN_imp_CMPLX_C ! ) ! DEFSPEC (FFEINTRIN_spec_CMPLX_D, ! "cmplx_d", ! FALSE, ! FFEINTRIN_familyF77, ! FFEINTRIN_imp_CMPLX_D ! ) ! DEFSPEC (FFEINTRIN_spec_CMPLX_I, ! "cmplx_i", ! FALSE, ! FFEINTRIN_familyF77, ! FFEINTRIN_imp_CMPLX_I ! ) ! DEFSPEC (FFEINTRIN_spec_CMPLX_R, ! "cmplx_r", ! FALSE, ! FFEINTRIN_familyF77, ! FFEINTRIN_imp_CMPLX_R ! ) ! DEFSPEC (FFEINTRIN_spec_DBLE_C, ! "dble_c", ! FALSE, ! FFEINTRIN_familyF77, ! FFEINTRIN_imp_DBLE_C ! ) ! DEFSPEC (FFEINTRIN_spec_DBLE_D, ! "dble_d", ! FALSE, ! FFEINTRIN_familyF77, ! FFEINTRIN_imp_DBLE_D ! ) ! DEFSPEC (FFEINTRIN_spec_DBLE_I, ! "dble_i", ! FALSE, ! FFEINTRIN_familyF77, ! FFEINTRIN_imp_DBLE_I ! ) ! DEFSPEC (FFEINTRIN_spec_DBLE_J, ! "dble_j", ! FALSE, ! FFEINTRIN_familyF77, ! FFEINTRIN_impNONE ! ) ! DEFSPEC (FFEINTRIN_spec_DBLE_R, ! "dble_r", ! FALSE, ! FFEINTRIN_familyF77, ! FFEINTRIN_imp_DBLE_R ! ) ! DEFSPEC (FFEINTRIN_spec_INT_C, ! "int_c", ! FALSE, ! FFEINTRIN_familyF77, ! FFEINTRIN_imp_INT_C ! ) ! DEFSPEC (FFEINTRIN_spec_INT_I, ! "int_i", ! FALSE, ! FFEINTRIN_familyF77, ! FFEINTRIN_imp_INT_I ! ) ! DEFSPEC (FFEINTRIN_spec_REAL_C, ! "real_c", ! FALSE, FFEINTRIN_familyF77, ! FFEINTRIN_imp_REAL_C ) ! DEFSPEC (FFEINTRIN_spec_REAL_R, ! "real_r", ! FALSE, FFEINTRIN_familyF77, ! FFEINTRIN_imp_REAL_R ) DEFSPEC (FFEINTRIN_specABORT, "ABORT", --- 885,899 ---- DEFSPEC (FFEINTRIN_specTAN, "TAN", ! TRUE, FFEINTRIN_familyF77, ! FFEINTRIN_impTAN ) ! DEFSPEC (FFEINTRIN_specTANH, ! "TANH", ! TRUE, FFEINTRIN_familyF77, ! FFEINTRIN_impTANH ) + DEFSPEC (FFEINTRIN_specABORT, "ABORT", *************** DEFSPEC (FFEINTRIN_specALLOCATED, *** 3327,3330 **** --- 962,971 ---- FFEINTRIN_impNONE ) + DEFSPEC (FFEINTRIN_specAND, + "AND", + FALSE, + FFEINTRIN_familyF2C, + FFEINTRIN_impIAND + ) DEFSPEC (FFEINTRIN_specANY, "ANY", *************** DEFSPEC (FFEINTRIN_specDATE_AND_TIME, *** 3471,3480 **** FFEINTRIN_impNONE ) - DEFSPEC (FFEINTRIN_specDBLE, - "DBLE", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_imp_DBLE_R - ) DEFSPEC (FFEINTRIN_specDBLEQ, "DBLEQ", --- 1112,1115 ---- *************** DEFSPEC (FFEINTRIN_specDBLEQ, *** 3483,3486 **** --- 1118,1127 ---- FFEINTRIN_impNONE ) + DEFSPEC (FFEINTRIN_specDCMPLX, + "DCMPLX", + FALSE, + FFEINTRIN_familyDCP, + FFEINTRIN_impDCMPLX + ) DEFSPEC (FFEINTRIN_specDCONJG, "DCONJG", *************** DEFSPEC (FFEINTRIN_specDFLOAT, *** 3511,3515 **** FALSE, FFEINTRIN_familyF2C, ! FFEINTRIN_imp_DBLE_I ) DEFSPEC (FFEINTRIN_specDFLOTI, --- 1152,1156 ---- FALSE, FFEINTRIN_familyF2C, ! FFEINTRIN_impDBLE ) DEFSPEC (FFEINTRIN_specDFLOTI, *************** DEFSPEC (FFEINTRIN_specDFLOTJ, *** 3523,3527 **** FALSE, FFEINTRIN_familyVXT, ! FFEINTRIN_imp_DBLE_I ) DEFSPEC (FFEINTRIN_specDIGITS, --- 1164,1168 ---- FALSE, FFEINTRIN_familyVXT, ! FFEINTRIN_impDBLE ) DEFSPEC (FFEINTRIN_specDIGITS, *************** DEFSPEC (FFEINTRIN_specDREAL, *** 3547,3551 **** FALSE, FFEINTRIN_familyFVZ, ! FFEINTRIN_imp_DBLE_E ) DEFSPEC (FFEINTRIN_specDSIND, --- 1188,1192 ---- FALSE, FFEINTRIN_familyFVZ, ! FFEINTRIN_impDBLE ) DEFSPEC (FFEINTRIN_specDSIND, *************** DEFSPEC (FFEINTRIN_specFLOATJ, *** 3607,3611 **** FALSE, FFEINTRIN_familyVXT, ! FFEINTRIN_imp_REAL_I ) DEFSPEC (FFEINTRIN_specFLOOR, --- 1248,1252 ---- FALSE, FFEINTRIN_familyVXT, ! FFEINTRIN_impREAL ) DEFSPEC (FFEINTRIN_specFLOOR, *************** DEFSPEC (FFEINTRIN_specIISIGN, *** 3789,3792 **** --- 1430,1439 ---- FFEINTRIN_impNONE ) + DEFSPEC (FFEINTRIN_specIMAG, + "IMAG", + FALSE, + FFEINTRIN_familyF2C, + FFEINTRIN_impAIMAG + ) DEFSPEC (FFEINTRIN_specIMAX0, "IMAX0", *************** DEFSPEC (FFEINTRIN_specJIDINT, *** 3895,3899 **** FALSE, FFEINTRIN_familyVXT, ! FFEINTRIN_imp_INT_D ) DEFSPEC (FFEINTRIN_specJIDNNT, --- 1542,1546 ---- FALSE, FFEINTRIN_familyVXT, ! FFEINTRIN_impINT ) DEFSPEC (FFEINTRIN_specJIDNNT, *************** DEFSPEC (FFEINTRIN_specJIFIX, *** 3913,3917 **** FALSE, FFEINTRIN_familyVXT, ! FFEINTRIN_imp_INT_R ) DEFSPEC (FFEINTRIN_specJINT, --- 1560,1564 ---- FALSE, FFEINTRIN_familyVXT, ! FFEINTRIN_impINT ) DEFSPEC (FFEINTRIN_specJINT, *************** DEFSPEC (FFEINTRIN_specJINT, *** 3919,3923 **** FALSE, FFEINTRIN_familyVXT, ! FFEINTRIN_imp_INT_R ) DEFSPEC (FFEINTRIN_specJIOR, --- 1566,1570 ---- FALSE, FFEINTRIN_familyVXT, ! FFEINTRIN_impINT ) DEFSPEC (FFEINTRIN_specJIOR, *************** DEFSPEC (FFEINTRIN_specLOGICAL, *** 4035,4038 **** --- 1682,1691 ---- FFEINTRIN_impNONE ) + DEFSPEC (FFEINTRIN_specLSHIFT, + "LSHIFT", + FALSE, + FFEINTRIN_familyF2C, + FFEINTRIN_impLSHIFT + ) DEFSPEC (FFEINTRIN_specMATMUL, "MATMUL", *************** DEFSPEC (FFEINTRIN_specNOT, *** 4107,4110 **** --- 1760,1769 ---- FFEINTRIN_impNOT ) + DEFSPEC (FFEINTRIN_specOR, + "OR", + FALSE, + FFEINTRIN_familyF2C, + FFEINTRIN_impIOR + ) DEFSPEC (FFEINTRIN_specPACK, "PACK", *************** DEFSPEC (FFEINTRIN_specQEXTD, *** 4227,4230 **** --- 1886,1895 ---- FFEINTRIN_impNONE ) + DEFSPEC (FFEINTRIN_specQFLOAT, + "QFLOAT", + FALSE, + FFEINTRIN_familyVXT, + FFEINTRIN_impNONE + ) DEFSPEC (FFEINTRIN_specQINT, "QINT", *************** DEFSPEC (FFEINTRIN_specRRSPACING, *** 4359,4362 **** --- 2024,2033 ---- FFEINTRIN_impNONE ) + DEFSPEC (FFEINTRIN_specRSHIFT, + "RSHIFT", + FALSE, + FFEINTRIN_familyF2C, + FFEINTRIN_impRSHIFT + ) DEFSPEC (FFEINTRIN_specSCALE, "SCALE", *************** DEFSPEC (FFEINTRIN_specVERIFY, *** 4491,4494 **** --- 2162,2171 ---- FFEINTRIN_impNONE ) + DEFSPEC (FFEINTRIN_specXOR, + "XOR", + FALSE, + FFEINTRIN_familyF2C, + FFEINTRIN_impIEOR + ) DEFSPEC (FFEINTRIN_specZABS, "ZABS", *************** DEFSPEC (FFEINTRIN_specZSQRT, *** 4533,4824 **** FFEINTRIN_impCDSQRT ) - DEFSPEC (FFEINTRIN_spec_AND_I, - "and_i", - FALSE, - FFEINTRIN_familyF2C, - FFEINTRIN_impIAND - ) - DEFSPEC (FFEINTRIN_spec_AND_L, - "and_l", - FALSE, - FFEINTRIN_familyF2C, - FFEINTRIN_imp_AND_L - ) - DEFSPEC (FFEINTRIN_spec_CHAR_J, - "char_j", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_CHAR_N, - "char_n", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_CMPLX_E, - "cmplx_e", - FALSE, - FFEINTRIN_familyFVZ, - FFEINTRIN_imp_CMPLX_E - ) - DEFSPEC (FFEINTRIN_spec_CMPLX_J, - "cmplx_j", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_CMPLX_Q, - "cmplx_q", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_DBLE_E, - "dble_e", - FALSE, - FFEINTRIN_familyDCP, - FFEINTRIN_imp_DBLE_E - ) - DEFSPEC (FFEINTRIN_spec_DCMPLX_C, - "dcmplx_c", - FALSE, - FFEINTRIN_familyDCP, - FFEINTRIN_imp_DCMPLX_C - ) - DEFSPEC (FFEINTRIN_spec_DCMPLX_D, - "dcmplx_d", - FALSE, - FFEINTRIN_familyDCP, - FFEINTRIN_imp_DCMPLX_D - ) - DEFSPEC (FFEINTRIN_spec_DCMPLX_E, - "dcmplx_e", - FALSE, - FFEINTRIN_familyFVZ, - FFEINTRIN_imp_DCMPLX_E - ) - DEFSPEC (FFEINTRIN_spec_DCMPLX_I, - "dcmplx_i", - FALSE, - FFEINTRIN_familyDCP, - FFEINTRIN_imp_DCMPLX_I - ) - DEFSPEC (FFEINTRIN_spec_DCMPLX_J, - "dcmplx_j", - FALSE, - FFEINTRIN_familyDCP, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_DCMPLX_Q, - "dcmplx_q", - FALSE, - FFEINTRIN_familyDCP, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_DCMPLX_R, - "dcmplx_r", - FALSE, - FFEINTRIN_familyDCP, - FFEINTRIN_imp_DCMPLX_R - ) - DEFSPEC (FFEINTRIN_spec_IINT_C, - "iint_c", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_imp_INT_C - ) - DEFSPEC (FFEINTRIN_spec_IINT_E, - "iint_e", - FALSE, - FFEINTRIN_familyFVZ, - FFEINTRIN_imp_INT_E - ) - DEFSPEC (FFEINTRIN_spec_IMAG_C_F2C, - "IMAG", - FALSE, - FFEINTRIN_familyF2C, - FFEINTRIN_impAIMAG - ) - DEFSPEC (FFEINTRIN_spec_IMAG_E_F2C, - "imag_e_f2c", - FALSE, - FFEINTRIN_familyF2C, - FFEINTRIN_impDIMAG - ) - DEFSPEC (FFEINTRIN_spec_IMAG_E, - "imag_e", - TRUE, - FFEINTRIN_familyDCP, - FFEINTRIN_impDIMAG - ) - DEFSPEC (FFEINTRIN_spec_IZEXT_N, - "izext_n", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_IZEXT_M, - "izext_m", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_IZEXT_L, - "izext_l", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_IZEXT_J, - "izext_j", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_IZEXT_I, - "izext_i", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_JINT_C, - "jint_c", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_JINT_E, - "jint_e", - FALSE, - FFEINTRIN_familyFVZ, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_JZEXT_N, - "jzext_n", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_JZEXT_M, - "jzext_m", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_JZEXT_J, - "jzext_j", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_LSHIFT_I, - "lshift_i", - FALSE, - FFEINTRIN_familyF2C, - FFEINTRIN_imp_LSHIFT_I - ) - DEFSPEC (FFEINTRIN_spec_LSHIFT_L, - "lshift_l", - FALSE, - FFEINTRIN_familyF2C, - FFEINTRIN_imp_LSHIFT_L - ) - DEFSPEC (FFEINTRIN_spec_NOT_I, - "not_i", - FALSE, - FFEINTRIN_familyF2C, - FFEINTRIN_impNOT - ) - DEFSPEC (FFEINTRIN_spec_NOT_L, - "not_l", - FALSE, - FFEINTRIN_familyF2C, - FFEINTRIN_imp_NOT_L - ) - DEFSPEC (FFEINTRIN_spec_OR_I, - "or_i", - FALSE, - FFEINTRIN_familyF2C, - FFEINTRIN_impIOR - ) - DEFSPEC (FFEINTRIN_spec_OR_L, - "or_l", - FALSE, - FFEINTRIN_familyF2C, - FFEINTRIN_imp_OR_L - ) - DEFSPEC (FFEINTRIN_spec_QEXT_C, - "qext_c", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_QEXT_E, - "qext_e", - FALSE, - FFEINTRIN_familyFVZ, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_QEXT_I, - "qext_i", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_QEXT_J, - "qext_j", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_QEXT_Q, - "qext_q", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_QFLOAT_I, - "qfloat_i", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_QFLOAT_J, - "qfloat_j", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) - DEFSPEC (FFEINTRIN_spec_REAL_E, - "real_e", - FALSE, - FFEINTRIN_familyFVZ, - FFEINTRIN_imp_REAL_E - ) - DEFSPEC (FFEINTRIN_spec_RSHIFT_I, - "rshift_i", - FALSE, - FFEINTRIN_familyF2C, - FFEINTRIN_imp_RSHIFT_I - ) - DEFSPEC (FFEINTRIN_spec_RSHIFT_L, - "rshift_l", - FALSE, - FFEINTRIN_familyF2C, - FFEINTRIN_imp_RSHIFT_L - ) - DEFSPEC (FFEINTRIN_spec_XOR_I, - "xor_i", - FALSE, - FFEINTRIN_familyF2C, - FFEINTRIN_impIEOR - ) - DEFSPEC (FFEINTRIN_spec_XOR_L, - "xor_l", - FALSE, - FFEINTRIN_familyF2C, - FFEINTRIN_imp_XOR_L - ) DEFSPEC (FFEINTRIN_specNONE, "none", --- 2210,2213 ---- *************** DEFSPEC (FFEINTRIN_specNONE, *** 4827,4828 **** --- 2216,2506 ---- FFEINTRIN_impNONE ) + + /* Intrinsic implementations ordered in two sections: + F77, then extensions; secondarily, alphabetical + ordering. + + This list corresponds to actual implementations + of specific intrinsics, so there is no redundancy -- e.g. instead + of FLOAT and REAL, there is only _REAL_I. We use this non- + redundancy when determining which specific intrinsic is meant + by a generic -- REAL(I) can match either specific REAL or FLOAT, + but rather than complain about that, we see that the implementations + are the same. This approach should allow lots of extensions in + the form of possibly conflicting intrinsic sets with complaints + arising only when those sets are enabled and the potentially + conflicting intrinsics are actually referenced. + + DEFIMQ defines an implementation that, while it might be implemented + differently at run time, is implemented by the same code at compile + time, and that code handles checking various possible inputs. So, + no need to complain about ambiguity if two different-typed intrinsic + run-time implementations have the same compile-time implementation, + as long as there's a straightforward way of determining which was + meant (done by ffeintrin_fulfill_generic). */ + + /* The control string has the following format: + + ::[,...] + + is: + + + + is: + + - Subroutine + A Character + C Complex + I Integer + L Logical + R Real + B Boolean (I or L), decided by co-operand list (COL) + F Floating-point (C or R), decided by COL + N Numeric (C, I, or R), decided by co-operand list (COL) + S Scalar numeric (I or R), decided by COL, which may be COMPLEX + + is: + + - Subroutine + 0 Decided by COL + 1 (Default) + 2 (COMPLEX*16, INTEGER*1, LOGICAL*1, REAL*8) + 3 (INTEGER*2, LOGICAL*2) + C Like 1 (F77), except (F90), if COL is COMPLEX, uses kind type of COL + + is: + + + + is: + + - No COL + * All arguments form COL + 1 Argument 1 forms COL + + is: + + =[][] + + is the standard keyword name for the argument. + + is: + + ? Argument is optional + ! Like ?, but argument must be omitted if previous arg was COMPLEX + + One or more of these arguments must be specified + * Zero or more of these arguments may be specified + n Numbered names for arguments, one or more may be specified + p Like n, but two or more may be specified + + is: + + - Any is valid (but see arg-kind-type) + A Character + C Complex + I Integer + L Logical + R Real + B Boolean (I or L) + F Floating-point (C or R) + N Numeric (C, I, or R) + S Scalar numeric (I or R; C mapped to R) + + is: + + 0 Any is valid + 1 (Default) + 2 (COMPLEX*16, INTEGER*1, LOGICAL*1, REAL*8) + 3 (INTEGER*2, LOGICAL*2) + A Same as first argument + s Signal handler (INTEGER FUNCTION, SUBROUTINE or dummy/global + default INTEGER variable) (arg-base-type * only) + + is: + + & Arg can have its address taken (LOC(), for example) + w Arg is INTENT(OUT) + x Arg is INTENT(INOUT) + + */ + + DEFIMP (ABS, "ABS", ABS, "S0:*:A=N0") + DEFIMP (ACOS, "ACOS", ACOS, "R0:*:X=R0") + DEFIMP (AIMAG, "AIMAG", AIMAG, "R0:*:Z=C0") + DEFIMP (AINT, "AINT", AINT, "R0:*:A=R0") + DEFIMQ (ALOG, "ALOG", ALOG, "R1:-:X=R1", + LOG) + DEFIMQ (ALOG10, "ALOG10", ALOG10, "R1:-:X=R1", + LOG10) + DEFIMQ (AMAX0, "AMAX0", , "R1:*:A=pI1", + MAX) + DEFIMQ (AMAX1, "AMAX1", , "R1:*:A=pR1", + MAX) + DEFIMQ (AMIN0, "AMIN0", , "R1:*:A=pI1", + MIN) + DEFIMQ (AMIN1, "AMIN1", , "R1:*:A=pR1", + MIN) + DEFIMQ (AMOD, "AMOD", AMOD, "R1:*:A=R1,P=R1", + MOD) + DEFIMP (ANINT, "ANINT", ANINT, "R0:*:A=R0") + DEFIMP (ASIN, "ASIN", ASIN, "R0:*:X=R0") + DEFIMP (ATAN, "ATAN", ATAN, "R0:*:X=R0") + DEFIMP (ATAN2, "ATAN2", ATAN2, "R0:*:Y=R0,X=R0") + DEFIMQ (CABS, "CABS", CABS, "R1:-:A=C1", + ABS) + DEFIMQ (CCOS, "CCOS", CCOS, "C1:-:X=C1", + COS) + DEFIMQ (CEXP, "CEXP", CEXP, "C1:-:X=C1", + EXP) + DEFIMP (CHAR, "CHAR", , "A1:-:I=I0") + DEFIMQ (CLOG, "CLOG", CLOG, "C1:-:X=C1", + LOG) + DEFIMP (CMPLX, "CMPLX", , "C1:*:X=N0,Y=!S0") + DEFIMP (CONJG, "CONJG", CONJG, "C0:*:Z=C0") + DEFIMP (COS, "COS", COS, "F0:*:X=F0") + DEFIMP (COSH, "COSH", COSH, "R0:*:X=R0") + DEFIMQ (CSIN, "CSIN", CSIN, "C1:-:X=C1", + SIN) + DEFIMQ (CSQRT, "CSQRT", CSQRT, "C1:-:X=C1", + SQRT) + DEFIMQ (DABS, "DABS", DABS, "R2:-:A=R2", + ABS) + DEFIMQ (DACOS, "DACOS", DACOS, "R2:-:X=R2", + ACOS) + DEFIMQ (DASIN, "DASIN", DASIN, "R2:-:X=R2", + ASIN) + DEFIMQ (DATAN, "DATAN", DATAN, "R2:-:X=R2", + ATAN) + DEFIMQ (DATAN2, "DATAN2", DATAN2, "R2:*:Y=R2,X=R2", + ATAN2) + DEFIMP (DBLE, "DBLE", , "R2:-:A=N0") + DEFIMQ (DCMPLX, "DCMPLX", , "C2:*:X=N0,Y=!S0", + CMPLX) + DEFIMQ (DCOS, "DCOS", DCOS, "R2:-:X=R2", + COS) + DEFIMQ (DCOSH, "DCOSH", DCOSH, "R2:-:X=R2", + COSH) + DEFIMQ (DDIM, "DDIM", DDIM, "R2:*:X=R2,Y=R2", + DIM) + DEFIMQ (DEXP, "DEXP", DEXP, "R2:-:X=R2", + EXP) + DEFIMP (DIM, "DIM", DIM, "S0:*:X=S0,Y=S0") + DEFIMQ (DINT, "DINT", DINT, "R2:-:A=R2", + AINT) + DEFIMQ (DLOG, "DLOG", DLOG, "R2:-:X=R2", + LOG) + DEFIMQ (DLOG10, "DLOG10", DLOG10, "R2:-:X=R2", + LOG10) + DEFIMQ (DMAX1, "DMAX1", , "R2:*:A=pR2", + MAX) + DEFIMQ (DMIN1, "DMIN1", , "R2:*:A=pR2", + MIN) + DEFIMQ (DMOD, "DMOD", DMOD, "R2:*:A=R2,P=R2", + MOD) + DEFIMQ (DNINT, "DNINT", DNINT, "R2:-:A=R2", + ANINT) + DEFIMP (DPROD, "DPROD", DPROD, "R2:*:X=R1,Y=R1") + DEFIMQ (DSIGN, "DSIGN", DSIGN, "R2:*:A=R2,B=R2", + SIGN) + DEFIMQ (DSIN, "DSIN", DSIN, "R2:-:X=R2", + SIN) + DEFIMQ (DSINH, "DSINH", DSINH, "R2:-:X=R2", + SINH) + DEFIMQ (DSQRT, "DSQRT", DSQRT, "R2:-:X=R2", + SQRT) + DEFIMQ (DTAN, "DTAN", DTAN, "R2:-:X=R2", + TAN) + DEFIMQ (DTANH, "DTANH", DTANH, "R2:-:X=R2", + TANH) + DEFIMP (EXP, "EXP", EXP, "F0:*:X=F0") + DEFIMQ (IABS, "IABS", IABS, "I1:-:A=I1", + ABS) + DEFIMP (ICHAR, "ICHAR", , "I1:-:C=A0") + DEFIMQ (IDIM, "IDIM", IDIM, "I1:*:X=I1,Y=I1", + DIM) + DEFIMQ (IDNINT, "IDNINT", IDNINT, "I1:-:A=R2", + NINT) + DEFIMP (INDEX, "INDEX", INDEX, "I1:*:String=A0,Substring=A0") + DEFIMP (INT, "INT", , "I1:-:A=N0") + DEFIMQ (ISIGN, "ISIGN", ISIGN, "I1:*:A=I1,B=I1", + SIGN) + DEFIMP (LEN, "LEN", LEN, "I1:-:String=A0") + DEFIMP (LGE, "LGE", LGE, "L1:*:String_A=A1,String_B=A1") + DEFIMP (LGT, "LGT", LGT, "L1:*:String_A=A1,String_B=A1") + DEFIMP (LLE, "LLE", LLE, "L1:*:String_A=A1,String_B=A1") + DEFIMP (LLT, "LLT", LLT, "L1:*:String_A=A1,String_B=A1") + DEFIMP (LOG, "LOG", , "F0:*:X=F0") + DEFIMP (LOG10, "LOG10", , "R0:*:X=R0") + DEFIMP (MAX, "MAX", , "S0:*:A=pS0") + DEFIMP (MIN, "MIN", , "S0:*:A=pS0") + DEFIMQ (MAX0, "MAX0", , "I1:*:A=pI1", + MAX) + DEFIMQ (MAX1, "MAX1", , "I1:*:A=pR1", + MAX) + DEFIMQ (MIN0, "MIN0", , "I1:*:A=pI1", + MIN) + DEFIMQ (MIN1, "MIN1", , "I1:*:A=pR1", + MIN) + DEFIMP (MOD, "MOD", MOD, "S0:*:A=S0,P=S0") + DEFIMP (NINT, "NINT", NINT, "I1:-:A=R0") + DEFIMP (REAL, "REAL", , "RC:*:A=N0") + DEFIMP (SIGN, "SIGN", SIGN, "S0:*:A=S0,B=S0") + DEFIMP (SIN, "SIN", SIN, "F0:*:X=F0") + DEFIMP (SINH, "SINH", SINH, "R0:*:X=R0") + DEFIMP (SQRT, "SQRT", SQRT, "F0:*:X=F0") + DEFIMP (TAN, "TAN", TAN, "R0:*:X=R0") + DEFIMP (TANH, "TANH", TANH, "R0:*:X=R0") + + DEFIMP (ABORT, "ABORT", ABORT, "--:-:") + DEFIMP (ACHAR, "ACHAR", , "A1:-:I=I0") + DEFIMP (AND, "AND", , "B0:*:I=B0,J=B0") + DEFIMP (BIT_SIZE, "BIT_SIZE", , "I0:*:I=I0") + DEFIMP (BTEST, "BTEST", , "L1:*:I=I0,Pos=I0") + DEFIMQ (CDABS, "CDABS", CDABS, "R2:-:A=C2", + ABS) + DEFIMQ (CDCOS, "CDCOS", CDCOS, "C2:-:X=C2", + COS) + DEFIMQ (CDEXP, "CDEXP", CDEXP, "C2:-:X=C2", + EXP) + DEFIMQ (CDLOG, "CDLOG", CDLOG, "C2:-:X=C2", + LOG) + DEFIMQ (CDSIN, "CDSIN", CDSIN, "C2:-:X=C2", + SIN) + DEFIMQ (CDSQRT, "CDSQRT", CDSQRT, "C2:-:X=C2", + SQRT) + DEFIMQ (DCONJG, "DCONJG", DCONJG, "C2:-:Z=C2", + CONJG) + DEFIMQ (DERF, "DERF", DERF, "R2:-:X=R2", + ERF) + DEFIMQ (DERFC, "DERFC", DERFC, "R2:-:X=R2", + ERFC) + DEFIMQ (DIMAG, "DIMAG", DIMAG, "R2:-:Z=C2", + AIMAG) + DEFIMP (ERF, "ERF", ERF, "R0:-:X=R0") + DEFIMP (ERFC, "ERFC", ERFC, "R0:-:X=R0") + DEFIMP (EXIT, "EXIT", EXIT, "--:-:Status=?I0") + DEFIMP (FLUSH, "FLUSH", FLUSH, "--:-:Unit=?I0") + DEFIMP (GETARG, "GETARG", GETARG, "--:-:Pos=I0,Value=A1w") + DEFIMP (GETENV, "GETENV", GETENV, "--:-:Name=A1,Value=A1w") + DEFIMP (IACHAR, "IACHAR", , "I1:-:C=A0") + DEFIMP (IAND, "IAND", , "I0:*:I=I0,J=I0") + DEFIMP (IARGC, "IARGC", IARGC, "I1:-:") + DEFIMP (IBCLR, "IBCLR", , "I0:1:I=I0,Pos=I0") + DEFIMP (IBITS, "IBITS", , "I0:1:I=I0,Pos=I0,Len=I0") + DEFIMP (IBSET, "IBSET", , "I0:1:I=I0,Pos=I0") + DEFIMP (IEOR, "IEOR", , "I0:*:I=I0,J=I0") + DEFIMP (IOR, "IOR", , "I0:*:I=I0,J=I0") + DEFIMP (ISHFT, "ISHFT", , "I0:1:I=I0,Shift=I0") + DEFIMP (ISHFTC, "ISHFTC", , "I0:1:I=I0,Shift=I0,Size=I0") + DEFIMP (LOC, "LOC", , "I1:-:Variable=-0&") + DEFIMP (LSHIFT, "LSHIFT", , "I0:1:I=I0,Shift=I0") + DEFIMP (MVBITS, "MVBITS", , "--:-:From=I0,FromPos=I0,Len=I0,TO=IAx,ToPos=I0") + DEFIMP (NOT, "NOT", , "I0:*:I=I0") + DEFIMP (OR, "OR", , "B0:*:I=B0,J=B0") + DEFIMP (RSHIFT, "RSHIFT", , "I0:1:I=I0,Shift=I0") + DEFIMP (SIGNAL, "SIGNAL", , "--:-:Number=I0,Handler=-s") + DEFIMP (SYSTEM, "SYSTEM", , "--:-:Command=A1,Status=?I1") + DEFIMP (XOR, "XOR", , "B0:*:I=B0,J=B0") + DEFIMP (NONE, "none", , "") + diff -rcp2N g77-0.5.17/f/intrin.h g77-0.5.18/f/intrin.h *** g77-0.5.17/f/intrin.h Wed Aug 30 15:53:36 1995 --- g77-0.5.18/f/intrin.h Thu Mar 14 14:16:41 1996 *************** typedef enum *** 43,54 **** typedef enum { ! #define DEFGEN(CODE,NAME,SPEC1,SPEC2,SPEC3,SPEC4,SPEC5,SPEC6, \ ! SPEC7,SPEC8,SPEC9,SPEC10,SPEC11,SPEC12,SPEC13,SPEC14) CODE, ! #define DEFIMP(CODE,NAME,GFRT,RETURNS,EXPECTS) #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) #include "intrin.def" #undef DEFGEN - #undef DEFIMP #undef DEFSPEC FFEINTRIN_gen } ffeintrinGen; --- 43,57 ---- typedef enum { ! #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) ! #define DEFGEN(CODE,NAME,SPEC1,SPEC2) CODE, #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) + #define DEFIMP(CODE,NAME,GFRT,CONTROL) + #define DEFIMQ(CODE,NAME,GFRT,CONTROL,CGIMP) #include "intrin.def" + #undef DEFNAME #undef DEFGEN #undef DEFSPEC + #undef DEFIMP + #undef DEFIMQ FFEINTRIN_gen } ffeintrinGen; *************** typedef enum *** 56,67 **** typedef enum { ! #define DEFGEN(CODE,NAME,SPEC1,SPEC2,SPEC3,SPEC4,SPEC5,SPEC6, \ ! SPEC7,SPEC8,SPEC9,SPEC10,SPEC11,SPEC12,SPEC13,SPEC14) ! #define DEFIMP(CODE,NAME,GFRT,RETURNS,EXPECTS) #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) CODE, #include "intrin.def" #undef DEFGEN - #undef DEFIMP #undef DEFSPEC FFEINTRIN_spec } ffeintrinSpec; --- 59,73 ---- typedef enum { ! #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) ! #define DEFGEN(CODE,NAME,SPEC1,SPEC2) #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) CODE, + #define DEFIMP(CODE,NAME,GFRT,CONTROL) + #define DEFIMQ(CODE,NAME,GFRT,CONTROL,CGIMP) #include "intrin.def" + #undef DEFNAME #undef DEFGEN #undef DEFSPEC + #undef DEFIMP + #undef DEFIMQ FFEINTRIN_spec } ffeintrinSpec; *************** typedef enum *** 69,80 **** typedef enum { ! #define DEFGEN(CODE,NAME,SPEC1,SPEC2,SPEC3,SPEC4,SPEC5,SPEC6, \ ! SPEC7,SPEC8,SPEC9,SPEC10,SPEC11,SPEC12,SPEC13,SPEC14) ! #define DEFIMP(CODE,NAME,GFRT,RETURNS,EXPECTS) CODE, #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) #include "intrin.def" #undef DEFGEN - #undef DEFIMP #undef DEFSPEC FFEINTRIN_imp } ffeintrinImp; --- 75,89 ---- typedef enum { ! #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) ! #define DEFGEN(CODE,NAME,SPEC1,SPEC2) #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) + #define DEFIMP(CODE,NAME,GFRT,CONTROL) FFEINTRIN_imp ## CODE, + #define DEFIMQ(CODE,NAME,GFRT,CONTROL,CGIMP) FFEINTRIN_imp ## CODE, #include "intrin.def" + #undef DEFNAME #undef DEFGEN #undef DEFSPEC + #undef DEFIMP + #undef DEFIMQ FFEINTRIN_imp } ffeintrinImp; *************** typedef enum *** 83,87 **** #include "info.h" ! ffeinfoBasictype ffeintrin_basictype (ffeintrinImp imp); ffeintrinFamily ffeintrin_family (ffeintrinSpec spec); void ffeintrin_fulfill_generic (ffebld *expr, ffeinfo *info, ffelexToken t); --- 92,97 ---- #include "info.h" ! ffeinfoBasictype ffeintrin_basictype (ffeintrinSpec spec); ! ffeintrinImp ffeintrin_codegen_imp (ffeintrinImp imp); ffeintrinFamily ffeintrin_family (ffeintrinSpec spec); void ffeintrin_fulfill_generic (ffebld *expr, ffeinfo *info, ffelexToken t); *************** bool ffeintrin_is_intrinsic (char *name, *** 99,103 **** ffeintrinGen *gen, ffeintrinSpec *spec, ffeintrinImp *imp, ffeinfoKind *kind); ! ffeinfoKindtype ffeintrin_kindtype (ffeintrinImp imp); char *ffeintrin_name_generic (ffeintrinGen gen); char *ffeintrin_name_implementation (ffeintrinImp imp); --- 109,113 ---- ffeintrinGen *gen, ffeintrinSpec *spec, ffeintrinImp *imp, ffeinfoKind *kind); ! ffeinfoKindtype ffeintrin_kindtype (ffeintrinSpec spec); char *ffeintrin_name_generic (ffeintrinGen gen); char *ffeintrin_name_implementation (ffeintrinImp imp); diff -rcp2N g77-0.5.17/f/lang-options.h g77-0.5.18/f/lang-options.h *** g77-0.5.17/f/lang-options.h Thu Oct 26 17:39:47 1995 --- g77-0.5.18/f/lang-options.h Mon Mar 18 20:04:55 1996 *************** the Free Software Foundation, 59 Temple *** 30,33 **** --- 30,34 ---- "-fversion", "-fnull-version", + "-fset-g77-defaults", "-fident", "-fno-ident", *************** the Free Software Foundation, 59 Temple *** 64,67 **** --- 65,70 ---- "-funderscoring", "-fno-underscoring", + "-fsecond-underscore", + "-fno-second-underscore", "-fintrin-case-initcap", "-fintrin-case-upper", *************** the Free Software Foundation, 59 Temple *** 109,112 **** --- 112,117 ---- "-fvxt-intrinsics-disable", "-fvxt-intrinsics-enable", + "-fzeros", + "-fno-zeros", "-Wimplicit", "-Wno-implicit", *************** the Free Software Foundation, 59 Temple *** 117,120 **** "-I", "-ffixed-line-length-", - #endif --- 122,124 ---- diff -rcp2N g77-0.5.17/f/lang-specs.h g77-0.5.18/f/lang-specs.h *** g77-0.5.17/f/lang-specs.h Wed Aug 30 15:53:35 1995 --- g77-0.5.18/f/lang-specs.h Mon Mar 11 19:09:33 1996 *************** the Free Software Foundation, 59 Temple *** 53,57 **** %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\ %i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n", ! "%{!M:%{!MM:%{!E:f771 %{!pipe:%g.i} \ %{!Q:-quiet} -dumpbase %b.F %{d*} %{m*} %{a}\ %{g*} %{O*} %{W*} %{w} %{pedantic*} \ --- 53,57 ---- %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\ %i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n", ! "%{!M:%{!MM:%{!E:f771 %{!pipe:%g.i} -fset-g77-defaults \ %{!Q:-quiet} -dumpbase %b.F %{d*} %{m*} %{a}\ %{g*} %{O*} %{W*} %{w} %{pedantic*} \ *************** the Free Software Foundation, 59 Temple *** 66,70 **** {".for", "@f77"}, {"@f77", ! "%{!M:%{!MM:%{!E:f771 %i \ %{!Q:-quiet} -dumpbase %b.f %{d*} %{m*} %{a}\ %{g*} %{O*} %{W*} %{w} %{pedantic*}\ --- 66,70 ---- {".for", "@f77"}, {"@f77", ! "%{!M:%{!MM:%{!E:f771 %i -fset-g77-defaults \ %{!Q:-quiet} -dumpbase %b.f %{d*} %{m*} %{a}\ %{g*} %{O*} %{W*} %{w} %{pedantic*}\ diff -rcp2N g77-0.5.17/f/lex.c g77-0.5.18/f/lex.c *** g77-0.5.17/f/lex.c Wed Aug 30 15:53:35 1995 --- g77-0.5.18/f/lex.c Mon Dec 4 02:25:00 1995 *************** static void ffelex_bad_2_ (ffebad errnum *** 44,50 **** static void ffelex_bad_here_ (int num, ffewhereLineNumber ln0, ffewhereColumnNumber cn0); - #if 0 - static void ffelex_display_token_ (void); - #endif static void ffelex_finish_statement_ (void); #if FFECOM_targetCURRENT == FFECOM_targetGCC --- 44,47 ---- *************** ffelex_cfelex_ (ffelexToken *xtoken, FIL *** 849,872 **** #endif - #if 0 - static void - ffelex_display_token_ () - { - fprintf (stdout, "; Token #%lu is %s (line %" ffewhereLineNumber_f "u, col %" - ffewhereColumnNumber_f "u)", - ffelex_number_of_tokens_, - ffelex_type_string_ (ffelex_token_->type), - ffewhere_line_number (ffelex_token_->where_line), - ffewhere_column_number (ffelex_token_->where_col)); - - if (ffelex_token_->text != NULL) - fprintf (stdout, ": \"%.*s\"\n", - (unsigned int) ffelex_token_->length, - ffelex_token_->text); - else - fprintf (stdout, ".\n"); - } - - #endif #if FFECOM_targetCURRENT == FFECOM_targetGCC static void --- 846,849 ---- *************** ffelex_finish_statement_ () *** 982,986 **** if (ffelex_total_tokens_ != ffelex_old_total_tokens_) { ! fprintf (stdout, "; token_track had %ld tokens, now have %ld.\n", ffelex_old_total_tokens_, ffelex_total_tokens_); ffelex_old_total_tokens_ = ffelex_total_tokens_; --- 959,963 ---- if (ffelex_total_tokens_ != ffelex_old_total_tokens_) { ! fprintf (dmpout, "; token_track had %ld tokens, now have %ld.\n", ffelex_old_total_tokens_, ffelex_total_tokens_); ffelex_old_total_tokens_ = ffelex_total_tokens_; *************** ffelex_token_new_ () *** 1695,1698 **** --- 1672,1750 ---- } + static char * + ffelex_type_string_ (ffelexType type) + { + static char *types[] = { + "FFELEX_typeNONE", + "FFELEX_typeCOMMENT", + "FFELEX_typeEOS", + "FFELEX_typeEOF", + "FFELEX_typeERROR", + "FFELEX_typeRAW", + "FFELEX_typeQUOTE", + "FFELEX_typeDOLLAR", + "FFELEX_typeHASH", + "FFELEX_typePERCENT", + "FFELEX_typeAMPERSAND", + "FFELEX_typeAPOSTROPHE", + "FFELEX_typeOPEN_PAREN", + "FFELEX_typeCLOSE_PAREN", + "FFELEX_typeASTERISK", + "FFELEX_typePLUS", + "FFELEX_typeMINUS", + "FFELEX_typePERIOD", + "FFELEX_typeSLASH", + "FFELEX_typeNUMBER", + "FFELEX_typeOPEN_ANGLE", + "FFELEX_typeEQUALS", + "FFELEX_typeCLOSE_ANGLE", + "FFELEX_typeNAME", + "FFELEX_typeCOMMA", + "FFELEX_typePOWER", + "FFELEX_typeCONCAT", + "FFELEX_typeDEBUG", + "FFELEX_typeNAMES", + "FFELEX_typeHOLLERITH", + "FFELEX_typeCHARACTER", + "FFELEX_typeCOLON", + "FFELEX_typeSEMICOLON", + "FFELEX_typeUNDERSCORE", + "FFELEX_typeQUESTION", + "FFELEX_typeOPEN_ARRAY", + "FFELEX_typeCLOSE_ARRAY", + "FFELEX_typeCOLONCOLON", + "FFELEX_typeREL_LE", + "FFELEX_typeREL_NE", + "FFELEX_typeREL_EQ", + "FFELEX_typePOINTS", + "FFELEX_typeREL_GE" + }; + + if (type >= ARRAY_SIZE (types)) + return "???"; + return types[type]; + } + + void + ffelex_display_token (ffelexToken t) + { + if (t == NULL) + t = ffelex_token_; + + fprintf (dmpout, "; Token #%lu is %s (line %" ffewhereLineNumber_f "u, col %" + ffewhereColumnNumber_f "u)", + t->id_, + ffelex_type_string_ (t->type), + ffewhere_line_number (t->where_line), + ffewhere_column_number (t->where_col)); + + if (t->text != NULL) + fprintf (dmpout, ": \"%.*s\"\n", + (int) t->length, + t->text); + else + fprintf (dmpout, ".\n"); + } + /* ffelex_expecting_character -- Tells if next token expected to be CHARACTER *************** ffelex_file_fixed (ffewhereFile wf, FILE *** 1734,1737 **** --- 1786,1790 ---- int labi; /* Length of label text. */ bool finish_statement; /* Previous statement finished? */ + bool have_content; /* This line have content? */ bool just_do_label; /* Nothing but label (and continuation?) on line. */ *************** ffelex_file_fixed (ffewhereFile wf, FILE *** 1909,1912 **** --- 1962,1967 ---- latest_char_in_file = c; /* Should be either '\n' or EOF. */ + have_content = FALSE; + /* Handle label, if any. */ *************** ffelex_file_fixed (ffewhereFile wf, FILE *** 2048,2051 **** --- 2103,2107 ---- has a label. */ finish_statement = TRUE; + have_content = TRUE; just_do_label = TRUE; break; *************** ffelex_file_fixed (ffewhereFile wf, FILE *** 2098,2101 **** --- 2154,2158 ---- { ++column; + have_content = TRUE; break; } *************** ffelex_file_fixed (ffewhereFile wf, FILE *** 2115,2118 **** --- 2172,2177 ---- just_do_label = TRUE; } + else + have_content = TRUE; break; *************** ffelex_file_fixed (ffewhereFile wf, FILE *** 2128,2135 **** finish_statement = TRUE; break; } ! if (finish_statement || (first_label_char != FFEWHERE_columnUNKNOWN)) { --- 2187,2195 ---- finish_statement = TRUE; + have_content = TRUE; break; } ! if (have_content || (first_label_char != FFEWHERE_columnUNKNOWN)) { *************** ffelex_file_free (ffewhereFile wf, FILE *** 3032,3036 **** case '&': continuation_column = column + 1; ! /* Fall through. */ default: break; --- 3092,3097 ---- case '&': continuation_column = column + 1; ! break; ! default: break; *************** ffelex_token_dollar_from_names (ffelexTo *** 4254,4258 **** assert (t != NULL); - ffelex_total_tokens_++; assert (ffelex_token_type (t) == FFELEX_typeNAMES); assert (start < t->length); --- 4315,4318 ---- *************** ffelex_token_kill (ffelexToken t) *** 4282,4286 **** { assert (t != NULL); - ffelex_total_tokens_--; assert (t->uses > 0); --- 4342,4345 ---- *************** ffelex_token_kill (ffelexToken t) *** 4289,4292 **** --- 4348,4353 ---- return; + --ffelex_total_tokens_; + if (t->type == FFELEX_typeNAMES) ffewhere_track_kill (t->where_line, t->where_col, *************** ffelex_token_name_from_names (ffelexToke *** 4308,4312 **** assert (t != NULL); - ffelex_total_tokens_++; assert (ffelex_token_type (t) == FFELEX_typeNAMES); assert (start < t->length); --- 4369,4372 ---- *************** ffelex_token_names_from_names (ffelexTok *** 4344,4348 **** assert (t != NULL); - ffelex_total_tokens_++; assert (ffelex_token_type (t) == FFELEX_typeNAMES); assert (start < t->length); --- 4404,4407 ---- *************** ffelex_token_new_character (char *s, ffe *** 4379,4384 **** ffelexToken t; - ffelex_total_tokens_++; - t = ffelex_token_new_ (); t->type = FFELEX_typeCHARACTER; --- 4438,4441 ---- *************** ffelex_token_new_eof () *** 4400,4405 **** ffelexToken t; - ffelex_total_tokens_++; - t = ffelex_token_new_ (); t->type = FFELEX_typeEOF; --- 4457,4460 ---- *************** ffelex_token_new_name (char *s, ffewhere *** 4418,4423 **** ffelexToken t; - ffelex_total_tokens_++; - assert (ffelex_is_firstnamechar (*s)); --- 4473,4476 ---- *************** ffelex_token_new_names (char *s, ffewher *** 4441,4446 **** ffelexToken t; - ffelex_total_tokens_++; - assert (ffelex_is_firstnamechar (*s)); --- 4494,4497 ---- *************** ffelex_token_new_number (char *s, ffewhe *** 4473,4478 **** ffeTokenLength len; - ffelex_total_tokens_++; - /* How long is the string of decimal digits at s? */ --- 4524,4527 ---- *************** ffelex_token_number_from_names (ffelexTo *** 4527,4531 **** assert (t != NULL); - ffelex_total_tokens_++; assert (ffelex_token_type (t) == FFELEX_typeNAMES); assert (start < t->length); --- 4576,4579 ---- *************** ffelex_token_uscore_from_names (ffelexTo *** 4564,4568 **** assert (t != NULL); - ffelex_total_tokens_++; assert (ffelex_token_type (t) == FFELEX_typeNAMES); assert (start < t->length); --- 4612,4615 ---- *************** ffelex_token_use (ffelexToken t) *** 4595,4599 **** if (t == NULL) assert ("_token_use: null token" == NULL); - ffelex_total_tokens_++; t->uses++; return t; --- 4642,4645 ---- diff -rcp2N g77-0.5.17/f/lex.h g77-0.5.18/f/lex.h *** g77-0.5.17/f/lex.h Wed Aug 30 15:53:35 1995 --- g77-0.5.18/f/lex.h Mon Dec 4 01:18:43 1995 *************** struct _lextoken_ *** 119,122 **** --- 119,123 ---- /* Declare functions with prototypes. */ + void ffelex_display_token (ffelexToken t); bool ffelex_expecting_character (void); ffelexHandler ffelex_file_fixed (ffewhereFile wf, FILE *f); diff -rcp2N g77-0.5.17/f/malloc.c g77-0.5.18/f/malloc.c *** g77-0.5.17/f/malloc.c Tue Sep 12 14:17:58 1995 --- g77-0.5.18/f/malloc.c Sun Dec 10 00:57:39 1995 *************** struct _malloc_root_ malloc_root_ *** 47,56 **** &malloc_root_.malloc_pool_image_, &malloc_root_.malloc_pool_image_, ! (mallocPool) & malloc_root_.malloc_pool_image_.eldest, ! (mallocPool) & malloc_root_.malloc_pool_image_.eldest, ! (mallocArea_) & malloc_root_.malloc_pool_image_.first, ! (mallocArea_) & malloc_root_.malloc_pool_image_.first, ! 0, 0, 0, 0, 0, 0, 0}, ! "Image" }; --- 47,59 ---- &malloc_root_.malloc_pool_image_, &malloc_root_.malloc_pool_image_, ! (mallocPool) &malloc_root_.malloc_pool_image_.eldest, ! (mallocPool) &malloc_root_.malloc_pool_image_.eldest, ! (mallocArea_) &malloc_root_.malloc_pool_image_.first, ! (mallocArea_) &malloc_root_.malloc_pool_image_.first, ! 0, ! #if MALLOC_DEBUG ! 0, 0, 0, 0, 0, 0, 0, '/' ! #endif ! }, }; *************** struct _malloc_root_ malloc_root_ *** 70,85 **** static void *malloc_reserve_ = NULL; /* For crashes. */ ! static char *malloc_types_[] ! = {"KS", "KSR", "NF", "NFR", "US", "USR"}; /* Static functions (internal). */ static void malloc_kill_area_ (mallocPool pool, mallocArea_ a); static void malloc_verify_area_ (mallocPool pool, mallocArea_ a); /* Internal macros. */ #define malloc_kill_(ptr,s) do {memset((ptr),127,(s));free((ptr));} while(0) /* malloc_kill_area_ -- Kill storage area and its object --- 73,95 ---- static void *malloc_reserve_ = NULL; /* For crashes. */ ! #if MALLOC_DEBUG ! static char *malloc_types_[] = {"KS", "KSR", "NF", "NFR", "US", "USR"}; + #endif /* Static functions (internal). */ static void malloc_kill_area_ (mallocPool pool, mallocArea_ a); + #if MALLOC_DEBUG static void malloc_verify_area_ (mallocPool pool, mallocArea_ a); + #endif /* Internal macros. */ + #if MALLOC_DEBUG #define malloc_kill_(ptr,s) do {memset((ptr),127,(s));free((ptr));} while(0) + #else + #define malloc_kill_(ptr,s) free((ptr)) + #endif /* malloc_kill_area_ -- Kill storage area and its object *************** static void malloc_verify_area_ (mallocP *** 90,103 **** static void ! malloc_kill_area_ (mallocPool pool, mallocArea_ a) { ! mallocSize s = a->size; ! ! assert (strcmp (a->name, ((char *) (a->where)) + s) == 0); ! malloc_kill_ (a->where, s); a->next->previous = a->previous; a->previous->next = a->next; ! pool->freed += s; pool->frees++; malloc_kill_ (a, offsetof (struct _malloc_area_, name) --- 100,115 ---- static void ! malloc_kill_area_ (mallocPool pool UNUSED, mallocArea_ a) { ! #if MALLOC_DEBUG ! assert (strcmp (a->name, ((char *) (a->where)) + a->size) == 0); ! #endif ! malloc_kill_ (a->where, a->size); a->next->previous = a->previous; a->previous->next = a->next; ! #if MALLOC_DEBUG ! pool->freed += a->size; pool->frees++; + #endif malloc_kill_ (a, offsetof (struct _malloc_area_, name) *************** malloc_kill_area_ (mallocPool pool, mall *** 111,116 **** Does the actual verifying of a storage area. */ static void ! malloc_verify_area_ (mallocPool pool UNUSED, mallocArea_ a) { mallocSize s = a->size; --- 123,129 ---- Does the actual verifying of a storage area. */ + #if MALLOC_DEBUG static void ! malloc_verify_area_ (mallocPool pool UNUSED, mallocArea_ a UNUSED) { mallocSize s = a->size; *************** malloc_verify_area_ (mallocPool pool UNU *** 118,121 **** --- 131,135 ---- assert (strcmp (a->name, ((char *) (a->where)) + s) == 0); } + #endif /* malloc_init -- Initialize malloc cluster *************** malloc_init () *** 142,151 **** void ! malloc_pool_display (mallocPool p) { mallocPool q; mallocArea_ a; ! fprintf (stdout, "Pool \"%s\": bytes allocated=%lu, freed=%lu, old sizes=%lu, new sizes\ =%lu,\n allocations=%lu, frees=%lu, resizes=%lu, uses=%lu\n Subpools:\n", p->name, p->allocated, p->freed, p->old_sizes, p->new_sizes, p->allocations, --- 156,166 ---- void ! malloc_pool_display (mallocPool p UNUSED) { + #if MALLOC_DEBUG mallocPool q; mallocArea_ a; ! fprintf (dmpout, "Pool \"%s\": bytes allocated=%lu, freed=%lu, old sizes=%lu, new sizes\ =%lu,\n allocations=%lu, frees=%lu, resizes=%lu, uses=%lu\n Subpools:\n", p->name, p->allocated, p->freed, p->old_sizes, p->new_sizes, p->allocations, *************** malloc_pool_display (mallocPool p) *** 153,165 **** for (q = p->eldest; q != (mallocPool) & p->eldest; q = q->next) ! fprintf (stdout, " \"%s\"\n", q->name); ! fprintf (stdout, " Storage areas:\n"); for (a = p->first; a != (mallocArea_) & p->first; a = a->next) { ! fprintf (stdout, " "); malloc_display_ (a); } } --- 168,181 ---- for (q = p->eldest; q != (mallocPool) & p->eldest; q = q->next) ! fprintf (dmpout, " \"%s\"\n", q->name); ! fprintf (dmpout, " Storage areas:\n"); for (a = p->first; a != (mallocArea_) & p->first; a = a->next) { ! fprintf (dmpout, " "); malloc_display_ (a); } + #endif } *************** malloc_pool_kill (mallocPool p) *** 189,195 **** /* Kill off all the subpools. */ ! while ((q = p->eldest) != (mallocPool) & p->eldest) { ! p->uses = 1; /* Force the kill. */ malloc_pool_kill (q); } --- 205,211 ---- /* Kill off all the subpools. */ ! while ((q = p->eldest) != (mallocPool) &p->eldest) { ! q->uses = 1; /* Force the kill. */ malloc_pool_kill (q); } *************** malloc_pool_new (char *name, mallocPool *** 230,246 **** parent = malloc_pool_image (); ! p = malloc_new_ (offsetof (struct _malloc_pool_, name) + strlen (name) + 1); ! p->next = (mallocPool) & (parent->eldest); p->previous = parent->youngest; parent->youngest->next = p; parent->youngest = p; ! p->eldest = (mallocPool) & (p->eldest); ! p->youngest = (mallocPool) & (p->eldest); ! p->first = (mallocArea_) & (p->first); ! p->last = (mallocArea_) & (p->first); p->allocated = p->freed = p->old_sizes = p->new_sizes = p->allocations = p->frees = p->resizes = 0; - p->uses = 1; strcpy (p->name, name); return p; } --- 246,265 ---- parent = malloc_pool_image (); ! p = malloc_new_ (offsetof (struct _malloc_pool_, name) ! + (MALLOC_DEBUG ? strlen (name) + 1 : 0)); ! p->next = (mallocPool) &(parent->eldest); p->previous = parent->youngest; parent->youngest->next = p; parent->youngest = p; ! p->eldest = (mallocPool) &(p->eldest); ! p->youngest = (mallocPool) &(p->eldest); ! p->first = (mallocArea_) &(p->first); ! p->last = (mallocArea_) &(p->first); ! p->uses = 1; ! #if MALLOC_DEBUG p->allocated = p->freed = p->old_sizes = p->new_sizes = p->allocations = p->frees = p->resizes = 0; strcpy (p->name, name); + #endif return p; } *************** malloc_pool_use (mallocPool pool) *** 269,276 **** void ! malloc_display_ (mallocArea_ a) { ! fprintf (stdout, "At %08lX, size=%" mallocSize_f "u, type=%s, \"%s\"\n", (unsigned long) a->where, a->size, malloc_types_[a->type], a->name); } --- 288,297 ---- void ! malloc_display_ (mallocArea_ a UNUSED) { ! #if MALLOC_DEBUG ! fprintf (dmpout, "At %08lX, size=%" mallocSize_f "u, type=%s, \"%s\"\n", (unsigned long) a->where, a->size, malloc_types_[a->type], a->name); + #endif } *************** malloc_find_inpool_ (mallocPool pool, vo *** 312,316 **** void ! malloc_kill_inpool_ (mallocPool pool, mallocType_ type, void *ptr, mallocSize s) { mallocArea_ a; --- 333,338 ---- void ! malloc_kill_inpool_ (mallocPool pool, mallocType_ type UNUSED, ! void *ptr, mallocSize s UNUSED) { mallocArea_ a; *************** malloc_kill_inpool_ (mallocPool pool, ma *** 319,329 **** --- 341,355 ---- pool = malloc_pool_image (); + #if MALLOC_DEBUG assert ((pool == malloc_pool_image ()) || malloc_pool_find_ (pool, malloc_pool_image ())); + #endif a = malloc_find_inpool_ (pool, ptr); + #if MALLOC_DEBUG assert (a->type == type); if ((type != MALLOC_typeUS_) && (type != MALLOC_typeUSR_)) assert (a->size == s); + #endif malloc_kill_area_ (pool, a); } *************** malloc_new_ (mallocSize s) *** 341,346 **** --- 367,375 ---- size_t ss = s; + #if MALLOC_DEBUG assert (s == (mallocSize) ss);/* Else alloc is too big for this library/sys. */ + #endif + ptr = malloc (ss); if (ptr == NULL) *************** malloc_new_ (mallocSize s) *** 349,354 **** --- 378,385 ---- assert (ptr != NULL); } + #if MALLOC_DEBUG memset (ptr, 126, ss); /* Catch some kinds of errors more quickly/reliably. */ + #endif return ptr; } *************** malloc_new_inpool_ (mallocPool pool, mal *** 371,379 **** pool = malloc_pool_image (); assert ((pool == malloc_pool_image ()) || malloc_pool_find_ (pool, malloc_pool_image ())); ! ptr = malloc_new_ (s + (i = strlen (name) + 1)); strcpy (((char *) (ptr)) + s, name); a = malloc_new_ (offsetof (struct _malloc_area_, name) + i); switch (type) --- 402,414 ---- pool = malloc_pool_image (); + #if MALLOC_DEBUG assert ((pool == malloc_pool_image ()) || malloc_pool_find_ (pool, malloc_pool_image ())); + #endif ! ptr = malloc_new_ (s + (i = (MALLOC_DEBUG ? strlen (name) + 1 : 0))); ! #if MALLOC_DEBUG strcpy (((char *) (ptr)) + s, name); + #endif a = malloc_new_ (offsetof (struct _malloc_area_, name) + i); switch (type) *************** malloc_new_inpool_ (mallocPool pool, mal *** 382,386 **** case MALLOC_typeKP_: case MALLOC_typeKPR_: ! a->next = (mallocArea_) & pool->first; break; --- 417,421 ---- case MALLOC_typeKP_: case MALLOC_typeKPR_: ! a->next = (mallocArea_) &pool->first; break; *************** malloc_new_inpool_ (mallocPool pool, mal *** 393,396 **** --- 428,432 ---- a->previous->next = a; a->where = ptr; + #if MALLOC_DEBUG a->size = s; a->type = type; *************** malloc_new_inpool_ (mallocPool pool, mal *** 398,401 **** --- 434,438 ---- pool->allocated += s; pool->allocations++; + #endif return ptr; } *************** malloc_pool_find_ (mallocPool pool, mall *** 446,451 **** void * ! malloc_resize_inpool_ (mallocPool pool, mallocType_ type, void *ptr, ! mallocSize ns, mallocSize os) { mallocArea_ a; --- 483,488 ---- void * ! malloc_resize_inpool_ (mallocPool pool, mallocType_ type UNUSED, ! void *ptr, mallocSize ns, mallocSize os UNUSED) { mallocArea_ a; *************** malloc_resize_inpool_ (mallocPool pool, *** 454,467 **** pool = malloc_pool_image (); assert ((pool == malloc_pool_image ()) || malloc_pool_find_ (pool, malloc_pool_image ())); a = malloc_find_inpool_ (pool, ptr); assert (a->type == type); if ((type == MALLOC_typeKSR_) || (type == MALLOC_typeKPR_)) assert (a->size == os); assert (strcmp (a->name, ((char *) (ptr)) + os) == 0); ! ptr = malloc_resize_ (ptr, ns + strlen (a->name) + 1); a->where = ptr; a->size = ns; strcpy (((char *) (ptr)) + ns, a->name); --- 491,509 ---- pool = malloc_pool_image (); + #if MALLOC_DEBUG assert ((pool == malloc_pool_image ()) || malloc_pool_find_ (pool, malloc_pool_image ())); + #endif a = malloc_find_inpool_ (pool, ptr); + #if MALLOC_DEBUG assert (a->type == type); if ((type == MALLOC_typeKSR_) || (type == MALLOC_typeKPR_)) assert (a->size == os); assert (strcmp (a->name, ((char *) (ptr)) + os) == 0); ! #endif ! ptr = malloc_resize_ (ptr, ns + (MALLOC_DEBUG ? strlen (a->name) + 1: 0)); a->where = ptr; + #if MALLOC_DEBUG a->size = ns; strcpy (((char *) (ptr)) + ns, a->name); *************** malloc_resize_inpool_ (mallocPool pool, *** 469,472 **** --- 511,515 ---- pool->new_sizes += ns; pool->resizes++; + #endif return ptr; } *************** malloc_resize_ (void *ptr, mallocSize s) *** 483,487 **** --- 526,532 ---- size_t ss = s; + #if MALLOC_DEBUG assert (s == (mallocSize) ss);/* Too big if failure here. */ + #endif ptr = realloc (ptr, ss); *************** malloc_resize_ (void *ptr, mallocSize s) *** 500,506 **** void ! malloc_verify_inpool_ (mallocPool pool, mallocType_ type, void *ptr, ! mallocSize s) { mallocArea_ a; --- 545,552 ---- void ! malloc_verify_inpool_ (mallocPool pool UNUSED, mallocType_ type UNUSED, ! void *ptr UNUSED, mallocSize s UNUSED) { + #if MALLOC_DEBUG mallocArea_ a; *************** malloc_verify_inpool_ (mallocPool pool, *** 516,518 **** --- 562,565 ---- assert (a->size == s); malloc_verify_area_ (pool, a); + #endif } diff -rcp2N g77-0.5.17/f/malloc.h g77-0.5.18/f/malloc.h *** g77-0.5.17/f/malloc.h Wed Aug 30 15:53:35 1995 --- g77-0.5.18/f/malloc.h Mon Dec 4 02:56:03 1995 *************** the Free Software Foundation, 59 Temple *** 31,34 **** --- 31,38 ---- #define _H_f_malloc + #ifndef MALLOC_DEBUG + #define MALLOC_DEBUG 0 /* 1 means check caller's use of this module. */ + #endif + /* Simple definitions and enumerations. */ *************** struct _malloc_area_ *** 61,66 **** --- 65,72 ---- mallocArea_ previous; void *where; + #if MALLOC_DEBUG mallocSize size; mallocType_ type; + #endif char name[1]; }; *************** struct _malloc_pool_ *** 74,77 **** --- 80,85 ---- mallocArea_ first; mallocArea_ last; + unsigned long uses; + #if MALLOC_DEBUG mallocSize allocated; mallocSize freed; *************** struct _malloc_pool_ *** 81,85 **** unsigned long frees; unsigned long resizes; ! unsigned long uses; char name[1]; }; --- 89,93 ---- unsigned long frees; unsigned long resizes; ! #endif char name[1]; }; *************** struct _malloc_root_ *** 88,92 **** { struct _malloc_pool_ malloc_pool_image_; - char name[6]; }; --- 96,99 ---- diff -rcp2N g77-0.5.17/f/news.texi g77-0.5.18/f/news.texi *** g77-0.5.17/f/news.texi Wed Dec 31 19:00:00 1969 --- g77-0.5.18/f/news.texi Mon Apr 1 10:19:28 1996 *************** *** 0 **** --- 1,754 ---- + @c Copyright (C) 1995, 1996 Free Software Foundation, Inc. + @c This is part of the G77 manual. + @c For copying conditions, see the file g77.texi. + + @c The text of this file appears in the file BUGS + @c in the G77 distribution, as well as in the G77 manual. + + @c 1996-04-01 + + @ifclear NEWSONLY + @node News + @chapter News About GNU Fortran + @end ifclear + @cindex versions, recent + @cindex recent versions + + @heading In 0.5.18: + @itemize @bullet + @item + Add some rudimentary support for @samp{INTEGER*1}, + @samp{INTEGER*2}, @samp{INTEGER*8}, + and their @samp{LOGICAL} equivalents. + (This support works on most, maybe all, @code{gcc} targets.) + + Thanks to Scott Snyder (@code{snyder@@d0sgif.fnal.gov}) + for providing the patch for this! + + Among the missing elements from the support for these + features are full intrinsic support and constants. + + @item + Add some rudimentary support for the @samp{BYTE} and + @samp{WORD} type-declaration statements. + @samp{BYTE} corresponds to @samp{INTEGER*1}, + while @samp{WORD} corresponds to @samp{INTEGER*2}. + + Thanks to Scott Snyder (@code{snyder@@d0sgif.fnal.gov}) + for providing the patch for this! + + @item + The compiler code handling intrinsics has been largely + rewritten to accommodate the new types. + No new intrinsics or arguments for existing + intrinsics have been added, so there is, at this + point, no intrinsic to convert to @samp{INTEGER*8}, + for example. + + @item + Support automatic arrays in procedures. + + @item + Reduce space/time requirements for handling large + @emph{sparsely} initialized aggregate arrays. + This improvement applies to only a subset of + the general problem to be addressed in 0.6. + + @item + Treat initial values of zero as if they weren't + specified (in DATA and type-declaration statements). + The initial values will be set to zero anyway, but the amount + of compile time processing them will be reduced, + in some cases significantly (though, again, this + is only a subset of the general problem to be + addressed in 0.6). + + A new option, @samp{-fzeros}, is introduced to + enable the traditional treatment of zeros as any + other value. + + @item + With @samp{-ff90} in force, @code{g77} incorrectly + interpreted @samp{REAL(Z)} as returning a @samp{REAL} + result, instead of as a @samp{DOUBLE PRECISION} + result. + (Here, @samp{Z} is @samp{DOUBLE COMPLEX}.) + + With @samp{-fno-f90} in force, the interpretation remains + unchanged, since this appears to be how at least some + F77 code using the @samp{DOUBLE COMPLEX} extension expected + it to work. + + Essentially, @samp{REAL(Z)} in F90 is the same as + @samp{DBLE(Z)}, while in extended F77, it appears to + be the same as @samp{REAL(REAL(Z))}. + + @item + An expression involving exponentiation, where both operands + were type @samp{INTEGER} and the right-hand operand + was negative, was erroneously evaluated. + + @item + Fix bugs involving @samp{DATA} implied-@samp{DO} constructs + (these involved an errant diagnostic and a crash, both on good + code, one involving subsequent statement-function definition). + + @item + Close @samp{INCLUDE} files after processing them, so compiling source + files with lots of @samp{INCLUDE} statements does not result in + being unable to open @samp{INCLUDE} files after all the available + file descriptors are used up. + + @item + Speed up compiling, especially of larger programs, and perhaps + slightly reduce memory utilization while compiling (this is + @emph{not} the improvement planned for 0.6 involving large aggregate + areas)---these improvements result from simply turning + off some low-level code to do self-checking that hasn't been + triggered in a long time. + + @item + Introduce three new options that + implement optimizations in the @code{gcc} back end (GBE). + These options are @samp{-fmove-all-movables}, @samp{-freduce-all-givs}, + and @samp{-frerun-loop-opt}, which are enabled, by default, + for Fortran compilations. + These optimizations are intended to help toon Fortran programs. + + @item + Patch the GBE to do a better job optimizing certain + kinds of references to array elements. + + @item + Due to patches to the GBE, the version number of @code{gcc} + also is patched to make it easier to manage installations, + especially useful if it turns out a @code{g77} change to the + GBE has a bug. + + The @code{g77}-modified version number is the @code{gcc} + version number with the string @samp{.f.@var{n}} appended, + where @samp{f} identifies the version as enhanced for + Fortran, and @var{n} is @samp{1} for the first Fortran + patch for that version of @code{gcc}, @samp{2} for the + second, and so on. + + So, this introduces version @samp{2.7.2.f.1} of @code{gcc}. + + @item + Make several improvements and fixes to diagnostics, including + the removal of two that were inappropriate or inadequate. + + @item + Warning about two successive arithmetic operators, produced + by @samp{-Wsurprising}, now produced @emph{only} when both + operators are, indeed, arithmetic (not relational/boolean). + + @item + @samp{-Wsurprising} now warns about the remaining cases + of using non-integral variables for implied-@code{DO} + loops, instead of these being rejected unless @samp{-fpedantic} + or @samp{-fugly} specified. + + @item + Allow @samp{SAVE} of a local variable or array, even after + it has been given an initial value via @samp{DATA}, for example. + + @item + Introduce an Info version of @code{g77} documentation, which + supercedes @file{gcc/f/CREDITS}, @file{gcc/f/DOC}, and + @file{gcc/f/PROJECTS}. + These files will be removed in a future release. + The files @file{gcc/f/BUGS}, @file{gcc/f/INSTALL}, and + @file{gcc/f/NEWS} now are automatically built from + the texinfo source when distributions are made. + + This effort was inspired by a first pass at translating + @code{g77-0.5.16/f/DOC} that was contributed to Craig by + David Ronis (@code{ronis@@onsager.chem.mcgill.ca}). + + @item + New @samp{-fno-second-underscore} option to specify + that, when @samp{-funderscoring} is in effect, a second + underscore is not to be appended to Fortran names already + containing an underscore. + + @item + Change the way iterative @code{DO} loops work to follow + the F90 standard. + In particular, calculation of the iteration count is + still done by converting the start, end, and increment + parameters to the type of the @code{DO} variable, but + the result of the calculation is always converted to + the default @samp{INTEGER} type. + + (This should have no effect on existing code compiled + by @code{g77}, but code written to assume that use + of a @emph{wider} type for the @code{DO} variable + will result in an iteration count being fully calculated + using that wider type (wider + than default @samp{INTEGER}) must be rewritten.) + + @item + Upgrade to @code{libf2c} as of 1996-03-23, and + fix up some of the build procedures. + + Note that the email addresses related to @code{f2c} + have changed---the distribution site now is + named @code{netlib.bell-labs.com}, and the + maintainer's new address is @code{dmg@@bell-labs.com}. + @end itemize + + @heading In 0.5.17: + @itemize @bullet + @item + @strong{Fix serious bug} in @samp{g77 -v} command that can cause removal of a + system's @file{/dev/null} special file if run by user @samp{root}. + + @strong{All users} of version 0.5.16 should ensure that + they have not removed @file{/dev/null} or replaced it with an ordinary + file (e.g. by comparing the output of @samp{ls -l /dev/null} with + @samp{ls -l /dev/zero}. + If the output isn't basically the + same, contact your system + administrator about restoring @file{/dev/null} to its proper status). + + This bug is particularly insidious because removing @file{/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 @samp{g77 -v} runs the @code{ld} command + with @samp{-o /dev/null} that @code{ld} tries to @emph{remove} the executable + it is supposed to build (especially if it reports unresolved + references, which it should in this case)! + + @item + Fix crash on @samp{CHARACTER*(*) FOO} in a main or block data program unit. + + @item + Fix crash that can occur when diagnostics given outside of any + program unit (such as when input file contains @samp{@@foo}). + + @item + Fix crashes, infinite loops (hangs), and such involving diagnosed code. + + @item + Fix @samp{ASSIGN}'ed variables so they can be @samp{SAVE}'d or dummy arguments, + and issue clearer error message in cases where target of @samp{ASSIGN} + or @samp{ASSIGN}ed @samp{GOTO}/@samp{FORMAT} is too small (which should + never happen). + + @item + Make @code{libf2c} build procedures work on more systems again by + eliminating unnecessary invocations of @samp{ld -r -x} and @samp{mv}. + + @item + Fix omission of @samp{-funix-intrinsics-@dots{}} options in list of permitted + options to compiler. + + @item + Fix failure to always diagnose missing type declaration for + @samp{IMPLICIT NONE}. + + @item + 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 @samp{INTEGER} + constant for the right-hand operator (e.g. @samp{I**32767}). + + @item + Fix build procedures so cross-compiling @code{g77} (the @code{fini} + utility in particular) is properly built using the host compiler. + + @item + Add new @samp{-Wsurprising} option to warn about constructs that are + interpreted by the Fortran standard (and @code{g77}) in ways that + are surprising to many programmers. + + @item + Add @samp{ERF()} and @samp{ERFC()} as generic intrinsics mapping to existing + @samp{ERF}/@samp{DERF} and @samp{ERFC}/@samp{DERFC} specific intrinsics. + + @emph{Note:} You should + specify @samp{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. @code{f2c}). + + @item + Remove from @samp{-fno-pedantic} the diagnostic about @samp{DO} + with non-@samp{INTEGER} index variable; issue that under + @samp{-Wsurprising} instead. + + @item + Clarify some diagnostics that say things like ``ignored'' when that's + misleading. + + @item + Clarify diagnostic on use of @samp{.EQ.}/@samp{.NE.} on @samp{LOGICAL} + operands. + + @item + Minor improvements to code generation for various operations on + @samp{LOGICAL} operands. + + @item + Minor improvement to code generation for some @samp{DO} loops on some + machines. + + @item + Support @code{gcc} version 2.7.1. + + @item + Upgrade to @code{libf2c} as of 1995-11-15. + @end itemize + + @heading In 0.5.16: + @itemize @bullet + @item + Fix a code-generation bug involving complicated @samp{EQUIVALENCE} statements + not involving @samp{COMMON} + + @item + Fix code-generation bugs involving invoking ``gratis'' library procedures + in @code{libf2c} from code compiled with @samp{-fno-f2c} by making these + procedures known to @code{g77} as intrinsics (not affected by -fno-f2c). + This is known to fix code invoking @samp{ERF()}, @samp{ERFC()}, + @samp{DERF()}, and @samp{DERFC()}. + + @item + Update @code{libf2c} to include netlib patches through 1995-08-16, and + @samp{#define} @samp{WANT_LEAD_0} to 1 to make @code{g77}-compiled code more + consistent with other Fortran implementations by outputting + leading zeros in formatted and list-directed output. + + @item + Fix a code-generation bug involving adjustable dummy arrays with high + bounds whose primaries are changed during procedure execution, and + which might well improve code-generation performance for such arrays + compared to @code{f2c} plus @code{gcc} (but apparently only when using + @file{gcc-2.7.0} or later). + + @item + Fix a code-generation bug involving invocation of @samp{COMPLEX} and + @samp{DOUBLE COMPLEX} @samp{FUNCTION}s and doing @samp{COMPLEX} and + @samp{DOUBLE COMPLEX} divides, when the result + of the invocation or divide is assigned directly to a variable + that overlaps one or more of the arguments to the invocation or divide. + + @item + Fix crash by not generating new optimal code for @samp{X**I} if @samp{I} is + nonconstant and the expression is used to dimension a dummy + array, since the @code{gcc} back end does not support the necessary + mechanics (and the @code{gcc} front end rejects the equivalent + construct, as it turns out). + + @item + Fix crash on expressions like @samp{COMPLEX**INTEGER}. + + @item + Fix crash on expressions like @samp{(1D0,2D0)**2}, i.e. raising a + @samp{DOUBLE COMPLEX} constant to an @samp{INTEGER} constant power. + + @item + Fix crashes and such involving diagnosed code. + + @item + Diagnose, instead of crashing on, statement function definitions + having duplicate dummy argument names. + + @item + Fix bug causing rejection of good code involving statement function + definitions. + + @item + Fix bug resulting in debugger not knowing size of local equivalence + area when any member of area has initial value (via @samp{DATA}, + for example). + + @item + Fix installation bug that prevented installation of @code{g77} driver. + Provide for easy selection of whether to install copy of @code{g77} + as @code{f77} to replace the broken code. + + @item + Fix @code{gcc} driver (affects @code{g77} thereby) to not + gratuitously invoke the + @code{f771} program (e.g. when @samp{-E} is specified). + + @item + Fix diagnostic to point to correct source line when it immediately + follows an @samp{INCLUDE} statement. + + @item + Support more compiler options in @code{gcc}/@code{g77} when + compiling Fortran files. + These options include @samp{-p}, @samp{-pg}, @samp{-aux-info}, @samp{-P}, + correct setting of version-number macros for preprocessing, full + recognition of @samp{-O0}, and + automatic insertion of configuration-specific linker specs. + + @item + Add new intrinsics that interface to existing routines in @code{libf2c}: + @samp{ABORT}, @samp{DERF}, @samp{DERFC}, @samp{ERF}, @samp{ERFC}, @samp{EXIT}, + @samp{FLUSH}, @samp{GETARG}, @samp{GETENV}, @samp{IARGC}, + @samp{SIGNAL}, and @samp{SYSTEM}. + Note that @samp{ABORT}, @samp{EXIT}, @samp{FLUSH}, @samp{SIGNAL}, and + @samp{SYSTEM} are intrinsic subroutines, not functions (since they + have side effects), so to get the return values from @samp{SIGNAL} + and @samp{SYSTEM}, append a final argument specifying an @samp{INTEGER} + variable or array element (e.g. @samp{CALL SYSTEM('rm foo',ISTAT)}). + + @item + Add new intrinsic group named @samp{unix} to contain the new intrinsics, + and by default enable this new group. + + @item + Move @samp{LOC()} intrinsic out of the @samp{vxt} group to the new + @samp{unix} group. + + @item + Improve @code{g77} so that @samp{g77 -v} by itself (or with + certain other options, including @samp{-B}, @samp{-b}, @samp{-i}, + @samp{-nostdlib}, and @samp{-V}) reports lots more useful + version info, and so that long-form options @code{gcc} accepts are + understood by @code{g77} as well (even in truncated, unambiguous forms). + + @item + Add new @code{g77} option @samp{--driver=name} to specify driver when + default, @code{gcc}, isn't appropriate. + + @item + Add support for @samp{#} directives (as output by the preprocessor) in the + compiler, and enable generation of those directives by the + preprocessor (when compiling @samp{.F} files) so diagnostics and debugging + info are more useful to users of the preprocessor. + + @item + Produce better diagnostics, more like @code{gcc}, with info such as + @samp{In function `foo':} and @samp{In file included from...:}. + + @item + Support @code{gcc}'s @samp{-fident} and @samp{-fno-ident} options. + + @item + When @samp{-Wunused} in effect, don't warn about local variables used as + statement-function dummy arguments or @samp{DATA} implied-@samp{DO} iteration + variables, even though, strictly speaking, these are not uses + of the variables themselves. + + @item + When @samp{-W -Wunused} in effect, don't warn about unused dummy arguments + at all, since there's no way to turn this off for individual + cases (@code{g77} might someday start warning about these)---applies + to @code{gcc} versions 2.7.0 and later, since earlier versions didn't + warn about unused dummy arguments. + + @item + New option @samp{-fno-underscoring} that inhibits transformation of names + (by appending one or two underscores) so users may experiment + with implications of such an environment. + + @item + Minor improvement to @file{gcc/f/info} module to make it easier to build + @code{g77} using the native (non-@code{gcc}) compiler on certain machines + (but definitely not all machines nor all non-@code{gcc} compilers). + Please + do not report bugs showing problems compilers have with + macros defined in @file{gcc/f/target.h} and used in places like + @file{gcc/f/expr.c}. + + @item + Add warning to be printed for each invocation of the compiler + if the target machine @samp{INTEGER}, REAL, or @samp{LOGICAL} size + is not 32 bits, + since @code{g77} is known to not work well for such cases (to be + fixed in Version 0.6---@pxref{Actual Bugs,,Actual Bugs We Haven't Fixed Yet}). + + @item + Lots of new documentation (though work is still needed to put it into + canonical GNU format). + + @item + Build @code{libf2c} with @samp{-g0}, not @samp{-g2}, in effect + (by default), to produce + smaller library without lots of debugging clutter. + @end itemize + + @heading In 0.5.15: + @itemize @bullet + @item + Fix bad code generation involving @samp{X**I} and temporary, internal variables + generated by @code{g77} and the back end (such as for @samp{DO} loops). + + @item + Fix crash given @samp{CHARACTER A;DATA A/.TRUE./}. + + @item + Replace crash with diagnostic given @samp{CHARACTER A;DATA A/1.0/}. + + @item + Fix crash or other erratic behavior when null character constant + (@samp{''}) is encountered. + + @item + Fix crash or other erratic behavior involving diagnosed code. + + @item + Fix code generation for external functions returning type @samp{REAL} when + the @samp{-ff2c} option is in force (which it is by default) so that + @code{f2c} compatibility is indeed provided. + + @item + Disallow @samp{COMMON I(10)} if @samp{I} has previously been specified + with an array declarator. + + @item + New @samp{-ffixed-line-length-@var{n}} option, where @var{n} is the + maximum length + of a typical fixed-form line, defaulting to 72 columns, such + that characters beyond column @var{n} are ignored, or @var{n} is @samp{none}, + meaning no characters are ignored. + does not affect lines + with @samp{&} in column 1, which are always processed as if + @samp{-ffixed-line-length-none} was in effect. + + @item + No longer generate better code for some kinds of array references, + as @code{gcc} back end is to be fixed to do this even better, and it + turned out to slow down some code in some cases after all. + + @item + In @samp{COMMON} and @samp{EQUIVALENCE} areas with any members given initial + values (e.g. via @samp{DATA}), uninitialized members now always + initialized to binary zeros (though this is not required by + the standard, and might not be done in future versions + of @code{g77}). + Previously, in some @samp{COMMON}/@samp{EQUIVALENCE} areas + (essentially those with members of more than one type), the + uninitialized members were initialized to spaces, to + cater to @samp{CHARACTER} types, but it seems no existing code expects + that, while much existing code expects binary zeros. + @end itemize + + @heading In 0.5.14: + @itemize @bullet + @item + Don't emit bad code when low bound of adjustable array is nonconstant + and thus might vary as an expression at run time. + + @item + Emit correct code for calculation of number of trips in @samp{DO} loops + for cases + where the loop should not execute at all. + (This bug affected cases + where the difference between the begin and end values was less + than the step count, though probably not for floating-point cases.) + + @item + Fix crash when extra parentheses surround item in + @samp{DATA} implied-@samp{DO} list. + + @item + Fix crash over minor internal inconsistencies in handling diagnostics, + just substitute dummy strings where necessary. + + @item + Fix crash on some systems when compiling call to @samp{MVBITS()} intrinsic. + + @item + Fix crash on array assignment @samp{TYPE@var{ddd}(...)=...}, where @var{ddd} + is a string of one or more digits. + + @item + Fix crash on @samp{DCMPLX()} with a single @samp{INTEGER} argument. + + @item + Fix various crashes involving code with diagnosed errors. + + @item + Support @samp{-I} option for @samp{INCLUDE} statement, plus @code{gcc}'s + @file{header.gcc} facility for handling systems like MS-DOS. + + @item + Allow @samp{INCLUDE} statement to be continued across multiple lines, + even allow it to coexist with other statements on the same line. + + @item + Incorporate Bellcore fixes to @code{libf2c} through 1995-03-15---this + fixes a bug involving infinite loops reading EOF with empty list-directed + I/O list. + + @item + Remove all the @code{g77}-specific auto-configuration scripts, code, + and so on, + except for temporary substitutes for bsearch() and strtoul(), as + too many configure/build problems were reported in these areas. + People will have to fix their systems' problems themselves, or at + least somewhere other than @code{g77}, which expects a working ANSI C + environment (and, for now, a GNU C compiler to compile @code{g77} itself). + + @item + Complain if initialized common redeclared as larger in subsequent program + unit. + + @item + Warn if blank common initialized, since its size can vary and hence + related warnings that might be helpful won't be seen. + + @item + New @samp{-fbackslash} option, on by default, that causes @samp{\} + within @samp{CHARACTER} + and Hollerith constants to be interpreted a la GNU C. + Note that + this behavior is somewhat different from @samp{f2c}'s, which supports only + a limited subset of backslash (escape) sequences. + + @item + Make @samp{-fugly-args} the default. + + @item + New @samp{-fugly-init} option, on by default, that allows typeless/Hollerith + to be specified as initial values for variables or named constants + (@samp{PARAMETER}), and also allows character<->numeric conversion in + those contexts---turn off via @samp{-fno-ugly-init}. + + @item + New @samp{-finit-local-zero} option to initialize + local variables to binary zeros. + This does not affect whether they are @samp{SAVE}d, i.e. made + automatic or static. + + @item + New @samp{-Wimplicit} option to warn about implicitly typed variables, arrays, + and functions. + (Basically causes all program units to default to @samp{IMPLICIT NONE}.) + + @item + @samp{-Wall} now implies @samp{-Wuninitialized} as with @code{gcc} + (i.e. unless @samp{-O} not specified, since @samp{-Wuninitialized} + requires @samp{-O}), and implies @samp{-Wunused} as well. + + @item + @samp{-Wunused} no longer gives spurious messages for unused + @samp{EXTERNAL} names (since they are assumed to refer to block data + program units, to make use of libraries more reliable). + + @item + Support @samp{%LOC()} and @samp{LOC()} of character arguments. + + @item + Support null (zero-length) character constants and expressions. + + @item + Support @code{f2c}'s @samp{IMAG()} generic intrinsic. + + @item + Support @samp{ICHAR()}, @samp{IACHAR()}, and @samp{LEN()} of + character expressions that are valid in assignments but + not normally as actual arguments. + + @item + Support @code{f2c}-style @samp{&} in column 1 to mean continuation line. + + @item + Allow @samp{NAMELIST}, @samp{EXTERNAL}, @samp{INTRINSIC}, and @samp{VOLATILE} + in @samp{BLOCK DATA}, even though these are not allowed by the standard. + + @item + Allow @samp{RETURN} in main program unit. + + @item + Changes to Hollerith-constant support to obey Appendix C of the + standard: + + @itemize -- + @item + Now padded on the right with zeros, not spaces. + + @item + Hollerith ``format specifications'' in the form of arrays of + non-character allowed. + + @item + Warnings issued when non-blank truncation occurs when converting + to another type. + + @item + When specified as actual argument, now passed + by reference to @samp{INTEGER} (padded on right with spaces if constant + too small, otherwise fully intact if constant wider the @samp{INTEGER} + type) instead of by value. + @end itemize + + @strong{Warning:} @code{f2c} differs on the + interpretation of @samp{CALL FOO(1HX)}, which it treats exactly the + same as @samp{CALL FOO('X')}, but which the standard and @code{g77} treat + as @samp{CALL FOO(%REF('X '))} (padded with as many blanks as necessary + to widen to @samp{INTEGER}), essentially. + + @item + Changes and fixes to typeless-constant support: + + @itemize -- + @item + Now treated as a typeless double-length @samp{INTEGER} value. + + @item + Warnings issued when overflow occurs. + + @item + Padded on the left with zeros when converting + to a larger type. + + @item + Should be properly aligned and ordered on + the target machine for whatever type it is turned into. + + @item + When specified as actual argument, now passed as reference to + a default @samp{INTEGER} constant. + @end itemize + + @item + @samp{%DESCR()} of a non-@samp{CHARACTER} expression now passes a pointer to + the expression plus a length for the expression just as if + it were a @samp{CHARACTER} expression. + For example, @samp{CALL FOO(%DESCR(D))}, where + @samp{D} is @samp{REAL*8}, is the same as @samp{CALL FOO(D,%VAL(8)))}. + + @item + Name of multi-entrypoint master function changed to incorporate + the name of the primary entry point instead of a decimal + value, so the name of the master function for @samp{SUBROUTINE X} + with alternate entry points is now @samp{__g77_masterfun_x}. + + @item + Remove redundant message about zero-step-count @samp{DO} loops. + + @item + Clean up diagnostic messages, shortening many of them. + + @item + Fix typo in @code{g77} man page. + + @item + Clarify implications of constant-handling bugs in @file{f/BUGS}. + + @item + Generate better code for @samp{**} operator with a right-hand operand of + type @samp{INTEGER}. + + @item + Generate better code for @samp{SQRT()} and @samp{DSQRT()}, + also when @samp{-ffast-math} + specified, enable better code generation for @samp{SIN()} and @samp{COS()}. + + @item + Generate better code for some kinds of array references. + + @item + Speed up lexing somewhat (this makes the compilation phase noticably + faster). + @end itemize diff -rcp2N g77-0.5.17/f/news0.texi g77-0.5.18/f/news0.texi *** g77-0.5.17/f/news0.texi Wed Dec 31 19:00:00 1969 --- g77-0.5.18/f/news0.texi Mon Mar 4 16:37:44 1996 *************** *** 0 **** --- 1,14 ---- + @setfilename NEW + @set NEWSONLY + + @c The immediately following lines apply to the NEWS file + @c which is generated using this file. + This file lists recent changes to the GNU Fortran compiler. + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + You may copy, distribute, and modify it freely as long as you preserve + this copyright notice and permission notice. + + @node Top,,, (dir) + @chapter News About GNU Fortran + @include news.texi + @bye diff -rcp2N g77-0.5.17/f/proj.h g77-0.5.18/f/proj.h *** g77-0.5.17/f/proj.h Wed Aug 30 15:53:35 1995 --- g77-0.5.18/f/proj.h Mon Dec 4 01:13:31 1995 *************** typedef enum *** 96,98 **** --- 96,102 ---- #endif /* !defined (UNUSED) */ + #ifndef dmpout + #define dmpout stderr + #endif + #endif diff -rcp2N g77-0.5.17/f/runtime/ChangeLog g77-0.5.18/f/runtime/ChangeLog *** g77-0.5.17/f/runtime/ChangeLog Sat Nov 18 19:38:09 1995 --- g77-0.5.18/f/runtime/ChangeLog Mon Apr 1 10:11:56 1996 *************** *** 1,2 **** --- 1,60 ---- + Sat Mar 30 20:57:24 1996 Dave Love + + * configure.in: Eliminate explicit use of + {RANLIB,AR}_FOR_TARGET. + * Makefile.in: Likewise. + * libF77/Makefile.in: Likewise. + * libI77/Makefile.in: Likewise. + * configure: Regenerated. + + Sat Mar 30 21:02:03 1996 Dave Love + + * Makefile.in: Eliminate explicit use of + {RANLIB,AR}_FOR_TARGET. + + Tue Mar 26 23:39:59 1996 Dave Love + + * Makefile.in: Remove hardwired RANLIB and RANLIB_TEST (unnoted + change). + + Mon Mar 25 21:04:56 1996 Craig Burley + + * Incorporate changes by Bell Labs to libf2c through 1996-03-23, + including changes to dmg and netlib email addresses. + + Tue Mar 19 13:10:02 1996 Craig Burley + + * Incorporate changes by AT&T/Bellcore to libf2c through 1996-03-19. + + * Makefile.in (rebuilt): New target. + + * lib[FI]77/Makefile.in: Use $AR_FOR_TARGET, not $AR. + + Tue Mar 19 12:53:19 1996 Dave Love + + * configure.in (ac_cpp): #include instead + of . + + Tue Mar 19 12:52:09 1996 Mumit Khan + + * configure.in (ac_cpp): For f2c integer type, + add -I$srcdir/../.. to make it work on mips-ultrix4.2. + + Sat Mar 9 17:37:15 1996 Craig Burley + + * libI77/Makefile.in (.c.o): Add -DAllow_TYQUAD, to enable + I/O support for INTEGER*8. + * f2c.h.in: Turn on longint type. + + Fri Dec 29 18:22:01 1995 Craig Burley + + * Makefile.in: Reorganize the *clean rules to more closely + parallel gcc's. + + * lib[FI]77/Makefile.in: Ignore error from $(AR) command, + in case just doing an install and installer has no write + access to library (this is a kludge fix -- perhaps install + targets should never try updating anything?). + Sat Nov 18 19:37:22 1995 Craig Burley (burley@gnu.ai.mit.edu) diff -rcp2N g77-0.5.17/f/runtime/Makefile.in g77-0.5.18/f/runtime/Makefile.in *** g77-0.5.17/f/runtime/Makefile.in Wed Aug 30 15:50:51 1995 --- g77-0.5.18/f/runtime/Makefile.in Mon Apr 1 10:10:48 1996 *************** INSTALL_PROGRAM = @INSTALL_PROGRAM@ *** 31,36 **** INSTALL_DATA = @INSTALL_DATA@ RANLIB = @RANLIB@ ! RANLIB_TEST_FOR_TARGET = @RANLIB_TEST_FOR_TARGET@ ! RANLIB_FOR_TARGET = @RANLIB_FOR_TARGET@ CFLAGS = @CFLAGS@ --- 31,35 ---- INSTALL_DATA = @INSTALL_DATA@ RANLIB = @RANLIB@ ! RANLIB_TEST = @RANLIB_TEST@ CFLAGS = @CFLAGS@ *************** prefix = @prefix@ *** 49,52 **** --- 48,52 ---- exec_prefix = @exec_prefix@ + AR = ar AR_FLAGS = rc *************** FLAGS_TO_PASS = \ *** 70,80 **** CROSS="$(CROSS)" \ AR_FLAGS="$(AR_FLAGS)" \ ! AR_FOR_TARGET="$(AR_FOR_TARGET)" \ GCCFLAGS="$(GCCFLAGS)" \ GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ CC="$(GCC_FOR_TARGET)" \ LDFLAGS="$(LDFLAGS)" \ ! RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)" \ ! RANLIB_TEST_FOR_TARGET="$(RANLIB_TEST_FOR_TARGET)" \ SHELL="$(SHELL)" --- 70,92 ---- CROSS="$(CROSS)" \ AR_FLAGS="$(AR_FLAGS)" \ ! AR="$(AR)" \ GCCFLAGS="$(GCCFLAGS)" \ GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ CC="$(GCC_FOR_TARGET)" \ LDFLAGS="$(LDFLAGS)" \ ! RANLIB="$(RANLIB)" \ ! RANLIB_TEST="$(RANLIB_TEST)" \ ! SHELL="$(SHELL)" ! ! CROSS_FLAGS_TO_PASS = \ ! CROSS="$(CROSS)" \ ! AR_FLAGS="$(AR_FLAGS)" \ ! AR="$(AR)" \ ! GCCFLAGS="$(GCCFLAGS)" \ ! GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ ! CC="$(GCC_FOR_TARGET)" \ ! LDFLAGS="$(LDFLAGS)" \ ! RANLIB="$(RANLIB)" \ ! RANLIB_TEST="$(RANLIB_TEST)" \ SHELL="$(SHELL)" *************** all: ../include/f2c.h libi77 libf77 *** 82,93 **** libi77: libI77/Makefile ! cd libI77; $(MAKE) $(FLAGS_TO_PASS) all libf77: libF77/Makefile ! cd libF77; $(MAKE) $(FLAGS_TO_PASS) all ${srcdir}/configure: ${srcdir}/configure.in cd ${srcdir} && autoconf && rm -f config.cache ../include/f2c.h libI77/Makefile libF77/Makefile Makefile: Makefile.in \ ! config.status $(FLAGS_TO_PASS) CONFIG_SITE=/dev/null $(SHELL) config.status # Extra dependencies for the targets above: --- 94,113 ---- libi77: libI77/Makefile ! if test "$(CROSS)"; then \ ! cd libI77; $(MAKE) $(CROSS_FLAGS_TO_PASS) all ; \ ! else \ ! cd libI77; $(MAKE) $(FLAGS_TO_PASS) all ; \ ! fi libf77: libF77/Makefile ! if test "$(CROSS)"; then \ ! cd libF77; $(MAKE) $(CROSS_FLAGS_TO_PASS) all ; \ ! else \ ! cd libF77; $(MAKE) $(FLAGS_TO_PASS) all ; \ ! fi ${srcdir}/configure: ${srcdir}/configure.in cd ${srcdir} && autoconf && rm -f config.cache ../include/f2c.h libI77/Makefile libF77/Makefile Makefile: Makefile.in \ ! config.status $(FLAGS_TO_PASS) CONFIG_SITE=/dev/null $(SHELL) config.status # Extra dependencies for the targets above: *************** config.status: configure *** 100,114 **** $(FLAGS_TO_PASS) CONFIG_SITE=/dev/null $(SHELL) config.status --recheck ! clean: -rm -f config.log config.cache for i in libI77 libF77; do cd $$i; $(MAKE) clean; cd ..; done distclean: clean ! -rm -f Makefile lib?77/Makefile config.status config.log ../include/f2c.h ! ! mostlyclean: clean uninstall: rm ../include/f2c.h ! .PHONY: libf77 libi77 --- 120,137 ---- $(FLAGS_TO_PASS) CONFIG_SITE=/dev/null $(SHELL) config.status --recheck ! mostlyclean: ! ! clean: mostlyclean -rm -f config.log config.cache for i in libI77 libF77; do cd $$i; $(MAKE) clean; cd ..; done distclean: clean ! -rm -f Makefile lib?77/Makefile config.status ../include/f2c.h uninstall: rm ../include/f2c.h ! rebuilt: ${srcdir}/configure ! echo Fortran library rebuildable files rebuilt. ! ! .PHONY: libf77 libi77 rebuilt diff -rcp2N g77-0.5.17/f/runtime/README g77-0.5.18/f/runtime/README *** g77-0.5.17/f/runtime/README Mon Aug 28 09:41:32 1995 --- g77-0.5.18/f/runtime/README Mon Mar 25 20:39:33 1996 *************** make steps. This depends on the makefil *** 6,11 **** Some small changes have been made to the f2c distributions of lib[IF]77 which ! come from ftp@netlib.att.com:netlib/f2c and are maintained (excellently) by ! David M. Gay . See the Notice files for copyright information. I'll try to get the changes rolled into the f2c distribution. --- 6,11 ---- Some small changes have been made to the f2c distributions of lib[IF]77 which ! come from ftp@bell-labs.com:netlib/f2c and are maintained (excellently) by ! David M. Gay . See the Notice files for copyright information. I'll try to get the changes rolled into the f2c distribution. diff -rcp2N g77-0.5.17/f/runtime/configure g77-0.5.18/f/runtime/configure *** g77-0.5.17/f/runtime/configure Wed Aug 30 15:57:57 1995 --- g77-0.5.18/f/runtime/configure Mon Apr 1 10:21:20 1996 *************** *** 2,7 **** # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.3 ! # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation --- 2,7 ---- # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.9 ! # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation *************** verbose= *** 34,40 **** --- 34,53 ---- x_includes=NONE x_libraries=NONE + bindir='${exec_prefix}/bin' + sbindir='${exec_prefix}/sbin' + libexecdir='${exec_prefix}/libexec' + datadir='${prefix}/share' + sysconfdir='${prefix}/etc' + sharedstatedir='${prefix}/com' + localstatedir='${prefix}/var' + libdir='${exec_prefix}/lib' + includedir='${prefix}/include' + oldincludedir='/usr/include' + infodir='${prefix}/info' + mandir='${prefix}/man' # Initialize some other variables. subdirs= + MFLAGS= MAKEFLAGS= ac_prev= *************** do *** 58,64 **** case "$ac_option" in ! -build | --build | --buil | --bui | --bu | --b) ac_prev=build ;; ! -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*) build="$ac_optarg" ;; --- 71,82 ---- case "$ac_option" in ! -bindir | --bindir | --bindi | --bind | --bin | --bi) ! ac_prev=bindir ;; ! -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) ! bindir="$ac_optarg" ;; ! ! -build | --build | --buil | --bui | --bu) ac_prev=build ;; ! -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$ac_optarg" ;; *************** do *** 70,73 **** --- 88,97 ---- cache_file="$ac_optarg" ;; + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` *************** Directory and file names: *** 120,129 **** --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] ! --exec-prefix=PREFIX install architecture-dependent files in PREFIX [same as prefix] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names ! --program-transform-name=PROGRAM run sed PROGRAM on installed program names Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --- 144,170 ---- --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] ! --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names ! --program-transform-name=PROGRAM ! run sed PROGRAM on installed program names ! EOF ! cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] *************** Features and packages: *** 137,142 **** --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR - --enable and --with options recognized:$ac_help EOF exit 0 ;; --- 178,185 ---- --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi exit 0 ;; *************** EOF *** 146,149 **** --- 189,230 ---- host="$ac_optarg" ;; + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + -nfp | --nfp | --nf) # Obsolete; use --without-fp. *************** EOF *** 158,161 **** --- 239,251 ---- no_recursion=yes ;; + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; *************** EOF *** 198,201 **** --- 288,308 ---- silent=yes ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + -site | --site | --sit) ac_prev=site ;; *************** EOF *** 208,211 **** --- 315,325 ---- srcdir="$ac_optarg" ;; + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target ;; *************** EOF *** 217,221 **** -version | --version | --versio | --versi | --vers) ! echo "configure generated by autoconf version 2.3" exit 0 ;; --- 331,335 ---- -version | --version | --versio | --versi | --vers) ! echo "configure generated by autoconf version 2.9" exit 0 ;; *************** EOF *** 263,267 **** ;; ! *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 --- 377,381 ---- ;; ! *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 *************** ac_ext=c *** 383,388 **** # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' ! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then --- 497,502 ---- # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then *************** else *** 422,426 **** done IFS="$ac_save_ifs" - test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc" fi fi --- 536,539 ---- *************** else *** 432,435 **** --- 545,597 ---- fi + if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. + set dummy cc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + ac_prog_rejected=no + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" + if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi + fi + fi + fi + CC="$ac_cv_prog_CC" + if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + fi echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 *************** else *** 442,446 **** #endif EOF ! if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else --- 604,608 ---- #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else *************** else *** 448,451 **** --- 610,614 ---- fi fi + echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then *************** rm -f conftest* *** 465,469 **** fi ! echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 if test $ac_cv_prog_gcc_g = yes; then CFLAGS="-g -O" --- 628,633 ---- fi ! ! echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 if test $ac_cv_prog_gcc_g = yes; then CFLAGS="-g -O" *************** else *** 483,491 **** fi ! if test "$ac_cv_c_cross" = yes; then ! RANLIB=$RANLIB_FOR_TARGET ! AR=$AR_FOR_TARGET else # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 --- 647,656 ---- fi ! test "$AR" || AR=ar ! ! if test "$RANLIB"; then : else + RANLIB_TEST=true # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 *************** else *** 516,521 **** fi - AR=ar - RANLIB_TEST_FOR_TARGET=true fi --- 681,684 ---- *************** fi *** 523,528 **** - - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 # On Suns, sometimes $CPP names a directory. --- 686,689 ---- *************** else *** 540,549 **** # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ! eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then --- 701,711 ---- # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then *************** else *** 554,563 **** CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ! eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then --- 716,726 ---- CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then *************** rm -f conftest* *** 573,578 **** ac_cv_prog_CPP="$CPP" fi fi - CPP="$ac_cv_prog_CPP" echo "$ac_t""$CPP" 1>&6 --- 736,743 ---- ac_cv_prog_CPP="$CPP" fi + CPP="$ac_cv_prog_CPP" + else + ac_cv_prog_CPP="$CPP" fi echo "$ac_t""$CPP" 1>&6 *************** else *** 586,594 **** else cat > conftest.$ac_ext </dev/null; then ac_cv_c_cross=no --- 751,759 ---- else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_c_cross=no *************** fi *** 599,604 **** rm -fr conftest* fi ! cross_compiling=$ac_cv_c_cross echo "$ac_t""$ac_cv_c_cross" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 --- 764,770 ---- rm -fr conftest* fi ! echo "$ac_t""$ac_cv_c_cross" 1>&6 + cross_compiling=$ac_cv_c_cross echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 *************** if eval "test \"`echo '$''{'ac_cv_header *** 607,611 **** else cat > conftest.$ac_ext < --- 773,777 ---- else cat > conftest.$ac_ext < *************** else *** 614,618 **** #include EOF ! eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then --- 780,785 ---- #include EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then *************** if test $ac_cv_header_stdc = yes; then *** 629,633 **** # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < --- 796,800 ---- # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < *************** if test $ac_cv_header_stdc = yes; then *** 647,651 **** # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < --- 814,818 ---- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < *************** if test $ac_cv_header_stdc = yes; then *** 665,672 **** # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then ! ac_cv_header_stdc=no else cat > conftest.$ac_ext < --- 832,839 ---- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then ! : else cat > conftest.$ac_ext < *************** exit (0); } *** 679,683 **** EOF ! eval $ac_link if test -s conftest && (./conftest; exit) 2>/dev/null; then : --- 846,850 ---- EOF ! { (eval echo configure:849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then : *************** rm -fr conftest* *** 689,692 **** --- 856,860 ---- fi fi + echo "$ac_t""$ac_cv_header_stdc" 1>&6 if test $ac_cv_header_stdc = yes; then *************** if eval "test \"`echo '$''{'ac_cv_header *** 704,708 **** else cat > conftest.$ac_ext < --- 872,876 ---- else cat > conftest.$ac_ext < *************** if eval "test \"`echo '$''{'ac_cv_lib_gn *** 734,740 **** else cat > conftest.$ac_ext < #ifdef __GNU_LIBRARY__ yes --- 902,908 ---- else cat > conftest.$ac_ext < #ifdef __GNU_LIBRARY__ yes *************** if eval "test \"`echo '$''{'ac_cv_header *** 762,770 **** else cat > conftest.$ac_ext < EOF ! eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then --- 930,939 ---- else cat > conftest.$ac_ext < EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then *************** if eval "test \"`echo '$''{'ac_cv_c_cons *** 801,805 **** else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes *************** rm -f conftest* *** 861,864 **** --- 1030,1034 ---- fi + echo "$ac_t""$ac_cv_c_const" 1>&6 if test $ac_cv_c_const = no; then *************** if eval "test \"`echo '$''{'ac_cv_type_s *** 874,878 **** else cat > conftest.$ac_ext < --- 1044,1048 ---- else cat > conftest.$ac_ext < *************** if eval "test \"`echo '$''{'ac_cv_type_s *** 906,910 **** else cat > conftest.$ac_ext < --- 1076,1080 ---- else cat > conftest.$ac_ext < *************** else *** 914,920 **** #endif #ifdef __cplusplus ! extern "C" ! #endif void (*signal ()) (); int main() { return 0; } int t() { --- 1084,1092 ---- #endif #ifdef __cplusplus ! extern "C" void (*signal (int, void (*)(int)))(int); ! #else void (*signal ()) (); + #endif + int main() { return 0; } int t() { *************** int i; *** 922,926 **** ; return 0; } EOF ! if eval $ac_compile; then rm -rf conftest* ac_cv_type_signal=void --- 1094,1098 ---- ; return 0; } EOF ! if { (eval echo configure:1097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void *************** rm -f conftest* *** 932,935 **** --- 1104,1108 ---- fi + echo "$ac_t""$ac_cv_type_signal" 1>&6 cat >> confdefs.h < conftest.$ac_ext < conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ ! char atexit(); int main() { return 0; } --- 1124,1128 ---- #include /* Override any gcc2 internal prototype to avoid an error. */ ! char atexit(); int main() { return 0; } *************** atexit(); *** 967,971 **** ; return 0; } EOF ! if eval $ac_link; then rm -rf conftest* eval "ac_cv_func_atexit=yes" --- 1140,1144 ---- ; return 0; } EOF ! if { (eval echo configure:1143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_atexit=yes" *************** if eval "test \"`echo '$''{'ac_cv_func_o *** 994,998 **** else cat > conftest.$ac_ext < conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ ! char onexit(); int main() { return 0; } --- 1173,1177 ---- #include /* Override any gcc2 internal prototype to avoid an error. */ ! char onexit(); int main() { return 0; } *************** onexit(); *** 1016,1020 **** ; return 0; } EOF ! if eval $ac_link; then rm -rf conftest* eval "ac_cv_func_onexit=yes" --- 1189,1193 ---- ; return 0; } EOF ! if { (eval echo configure:1192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_onexit=yes" *************** if eval "test \"`echo '$''{'ac_cv_func_o *** 1036,1040 **** else cat > conftest.$ac_ext < conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ ! char on_exit(); int main() { return 0; } --- 1215,1219 ---- #include /* Override any gcc2 internal prototype to avoid an error. */ ! char on_exit(); int main() { return 0; } *************** on_exit(); *** 1058,1062 **** ; return 0; } EOF ! if eval $ac_link; then rm -rf conftest* eval "ac_cv_func_on_exit=yes" --- 1231,1235 ---- ; return 0; } EOF ! if { (eval echo configure:1234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_on_exit=yes" *************** if eval "test \"`echo '$''{'ac_cv_func_f *** 1091,1095 **** else cat > conftest.$ac_ext < conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ ! char fstat(); int main() { return 0; } --- 1270,1274 ---- #include /* Override any gcc2 internal prototype to avoid an error. */ ! char fstat(); int main() { return 0; } *************** fstat(); *** 1113,1117 **** ; return 0; } EOF ! if eval $ac_link; then rm -rf conftest* eval "ac_cv_func_fstat=yes" --- 1286,1290 ---- ; return 0; } EOF ! if { (eval echo configure:1289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_fstat=yes" *************** if eval "test \"`echo '$''{'ac_cv_struct *** 1140,1144 **** else cat > conftest.$ac_ext < --- 1313,1317 ---- else cat > conftest.$ac_ext < *************** FILE s; s._ptr; s._base; s._flag; *** 1148,1152 **** ; return 0; } EOF ! if eval $ac_compile; then rm -rf conftest* ac_cv_struct_FILE=yes --- 1321,1325 ---- ; return 0; } EOF ! if { (eval echo configure:1324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_FILE=yes *************** fi *** 1167,1171 **** echo $ac_n "checking for -lm""... $ac_c" 1>&6 ! if eval "test \"`echo '$''{'ac_cv_lib_m'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1340,1345 ---- echo $ac_n "checking for -lm""... $ac_c" 1>&6 ! ac_lib_var=`echo m_drem | tr '.-/+' '___p'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 1173,1178 **** LIBS="-lm $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=yes" else rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* *************** LIBS="$ac_save_LIBS" *** 1192,1196 **** fi ! if eval "test \"`echo '$ac_cv_lib_'m`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF --- 1368,1372 ---- fi ! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF *************** if test "$cross_compiling" = yes; then *** 1213,1217 **** else cat > conftest.$ac_ext < --- 1389,1393 ---- else cat > conftest.$ac_ext < *************** cat > conftest.$ac_ext </dev/null; then ac_cv_sys_sprintf_ansi=yes --- 1396,1400 ---- EOF ! { (eval echo configure:1399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_sys_sprintf_ansi=yes *************** fi *** 1248,1252 **** # define NON_ANSI_RW_MODES on unix (can't hurt) cat > conftest.$ac_ext < conftest.$ac_ext <&6 late_ac_cpp=$ac_cpp ! ac_cpp="$late_ac_cpp -I$srcdir/.. -I../.. -I$srcdir/../../config" if eval "test \"`echo '$''{'ac_cv_sys_f2cinteger'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 late_ac_cpp=$ac_cpp ! ac_cpp="$late_ac_cpp -I$srcdir/.. -I../.. -I$srcdir/../.. -I$srcdir/../../config" if eval "test \"`echo '$''{'ac_cv_sys_f2cinteger'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> confdefs.h <<\EOF #define Pad_UDread 1 --- 1525,1528 ---- *************** trap 'rm -f $CONFIG_STATUS conftest*; ex *** 1426,1430 **** # Protect against Makefile macro expansion. cat > conftest.defs <<\EOF ! s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g s%\[%\\&%g --- 1600,1604 ---- # Protect against Makefile macro expansion. cat > conftest.defs <<\EOF ! s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g s%\[%\\&%g *************** do *** 1461,1465 **** exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.3" exit 0 ;; -help | --help | --hel | --he | --h) --- 1635,1639 ---- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.9" exit 0 ;; -help | --help | --hel | --he | --h) *************** ac_given_srcdir=$srcdir *** 1472,1479 **** trap 'rm -fr `echo "Makefile ../../include/f2c.h:f2c.h.in libI77/Makefile libF77/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 ! # Protect against being on the right side of a sed subst in config.status. ! sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; ! s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF $ac_vpsub $extrasub --- 1646,1655 ---- trap 'rm -fr `echo "Makefile ../../include/f2c.h:f2c.h.in libI77/Makefile libF77/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 + EOF + cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF $ac_vpsub $extrasub *************** s%@exec_prefix@%$exec_prefix%g *** 1487,1496 **** s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g s%@CC@%$CC%g - s%@RANLIB@%$RANLIB%g s%@AR@%$AR%g ! s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g ! s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g ! s%@RANLIB_TEST_FOR_TARGET@%$RANLIB_TEST_FOR_TARGET%g s%@CPP@%$CPP%g s%@F2C_INTEGER@%$F2C_INTEGER%g --- 1663,1682 ---- s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g + s%@bindir@%$bindir%g + s%@sbindir@%$sbindir%g + s%@libexecdir@%$libexecdir%g + s%@datadir@%$datadir%g + s%@sysconfdir@%$sysconfdir%g + s%@sharedstatedir@%$sharedstatedir%g + s%@localstatedir@%$localstatedir%g + s%@libdir@%$libdir%g + s%@includedir@%$includedir%g + s%@oldincludedir@%$oldincludedir%g + s%@infodir@%$infodir%g + s%@mandir@%$mandir%g s%@CC@%$CC%g s%@AR@%$AR%g ! s%@RANLIB@%$RANLIB%g ! s%@RANLIB_TEST@%$RANLIB_TEST%g s%@CPP@%$CPP%g s%@F2C_INTEGER@%$F2C_INTEGER%g diff -rcp2N g77-0.5.17/f/runtime/configure.in g77-0.5.18/f/runtime/configure.in *** g77-0.5.17/f/runtime/configure.in Wed Aug 30 15:50:51 1995 --- g77-0.5.18/f/runtime/configure.in Mon Apr 1 10:10:48 1996 *************** else *** 36,53 **** fi ! dnl for g77 build maybe use $(RANLIB_FOR_TARGET) always (like wise AR) ! if test "$ac_cv_c_cross" = yes; then ! RANLIB=$RANLIB_FOR_TARGET ! AR=$AR_FOR_TARGET AC_SUBST(RANLIB) else AC_PROG_RANLIB - AR=ar - RANLIB_TEST_FOR_TARGET=true fi ! AC_SUBST(AR) ! AC_SUBST(AR_FOR_TARGET) ! AC_SUBST(RANLIB_FOR_TARGET) ! AC_SUBST(RANLIB_TEST_FOR_TARGET) dnl not needed for g77? dnl AC_PROG_MAKE_SET --- 36,51 ---- fi ! dnl These should be inherited in the recursive make, but ensure they are ! dnl defined: ! test "$AR" || AR=ar ! AC_SUBST(AR) ! if test "$RANLIB"; then : AC_SUBST(RANLIB) else + RANLIB_TEST=true AC_PROG_RANLIB fi ! AC_SUBST(RANLIB_TEST) ! dnl not needed for g77? dnl AC_PROG_MAKE_SET *************** AC_MSG_CHECKING(for GNU library) *** 89,93 **** AC_CACHE_VAL(ac_cv_lib_gnu, AC_EGREP_CPP(yes, ! [#include #ifdef __GNU_LIBRARY__ yes --- 87,91 ---- AC_CACHE_VAL(ac_cv_lib_gnu, AC_EGREP_CPP(yes, ! [#include #ifdef __GNU_LIBRARY__ yes *************** test $is_unix = yes && AC_DEFINE(NON_ANS *** 188,192 **** AC_MSG_CHECKING(f2c integer type) late_ac_cpp=$ac_cpp ! ac_cpp="$late_ac_cpp -I$srcdir/.. -I../.. -I$srcdir/../../config" AC_CACHE_VAL(ac_cv_sys_f2cinteger, AC_EGREP_CPP(F2C_INTEGER=long int, --- 186,190 ---- AC_MSG_CHECKING(f2c integer type) late_ac_cpp=$ac_cpp ! ac_cpp="$late_ac_cpp -I$srcdir/.. -I../.. -I$srcdir/../.. -I$srcdir/../../config" AC_CACHE_VAL(ac_cv_sys_f2cinteger, AC_EGREP_CPP(F2C_INTEGER=long int, *************** dnl maybe check for drem/remainder *** 231,236 **** AC_SUBST(CROSS) - AC_SUBST(RANLIB_FOR_TARGET) - AC_SUBST(RANLIB_TEST_FOR_TARGET) dnl Craig had these in f2c.h, but they're only relevant for building libf2c --- 229,232 ---- diff -rcp2N g77-0.5.17/f/runtime/f2c.h.in g77-0.5.18/f/runtime/f2c.h.in *** g77-0.5.17/f/runtime/f2c.h.in Wed Feb 15 15:30:21 1995 --- g77-0.5.18/f/runtime/f2c.h.in Sat Mar 9 17:36:10 1996 *************** typedef short int shortlogical; *** 21,25 **** typedef char logical1; typedef char integer1; ! /* typedef long long longint; */ /* system-dependent */ #define TRUE_ (1) --- 21,25 ---- typedef char logical1; typedef char integer1; ! typedef long long int longint; #define TRUE_ (1) diff -rcp2N g77-0.5.17/f/runtime/libF77/Makefile.in g77-0.5.18/f/runtime/libF77/Makefile.in *** g77-0.5.17/f/runtime/libF77/Makefile.in Tue Sep 5 13:59:15 1995 --- g77-0.5.18/f/runtime/libF77/Makefile.in Mon Apr 1 10:10:47 1996 *************** CGFLAGS = -g0 *** 41,49 **** ALL_CFLAGS = -I$(srcdir) -I../../include $(CPPFLAGS) $(DEFS) $(CFLAGS) AR = @AR@ - AR_FOR_TARGET = @AR_FOR_TARGET@ AR_FLAGS = rc RANLIB = @RANLIB@ ! RANLIB_FOR_TARGET = @RANLIB_FOR_TARGET@ ! RANLIB_TEST_FOR_TARGET = @RANLIB_TEST_FOR_TARGET@ CROSS = @CROSS@ --- 41,47 ---- ALL_CFLAGS = -I$(srcdir) -I../../include $(CPPFLAGS) $(DEFS) $(CFLAGS) AR = @AR@ AR_FLAGS = rc RANLIB = @RANLIB@ ! RANLIB_TEST = @RANLIB_TEST@ CROSS = @CROSS@ *************** all: $(lib) *** 87,100 **** $(lib): force $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \ $(HALF) $(CMP) $(EFL) $(CHAR) ! # use cross tools if appropriate; note that the _FOR_TARGET tools have a ! # tooldir-type prefix even when we're not cross-compiling ! $(AR) $(AR_FLAGS) $(lib) $(MISC) $(POW) $(CX) $(DCX) $(REAL) \ $(DBL) $(INT) $(HALF) $(CMP) $(EFL) $(CHAR) ! -if test "$(CROSS)"; then \ ! if $(RANLIB_TEST_FOR_TARGET); then $(RANLIB_FOR_TARGET) $(lib); \ ! else true; fi ; \ ! else \ ! $(RANLIB) $(lib); \ ! fi uninstall: --- 85,96 ---- $(lib): force $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \ $(HALF) $(CMP) $(EFL) $(CHAR) ! # Don't worry if ar fails, that can happen when a root-like user installs a ! # system built by a user to which the installer has insufficient access ! # to modify libf2c.a. Probably a better solution to this should be ! # found, but this should do for now. -- burley 951226 ! -$(AR) $(AR_FLAGS) $(lib) $(MISC) $(POW) $(CX) $(DCX) $(REAL) \ $(DBL) $(INT) $(HALF) $(CMP) $(EFL) $(CHAR) ! if $(RANLIB_TEST); then $(RANLIB) $(lib); \ ! else true; fi uninstall: diff -rcp2N g77-0.5.17/f/runtime/libF77/README g77-0.5.18/f/runtime/libF77/README *** g77-0.5.17/f/runtime/libF77/README Thu Nov 16 04:57:27 1995 --- g77-0.5.18/f/runtime/libF77/README Mon Mar 25 20:39:33 1996 *************** This assumes you have the xsum program w *** 37,41 **** is distributed as part of "all from f2c/src". If you do not have xsum, you can obtain xsum.c by sending the following E-mail ! message to netlib@research.att.com send xsum.c from f2c/src --- 37,41 ---- is distributed as part of "all from f2c/src". If you do not have xsum, you can obtain xsum.c by sending the following E-mail ! message to netlib@bell-labs.com send xsum.c from f2c/src diff -rcp2N g77-0.5.17/f/runtime/libF77/Version.c g77-0.5.18/f/runtime/libF77/Version.c *** g77-0.5.17/f/runtime/libF77/Version.c Sat Nov 18 19:44:18 1995 --- g77-0.5.18/f/runtime/libF77/Version.c Mon Apr 1 10:14:42 1996 *************** *** 1,8 **** ! static char junk[] = "\n@(#)LIBF77 VERSION 2.01 6 Sept. 1995\n"; /* */ ! char __G77_LIBF77_VERSION__[] = "0.5.17"; /* --- 1,8 ---- ! static char junk[] = "\n@(#)LIBF77 VERSION 2.01 19 Mar. 1996\n"; /* */ ! char __G77_LIBF77_VERSION__[] = "0.5.18"; /* *************** char __G77_LIBF77_VERSION__[] = "0.5.17" *** 44,47 **** --- 44,49 ---- 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. + 19 Dec. 1995: s_cat.c: fix bug when 2nd or later arg overlaps lhs. + 19 Mar. 1996: s_cat.c: supply missing break after overlap detection. */ diff -rcp2N g77-0.5.17/f/runtime/libF77/s_cat.c g77-0.5.18/f/runtime/libF77/s_cat.c *** g77-0.5.17/f/runtime/libF77/s_cat.c Wed Aug 30 14:27:18 1995 --- g77-0.5.18/f/runtime/libF77/s_cat.c Mon Mar 25 20:39:56 1996 *************** s_cat(char *lp, char *rpp[], ftnlen rnp[ *** 50,54 **** --- 50,56 ---- lp0 = lp; lp = lp1 = F77_aloc(L = ll, "s_cat"); + break; } + lp1 = lp; #endif /* NO_OVERWRITE */ for(i = 0 ; i < n ; ++i) { diff -rcp2N g77-0.5.17/f/runtime/libI77/Makefile.in g77-0.5.18/f/runtime/libI77/Makefile.in *** g77-0.5.17/f/runtime/libI77/Makefile.in Tue Sep 5 13:59:29 1995 --- g77-0.5.18/f/runtime/libI77/Makefile.in Mon Apr 1 10:10:47 1996 *************** CGFLAGS = -g0 *** 41,49 **** ALL_CFLAGS = -I$(srcdir) -I../../include $(CPPFLAGS) $(DEFS) $(CFLAGS) AR = @AR@ - AR_FOR_TARGET = @AR_FOR_TARGET@ AR_FLAGS = rc RANLIB = @RANLIB@ ! RANLIB_FOR_TARGET = @RANLIB_FOR_TARGET@ ! RANLIB_TEST_FOR_TARGET = @RANLIB_TEST_FOR_TARGET@ CROSS = @CROSS@ --- 41,47 ---- ALL_CFLAGS = -I$(srcdir) -I../../include $(CPPFLAGS) $(DEFS) $(CFLAGS) AR = @AR@ AR_FLAGS = rc RANLIB = @RANLIB@ ! RANLIB_TEST = @RANLIB_TEST@ CROSS = @CROSS@ *************** CROSS = @CROSS@ *** 52,56 **** .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. --- 50,54 ---- .c.o: ! $(CC) -c -DSkip_f2c_Undefs -DAllow_TYQUAD $(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. *************** all: ../../include/f2c.h $(lib) *** 70,82 **** $(lib): force $(OBJ) ! # use cross tools if appropriate; note that the _FOR_TARGET tools have a ! # tooldir-type prefix even when we're not cross-compiling ! $(AR) $(AR_FLAGS) $(lib) $(OBJ) ! -if test "$(CROSS)"; then \ ! if $(RANLIB_TEST_FOR_TARGET); then $(RANLIB_FOR_TARGET) $(lib); \ ! else true; fi ; \ ! else \ ! $(RANLIB) $(lib); \ ! fi uninstall: --- 68,78 ---- $(lib): force $(OBJ) ! # Don't worry if ar fails, that can happen when a root-like user installs a ! # system built by a user to which the installer has insufficient access ! # to modify libf2c.a. Probably a better solution to this should be ! # found, but this should do for now. -- burley 951226 ! -$(AR) $(AR_FLAGS) $(lib) $(OBJ) ! if $(RANLIB_TEST); then $(RANLIB) $(lib); \ ! else true; fi uninstall: diff -rcp2N g77-0.5.17/f/runtime/libI77/README g77-0.5.18/f/runtime/libI77/README *** g77-0.5.17/f/runtime/libI77/README Thu Nov 16 04:57:32 1995 --- g77-0.5.18/f/runtime/libI77/README Mon Mar 25 20:39:33 1996 *************** This assumes you have the xsum program w *** 118,122 **** is distributed as part of "all from f2c/src". If you do not have xsum, you can obtain xsum.c by sending the following E-mail ! message to netlib@research.att.com send xsum.c from f2c/src --- 118,122 ---- is distributed as part of "all from f2c/src". If you do not have xsum, you can obtain xsum.c by sending the following E-mail ! message to netlib@bell-labs.com send xsum.c from f2c/src diff -rcp2N g77-0.5.17/f/runtime/libI77/Version.c g77-0.5.18/f/runtime/libI77/Version.c *** g77-0.5.17/f/runtime/libI77/Version.c Sat Nov 18 19:44:18 1995 --- g77-0.5.18/f/runtime/libI77/Version.c Mon Apr 1 10:14:50 1996 *************** *** 1,8 **** ! static char junk[] = "\n@(#) LIBI77 VERSION pjw,dmg-mods 19951011\n"; /* */ ! char __G77_LIBI77_VERSION__[] = "0.5.17"; /* --- 1,8 ---- ! static char junk[] = "\n@(#) LIBI77 VERSION pjw,dmg-mods 19960315\n"; /* */ ! char __G77_LIBI77_VERSION__[] = "0.5.18"; /* *************** wrtfmt.c: *** 232,235 **** --- 232,236 ---- /* 11 Oct. 1995: move defs of f__hiwater, f__svic, f__icptr from wrtfmt.c to err.c */ + /* 15 Mar. 1996: lread.c, rsfe.c: honor END= in READ stmt with empty iolist */ #include "stdio.h" diff -rcp2N g77-0.5.17/f/runtime/libI77/lread.c g77-0.5.18/f/runtime/libI77/lread.c *** g77-0.5.17/f/runtime/libI77/lread.c Thu Nov 16 04:57:25 1995 --- g77-0.5.18/f/runtime/libI77/lread.c Tue Mar 19 12:59:07 1996 *************** integer e_rsle(Void) *** 80,84 **** int ch; if(f__curunit->uend) return(0); ! while((ch=t_getc())!='\n' && ch!=EOF); return(0); } --- 80,89 ---- int ch; if(f__curunit->uend) return(0); ! while((ch=t_getc())!='\n') ! if (ch == EOF) { ! if(feof(f__cf)) ! f__curunit->uend = l_eof = 1; ! return EOF; ! } return(0); } diff -rcp2N g77-0.5.17/f/runtime/libI77/rdfmt.c g77-0.5.18/f/runtime/libI77/rdfmt.c *** g77-0.5.17/f/runtime/libI77/rdfmt.c Thu Nov 16 04:57:26 1995 --- g77-0.5.18/f/runtime/libI77/rdfmt.c Tue Mar 19 12:59:07 1996 *************** *** 3,6 **** --- 3,7 ---- #include "fmt.h" #include "fp.h" + #include "ctype.h" extern int f__cursor; *************** rd_L(ftnint *n, int w, ftnlen len) *** 154,159 **** return 0; } - - #include "ctype.h" static int --- 155,158 ---- diff -rcp2N g77-0.5.17/f/runtime/libI77/rsfe.c g77-0.5.18/f/runtime/libI77/rsfe.c *** g77-0.5.17/f/runtime/libI77/rsfe.c Wed Mar 15 12:47:54 1995 --- g77-0.5.18/f/runtime/libI77/rsfe.c Tue Mar 19 12:59:07 1996 *************** x_getc(Void) *** 36,41 **** x_endp(Void) { ! (void) xrd_SL(); ! return(0); } x_rev(Void) --- 36,41 ---- x_endp(Void) { ! xrd_SL(); ! return f__curunit->uend == 1 ? EOF : 0; } x_rev(Void) diff -rcp2N g77-0.5.17/f/sta.c g77-0.5.18/f/sta.c *** g77-0.5.17/f/sta.c Thu Nov 2 05:08:48 1995 --- g77-0.5.18/f/sta.c Sat Mar 9 13:53:35 1996 *************** ffesta_second_ (ffelexToken t) *** 864,867 **** --- 864,879 ---- break; + case FFESTR_firstBYTE: + ffestb_args.decl.len = FFESTR_firstlBYTE; + ffestb_args.decl.type = FFESTP_typeBYTE; + ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_decl_gentype); + break; + + case FFESTR_firstWORD: + ffestb_args.decl.len = FFESTR_firstlWORD; + ffestb_args.decl.type = FFESTP_typeWORD; + ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_decl_gentype); + break; + #if FFESTR_F90 case FFESTR_firstINTENT: diff -rcp2N g77-0.5.17/f/stb.c g77-0.5.18/f/stb.c *** g77-0.5.17/f/stb.c Wed Aug 30 15:53:34 1995 --- g77-0.5.18/f/stb.c Sat Mar 9 13:53:38 1996 *************** ffestb_decl_recursive (ffelexToken t) *** 20922,20925 **** --- 20922,20933 ---- return (ffelexHandler) ffestb_decl_recursive1_; + case FFESTR_secondBYTE: + ffestb_local_.decl.type = FFESTP_typeBYTE; + return (ffelexHandler) ffestb_decl_recursive1_; + + case FFESTR_secondWORD: + ffestb_local_.decl.type = FFESTP_typeWORD; + return (ffelexHandler) ffestb_decl_recursive1_; + case FFESTR_secondREAL: ffestb_local_.decl.type = FFESTP_typeREAL; *************** ffestb_decl_recursive (ffelexToken t) *** 21010,21013 **** --- 21018,21033 ---- goto typefunc; /* :::::::::::::::::::: */ + case FFESTR_firstBYTE: + p = ffelex_token_text (nt) + (i = FFESTR_firstlBYTE); + ffestb_local_.decl.type = FFESTP_typeBYTE; + needfunc = FALSE; + goto typefunc; /* :::::::::::::::::::: */ + + case FFESTR_firstWORD: + p = ffelex_token_text (nt) + (i = FFESTR_firstlWORD); + ffestb_local_.decl.type = FFESTP_typeWORD; + needfunc = FALSE; + goto typefunc; /* :::::::::::::::::::: */ + case FFESTR_firstREAL: p = ffelex_token_text (nt) + (i = FFESTR_firstlREAL); *************** ffestb_decl_entsp_2_ (ffelexToken t) *** 22546,22549 **** --- 22566,22571 ---- break; + case FFESTP_typeBYTE: + case FFESTP_typeWORD: default: asterisk_ok = FALSE; *************** ffestb_decl_entsp_3_ (ffelexToken t) *** 22662,22665 **** --- 22684,22689 ---- break; + case FFESTP_typeBYTE: + case FFESTP_typeWORD: default: assert (FALSE); *************** ffestb_decl_funcname_2_ (ffelexToken t) *** 23089,23092 **** --- 23113,23118 ---- break; + case FFESTP_typeBYTE: + case FFESTP_typeWORD: default: ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); *************** ffestb_decl_R539 (ffelexToken t) *** 24220,24223 **** --- 24246,24257 ---- return (ffelexHandler) ffestb_decl_R5391_; + case FFESTR_secondBYTE: + ffestb_local_.decl.type = FFESTP_typeBYTE; + return (ffelexHandler) ffestb_decl_R5391_; + + case FFESTR_secondWORD: + ffestb_local_.decl.type = FFESTP_typeWORD; + return (ffelexHandler) ffestb_decl_R5391_; + case FFESTR_secondREAL: ffestb_local_.decl.type = FFESTP_typeREAL; *************** ffestb_decl_R539 (ffelexToken t) *** 24301,24304 **** --- 24335,24346 ---- return (ffelexHandler) ffestb_decl_R5391_ (t); + case FFESTR_secondBYTE: + ffestb_local_.decl.type = FFESTP_typeBYTE; + return (ffelexHandler) ffestb_decl_R5391_ (t); + + case FFESTR_secondWORD: + ffestb_local_.decl.type = FFESTP_typeWORD; + return (ffelexHandler) ffestb_decl_R5391_ (t); + case FFESTR_secondREAL: ffestb_local_.decl.type = FFESTP_typeREAL; *************** ffestb_decl_R5395_ (ffelexToken t) *** 24516,24519 **** --- 24558,24569 ---- case FFESTR_secondINTEGER: ffestb_local_.decl.type = FFESTP_typeINTEGER; + return (ffelexHandler) ffestb_decl_R5391_; + + case FFESTR_secondBYTE: + ffestb_local_.decl.type = FFESTP_typeBYTE; + return (ffelexHandler) ffestb_decl_R5391_; + + case FFESTR_secondWORD: + ffestb_local_.decl.type = FFESTP_typeWORD; return (ffelexHandler) ffestb_decl_R5391_; diff -rcp2N g77-0.5.17/f/stc.c g77-0.5.18/f/stc.c *** g77-0.5.17/f/stc.c Sat Nov 18 19:44:19 1995 --- g77-0.5.18/f/stc.c Mon Mar 18 19:08:52 1996 *************** ffestc_establish_declstmt_ (ffestpType t *** 508,511 **** --- 508,521 ---- break; + case FFESTP_typeBYTE: + bt = FFEINFO_basictypeINTEGER; + ktd = FFEINFO_kindtypeINTEGER2; + break; + + case FFESTP_typeWORD: + bt = FFEINFO_basictypeINTEGER; + ktd = FFEINFO_kindtypeINTEGER3; + break; + case FFESTP_typeREAL: bt = FFEINFO_basictypeREAL; *************** ffestc_promote_sfdummy_ (ffelexToken t) *** 4417,4421 **** || ((ffesymbol_where (sp) != FFEINFO_whereLOCAL) && (ffesymbol_where (sp) != FFEINFO_whereCOMMON) ! && (ffesymbol_where (sp) != FFEINFO_whereDUMMY)))) na = FFESYMBOL_attrsetNONE; /* Can't be PARAMETER etc., must be a var. */ else if (sa & FFESYMBOL_attrsANY) --- 4427,4432 ---- || ((ffesymbol_where (sp) != FFEINFO_whereLOCAL) && (ffesymbol_where (sp) != FFEINFO_whereCOMMON) ! && (ffesymbol_where (sp) != FFEINFO_whereDUMMY) ! && (ffesymbol_where (sp) != FFEINFO_whereNONE)))) na = FFESYMBOL_attrsetNONE; /* Can't be PARAMETER etc., must be a var. */ else if (sa & FFESYMBOL_attrsANY) *************** ffestc_R501_item (ffelexToken name, ffeb *** 6470,6473 **** --- 6481,6485 ---- FFEEXPR_contextDATA)); ffecom_notify_init_symbol (s); + ffesymbol_update_init (s); #if FFEGLOBAL_ENABLED if (ffesymbol_common (s) != NULL) *************** ffestc_R522item_object (ffelexToken name *** 7055,7059 **** of or references to the object. */ ! if (!ffesymbol_is_specable (s)) na = FFESYMBOL_attrsetNONE; /* Can't dcl sym ref'd in sfuncdef. */ else if (sa & FFESYMBOL_attrsANY) --- 7067,7073 ---- of or references to the object. */ ! if (!ffesymbol_is_specable (s) ! && ((ffesymbol_kind (s) != FFEINFO_kindENTITY) ! || (ffesymbol_where (s) != FFEINFO_whereLOCAL))) na = FFESYMBOL_attrsetNONE; /* Can't dcl sym ref'd in sfuncdef. */ else if (sa & FFESYMBOL_attrsANY) *************** ffestc_R522item_object (ffelexToken name *** 7078,7082 **** { ffesymbol_set_attrs (s, na); ! ffesymbol_set_state (s, FFESYMBOL_stateSEEN); ffesymbol_update_save (s); ffesymbol_signal_unreported (s); --- 7092,7097 ---- { ffesymbol_set_attrs (s, na); ! if (ffesymbol_state (s) == FFESYMBOL_stateNONE) ! ffesymbol_set_state (s, FFESYMBOL_stateSEEN); ffesymbol_update_save (s); ffesymbol_signal_unreported (s); *************** ffestc_R544_equiv_ (ffebld expr, ffelexT *** 8149,8153 **** } ! if (ffesymbol_save (s)) ffestc_local_.equiv.save = TRUE; } --- 8164,8168 ---- } ! if (ffesymbol_is_save (s)) ffestc_local_.equiv.save = TRUE; } *************** ffestc_R547_item_object (ffelexToken nam *** 8279,8286 **** ffesymbol_set_common (s, ffestc_local_.common.symbol); #if FFEGLOBAL_ENABLED ! if ((ffesymbol_init (s) != NULL) || (ffesymbol_accretion (s) != NULL)) ffeglobal_init_common (ffestc_local_.common.symbol, name); #endif ! if (ffesymbol_save (ffestc_local_.common.symbol)) ffesymbol_update_save (s); if (ffesymbol_equiv (s) != NULL) --- 8294,8301 ---- ffesymbol_set_common (s, ffestc_local_.common.symbol); #if FFEGLOBAL_ENABLED ! if (ffesymbol_is_init (s)) ffeglobal_init_common (ffestc_local_.common.symbol, name); #endif ! if (ffesymbol_is_save (ffestc_local_.common.symbol)) ffesymbol_update_save (s); if (ffesymbol_equiv (s) != NULL) *************** ffestc_R547_item_object (ffelexToken nam *** 8301,8308 **** } #if FFEGLOBAL_ENABLED ! if (ffeequiv_init (ffesymbol_equiv (s))) ffeglobal_init_common (ffestc_local_.common.symbol, name); #endif ! if (ffesymbol_save (ffestc_local_.common.symbol)) ffeequiv_update_save (ffesymbol_equiv (s)); } --- 8316,8323 ---- } #if FFEGLOBAL_ENABLED ! if (ffeequiv_is_init (ffesymbol_equiv (s))) ffeglobal_init_common (ffestc_local_.common.symbol, name); #endif ! if (ffesymbol_is_save (ffestc_local_.common.symbol)) ffeequiv_update_save (ffesymbol_equiv (s)); } *************** ffestc_R1208_item (ffelexToken name) *** 11878,11886 **** &gen, &spec, &imp, &kind) && ((imp == FFEINTRIN_impNONE) ! || !(sa & FFESYMBOL_attrsTYPE) ! || ((ffeintrin_basictype (imp) == ffesymbol_basictype (s)) ! && (ffeintrin_kindtype (imp) ! == ffesymbol_kindtype (s))))) na = sa | FFESYMBOL_attrsINTRINSIC; else if (kind == FFEINFO_kindANY) --- 11893,11905 ---- &gen, &spec, &imp, &kind) && ((imp == FFEINTRIN_impNONE) ! #if 0 /* Don't bother with this for now. */ ! || ((ffeintrin_basictype (spec) == ffesymbol_basictype (s)) ! && (ffeintrin_kindtype (spec) ! == ffesymbol_kindtype (s))) ! #else ! || 1 ! #endif ! || !(sa & FFESYMBOL_attrsTYPE))) na = sa | FFESYMBOL_attrsINTRINSIC; else if (kind == FFEINFO_kindANY) diff -rcp2N g77-0.5.17/f/std.c g77-0.5.18/f/std.c *** g77-0.5.17/f/std.c Fri Oct 27 08:19:47 1995 --- g77-0.5.18/f/std.c Sat Mar 9 13:53:41 1996 *************** ffestd_begin_uses () *** 1252,1256 **** { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("; begin_uses\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 1252,1256 ---- { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("; begin_uses\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_end_uses (bool ok) *** 1302,1306 **** { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("; end_uses\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 1302,1306 ---- { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("; end_uses\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_exec_begin () *** 1360,1364 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("{ begin_exec\n", stdout); #endif --- 1360,1364 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("{ begin_exec\n", dmpout); #endif *************** ffestd_exec_end () *** 1407,1412 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("} end_exec\n", stdout); ! fputs ("> end_unit\n", stdout); #endif --- 1407,1412 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("} end_exec\n", dmpout); ! fputs ("> end_unit\n", dmpout); #endif *************** ffestd_labeldef_any (ffelab label UNUSED *** 1462,1466 **** { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "; any_label_def %lu\n", ffelab_value (label)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 1462,1466 ---- { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "; any_label_def %lu\n", ffelab_value (label)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_labeldef_useless (ffelab label UN *** 1521,1525 **** { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "; useless_label_def %lu\n", ffelab_value (label)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 1521,1525 ---- { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "; useless_label_def %lu\n", ffelab_value (label)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R423A () *** 1539,1543 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* PRIVATE_derived_type\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 1539,1543 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* PRIVATE_derived_type\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R423B () *** 1556,1560 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* SEQUENCE_derived_type\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 1556,1560 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* SEQUENCE_derived_type\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R424 (ffelexToken access, ffestrO *** 1581,1585 **** if (access == NULL) ! fprintf (stdout, "* TYPE %s\n", ffelex_token_text (name)); else { --- 1581,1585 ---- if (access == NULL) ! fprintf (dmpout, "* TYPE %s\n", ffelex_token_text (name)); else { *************** ffestd_R424 (ffelexToken access, ffestrO *** 1597,1601 **** assert (FALSE); } ! fprintf (stdout, "* TYPE,%s: %s\n", a, ffelex_token_text (name)); } #endif --- 1597,1601 ---- assert (FALSE); } ! fprintf (dmpout, "* TYPE,%s: %s\n", a, ffelex_token_text (name)); } #endif *************** ffestd_R425 (bool ok) *** 1610,1614 **** { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "* END_TYPE %s\n", ffelex_token_text (ffestw_name (ffestw_stack_top ()))); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 1610,1614 ---- { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "* END_TYPE %s\n", ffelex_token_text (ffestw_name (ffestw_stack_top ()))); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R519_start (ffestrOther intent_kw *** 1651,1655 **** assert (FALSE); } ! fprintf (stdout, "* INTENT (%s) ", a); #endif } --- 1651,1655 ---- assert (FALSE); } ! fprintf (dmpout, "* INTENT (%s) ", a); #endif } *************** ffestd_R519_item (ffelexToken name) *** 1669,1673 **** #ifdef FFESTD_F90 ! fprintf (stdout, "%s,", ffelex_token_text (name)); #endif } --- 1669,1673 ---- #ifdef FFESTD_F90 ! fprintf (dmpout, "%s,", ffelex_token_text (name)); #endif } *************** ffestd_R519_finish () *** 1687,1691 **** #ifdef FFESTD_F90 ! fputc ('\n', stdout); #endif } --- 1687,1691 ---- #ifdef FFESTD_F90 ! fputc ('\n', dmpout); #endif } *************** ffestd_R520_start () *** 1706,1710 **** #ifdef FFESTD_F90 ! fputs ("* OPTIONAL ", stdout); #endif } --- 1706,1710 ---- #ifdef FFESTD_F90 ! fputs ("* OPTIONAL ", dmpout); #endif } *************** ffestd_R520_item (ffelexToken name) *** 1724,1728 **** #ifdef FFESTD_F90 ! fprintf (stdout, "%s,", ffelex_token_text (name)); #endif } --- 1724,1728 ---- #ifdef FFESTD_F90 ! fprintf (dmpout, "%s,", ffelex_token_text (name)); #endif } *************** ffestd_R520_finish () *** 1742,1746 **** #ifdef FFESTD_F90 ! fputc ('\n', stdout); #endif } --- 1742,1746 ---- #ifdef FFESTD_F90 ! fputc ('\n', dmpout); #endif } *************** ffestd_R521A () *** 1761,1765 **** #ifdef FFESTD_F90 ! fputs ("* PUBLIC\n", stdout); #endif } --- 1761,1765 ---- #ifdef FFESTD_F90 ! fputs ("* PUBLIC\n", dmpout); #endif } *************** ffestd_R521Astart () *** 1780,1784 **** #ifdef FFESTD_F90 ! fputs ("* PUBLIC ", stdout); #endif } --- 1780,1784 ---- #ifdef FFESTD_F90 ! fputs ("* PUBLIC ", dmpout); #endif } *************** ffestd_R521Aitem (ffelexToken name) *** 1798,1802 **** #ifdef FFESTD_F90 ! fprintf (stdout, "%s,", ffelex_token_text (name)); #endif } --- 1798,1802 ---- #ifdef FFESTD_F90 ! fprintf (dmpout, "%s,", ffelex_token_text (name)); #endif } *************** ffestd_R521Afinish () *** 1816,1820 **** #ifdef FFESTD_F90 ! fputc ('\n', stdout); #endif } --- 1816,1820 ---- #ifdef FFESTD_F90 ! fputc ('\n', dmpout); #endif } *************** ffestd_R521B () *** 1835,1839 **** #ifdef FFESTD_F90 ! fputs ("* PRIVATE_outside_of_R422_derived_type_def\n", stdout); #endif } --- 1835,1839 ---- #ifdef FFESTD_F90 ! fputs ("* PRIVATE_outside_of_R422_derived_type_def\n", dmpout); #endif } *************** ffestd_R521Bstart () *** 1854,1858 **** #ifdef FFESTD_F90 ! fputs ("* PRIVATE ", stdout); #endif } --- 1854,1858 ---- #ifdef FFESTD_F90 ! fputs ("* PRIVATE ", dmpout); #endif } *************** ffestd_R521Bitem (ffelexToken name) *** 1872,1876 **** #ifdef FFESTD_F90 ! fprintf (stdout, "%s,", ffelex_token_text (name)); #endif } --- 1872,1876 ---- #ifdef FFESTD_F90 ! fprintf (dmpout, "%s,", ffelex_token_text (name)); #endif } *************** ffestd_R521Bfinish () *** 1890,1894 **** #ifdef FFESTD_F90 ! fputc ('\n', stdout); #endif } --- 1890,1894 ---- #ifdef FFESTD_F90 ! fputc ('\n', dmpout); #endif } *************** ffestd_R522 () *** 1907,1911 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* SAVE_all\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 1907,1911 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* SAVE_all\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R522start () *** 1926,1930 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* SAVE ", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 1926,1930 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* SAVE ", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R522item_object (ffelexToken name *** 1945,1949 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "%s,", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 1945,1949 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "%s,", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R522item_cblock (ffelexToken name *** 1964,1968 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "/%s/,", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 1964,1968 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "/%s/,", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R522finish () *** 1983,1987 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 1983,1987 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R524_start (bool virtual UNUSED) *** 2003,2009 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE if (virtual) ! fputs ("* VIRTUAL ", stdout); /* V028. */ else ! fputs ("* DIMENSION ", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2003,2009 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE if (virtual) ! fputs ("* VIRTUAL ", dmpout); /* V028. */ else ! fputs ("* DIMENSION ", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R524_item (ffelexToken name UNUSE *** 2024,2031 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs (ffelex_token_text (name), stdout); ! fputc ('(', stdout); ffestt_dimlist_dump (dims); ! fputs ("),", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2024,2031 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs (ffelex_token_text (name), dmpout); ! fputc ('(', dmpout); ffestt_dimlist_dump (dims); ! fputs ("),", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R524_finish () *** 2046,2050 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2046,2050 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R525_start () *** 2070,2074 **** #ifdef FFESTD_F90 ! fputs ("* ALLOCATABLE ", stdout); #endif } --- 2070,2074 ---- #ifdef FFESTD_F90 ! fputs ("* ALLOCATABLE ", dmpout); #endif } *************** ffestd_R525_item (ffelexToken name, ffes *** 2088,2099 **** #ifdef FFESTD_F90 ! fputs (ffelex_token_text (name), stdout); if (dims != NULL) { ! fputc ('(', stdout); ffestt_dimlist_dump (dims); ! fputc (')', stdout); } ! fputc (',', stdout); #endif } --- 2088,2099 ---- #ifdef FFESTD_F90 ! fputs (ffelex_token_text (name), dmpout); if (dims != NULL) { ! fputc ('(', dmpout); ffestt_dimlist_dump (dims); ! fputc (')', dmpout); } ! fputc (',', dmpout); #endif } *************** ffestd_R525_finish () *** 2113,2117 **** #ifdef FFESTD_F90 ! fputc ('\n', stdout); #endif } --- 2113,2117 ---- #ifdef FFESTD_F90 ! fputc ('\n', dmpout); #endif } *************** ffestd_R526_start () *** 2133,2137 **** #ifdef FFESTD_F90 ! fputs ("* POINTER ", stdout); #endif } --- 2133,2137 ---- #ifdef FFESTD_F90 ! fputs ("* POINTER ", dmpout); #endif } *************** ffestd_R526_item (ffelexToken name, ffes *** 2151,2162 **** #ifdef FFESTD_F90 ! fputs (ffelex_token_text (name), stdout); if (dims != NULL) { ! fputc ('(', stdout); ffestt_dimlist_dump (dims); ! fputc (')', stdout); } ! fputc (',', stdout); #endif } --- 2151,2162 ---- #ifdef FFESTD_F90 ! fputs (ffelex_token_text (name), dmpout); if (dims != NULL) { ! fputc ('(', dmpout); ffestt_dimlist_dump (dims); ! fputc (')', dmpout); } ! fputc (',', dmpout); #endif } *************** ffestd_R526_finish () *** 2176,2180 **** #ifdef FFESTD_F90 ! fputc ('\n', stdout); #endif } --- 2176,2180 ---- #ifdef FFESTD_F90 ! fputc ('\n', dmpout); #endif } *************** ffestd_R527_start () *** 2196,2200 **** #ifdef FFESTD_F90 ! fputs ("* TARGET ", stdout); #endif } --- 2196,2200 ---- #ifdef FFESTD_F90 ! fputs ("* TARGET ", dmpout); #endif } *************** ffestd_R527_item (ffelexToken name, ffes *** 2214,2225 **** #ifdef FFESTD_F90 ! fputs (ffelex_token_text (name), stdout); if (dims != NULL) { ! fputc ('(', stdout); ffestt_dimlist_dump (dims); ! fputc (')', stdout); } ! fputc (',', stdout); #endif } --- 2214,2225 ---- #ifdef FFESTD_F90 ! fputs (ffelex_token_text (name), dmpout); if (dims != NULL) { ! fputc ('(', dmpout); ffestt_dimlist_dump (dims); ! fputc (')', dmpout); } ! fputc (',', dmpout); #endif } *************** ffestd_R527_finish () *** 2239,2243 **** #ifdef FFESTD_F90 ! fputc ('\n', stdout); #endif } --- 2239,2243 ---- #ifdef FFESTD_F90 ! fputc ('\n', dmpout); #endif } *************** ffestd_R537_start () *** 2256,2260 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* PARAMETER (", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2256,2260 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* PARAMETER (", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R537_item (ffebld dest UNUSED, ff *** 2277,2283 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (dest); ! fputc ('=', stdout); ffebld_dump (source); ! fputc (',', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2277,2283 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (dest); ! fputc ('=', dmpout); ffebld_dump (source); ! fputc (',', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R537_finish () *** 2298,2302 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs (")\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2298,2302 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs (")\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R539 () *** 2317,2321 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* IMPLICIT_NONE\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2317,2321 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* IMPLICIT_NONE\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R539start () *** 2336,2340 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* IMPLICIT ", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2336,2340 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* IMPLICIT ", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R539item (ffestpType type UNUSED, *** 2367,2370 **** --- 2367,2378 ---- break; + case FFESTP_typeBYTE: + a = "BYTE"; + break; + + case FFESTP_typeWORD: + a = "WORD"; + break; + case FFESTP_typeREAL: a = "REAL"; *************** ffestd_R539item (ffestpType type UNUSED, *** 2402,2427 **** break; } ! fprintf (stdout, "%s(", a); if (kindt != NULL) { ! fputs ("kind=", stdout); if (kind == NULL) ! fputs (ffelex_token_text (kindt), stdout); else ffebld_dump (kind); if (lent != NULL) ! fputc (',', stdout); } if (lent != NULL) { ! fputs ("len=", stdout); if (len == NULL) ! fputs (ffelex_token_text (lent), stdout); else ffebld_dump (len); } ! fputs (")(", stdout); ffestt_implist_dump (letters); ! fputs ("),", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2410,2435 ---- break; } ! fprintf (dmpout, "%s(", a); if (kindt != NULL) { ! fputs ("kind=", dmpout); if (kind == NULL) ! fputs (ffelex_token_text (kindt), dmpout); else ffebld_dump (kind); if (lent != NULL) ! fputc (',', dmpout); } if (lent != NULL) { ! fputs ("len=", dmpout); if (len == NULL) ! fputs (ffelex_token_text (lent), dmpout); else ffebld_dump (len); } ! fputs (")(", dmpout); ffestt_implist_dump (letters); ! fputs ("),", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R539finish () *** 2442,2446 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2450,2454 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R542_start () *** 2461,2465 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* NAMELIST ", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2469,2473 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* NAMELIST ", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R542_item_nlist (ffelexToken name *** 2480,2484 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "/%s/", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2488,2492 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "/%s/", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R542_item_nitem (ffelexToken name *** 2499,2503 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "%s,", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2507,2511 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "%s,", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R542_finish () *** 2518,2522 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2526,2530 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R544_start () *** 2539,2543 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* EQUIVALENCE (", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2547,2551 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* EQUIVALENCE (", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R544_item (ffesttExprList exprlis *** 2561,2565 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ffestt_exprlist_dump (exprlist); ! fputs ("),", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2569,2573 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ffestt_exprlist_dump (exprlist); ! fputs ("),", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R544_finish () *** 2582,2586 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs (")\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2590,2594 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs (")\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R547_start () *** 2602,2606 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* COMMON ", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2610,2614 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* COMMON ", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R547_item_object (ffelexToken nam *** 2622,2633 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs (ffelex_token_text (name), stdout); if (dims != NULL) { ! fputc ('(', stdout); ffestt_dimlist_dump (dims); ! fputc (')', stdout); } ! fputc (',', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2630,2641 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs (ffelex_token_text (name), dmpout); if (dims != NULL) { ! fputc ('(', dmpout); ffestt_dimlist_dump (dims); ! fputc (')', dmpout); } ! fputc (',', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R547_item_cblock (ffelexToken nam *** 2649,2655 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE if (name == NULL) ! fputs ("//,", stdout); else ! fprintf (stdout, "/%s/,", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2657,2663 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE if (name == NULL) ! fputs ("//,", dmpout); else ! fprintf (dmpout, "/%s/,", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R547_finish () *** 2670,2674 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 2678,2682 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R620 (ffesttExprList exprlist, ff *** 2693,2704 **** #ifdef FFESTD_F90 ! fputs ("+ ALLOCATE (", stdout); ffestt_exprlist_dump (exprlist); if (stat != NULL) { ! fputs (",stat=", stdout); ffebld_dump (stat); } ! fputs (")\n", stdout); #endif } --- 2701,2712 ---- #ifdef FFESTD_F90 ! fputs ("+ ALLOCATE (", dmpout); ffestt_exprlist_dump (exprlist); if (stat != NULL) { ! fputs (",stat=", dmpout); ffebld_dump (stat); } ! fputs (")\n", dmpout); #endif } *************** ffestd_R624 (ffesttExprList pointers) *** 2719,2726 **** #ifdef FFESTD_F90 ! fputs ("+ NULLIFY (", stdout); assert (pointers != NULL); ffestt_exprlist_dump (pointers); ! fputs (")\n", stdout); #endif } --- 2727,2734 ---- #ifdef FFESTD_F90 ! fputs ("+ NULLIFY (", dmpout); assert (pointers != NULL); ffestt_exprlist_dump (pointers); ! fputs (")\n", dmpout); #endif } *************** ffestd_R625 (ffesttExprList exprlist, ff *** 2741,2752 **** #ifdef FFESTD_F90 ! fputs ("+ DEALLOCATE (", stdout); ffestt_exprlist_dump (exprlist); if (stat != NULL) { ! fputs (",stat=", stdout); ffebld_dump (stat); } ! fputs (")\n", stdout); #endif } --- 2749,2760 ---- #ifdef FFESTD_F90 ! fputs ("+ DEALLOCATE (", dmpout); ffestt_exprlist_dump (exprlist); if (stat != NULL) { ! fputs (",stat=", dmpout); ffebld_dump (stat); } ! fputs (")\n", dmpout); #endif } *************** ffestd_R737B (ffebld dest, ffebld source *** 2793,2801 **** #ifdef FFESTD_F90 ! fputs ("+ let_inside_where ", stdout); ffebld_dump (dest); ! fputs ("=", stdout); ffebld_dump (source); ! fputc ('\n', stdout); #endif } --- 2801,2809 ---- #ifdef FFESTD_F90 ! fputs ("+ let_inside_where ", dmpout); ffebld_dump (dest); ! fputs ("=", dmpout); ffebld_dump (source); ! fputc ('\n', dmpout); #endif } *************** ffestd_R738 (ffebld dest, ffebld source) *** 2816,2824 **** #ifdef FFESTD_F90 ! fputs ("+ let_pointer ", stdout); ffebld_dump (dest); ! fputs ("=>", stdout); ffebld_dump (source); ! fputc ('\n', stdout); #endif } --- 2824,2832 ---- #ifdef FFESTD_F90 ! fputs ("+ let_pointer ", dmpout); ffebld_dump (dest); ! fputs ("=>", dmpout); ffebld_dump (source); ! fputc ('\n', dmpout); #endif } *************** ffestd_R740 (ffebld expr) *** 2839,2845 **** #ifdef FFESTD_F90 ! fputs ("+ WHERE (", stdout); ffebld_dump (expr); ! fputs (")\n", stdout); ++ffestd_block_level_; --- 2847,2853 ---- #ifdef FFESTD_F90 ! fputs ("+ WHERE (", dmpout); ffebld_dump (expr); ! fputs (")\n", dmpout); ++ffestd_block_level_; *************** ffestd_R742 (ffebld expr) *** 2863,2869 **** #ifdef FFESTD_F90 ! fputs ("+ WHERE_construct (", stdout); ffebld_dump (expr); ! fputs (")\n", stdout); ++ffestd_block_level_; --- 2871,2877 ---- #ifdef FFESTD_F90 ! fputs ("+ WHERE_construct (", dmpout); ffebld_dump (expr); ! fputs (")\n", dmpout); ++ffestd_block_level_; *************** ffestd_R744 () *** 2887,2891 **** #ifdef FFESTD_F90 ! fputs ("+ ELSE_WHERE\n", stdout); #endif } --- 2895,2899 ---- #ifdef FFESTD_F90 ! fputs ("+ ELSE_WHERE\n", dmpout); #endif } *************** ffestd_R745 (bool ok) *** 2905,2909 **** #ifdef FFESTD_F90 ! fputs ("+ END_WHERE\n", stdout); /* Also see ffestd_R745. */ --ffestd_block_level_; --- 2913,2917 ---- #ifdef FFESTD_F90 ! fputs ("+ END_WHERE\n", dmpout); /* Also see ffestd_R745. */ --ffestd_block_level_; *************** ffestd_R1102 (ffesymbol s, ffelexToken n *** 4667,4673 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE if (name == NULL) ! fputs ("< PROGRAM_unnamed\n", stdout); else ! fprintf (stdout, "< PROGRAM %s\n", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 4675,4681 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE if (name == NULL) ! fputs ("< PROGRAM_unnamed\n", dmpout); else ! fprintf (dmpout, "< PROGRAM %s\n", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R1105 (ffelexToken name) *** 4722,4726 **** #ifdef FFESTD_F90 ! fprintf (stdout, "* MODULE %s\n", ffelex_token_text (name)); #endif } --- 4730,4734 ---- #ifdef FFESTD_F90 ! fprintf (dmpout, "* MODULE %s\n", ffelex_token_text (name)); #endif } *************** ffestd_R1106 (bool ok) *** 4743,4747 **** #ifdef FFESTD_F90 ! fprintf (stdout, "< END_MODULE %s\n", ffelex_token_text (ffestw_name (ffestw_stack_top ()))); #endif --- 4751,4755 ---- #ifdef FFESTD_F90 ! fprintf (dmpout, "< END_MODULE %s\n", ffelex_token_text (ffestw_name (ffestw_stack_top ()))); #endif *************** ffestd_R1107_start (ffelexToken name, bo *** 4763,4770 **** #ifdef FFESTD_F90 ! fprintf (stdout, "* USE %s,", ffelex_token_text (name)); /* NB _shriek_begin_uses_. */ if (only) ! fputs ("only: ", stdout); #endif } --- 4771,4778 ---- #ifdef FFESTD_F90 ! fprintf (dmpout, "* USE %s,", ffelex_token_text (name)); /* NB _shriek_begin_uses_. */ if (only) ! fputs ("only: ", dmpout); #endif } *************** ffestd_R1107_item (ffelexToken local, ff *** 4787,4792 **** #ifdef FFESTD_F90 if (local != NULL) ! fprintf (stdout, "%s=>", ffelex_token_text (local)); ! fprintf (stdout, "%s,", ffelex_token_text (use)); #endif } --- 4795,4800 ---- #ifdef FFESTD_F90 if (local != NULL) ! fprintf (dmpout, "%s=>", ffelex_token_text (local)); ! fprintf (dmpout, "%s,", ffelex_token_text (use)); #endif } *************** ffestd_R1107_finish () *** 4806,4810 **** #ifdef FFESTD_F90 ! fputc ('\n', stdout); #endif } --- 4814,4818 ---- #ifdef FFESTD_F90 ! fputc ('\n', dmpout); #endif } *************** ffestd_R1111 (ffesymbol s, ffelexToken n *** 4832,4838 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE if (name == NULL) ! fputs ("< BLOCK_DATA_unnamed\n", stdout); else ! fprintf (stdout, "< BLOCK_DATA %s\n", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 4840,4846 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE if (name == NULL) ! fputs ("< BLOCK_DATA_unnamed\n", dmpout); else ! fprintf (dmpout, "< BLOCK_DATA %s\n", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R1202 (ffestpDefinedOperator oper *** 4892,4974 **** case FFESTP_definedoperatorNone: if (name == NULL) ! fputs ("* INTERFACE_unnamed\n", stdout); else ! fprintf (stdout, "* INTERFACE %s\n", ffelex_token_text (name)); break; case FFESTP_definedoperatorOPERATOR: ! fprintf (stdout, "* INTERFACE_OPERATOR (.%s.)\n", ffelex_token_text (name)); break; case FFESTP_definedoperatorASSIGNMENT: ! fputs ("* INTERFACE_ASSIGNMENT (=)\n", stdout); break; case FFESTP_definedoperatorPOWER: ! fputs ("* INTERFACE_OPERATOR (**)\n", stdout); break; case FFESTP_definedoperatorMULT: ! fputs ("* INTERFACE_OPERATOR (*)\n", stdout); break; case FFESTP_definedoperatorADD: ! fputs ("* INTERFACE_OPERATOR (+)\n", stdout); break; case FFESTP_definedoperatorCONCAT: ! fputs ("* INTERFACE_OPERATOR (//)\n", stdout); break; case FFESTP_definedoperatorDIVIDE: ! fputs ("* INTERFACE_OPERATOR (/)\n", stdout); break; case FFESTP_definedoperatorSUBTRACT: ! fputs ("* INTERFACE_OPERATOR (-)\n", stdout); break; case FFESTP_definedoperatorNOT: ! fputs ("* INTERFACE_OPERATOR (.not.)\n", stdout); break; case FFESTP_definedoperatorAND: ! fputs ("* INTERFACE_OPERATOR (.and.)\n", stdout); break; case FFESTP_definedoperatorOR: ! fputs ("* INTERFACE_OPERATOR (.or.)\n", stdout); break; case FFESTP_definedoperatorEQV: ! fputs ("* INTERFACE_OPERATOR (.eqv.)\n", stdout); break; case FFESTP_definedoperatorNEQV: ! fputs ("* INTERFACE_OPERATOR (.neqv.)\n", stdout); break; case FFESTP_definedoperatorEQ: ! fputs ("* INTERFACE_OPERATOR (==)\n", stdout); break; case FFESTP_definedoperatorNE: ! fputs ("* INTERFACE_OPERATOR (/=)\n", stdout); break; case FFESTP_definedoperatorLT: ! fputs ("* INTERFACE_OPERATOR (<)\n", stdout); break; case FFESTP_definedoperatorLE: ! fputs ("* INTERFACE_OPERATOR (<=)\n", stdout); break; case FFESTP_definedoperatorGT: ! fputs ("* INTERFACE_OPERATOR (>)\n", stdout); break; case FFESTP_definedoperatorGE: ! fputs ("* INTERFACE_OPERATOR (>=)\n", stdout); break; --- 4900,4982 ---- case FFESTP_definedoperatorNone: if (name == NULL) ! fputs ("* INTERFACE_unnamed\n", dmpout); else ! fprintf (dmpout, "* INTERFACE %s\n", ffelex_token_text (name)); break; case FFESTP_definedoperatorOPERATOR: ! fprintf (dmpout, "* INTERFACE_OPERATOR (.%s.)\n", ffelex_token_text (name)); break; case FFESTP_definedoperatorASSIGNMENT: ! fputs ("* INTERFACE_ASSIGNMENT (=)\n", dmpout); break; case FFESTP_definedoperatorPOWER: ! fputs ("* INTERFACE_OPERATOR (**)\n", dmpout); break; case FFESTP_definedoperatorMULT: ! fputs ("* INTERFACE_OPERATOR (*)\n", dmpout); break; case FFESTP_definedoperatorADD: ! fputs ("* INTERFACE_OPERATOR (+)\n", dmpout); break; case FFESTP_definedoperatorCONCAT: ! fputs ("* INTERFACE_OPERATOR (//)\n", dmpout); break; case FFESTP_definedoperatorDIVIDE: ! fputs ("* INTERFACE_OPERATOR (/)\n", dmpout); break; case FFESTP_definedoperatorSUBTRACT: ! fputs ("* INTERFACE_OPERATOR (-)\n", dmpout); break; case FFESTP_definedoperatorNOT: ! fputs ("* INTERFACE_OPERATOR (.not.)\n", dmpout); break; case FFESTP_definedoperatorAND: ! fputs ("* INTERFACE_OPERATOR (.and.)\n", dmpout); break; case FFESTP_definedoperatorOR: ! fputs ("* INTERFACE_OPERATOR (.or.)\n", dmpout); break; case FFESTP_definedoperatorEQV: ! fputs ("* INTERFACE_OPERATOR (.eqv.)\n", dmpout); break; case FFESTP_definedoperatorNEQV: ! fputs ("* INTERFACE_OPERATOR (.neqv.)\n", dmpout); break; case FFESTP_definedoperatorEQ: ! fputs ("* INTERFACE_OPERATOR (==)\n", dmpout); break; case FFESTP_definedoperatorNE: ! fputs ("* INTERFACE_OPERATOR (/=)\n", dmpout); break; case FFESTP_definedoperatorLT: ! fputs ("* INTERFACE_OPERATOR (<)\n", dmpout); break; case FFESTP_definedoperatorLE: ! fputs ("* INTERFACE_OPERATOR (<=)\n", dmpout); break; case FFESTP_definedoperatorGT: ! fputs ("* INTERFACE_OPERATOR (>)\n", dmpout); break; case FFESTP_definedoperatorGE: ! fputs ("* INTERFACE_OPERATOR (>=)\n", dmpout); break; *************** ffestd_R1203 (bool ok) *** 4990,4994 **** #ifdef FFESTD_F90 ! fputs ("* END_INTERFACE\n", stdout); #endif } --- 4998,5002 ---- #ifdef FFESTD_F90 ! fputs ("* END_INTERFACE\n", dmpout); #endif } *************** ffestd_R1205_start () *** 5009,5013 **** #ifdef FFESTD_F90 ! fputs ("* MODULE_PROCEDURE ", stdout); #endif } --- 5017,5021 ---- #ifdef FFESTD_F90 ! fputs ("* MODULE_PROCEDURE ", dmpout); #endif } *************** ffestd_R1205_item (ffelexToken name) *** 5028,5032 **** #ifdef FFESTD_F90 ! fprintf (stdout, "%s,", ffelex_token_text (name)); #endif } --- 5036,5040 ---- #ifdef FFESTD_F90 ! fprintf (dmpout, "%s,", ffelex_token_text (name)); #endif } *************** ffestd_R1205_finish () *** 5046,5050 **** #ifdef FFESTD_F90 ! fputc ('\n', stdout); #endif } --- 5054,5058 ---- #ifdef FFESTD_F90 ! fputc ('\n', dmpout); #endif } *************** ffestd_R1207_start () *** 5063,5067 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* EXTERNAL (", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5071,5075 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* EXTERNAL (", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R1207_item (ffelexToken name) *** 5083,5087 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "%s,", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5091,5095 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "%s,", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R1207_finish () *** 5102,5106 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs (")\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5110,5114 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs (")\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R1208_start () *** 5121,5125 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* INTRINSIC (", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5129,5133 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* INTRINSIC (", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R1208_item (ffelexToken name) *** 5141,5145 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "%s,", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5149,5153 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "%s,", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R1208_finish () *** 5160,5164 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs (")\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5168,5172 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs (")\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R1213 (ffebld dest, ffebld source *** 5211,5219 **** #ifdef FFESTD_F90 ! fputs ("+ let_defined ", stdout); ffebld_dump (dest); ! fputs ("=", stdout); ffebld_dump (source); ! fputc ('\n', stdout); #endif } --- 5219,5227 ---- #ifdef FFESTD_F90 ! fputs ("+ let_defined ", dmpout); ffebld_dump (dest); ! fputs ("=", dmpout); ffebld_dump (source); ! fputc ('\n', dmpout); #endif } *************** ffestd_R1219 (ffesymbol s, ffelexToken f *** 5258,5261 **** --- 5266,5277 ---- break; + case FFESTP_typeBYTE: + a = "BYTE"; + break; + + case FFESTP_typeWORD: + a = "WORD"; + break; + case FFESTP_typeREAL: a = "REAL"; *************** ffestd_R1219 (ffesymbol s, ffelexToken f *** 5297,5332 **** break; } ! fprintf (stdout, "< FUNCTION %s ", ffelex_token_text (funcname)); if (recursive) ! fputs ("RECURSIVE ", stdout); ! fprintf (stdout, "%s(", a); if (kindt != NULL) { ! fputs ("kind=", stdout); if (kind == NULL) ! fputs (ffelex_token_text (kindt), stdout); else ffebld_dump (kind); if (lent != NULL) ! fputc (',', stdout); } if (lent != NULL) { ! fputs ("len=", stdout); if (len == NULL) ! fputs (ffelex_token_text (lent), stdout); else ffebld_dump (len); } ! fprintf (stdout, ")"); if (args != NULL) { ! fputs (" (", stdout); ffestt_tokenlist_dump (args); ! fputc (')', stdout); } if (result != NULL) ! fprintf (stdout, " result(%s)", ffelex_token_text (result)); ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5313,5348 ---- break; } ! fprintf (dmpout, "< FUNCTION %s ", ffelex_token_text (funcname)); if (recursive) ! fputs ("RECURSIVE ", dmpout); ! fprintf (dmpout, "%s(", a); if (kindt != NULL) { ! fputs ("kind=", dmpout); if (kind == NULL) ! fputs (ffelex_token_text (kindt), dmpout); else ffebld_dump (kind); if (lent != NULL) ! fputc (',', dmpout); } if (lent != NULL) { ! fputs ("len=", dmpout); if (len == NULL) ! fputs (ffelex_token_text (lent), dmpout); else ffebld_dump (len); } ! fprintf (dmpout, ")"); if (args != NULL) { ! fputs (" (", dmpout); ffestt_tokenlist_dump (args); ! fputc (')', dmpout); } if (result != NULL) ! fprintf (dmpout, " result(%s)", ffelex_token_text (result)); ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R1223 (ffesymbol s, ffelexToken s *** 5386,5399 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "< SUBROUTINE %s ", ffelex_token_text (subrname)); if (recursive) ! fputs ("recursive ", stdout); if (args != NULL) { ! fputc ('(', stdout); ffestt_tokenlist_dump (args); ! fputc (')', stdout); } ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5402,5415 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "< SUBROUTINE %s ", ffelex_token_text (subrname)); if (recursive) ! fputs ("recursive ", dmpout); if (args != NULL) { ! fputc ('(', dmpout); ffestt_tokenlist_dump (args); ! fputc (')', dmpout); } ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_R1228 () *** 5515,5519 **** #ifdef FFESTD_F90 ! fputs ("- CONTAINS\n", stdout); #endif } --- 5531,5535 ---- #ifdef FFESTD_F90 ! fputs ("- CONTAINS\n", dmpout); #endif } *************** ffestd_R1229_finish (ffesymbol s) *** 5576,5585 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "* stmtfunction %s(", ffesymbol_text (s)); for (; args != NULL; args = ffebld_trail (args)) ! fprintf (stdout, "%s,", ffesymbol_text (ffebld_symter (ffebld_head (args)))); ! fputs (")=", stdout); ffebld_dump (expr); ! fputc ('\n', stdout); #if 0 /* Normally no need to preserve the expression. */ --- 5592,5601 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "* stmtfunction %s(", ffesymbol_text (s)); for (; args != NULL; args = ffebld_trail (args)) ! fprintf (dmpout, "%s,", ffesymbol_text (ffebld_symter (ffebld_head (args)))); ! fputs (")=", dmpout); ffebld_dump (expr); ! fputc ('\n', dmpout); #if 0 /* Normally no need to preserve the expression. */ *************** ffestd_V003_start (ffelexToken structure *** 5659,5665 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE if (structure_name == NULL) ! fputs ("* STRUCTURE_unnamed ", stdout); else ! fprintf (stdout, "* STRUCTURE %s ", ffelex_token_text (structure_name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffestd_subr_vxt_ (); --- 5675,5681 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE if (structure_name == NULL) ! fputs ("* STRUCTURE_unnamed ", dmpout); else ! fprintf (dmpout, "* STRUCTURE %s ", ffelex_token_text (structure_name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffestd_subr_vxt_ (); *************** ffestd_V003_item (ffelexToken name, ffes *** 5681,5692 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs (ffelex_token_text (name), stdout); if (dims != NULL) { ! fputc ('(', stdout); ffestt_dimlist_dump (dims); ! fputc (')', stdout); } ! fputc (',', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5697,5708 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs (ffelex_token_text (name), dmpout); if (dims != NULL) { ! fputc ('(', dmpout); ffestt_dimlist_dump (dims); ! fputc (')', dmpout); } ! fputc (',', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_V003_finish () *** 5707,5711 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5723,5727 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_V004 (bool ok) *** 5722,5726 **** { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* END_STRUCTURE\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5738,5742 ---- { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* END_STRUCTURE\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_V009 () *** 5739,5743 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* UNION\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5755,5759 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* UNION\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_V010 (bool ok) *** 5754,5758 **** { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* END_UNION\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5770,5774 ---- { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* END_UNION\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_V012 () *** 5771,5775 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* MAP\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5787,5791 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* MAP\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_V013 (bool ok) *** 5786,5790 **** { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* END_MAP\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5802,5806 ---- { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* END_MAP\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_V014_start () *** 5806,5810 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* VOLATILE (", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffestd_subr_vxt_ (); --- 5822,5826 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* VOLATILE (", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffestd_subr_vxt_ (); *************** ffestd_V014_item_object (ffelexToken nam *** 5826,5830 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "%s,", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5842,5846 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "%s,", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_V014_item_cblock (ffelexToken nam *** 5845,5849 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "/%s/,", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5861,5865 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "/%s/,", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_V014_finish () *** 5864,5868 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs (")\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5880,5884 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs (")\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_V016_start () *** 5884,5888 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* RECORD ", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffestd_subr_vxt_ (); --- 5900,5904 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* RECORD ", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffestd_subr_vxt_ (); *************** ffestd_V016_item_structure (ffelexToken *** 5904,5908 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "/%s/,", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5920,5924 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "/%s/,", ffelex_token_text (name)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_V016_item_object (ffelexToken nam *** 5923,5934 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs (ffelex_token_text (name), stdout); if (dims != NULL) { ! fputc ('(', stdout); ffestt_dimlist_dump (dims); ! fputc (')', stdout); } ! fputc (',', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5939,5950 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs (ffelex_token_text (name), dmpout); if (dims != NULL) { ! fputc ('(', dmpout); ffestt_dimlist_dump (dims); ! fputc (')', dmpout); } ! fputc (',', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_V016_finish () *** 5949,5953 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5965,5969 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_V027_start () *** 6652,6656 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* PARAMETER_vxt ", stdout); #else #if FFECOM_targetCURRENT == FFECOM_targetGCC --- 6668,6672 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* PARAMETER_vxt ", dmpout); #else #if FFECOM_targetCURRENT == FFECOM_targetGCC *************** ffestd_V027_item (ffelexToken dest_token *** 6673,6680 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs (ffelex_token_text (dest_token), stdout); ! fputc ('=', stdout); ffebld_dump (source); ! fputc (',', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 6689,6696 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs (ffelex_token_text (dest_token), dmpout); ! fputc ('=', dmpout); ffebld_dump (source); ! fputc (',', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffestd_V027_finish () *** 6695,6699 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 6711,6715 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else diff -rcp2N g77-0.5.17/f/ste.c g77-0.5.18/f/ste.c *** g77-0.5.17/f/ste.c Fri Nov 10 19:16:00 1995 --- g77-0.5.18/f/ste.c Mon Mar 25 20:39:34 1996 *************** the Free Software Foundation, 59 Temple *** 55,58 **** --- 55,59 ---- #include "bld.h" #include "com.h" + #include "expr.h" #include "lab.h" #include "lex.h" *************** ffeste_begin_iterdo_ (ffestw block, tree *** 373,377 **** /* Warn if end plus incr would overflow. */ ! try = ffecom_2 (PLUS_EXPR, TREE_TYPE (tend), tend, tincr); --- 374,378 ---- /* Warn if end plus incr would overflow. */ ! try = ffecom_2 (PLUS_EXPR, TREE_TYPE (tvar), tend, tincr); *************** ffeste_begin_iterdo_ (ffestw block, tree *** 402,413 **** if (TREE_CODE (TREE_TYPE (tvar)) != REAL_TYPE) ! expr = ffecom_2 (TRUNC_DIV_EXPR, integer_type_node, expr, tincr_saved); else ! expr = ffecom_2 (RDIV_EXPR, TREE_TYPE (tvar), expr, tincr_saved); if ((TREE_TYPE (tvar) != error_mark_node) && ((TREE_CODE (TREE_TYPE (tvar)) != INTEGER_TYPE) --- 403,418 ---- if (TREE_CODE (TREE_TYPE (tvar)) != REAL_TYPE) ! expr = ffecom_2 (TRUNC_DIV_EXPR, TREE_TYPE (expr), expr, tincr_saved); else ! expr = ffecom_2 (RDIV_EXPR, TREE_TYPE (expr), expr, tincr_saved); + #if 1 /* New, F90-approved approach: convert to default INTEGER. */ + if (TREE_TYPE (tvar) != error_mark_node) + expr = convert (ffecom_integer_type_node, expr); + #else /* Old approach; convert to INTEGER unless that's a narrowing. */ if ((TREE_TYPE (tvar) != error_mark_node) && ((TREE_CODE (TREE_TYPE (tvar)) != INTEGER_TYPE) *************** ffeste_begin_iterdo_ (ffestw block, tree *** 420,423 **** --- 425,429 ---- default INTEGER; else leave as, say, INTEGER*8 (long long int). */ expr = convert (ffecom_integer_type_node, expr); + #endif niters = ffecom_push_tempvar (TREE_TYPE (expr), *************** ffeste_begin_iterdo_ (ffestw block, tree *** 432,444 **** 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, ! ffecom_integer_one_node), ! ffecom_integer_zero_node)); ! expand_exit_loop_if_false (0, ! expr); clear_momentary (); /* Discard the above now that we're done with --- 438,452 ---- expand_start_loop_continue_elsewhere (1)); ! expr = ffecom_truth_value ! (ffecom_2 (GE_EXPR, integer_type_node, ! ffecom_2 (PREDECREMENT_EXPR, ! TREE_TYPE (niters), ! niters, ! convert (TREE_TYPE (niters), ! ffecom_integer_one_node)), ! convert (TREE_TYPE (niters), ! ffecom_integer_zero_node))); ! expand_exit_loop_if_false (0, expr); clear_momentary (); /* Discard the above now that we're done with *************** ffeste_io_impdo_ (ffebld impdo, ffelexTo *** 1489,1492 **** --- 1497,1507 ---- /* Start the DO loop. */ + start = ffeexpr_convert_expr (start, impdo_token, var, impdo_token, + FFEEXPR_contextLET); + end = ffeexpr_convert_expr (end, impdo_token, var, impdo_token, + FFEEXPR_contextLET); + incr = ffeexpr_convert_expr (incr, impdo_token, var, impdo_token, + FFEEXPR_contextLET); + ffeste_begin_iterdo_ (NULL, &tvar, &tincr, &titervar, var, start, impdo_token, *************** ffeste_subr_file_ (char *kw, ffestpFile *** 1904,1915 **** if (!spec->kw_or_val_present) return; ! fputs (kw, stdout); if (spec->value_present) { ! fputc ('=', stdout); if (spec->value_is_label) { assert (spec->value_is_label == 2); /* Temporary checking only. */ ! fprintf (stdout, "%" ffelabValue_f "u", ffelab_value (spec->u.label)); } --- 1919,1930 ---- if (!spec->kw_or_val_present) return; ! fputs (kw, dmpout); if (spec->value_present) { ! fputc ('=', dmpout); if (spec->value_is_label) { assert (spec->value_is_label == 2); /* Temporary checking only. */ ! fprintf (dmpout, "%" ffelabValue_f "u", ffelab_value (spec->u.label)); } *************** ffeste_subr_file_ (char *kw, ffestpFile *** 1917,1921 **** ffebld_dump (spec->u.expr); } ! fputc (',', stdout); } #endif --- 1932,1936 ---- ffebld_dump (spec->u.expr); } ! fputc (',', dmpout); } #endif *************** ffeste_do (ffestw block) *** 2039,2043 **** { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ END_DO\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); --- 2054,2058 ---- { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ END_DO\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); *************** ffeste_end_R807 () *** 2069,2073 **** { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ END_IF\n", stdout); /* Also see ffeste_R806. */ #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); --- 2084,2088 ---- { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ END_IF\n", dmpout); /* Also see ffeste_R806. */ #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); *************** ffeste_labeldef_branch (ffelab label) *** 2087,2091 **** { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "+ label %lu\n", ffelab_value (label)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { --- 2102,2106 ---- { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "+ label %lu\n", ffelab_value (label)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { *************** ffeste_labeldef_format (ffelab label) *** 2116,2120 **** { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "$ label %lu\n", ffelab_value (label)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_label_formatdef_ = label; --- 2131,2135 ---- { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "$ label %lu\n", ffelab_value (label)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_label_formatdef_ = label; *************** ffeste_R737A (ffebld dest, ffebld source *** 2134,2142 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ let ", stdout); ffebld_dump (dest); ! fputs ("=", stdout); ffebld_dump (source); ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); --- 2149,2157 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ let ", dmpout); ffebld_dump (dest); ! fputs ("=", dmpout); ffebld_dump (source); ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); *************** ffeste_R803 (ffebld expr) *** 2164,2170 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ IF_block (", stdout); ffebld_dump (expr); ! fputs (")\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); --- 2179,2185 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ IF_block (", dmpout); ffebld_dump (expr); ! fputs (")\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); *************** ffeste_R804 (ffebld expr) *** 2194,2200 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ ELSE_IF (", stdout); ffebld_dump (expr); ! fputs (")\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); --- 2209,2215 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ ELSE_IF (", dmpout); ffebld_dump (expr); ! fputs (")\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); *************** ffeste_R805 () *** 2224,2228 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ ELSE\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); --- 2239,2243 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ ELSE\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); *************** ffeste_R806 () *** 2242,2246 **** { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ END_IF_then\n", stdout); /* Also see ffeste_shriek_if_. */ #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); --- 2257,2261 ---- { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ END_IF_then\n", dmpout); /* Also see ffeste_shriek_if_. */ #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); *************** ffeste_R807 (ffebld expr) *** 2264,2270 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ IF_logical (", stdout); ffebld_dump (expr); ! fputs (")\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); --- 2279,2285 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ IF_logical (", dmpout); ffebld_dump (expr); ! fputs (")\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); *************** ffeste_R809 (ffestw block, ffebld expr) *** 2292,2298 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ SELECT_CASE (", stdout); ffebld_dump (expr); ! fputs (")\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffecom_push_calltemps (); --- 2307,2313 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ SELECT_CASE (", dmpout); ffebld_dump (expr); ! fputs (")\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffecom_push_calltemps (); *************** ffeste_R810 (ffestw block, unsigned long *** 2355,2359 **** { if (casenum == 0) /* Intentional CASE DEFAULT. */ ! fputs ("+ CASE_DEFAULT", stdout); } else --- 2370,2374 ---- { if (casenum == 0) /* Intentional CASE DEFAULT. */ ! fputs ("+ CASE_DEFAULT", dmpout); } else *************** ffeste_R810 (ffestw block, unsigned long *** 2361,2369 **** bool comma = FALSE; ! fputs ("+ CASE (", stdout); do { if (comma) ! fputc (',', stdout); else comma = TRUE; --- 2376,2384 ---- bool comma = FALSE; ! fputs ("+ CASE (", dmpout); do { if (comma) ! fputc (',', dmpout); else comma = TRUE; *************** ffeste_R810 (ffestw block, unsigned long *** 2372,2376 **** if (c->low != c->high) { ! fputc (':', stdout); if (c->high != NULL) ffebld_constant_dump (c->high); --- 2387,2391 ---- if (c->low != c->high) { ! fputc (':', dmpout); if (c->high != NULL) ffebld_constant_dump (c->high); *************** ffeste_R810 (ffestw block, unsigned long *** 2382,2389 **** } while ((c != (ffestwCase) &s->first_rel) && (casenum == c->casenum)); ! fputc (')', stdout); } ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { --- 2397,2404 ---- } while ((c != (ffestwCase) &s->first_rel) && (casenum == c->casenum)); ! fputc (')', dmpout); } ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { *************** ffeste_R811 (ffestw block) *** 2454,2458 **** { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ END_SELECT\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); --- 2469,2473 ---- { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ END_SELECT\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); *************** ffeste_R819A (ffestw block, ffelab label *** 2495,2509 **** if (label == NULL) ! fputs ("+ DO_iterative_nonlabeled (", stdout); else ! fprintf (stdout, "+ DO_iterative_labeled %lu (", ffelab_value (label)); ffebld_dump (var); ! fputc ('=', stdout); ffebld_dump (start); ! fputc (',', stdout); ffebld_dump (end); ! fputc (',', stdout); ffebld_dump (incr); ! fputs (")\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { --- 2510,2524 ---- if (label == NULL) ! fputs ("+ DO_iterative_nonlabeled (", dmpout); else ! fprintf (dmpout, "+ DO_iterative_labeled %lu (", ffelab_value (label)); ffebld_dump (var); ! fputc ('=', dmpout); ffebld_dump (start); ! fputc (',', dmpout); ffebld_dump (end); ! fputc (',', dmpout); ffebld_dump (incr); ! fputs (")\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { *************** ffeste_R819B (ffestw block, ffelab label *** 2540,2548 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE if (label == NULL) ! fputs ("+ DO_WHILE_nonlabeled (", stdout); else ! fprintf (stdout, "+ DO_WHILE_labeled %lu (", ffelab_value (label)); ffebld_dump (expr); ! fputs (")\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { --- 2555,2563 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE if (label == NULL) ! fputs ("+ DO_WHILE_nonlabeled (", dmpout); else ! fprintf (dmpout, "+ DO_WHILE_labeled %lu (", ffelab_value (label)); ffebld_dump (expr); ! fputs (")\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { *************** ffeste_R825 () *** 2580,2584 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ END_DO_sugar\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); --- 2595,2599 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ END_DO_sugar\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); *************** ffeste_R834 (ffestw block) *** 2601,2605 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "+ CYCLE block #%lu\n", ffestw_blocknum (block)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); --- 2616,2620 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "+ CYCLE block #%lu\n", ffestw_blocknum (block)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); *************** ffeste_R835 (ffestw block) *** 2623,2627 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "+ EXIT block #%lu\n", ffestw_blocknum (block)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); --- 2638,2642 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "+ EXIT block #%lu\n", ffestw_blocknum (block)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); *************** ffeste_R836 (ffelab label) *** 2646,2650 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "+ GOTO %lu\n", ffelab_value (label)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { --- 2661,2665 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "+ GOTO %lu\n", ffelab_value (label)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { *************** ffeste_R837 (ffelab *labels, int count, *** 2681,2694 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ CGOTO (", stdout); for (i = 0; i < count; ++i) { if (i != 0) ! fputc (',', stdout); ! fprintf (stdout, "%" ffelabValue_f "u", ffelab_value (labels[i])); } ! fputs ("),", stdout); ffebld_dump (expr); ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { --- 2696,2709 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ CGOTO (", dmpout); for (i = 0; i < count; ++i) { if (i != 0) ! fputc (',', dmpout); ! fprintf (dmpout, "%" ffelabValue_f "u", ffelab_value (labels[i])); } ! fputs ("),", dmpout); ffebld_dump (expr); ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { *************** ffeste_R838 (ffelab label, ffebld target *** 2747,2753 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "+ ASSIGN %lu TO ", ffelab_value (label)); ffebld_dump (target); ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { --- 2762,2768 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "+ ASSIGN %lu TO ", ffelab_value (label)); ffebld_dump (target); ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { *************** ffeste_R839 (ffebld target) *** 2799,2805 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ AGOTO ", stdout); ffebld_dump (target); ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { --- 2814,2820 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ AGOTO ", dmpout); ffebld_dump (target); ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { *************** ffeste_R840 (ffebld expr, ffelab neg, ff *** 2835,2841 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ IF_arithmetic (", stdout); ffebld_dump (expr); ! fprintf (stdout, ") %" ffelabValue_f "u,%" ffelabValue_f "u,%" ffelabValue_f "u\n", ffelab_value (neg), ffelab_value (zero), ffelab_value (pos)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC --- 2850,2856 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ IF_arithmetic (", dmpout); ffebld_dump (expr); ! fprintf (dmpout, ") %" ffelabValue_f "u,%" ffelabValue_f "u,%" ffelabValue_f "u\n", ffelab_value (neg), ffelab_value (zero), ffelab_value (pos)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC *************** ffeste_R841 () *** 2943,2947 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ CONTINUE\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); --- 2958,2962 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ CONTINUE\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_emit_line_note_ (); *************** ffeste_R842 (ffebld expr) *** 2964,2974 **** if (expr == NULL) { ! fputs ("+ STOP\n", stdout); } else { ! fputs ("+ STOP_coded ", stdout); ffebld_dump (expr); ! fputc ('\n', stdout); } #elif FFECOM_targetCURRENT == FFECOM_targetGCC --- 2979,2989 ---- if (expr == NULL) { ! fputs ("+ STOP\n", dmpout); } else { ! fputs ("+ STOP_coded ", dmpout); ffebld_dump (expr); ! fputc ('\n', dmpout); } #elif FFECOM_targetCURRENT == FFECOM_targetGCC *************** ffeste_R843 (ffebld expr) *** 3049,3059 **** if (expr == NULL) { ! fputs ("+ PAUSE\n", stdout); } else { ! fputs ("+ PAUSE_coded ", stdout); ffebld_dump (expr); ! fputc ('\n', stdout); } #elif FFECOM_targetCURRENT == FFECOM_targetGCC --- 3064,3074 ---- if (expr == NULL) { ! fputs ("+ PAUSE\n", dmpout); } else { ! fputs ("+ PAUSE_coded ", dmpout); ffebld_dump (expr); ! fputc ('\n', dmpout); } #elif FFECOM_targetCURRENT == FFECOM_targetGCC *************** ffeste_R904 (ffestpOpenStmt *info) *** 3162,3166 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ OPEN (", stdout); ffeste_subr_file_ ("UNIT", &info->open_spec[FFESTP_openixUNIT]); ffeste_subr_file_ ("ACCESS", &info->open_spec[FFESTP_openixACCESS]); --- 3177,3181 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ OPEN (", dmpout); ffeste_subr_file_ ("UNIT", &info->open_spec[FFESTP_openixUNIT]); ffeste_subr_file_ ("ACCESS", &info->open_spec[FFESTP_openixACCESS]); *************** ffeste_R904 (ffestpOpenStmt *info) *** 3192,3196 **** ffeste_subr_file_ ("STATUS", &info->open_spec[FFESTP_openixSTATUS]); ffeste_subr_file_ ("USEROPEN", &info->open_spec[FFESTP_openixUSEROPEN]); ! fputs (")\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { --- 3207,3211 ---- ffeste_subr_file_ ("STATUS", &info->open_spec[FFESTP_openixSTATUS]); ffeste_subr_file_ ("USEROPEN", &info->open_spec[FFESTP_openixUSEROPEN]); ! fputs (")\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { *************** ffeste_R907 (ffestpCloseStmt *info) *** 3299,3308 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ CLOSE (", stdout); ffeste_subr_file_ ("UNIT", &info->close_spec[FFESTP_closeixUNIT]); ffeste_subr_file_ ("ERR", &info->close_spec[FFESTP_closeixERR]); ffeste_subr_file_ ("IOSTAT", &info->close_spec[FFESTP_closeixIOSTAT]); ffeste_subr_file_ ("STATUS", &info->close_spec[FFESTP_closeixSTATUS]); ! fputs (")\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { --- 3314,3323 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ CLOSE (", dmpout); ffeste_subr_file_ ("UNIT", &info->close_spec[FFESTP_closeixUNIT]); ffeste_subr_file_ ("ERR", &info->close_spec[FFESTP_closeixERR]); ffeste_subr_file_ ("IOSTAT", &info->close_spec[FFESTP_closeixIOSTAT]); ffeste_subr_file_ ("STATUS", &info->close_spec[FFESTP_closeixSTATUS]); ! fputs (")\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { *************** ffeste_R909_start (ffestpReadStmt *info, *** 3413,3421 **** case FFESTV_formatNONE: if (rec) ! fputs ("+ READ_ufdac", stdout); else if (key) ! fputs ("+ READ_ufidx", stdout); else ! fputs ("+ READ_ufseq", stdout); break; --- 3428,3436 ---- case FFESTV_formatNONE: if (rec) ! fputs ("+ READ_ufdac", dmpout); else if (key) ! fputs ("+ READ_ufidx", dmpout); else ! fputs ("+ READ_ufseq", dmpout); break; *************** ffeste_R909_start (ffestpReadStmt *info, *** 3424,3445 **** case FFESTV_formatINTEXPR: if (rec) ! fputs ("+ READ_fmdac", stdout); else if (key) ! fputs ("+ READ_fmidx", stdout); else if (unit == FFESTV_unitCHAREXPR) ! fputs ("+ READ_fmint", stdout); else ! fputs ("+ READ_fmseq", stdout); break; case FFESTV_formatASTERISK: if (unit == FFESTV_unitCHAREXPR) ! fputs ("+ READ_lsint", stdout); else ! fputs ("+ READ_lsseq", stdout); break; case FFESTV_formatNAMELIST: ! fputs ("+ READ_nlseq", stdout); break; --- 3439,3460 ---- case FFESTV_formatINTEXPR: if (rec) ! fputs ("+ READ_fmdac", dmpout); else if (key) ! fputs ("+ READ_fmidx", dmpout); else if (unit == FFESTV_unitCHAREXPR) ! fputs ("+ READ_fmint", dmpout); else ! fputs ("+ READ_fmseq", dmpout); break; case FFESTV_formatASTERISK: if (unit == FFESTV_unitCHAREXPR) ! fputs ("+ READ_lsint", dmpout); else ! fputs ("+ READ_lsseq", dmpout); break; case FFESTV_formatNAMELIST: ! fputs ("+ READ_nlseq", dmpout); break; *************** ffeste_R909_start (ffestpReadStmt *info, *** 3450,3461 **** if (only_format) { ! fputc (' ', stdout); ffeste_subr_file_ ("FORMAT", &info->read_spec[FFESTP_readixFORMAT]); ! fputc (' ', stdout); return; } ! fputs (" (", stdout); ffeste_subr_file_ ("UNIT", &info->read_spec[FFESTP_readixUNIT]); ffeste_subr_file_ ("FORMAT", &info->read_spec[FFESTP_readixFORMAT]); --- 3465,3476 ---- if (only_format) { ! fputc (' ', dmpout); ffeste_subr_file_ ("FORMAT", &info->read_spec[FFESTP_readixFORMAT]); ! fputc (' ', dmpout); return; } ! fputs (" (", dmpout); ffeste_subr_file_ ("UNIT", &info->read_spec[FFESTP_readixUNIT]); ffeste_subr_file_ ("FORMAT", &info->read_spec[FFESTP_readixFORMAT]); *************** ffeste_R909_start (ffestpReadStmt *info, *** 3472,3476 **** ffeste_subr_file_ ("REC", &info->read_spec[FFESTP_readixREC]); ffeste_subr_file_ ("SIZE", &info->read_spec[FFESTP_readixSIZE]); ! fputs (") ", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC --- 3487,3491 ---- ffeste_subr_file_ ("REC", &info->read_spec[FFESTP_readixREC]); ffeste_subr_file_ ("SIZE", &info->read_spec[FFESTP_readixSIZE]); ! fputs (") ", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC *************** ffeste_R909_item (ffebld expr, ffelexTok *** 3666,3670 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (expr); ! fputc (',', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC if (expr == NULL) --- 3681,3685 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (expr); ! fputc (',', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC if (expr == NULL) *************** ffeste_R909_finish () *** 3699,3703 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC --- 3714,3718 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC *************** ffeste_R909_finish () *** 3707,3711 **** /* SPECIAL CASE: for e_rsle and e_rsli, don't generate the check AND don't even let ffeste_io_call_ bother writing to IOSTAT=, since ! dmg@research.att.com claims that e_[rw]sl[ei] always return 0. */ { --- 3722,3726 ---- /* SPECIAL CASE: for e_rsle and e_rsli, don't generate the check AND don't even let ffeste_io_call_ bother writing to IOSTAT=, since ! dmg@bell-labs.com claims that e_[rw]sl[ei] always return 0. */ { *************** ffeste_R910_start (ffestpWriteStmt *info *** 3795,3801 **** case FFESTV_formatNONE: if (rec) ! fputs ("+ WRITE_ufdac (", stdout); else ! fputs ("+ WRITE_ufseq_or_idx (", stdout); break; --- 3810,3816 ---- case FFESTV_formatNONE: if (rec) ! fputs ("+ WRITE_ufdac (", dmpout); else ! fputs ("+ WRITE_ufseq_or_idx (", dmpout); break; *************** ffeste_R910_start (ffestpWriteStmt *info *** 3804,3823 **** case FFESTV_formatINTEXPR: if (rec) ! fputs ("+ WRITE_fmdac (", stdout); else if (unit == FFESTV_unitCHAREXPR) ! fputs ("+ WRITE_fmint (", stdout); else ! fputs ("+ WRITE_fmseq_or_idx (", stdout); break; case FFESTV_formatASTERISK: if (unit == FFESTV_unitCHAREXPR) ! fputs ("+ WRITE_lsint (", stdout); else ! fputs ("+ WRITE_lsseq (", stdout); break; case FFESTV_formatNAMELIST: ! fputs ("+ WRITE_nlseq (", stdout); break; --- 3819,3838 ---- case FFESTV_formatINTEXPR: if (rec) ! fputs ("+ WRITE_fmdac (", dmpout); else if (unit == FFESTV_unitCHAREXPR) ! fputs ("+ WRITE_fmint (", dmpout); else ! fputs ("+ WRITE_fmseq_or_idx (", dmpout); break; case FFESTV_formatASTERISK: if (unit == FFESTV_unitCHAREXPR) ! fputs ("+ WRITE_lsint (", dmpout); else ! fputs ("+ WRITE_lsseq (", dmpout); break; case FFESTV_formatNAMELIST: ! fputs ("+ WRITE_nlseq (", dmpout); break; *************** ffeste_R910_start (ffestpWriteStmt *info *** 3833,3837 **** ffeste_subr_file_ ("IOSTAT", &info->write_spec[FFESTP_writeixIOSTAT]); ffeste_subr_file_ ("REC", &info->write_spec[FFESTP_writeixREC]); ! fputs (") ", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC --- 3848,3852 ---- ffeste_subr_file_ ("IOSTAT", &info->write_spec[FFESTP_writeixIOSTAT]); ffeste_subr_file_ ("REC", &info->write_spec[FFESTP_writeixREC]); ! fputs (") ", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC *************** ffeste_R910_item (ffebld expr, ffelexTok *** 3991,3995 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (expr); ! fputc (',', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC if (expr == NULL) --- 4006,4010 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (expr); ! fputc (',', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC if (expr == NULL) *************** ffeste_R910_finish () *** 4020,4024 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC --- 4035,4039 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC *************** ffeste_R910_finish () *** 4028,4032 **** /* SPECIAL CASE: for e_rsle and e_rsli, don't generate the check AND don't even let ffeste_io_call_ bother writing to IOSTAT=, since ! dmg@research.att.com claims that e_[rw]sl[ei] always return 0. */ { --- 4043,4047 ---- /* SPECIAL CASE: for e_rsle and e_rsli, don't generate the check AND don't even let ffeste_io_call_ bother writing to IOSTAT=, since ! dmg@bell-labs.com claims that e_[rw]sl[ei] always return 0. */ { *************** ffeste_R911_start (ffestpPrintStmt *info *** 4086,4098 **** case FFESTV_formatCHAREXPR: case FFESTV_formatINTEXPR: ! fputs ("+ PRINT_fm ", stdout); break; case FFESTV_formatASTERISK: ! fputs ("+ PRINT_ls ", stdout); break; case FFESTV_formatNAMELIST: ! fputs ("+ PRINT_nl ", stdout); break; --- 4101,4113 ---- case FFESTV_formatCHAREXPR: case FFESTV_formatINTEXPR: ! fputs ("+ PRINT_fm ", dmpout); break; case FFESTV_formatASTERISK: ! fputs ("+ PRINT_ls ", dmpout); break; case FFESTV_formatNAMELIST: ! fputs ("+ PRINT_nl ", dmpout); break; *************** ffeste_R911_start (ffestpPrintStmt *info *** 4101,4105 **** } ffeste_subr_file_ ("FORMAT", &info->print_spec[FFESTP_printixFORMAT]); ! fputc (' ', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC --- 4116,4120 ---- } ffeste_subr_file_ ("FORMAT", &info->print_spec[FFESTP_printixFORMAT]); ! fputc (' ', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC *************** ffeste_R911_item (ffebld expr, ffelexTok *** 4188,4192 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (expr); ! fputc (',', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC if (expr == NULL) --- 4203,4207 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (expr); ! fputc (',', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC if (expr == NULL) *************** ffeste_R911_finish () *** 4216,4220 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { --- 4231,4235 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { *************** ffeste_R919 (ffestpBeruStmt *info) *** 4246,4254 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ BACKSPACE (", stdout); ffeste_subr_file_ ("UNIT", &info->beru_spec[FFESTP_beruixUNIT]); ffeste_subr_file_ ("ERR", &info->beru_spec[FFESTP_beruixERR]); ffeste_subr_file_ ("IOSTAT", &info->beru_spec[FFESTP_beruixIOSTAT]); ! fputs (")\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_subr_beru_ (info, FFECOM_gfrtFBACK); --- 4261,4269 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ BACKSPACE (", dmpout); ffeste_subr_file_ ("UNIT", &info->beru_spec[FFESTP_beruixUNIT]); ffeste_subr_file_ ("ERR", &info->beru_spec[FFESTP_beruixERR]); ffeste_subr_file_ ("IOSTAT", &info->beru_spec[FFESTP_beruixIOSTAT]); ! fputs (")\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_subr_beru_ (info, FFECOM_gfrtFBACK); *************** ffeste_R920 (ffestpBeruStmt *info) *** 4270,4278 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ ENDFILE (", stdout); ffeste_subr_file_ ("UNIT", &info->beru_spec[FFESTP_beruixUNIT]); ffeste_subr_file_ ("ERR", &info->beru_spec[FFESTP_beruixERR]); ffeste_subr_file_ ("IOSTAT", &info->beru_spec[FFESTP_beruixIOSTAT]); ! fputs (")\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_subr_beru_ (info, FFECOM_gfrtFEND); --- 4285,4293 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ ENDFILE (", dmpout); ffeste_subr_file_ ("UNIT", &info->beru_spec[FFESTP_beruixUNIT]); ffeste_subr_file_ ("ERR", &info->beru_spec[FFESTP_beruixERR]); ffeste_subr_file_ ("IOSTAT", &info->beru_spec[FFESTP_beruixIOSTAT]); ! fputs (")\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_subr_beru_ (info, FFECOM_gfrtFEND); *************** ffeste_R921 (ffestpBeruStmt *info) *** 4294,4302 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ REWIND (", stdout); ffeste_subr_file_ ("UNIT", &info->beru_spec[FFESTP_beruixUNIT]); ffeste_subr_file_ ("ERR", &info->beru_spec[FFESTP_beruixERR]); ffeste_subr_file_ ("IOSTAT", &info->beru_spec[FFESTP_beruixIOSTAT]); ! fputs (")\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_subr_beru_ (info, FFECOM_gfrtFREW); --- 4309,4317 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ REWIND (", dmpout); ffeste_subr_file_ ("UNIT", &info->beru_spec[FFESTP_beruixUNIT]); ffeste_subr_file_ ("ERR", &info->beru_spec[FFESTP_beruixERR]); ffeste_subr_file_ ("IOSTAT", &info->beru_spec[FFESTP_beruixIOSTAT]); ! fputs (")\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC ffeste_subr_beru_ (info, FFECOM_gfrtFREW); *************** ffeste_R923A (ffestpInquireStmt *info, b *** 4320,4329 **** if (by_file) { ! fputs ("+ INQUIRE_file (", stdout); ffeste_subr_file_ ("FILE", &info->inquire_spec[FFESTP_inquireixFILE]); } else { ! fputs ("+ INQUIRE_unit (", stdout); ffeste_subr_file_ ("UNIT", &info->inquire_spec[FFESTP_inquireixUNIT]); } --- 4335,4344 ---- if (by_file) { ! fputs ("+ INQUIRE_file (", dmpout); ffeste_subr_file_ ("FILE", &info->inquire_spec[FFESTP_inquireixFILE]); } else { ! fputs ("+ INQUIRE_unit (", dmpout); ffeste_subr_file_ ("UNIT", &info->inquire_spec[FFESTP_inquireixUNIT]); } *************** ffeste_R923A (ffestpInquireStmt *info, b *** 4356,4360 **** ffeste_subr_file_ ("UNFORMATTED", &info->inquire_spec[FFESTP_inquireixUNFORMATTED]); ffeste_subr_file_ ("WRITE", &info->inquire_spec[FFESTP_inquireixWRITE]); ! fputs (")\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { --- 4371,4375 ---- ffeste_subr_file_ ("UNFORMATTED", &info->inquire_spec[FFESTP_inquireixUNFORMATTED]); ffeste_subr_file_ ("WRITE", &info->inquire_spec[FFESTP_inquireixWRITE]); ! fputs (")\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { *************** ffeste_R923B_start (ffestpInquireStmt *i *** 4473,4479 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ INQUIRE (", stdout); ffeste_subr_file_ ("IOLENGTH", &info->inquire_spec[FFESTP_inquireixIOLENGTH]); ! fputs (") ", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC assert ("INQUIRE(IOLENGTH=) not implemented yet! ~~~" == NULL); --- 4488,4494 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ INQUIRE (", dmpout); ffeste_subr_file_ ("IOLENGTH", &info->inquire_spec[FFESTP_inquireixIOLENGTH]); ! fputs (") ", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC assert ("INQUIRE(IOLENGTH=) not implemented yet! ~~~" == NULL); *************** ffeste_R923B_item (ffebld expr UNUSED) *** 4498,4502 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (expr); ! fputc (',', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC clear_momentary (); --- 4513,4517 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (expr); ! fputc (',', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC clear_momentary (); *************** ffeste_R923B_finish () *** 4518,4522 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC clear_momentary (); --- 4533,4537 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC clear_momentary (); *************** ffeste_R1001 (ffests s) *** 4536,4540 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "$ FORMAT %.*s\n", (int) ffests_length (s), ffests_text (s)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { --- 4551,4555 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "$ FORMAT %.*s\n", (int) ffests_length (s), ffests_text (s)); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { *************** ffeste_R1103 () *** 4600,4604 **** { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ END_PROGRAM\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 4615,4619 ---- { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ END_PROGRAM\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_R1112 () *** 4615,4619 **** { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* END_BLOCK_DATA\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 4630,4634 ---- { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("* END_BLOCK_DATA\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_R1212 (ffebld expr) *** 4634,4640 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ CALL ", stdout); ffebld_dump (expr); ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { --- 4649,4655 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ CALL ", dmpout); ffebld_dump (expr); ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { *************** ffeste_R1221 () *** 4743,4747 **** { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ END_FUNCTION\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 4758,4762 ---- { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ END_FUNCTION\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_R1225 () *** 4758,4762 **** { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "+ END_SUBROUTINE\n"); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 4773,4777 ---- { #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "+ END_SUBROUTINE\n"); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_R1226 (ffesymbol entry) *** 4778,4787 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (stdout, "+ ENTRY %s", ffesymbol_text (entry)); if (ffesymbol_dummyargs (entry) != NULL) { ffebld argh; ! fputc ('(', stdout); for (argh = ffesymbol_dummyargs (entry); argh != NULL; --- 4793,4802 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fprintf (dmpout, "+ ENTRY %s", ffesymbol_text (entry)); if (ffesymbol_dummyargs (entry) != NULL) { ffebld argh; ! fputc ('(', dmpout); for (argh = ffesymbol_dummyargs (entry); argh != NULL; *************** ffeste_R1226 (ffesymbol entry) *** 4793,4815 **** case FFEBLD_opSYMTER: fputs (ffesymbol_text (ffebld_symter (ffebld_head (argh))), ! stdout); break; case FFEBLD_opSTAR: ! fputc ('*', stdout); break; default: ! fputc ('?', stdout); ffebld_dump (ffebld_head (argh)); ! fputc ('?', stdout); break; } if (ffebld_trail (argh) != NULL) ! fputc (',', stdout); } ! fputc (')', stdout); } ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { --- 4808,4830 ---- case FFEBLD_opSYMTER: fputs (ffesymbol_text (ffebld_symter (ffebld_head (argh))), ! dmpout); break; case FFEBLD_opSTAR: ! fputc ('*', dmpout); break; default: ! fputc ('?', dmpout); ffebld_dump (ffebld_head (argh)); ! fputc ('?', dmpout); break; } if (ffebld_trail (argh) != NULL) ! fputc (',', dmpout); } ! fputc (')', dmpout); } ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC { *************** ffeste_R1227 (ffestw block UNUSED, ffebl *** 4844,4854 **** if (expr == NULL) { ! fputs ("+ RETURN\n", stdout); } else { ! fputs ("+ RETURN_alternate ", stdout); ffebld_dump (expr); ! fputc ('\n', stdout); } #elif FFECOM_targetCURRENT == FFECOM_targetGCC --- 4859,4869 ---- if (expr == NULL) { ! fputs ("+ RETURN\n", dmpout); } else { ! fputs ("+ RETURN_alternate ", dmpout); ffebld_dump (expr); ! fputc ('\n', dmpout); } #elif FFECOM_targetCURRENT == FFECOM_targetGCC *************** ffeste_V018_start (ffestpRewriteStmt *in *** 4898,4902 **** { case FFESTV_formatNONE: ! fputs ("+ REWRITE_uf (", stdout); break; --- 4913,4917 ---- { case FFESTV_formatNONE: ! fputs ("+ REWRITE_uf (", dmpout); break; *************** ffeste_V018_start (ffestpRewriteStmt *in *** 4904,4908 **** case FFESTV_formatCHAREXPR: case FFESTV_formatINTEXPR: ! fputs ("+ REWRITE_fm (", stdout); break; --- 4919,4923 ---- case FFESTV_formatCHAREXPR: case FFESTV_formatINTEXPR: ! fputs ("+ REWRITE_fm (", dmpout); break; *************** ffeste_V018_start (ffestpRewriteStmt *in *** 4914,4918 **** ffeste_subr_file_ ("ERR", &info->rewrite_spec[FFESTP_rewriteixERR]); ffeste_subr_file_ ("IOSTAT", &info->rewrite_spec[FFESTP_rewriteixIOSTAT]); ! fputs (") ", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 4929,4933 ---- ffeste_subr_file_ ("ERR", &info->rewrite_spec[FFESTP_rewriteixERR]); ffeste_subr_file_ ("IOSTAT", &info->rewrite_spec[FFESTP_rewriteixIOSTAT]); ! fputs (") ", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_V018_item (ffebld expr) *** 4934,4938 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (expr); ! fputc (',', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 4949,4953 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (expr); ! fputc (',', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_V018_finish () *** 4953,4957 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 4968,4972 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_V019_start (ffestpAcceptStmt *inf *** 4978,4990 **** case FFESTV_formatCHAREXPR: case FFESTV_formatINTEXPR: ! fputs ("+ ACCEPT_fm ", stdout); break; case FFESTV_formatASTERISK: ! fputs ("+ ACCEPT_ls ", stdout); break; case FFESTV_formatNAMELIST: ! fputs ("+ ACCEPT_nl ", stdout); break; --- 4993,5005 ---- case FFESTV_formatCHAREXPR: case FFESTV_formatINTEXPR: ! fputs ("+ ACCEPT_fm ", dmpout); break; case FFESTV_formatASTERISK: ! fputs ("+ ACCEPT_ls ", dmpout); break; case FFESTV_formatNAMELIST: ! fputs ("+ ACCEPT_nl ", dmpout); break; *************** ffeste_V019_start (ffestpAcceptStmt *inf *** 4993,4997 **** } ffeste_subr_file_ ("FORMAT", &info->accept_spec[FFESTP_acceptixFORMAT]); ! fputc (' ', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5008,5012 ---- } ffeste_subr_file_ ("FORMAT", &info->accept_spec[FFESTP_acceptixFORMAT]); ! fputc (' ', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_V019_item (ffebld expr) *** 5013,5017 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (expr); ! fputc (',', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5028,5032 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (expr); ! fputc (',', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_V019_finish () *** 5032,5036 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5047,5051 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_V020_start (ffestpTypeStmt *info *** 5059,5071 **** case FFESTV_formatCHAREXPR: case FFESTV_formatINTEXPR: ! fputs ("+ TYPE_fm ", stdout); break; case FFESTV_formatASTERISK: ! fputs ("+ TYPE_ls ", stdout); break; case FFESTV_formatNAMELIST: ! fputs ("* TYPE_nl ", stdout); break; --- 5074,5086 ---- case FFESTV_formatCHAREXPR: case FFESTV_formatINTEXPR: ! fputs ("+ TYPE_fm ", dmpout); break; case FFESTV_formatASTERISK: ! fputs ("+ TYPE_ls ", dmpout); break; case FFESTV_formatNAMELIST: ! fputs ("* TYPE_nl ", dmpout); break; *************** ffeste_V020_start (ffestpTypeStmt *info *** 5074,5078 **** } ffeste_subr_file_ ("FORMAT", &info->type_spec[FFESTP_typeixFORMAT]); ! fputc (' ', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5089,5093 ---- } ffeste_subr_file_ ("FORMAT", &info->type_spec[FFESTP_typeixFORMAT]); ! fputc (' ', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_V020_item (ffebld expr UNUSED) *** 5094,5098 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (expr); ! fputc (',', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5109,5113 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (expr); ! fputc (',', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_V020_finish () *** 5113,5117 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5128,5132 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_V021 (ffestpDeleteStmt *info) *** 5133,5142 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ DELETE (", stdout); ffeste_subr_file_ ("UNIT", &info->delete_spec[FFESTP_deleteixUNIT]); ffeste_subr_file_ ("REC", &info->delete_spec[FFESTP_deleteixREC]); ffeste_subr_file_ ("ERR", &info->delete_spec[FFESTP_deleteixERR]); ffeste_subr_file_ ("IOSTAT", &info->delete_spec[FFESTP_deleteixIOSTAT]); ! fputs (")\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5148,5157 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ DELETE (", dmpout); ffeste_subr_file_ ("UNIT", &info->delete_spec[FFESTP_deleteixUNIT]); ffeste_subr_file_ ("REC", &info->delete_spec[FFESTP_deleteixREC]); ffeste_subr_file_ ("ERR", &info->delete_spec[FFESTP_deleteixERR]); ffeste_subr_file_ ("IOSTAT", &info->delete_spec[FFESTP_deleteixIOSTAT]); ! fputs (")\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_V022 (ffestpBeruStmt *info) *** 5157,5165 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ UNLOCK (", stdout); ffeste_subr_file_ ("UNIT", &info->beru_spec[FFESTP_beruixUNIT]); ffeste_subr_file_ ("ERR", &info->beru_spec[FFESTP_beruixERR]); ffeste_subr_file_ ("IOSTAT", &info->beru_spec[FFESTP_beruixIOSTAT]); ! fputs (")\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5172,5180 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ UNLOCK (", dmpout); ffeste_subr_file_ ("UNIT", &info->beru_spec[FFESTP_beruixUNIT]); ffeste_subr_file_ ("ERR", &info->beru_spec[FFESTP_beruixERR]); ffeste_subr_file_ ("IOSTAT", &info->beru_spec[FFESTP_beruixIOSTAT]); ! fputs (")\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_V023_start (ffestpVxtcodeStmt *in *** 5181,5185 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ ENCODE (", stdout); ffeste_subr_file_ ("C", &info->vxtcode_spec[FFESTP_vxtcodeixC]); ffeste_subr_file_ ("F", &info->vxtcode_spec[FFESTP_vxtcodeixF]); --- 5196,5200 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ ENCODE (", dmpout); ffeste_subr_file_ ("C", &info->vxtcode_spec[FFESTP_vxtcodeixC]); ffeste_subr_file_ ("F", &info->vxtcode_spec[FFESTP_vxtcodeixF]); *************** ffeste_V023_start (ffestpVxtcodeStmt *in *** 5187,5191 **** ffeste_subr_file_ ("ERR", &info->vxtcode_spec[FFESTP_vxtcodeixERR]); ffeste_subr_file_ ("IOSTAT", &info->vxtcode_spec[FFESTP_vxtcodeixIOSTAT]); ! fputs (") ", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5202,5206 ---- ffeste_subr_file_ ("ERR", &info->vxtcode_spec[FFESTP_vxtcodeixERR]); ffeste_subr_file_ ("IOSTAT", &info->vxtcode_spec[FFESTP_vxtcodeixIOSTAT]); ! fputs (") ", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_V023_item (ffebld expr) *** 5207,5211 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (expr); ! fputc (',', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5222,5226 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (expr); ! fputc (',', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_V023_finish () *** 5226,5230 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5241,5245 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_V024_start (ffestpVxtcodeStmt *in *** 5246,5250 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ DECODE (", stdout); ffeste_subr_file_ ("C", &info->vxtcode_spec[FFESTP_vxtcodeixC]); ffeste_subr_file_ ("F", &info->vxtcode_spec[FFESTP_vxtcodeixF]); --- 5261,5265 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ DECODE (", dmpout); ffeste_subr_file_ ("C", &info->vxtcode_spec[FFESTP_vxtcodeixC]); ffeste_subr_file_ ("F", &info->vxtcode_spec[FFESTP_vxtcodeixF]); *************** ffeste_V024_start (ffestpVxtcodeStmt *in *** 5252,5256 **** ffeste_subr_file_ ("ERR", &info->vxtcode_spec[FFESTP_vxtcodeixERR]); ffeste_subr_file_ ("IOSTAT", &info->vxtcode_spec[FFESTP_vxtcodeixIOSTAT]); ! fputs (") ", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5267,5271 ---- ffeste_subr_file_ ("ERR", &info->vxtcode_spec[FFESTP_vxtcodeixERR]); ffeste_subr_file_ ("IOSTAT", &info->vxtcode_spec[FFESTP_vxtcodeixIOSTAT]); ! fputs (") ", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_V024_item (ffebld expr) *** 5272,5276 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (expr); ! fputc (',', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5287,5291 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (expr); ! fputc (',', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_V024_finish () *** 5291,5295 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5306,5310 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_V025_start () *** 5311,5315 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ DEFINE_FILE ", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5326,5330 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ DEFINE_FILE ", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_V025_item (ffebld u, ffebld m, ff *** 5331,5341 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (u); ! fputc ('(', stdout); ffebld_dump (m); ! fputc (',', stdout); ffebld_dump (n); ! fputs (",U,", stdout); ffebld_dump (asv); ! fputs ("),", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5346,5356 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ffebld_dump (u); ! fputc ('(', dmpout); ffebld_dump (m); ! fputc (',', dmpout); ffebld_dump (n); ! fputs (",U,", dmpout); ffebld_dump (asv); ! fputs ("),", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_V025_finish () *** 5356,5360 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5371,5375 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputc ('\n', dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else *************** ffeste_V026 (ffestpFindStmt *info) *** 5375,5384 **** #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ FIND (", stdout); ffeste_subr_file_ ("UNIT", &info->find_spec[FFESTP_findixUNIT]); ffeste_subr_file_ ("REC", &info->find_spec[FFESTP_findixREC]); ffeste_subr_file_ ("ERR", &info->find_spec[FFESTP_findixERR]); ffeste_subr_file_ ("IOSTAT", &info->find_spec[FFESTP_findixIOSTAT]); ! fputs (")\n", stdout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else --- 5390,5399 ---- #if FFECOM_targetCURRENT == FFECOM_targetFFE ! fputs ("+ FIND (", dmpout); ffeste_subr_file_ ("UNIT", &info->find_spec[FFESTP_findixUNIT]); ffeste_subr_file_ ("REC", &info->find_spec[FFESTP_findixREC]); ffeste_subr_file_ ("ERR", &info->find_spec[FFESTP_findixERR]); ffeste_subr_file_ ("IOSTAT", &info->find_spec[FFESTP_findixIOSTAT]); ! fputs (")\n", dmpout); #elif FFECOM_targetCURRENT == FFECOM_targetGCC #else diff -rcp2N g77-0.5.17/f/storag.c g77-0.5.18/f/storag.c *** g77-0.5.17/f/storag.c Wed Aug 30 15:53:33 1995 --- g77-0.5.18/f/storag.c Mon Mar 18 18:37:51 1996 *************** ffestorag_dump (ffestorag s) *** 102,106 **** if (s == NULL) { ! fprintf (stdout, "(no storage object)"); return; } --- 102,106 ---- if (s == NULL) { ! fprintf (dmpout, "(no storage object)"); return; } *************** ffestorag_dump (ffestorag s) *** 109,136 **** { case FFESTORAG_typeCBLOCK: ! fprintf (stdout, "CBLOCK "); break; case FFESTORAG_typeCOMMON: ! fprintf (stdout, "COMMON "); break; case FFESTORAG_typeLOCAL: ! fprintf (stdout, "LOCAL "); break; case FFESTORAG_typeEQUIV: ! fprintf (stdout, "EQUIV "); break; default: ! fprintf (stdout, "?%d? ", s->type); break; } if (s->symbol != NULL) ! fprintf (stdout, "\"%s\" ", ffesymbol_text (s->symbol)); ! fprintf (stdout, "at %" ffetargetOffset_f "u size %" ffetargetOffset_f "u, align loc%%%" ffetargetAlign_f "u=%" ffetargetAlign_f "u, bt=%s, kt=%s", --- 109,136 ---- { case FFESTORAG_typeCBLOCK: ! fprintf (dmpout, "CBLOCK "); break; case FFESTORAG_typeCOMMON: ! fprintf (dmpout, "COMMON "); break; case FFESTORAG_typeLOCAL: ! fprintf (dmpout, "LOCAL "); break; case FFESTORAG_typeEQUIV: ! fprintf (dmpout, "EQUIV "); break; default: ! fprintf (dmpout, "?%d? ", s->type); break; } if (s->symbol != NULL) ! fprintf (dmpout, "\"%s\" ", ffesymbol_text (s->symbol)); ! fprintf (dmpout, "at %" ffetargetOffset_f "u size %" ffetargetOffset_f "u, align loc%%%" ffetargetAlign_f "u=%" ffetargetAlign_f "u, bt=%s, kt=%s", *************** ffestorag_dump (ffestorag s) *** 144,148 **** ffestorag sq; ! fprintf (stdout, " with equivs"); for (sq = s->equivs_.first; sq != (ffestorag) &s->equivs_.first; --- 144,148 ---- ffestorag sq; ! fprintf (dmpout, " with equivs"); for (sq = s->equivs_.first; sq != (ffestorag) &s->equivs_.first; *************** ffestorag_dump (ffestorag s) *** 150,157 **** { if (ffestorag_previous_ (sq) == (ffestorag) &s->equivs_.first) ! fputc (' ', stdout); else ! fputc (',', stdout); ! fprintf (stdout, "%s", ffesymbol_text (ffestorag_symbol (sq))); } } --- 150,157 ---- { if (ffestorag_previous_ (sq) == (ffestorag) &s->equivs_.first) ! fputc (' ', dmpout); else ! fputc (',', dmpout); ! fprintf (dmpout, "%s", ffesymbol_text (ffestorag_symbol (sq))); } } *************** ffestorag_exec_layout (ffesymbol s) *** 235,240 **** num_elements = 1; else ! num_elements = ffebld_constant_integerdefault (ffebld_conter ! (ffesymbol_arraysize (s))); ffetarget_layout (ffesymbol_text (s), &alignment, &modulo, &size, ffesymbol_basictype (s), --- 235,246 ---- num_elements = 1; else ! { ! if (ffebld_op (ffesymbol_arraysize (s)) ! != FFEBLD_opCONTER) ! return; /* An adjustable local array, just like a dummy. */ ! num_elements ! = ffebld_constant_integerdefault (ffebld_conter ! (ffesymbol_arraysize (s))); ! } ffetarget_layout (ffesymbol_text (s), &alignment, &modulo, &size, ffesymbol_basictype (s), *************** ffestorag_exec_layout (ffesymbol s) *** 254,260 **** st->kind_type = ffesymbol_kindtype (s); st->type_symbol = s; ! st->save = ffesymbol_save (s); ffesymbol_set_storage (s, st); ! if (ffesymbol_init (s) != NULL) ffecom_notify_init_symbol (s); /* Init completed before, but we didn't have a storage --- 260,267 ---- st->kind_type = ffesymbol_kindtype (s); st->type_symbol = s; ! st->is_save = ffesymbol_is_save (s); ! st->is_init = ffesymbol_is_init (s); ffesymbol_set_storage (s, st); ! if (ffesymbol_is_init (s)) ffecom_notify_init_symbol (s); /* Init completed before, but we didn't have a storage *************** ffestorag_exec_layout (ffesymbol s) *** 311,318 **** st->type_symbol = NULL; } ! st->save = ffesymbol_save (s); if (!ffe_is_mainprog ()) ffeglobal_save_common (s, ! st->save || ffe_is_saveall (), ffesymbol_where_line (s), ffesymbol_where_column (s)); --- 318,326 ---- st->type_symbol = NULL; } ! st->is_save = ffesymbol_is_save (s); ! st->is_init = ffesymbol_is_init (s); if (!ffe_is_mainprog ()) ffeglobal_save_common (s, ! st->is_save || ffe_is_saveall (), ffesymbol_where_line (s), ffesymbol_where_column (s)); *************** ffestorag_exec_layout (ffesymbol s) *** 377,387 **** stv->kind_type = ffesymbol_kindtype (var); stv->type_symbol = var; ! stv->save = st->save; ffesymbol_set_storage (var, stv); ffesymbol_signal_unreported (var); ffestorag_update (st, var, ffesymbol_basictype (var), ffesymbol_kindtype (var)); ! if ((ffesymbol_init (var) != NULL) ! || (ffesymbol_accretion (var) != NULL)) init = TRUE; /* Must move inits over to COMMON's ffestorag. */ --- 385,395 ---- stv->kind_type = ffesymbol_kindtype (var); stv->type_symbol = var; ! stv->is_save = st->is_save; ! stv->is_init = st->is_init; ffesymbol_set_storage (var, stv); ffesymbol_signal_unreported (var); ffestorag_update (st, var, ffesymbol_basictype (var), ffesymbol_kindtype (var)); ! if (ffesymbol_is_init (var)) init = TRUE; /* Must move inits over to COMMON's ffestorag. */ *************** ffestorag_report () *** 440,446 **** { ffestorag_reported_ = TRUE; ! fputs ("Storage area: ", stdout); ffestorag_dump (s); ! fputc ('\n', stdout); } } --- 448,454 ---- { ffestorag_reported_ = TRUE; ! fputs ("Storage area: ", dmpout); ffestorag_dump (s); ! fputc ('\n', dmpout); } } *************** ffestorag_update (ffestorag s, ffesymbol *** 503,506 **** --- 511,542 ---- } + /* Update INIT flag for storage object. + + If the INIT flag for the object is already TRUE, return. Else, + set it to TRUE and call ffe*_update_init for all contained objects. */ + + void + ffestorag_update_init (ffestorag s) + { + ffestorag sq; + + if (s->is_init) + return; + + s->is_init = TRUE; + + if ((s->symbol != NULL) + && !ffesymbol_is_init (s->symbol)) + ffesymbol_update_init (s->symbol); + + for (sq = s->equivs_.first; + sq != (ffestorag) &s->equivs_.first; + sq = ffestorag_next_ (sq)) + { + if (!sq->is_init) + ffestorag_update_init (sq); + } + } + /* Update SAVE flag for storage object. *************** ffestorag_update_save (ffestorag s) *** 513,522 **** ffestorag sq; ! if (s->save) return; ! s->save = TRUE; ! if (s->symbol != NULL) ffesymbol_update_save (s->symbol); --- 549,559 ---- ffestorag sq; ! if (s->is_save) return; ! s->is_save = TRUE; ! if ((s->symbol != NULL) ! && !ffesymbol_is_save (s->symbol)) ffesymbol_update_save (s->symbol); *************** ffestorag_update_save (ffestorag s) *** 524,527 **** sq != (ffestorag) &s->equivs_.first; sq = ffestorag_next_ (sq)) ! ffestorag_update_save (sq); } --- 561,567 ---- sq != (ffestorag) &s->equivs_.first; sq = ffestorag_next_ (sq)) ! { ! if (!sq->is_save) ! ffestorag_update_save (sq); ! } } diff -rcp2N g77-0.5.17/f/storag.h g77-0.5.18/f/storag.h *** g77-0.5.17/f/storag.h Wed Aug 30 15:53:33 1995 --- g77-0.5.18/f/storag.h Mon Mar 18 18:23:57 1996 *************** struct _ffestorag_ *** 90,94 **** ffeinfoKindtype kind_type; /* NONE= >1 kind type or NONE/ANY basic_type. */ ffesymbol type_symbol; /* First symbol for basic_type/kind_type. */ ! bool save; /* SAVE flag set for this storage area. */ }; --- 90,95 ---- ffeinfoKindtype kind_type; /* NONE= >1 kind type or NONE/ANY basic_type. */ ffesymbol type_symbol; /* First symbol for basic_type/kind_type. */ ! bool is_save; /* SAVE flag set for this storage area. */ ! bool is_init; /* INIT flag set for this storage area. */ }; *************** void ffestorag_report (void); *** 109,112 **** --- 110,114 ---- void ffestorag_update (ffestorag s, ffesymbol sym, ffeinfoBasictype bt, ffeinfoKindtype kt); + void ffestorag_update_init (ffestorag s); void ffestorag_update_save (ffestorag s); *************** void ffestorag_update_save (ffestorag s) *** 123,126 **** --- 125,130 ---- #define ffestorag_init_3() #define ffestorag_init_4() + #define ffestorag_is_init(s) ((s)->is_init) + #define ffestorag_is_save(s) ((s)->is_save) #define ffestorag_kindtype(s) ((s)->kind_type) #define ffestorag_list_equivs(s) (&(s)->equivs_) *************** void ffestorag_update_save (ffestorag s) *** 131,135 **** #define ffestorag_ptr_to_alignment(s) (&(s)->alignment) #define ffestorag_ptr_to_modulo(s) (&(s)->modulo) - #define ffestorag_save(s) ((s)->save) #define ffestorag_set_accretes(s,a) ((s)->accretes = (a)) #define ffestorag_set_accretion(s,a) ((s)->accretion = (a)) --- 135,138 ---- *************** void ffestorag_update_save (ffestorag s) *** 138,146 **** #define ffestorag_set_hook(s,h) ((s)->hook = (h)) #define ffestorag_set_init(s,i) ((s)->init = (i)) #define ffestorag_set_kindtype(s,k) ((s)->kind_type = (k)) #define ffestorag_set_modulo(s,m) ((s)->modulo = (m)) #define ffestorag_set_offset(s,o) ((s)->offset = (o)) #define ffestorag_set_parent(s,p) ((s)->parent = (p)) - #define ffestorag_set_save(s,sa) ((s)->save = (sa)) #define ffestorag_set_size(s,si) ((s)->size = (si)) #define ffestorag_set_symbol(s,sy) ((s)->symbol = (sy)) --- 141,150 ---- #define ffestorag_set_hook(s,h) ((s)->hook = (h)) #define ffestorag_set_init(s,i) ((s)->init = (i)) + #define ffestorag_set_is_init(s,in) ((s)->is_init = (in)) + #define ffestorag_set_is_save(s,sa) ((s)->is_save = (sa)) #define ffestorag_set_kindtype(s,k) ((s)->kind_type = (k)) #define ffestorag_set_modulo(s,m) ((s)->modulo = (m)) #define ffestorag_set_offset(s,o) ((s)->offset = (o)) #define ffestorag_set_parent(s,p) ((s)->parent = (p)) #define ffestorag_set_size(s,si) ((s)->size = (si)) #define ffestorag_set_symbol(s,sy) ((s)->symbol = (sy)) diff -rcp2N g77-0.5.17/f/stp.h g77-0.5.18/f/stp.h *** g77-0.5.17/f/stp.h Wed Aug 30 15:53:33 1995 --- g77-0.5.18/f/stp.h Sat Mar 9 13:53:41 1996 *************** enum _ffestp_type_ *** 337,340 **** --- 337,342 ---- FFESTP_typeDBLPRCSN, FFESTP_typeDBLCMPLX, + FFESTP_typeBYTE, + FFESTP_typeWORD, #if FFESTR_F90 FFESTP_typeTYPE, diff -rcp2N g77-0.5.17/f/str-1t.fin g77-0.5.18/f/str-1t.fin *** g77-0.5.17/f/str-1t.fin Wed Aug 30 15:53:33 1995 --- g77-0.5.18/f/str-1t.fin Sat Mar 9 13:53:41 1996 *************** Backspace BACKSPACE *** 30,33 **** --- 30,34 ---- Block BLOCK BlockData BLOCKDATA + Byte BYTE Call CALL Case CASE *************** Virtual VIRTUAL *** 131,133 **** --- 132,135 ---- Volatile VOLATILE ;Where WHERE + Word WORD Write WRITE diff -rcp2N g77-0.5.17/f/str-2t.fin g77-0.5.18/f/str-2t.fin *** g77-0.5.17/f/str-2t.fin Wed Aug 30 15:53:33 1995 --- g77-0.5.18/f/str-2t.fin Sat Mar 9 13:53:41 1996 *************** FFESTR_second // // ffestrSecond ffestr_ *** 26,29 **** --- 26,30 ---- Block BLOCK BlockData BLOCKDATA + Byte BYTE Case CASE Character CHARACTER *************** To TO *** 57,58 **** --- 58,60 ---- ;Where WHERE While WHILE + Word WORD diff -rcp2N g77-0.5.17/f/stt.c g77-0.5.18/f/stt.c *** g77-0.5.17/f/stt.c Wed Aug 30 15:53:33 1995 --- g77-0.5.18/f/stt.c Mon Dec 4 01:10:30 1995 *************** ffestt_caselist_dump (ffesttCaseList lis *** 130,139 **** { if (next != list->next) ! fputc (',', stdout); if (next->expr1 != NULL) ffebld_dump (next->expr1); if (next->range) { ! fputc (':', stdout); if (next->expr2 != NULL) ffebld_dump (next->expr2); --- 130,139 ---- { if (next != list->next) ! fputc (',', dmpout); if (next->expr1 != NULL) ffebld_dump (next->expr1); if (next->range) { ! fputc (':', dmpout); if (next->expr2 != NULL) ffebld_dump (next->expr2); *************** ffestt_dimlist_dump (ffesttDimList list) *** 435,442 **** { if (next != list->next) ! fputc (',', stdout); if (next->lower != NULL) ffebld_dump (next->lower); ! fputc (':', stdout); if (next->upper != NULL) ffebld_dump (next->upper); --- 435,442 ---- { if (next != list->next) ! fputc (',', dmpout); if (next->lower != NULL) ffebld_dump (next->lower); ! fputc (':', dmpout); if (next->upper != NULL) ffebld_dump (next->upper); *************** ffestt_exprlist_dump (ffesttExprList lis *** 584,588 **** { if (next != list->next) ! fputc (',', stdout); ffebld_dump (next->expr); } --- 584,588 ---- { if (next != list->next) ! fputc (',', dmpout); ffebld_dump (next->expr); } *************** ffestt_implist_dump (ffesttImpList list) *** 821,832 **** { if (next != list->next) ! fputc (',', stdout); assert (ffelex_token_type (next->first) == FFELEX_typeNAME); ! fputs (ffelex_token_text (next->first), stdout); if (next->last != NULL) { ! fputc ('-', stdout); assert (ffelex_token_type (next->last) == FFELEX_typeNAME); ! fputs (ffelex_token_text (next->last), stdout); } } --- 821,832 ---- { if (next != list->next) ! fputc (',', dmpout); assert (ffelex_token_type (next->first) == FFELEX_typeNAME); ! fputs (ffelex_token_text (next->first), dmpout); if (next->last != NULL) { ! fputc ('-', dmpout); assert (ffelex_token_type (next->last) == FFELEX_typeNAME); ! fputs (ffelex_token_text (next->last), dmpout); } } *************** ffestt_tokenlist_dump (ffesttTokenList t *** 933,937 **** { if (ti != tl->first) ! fputc (',', stdout); switch (ffelex_token_type (ti->t)) { --- 933,937 ---- { if (ti != tl->first) ! fputc (',', dmpout); switch (ffelex_token_type (ti->t)) { *************** ffestt_tokenlist_dump (ffesttTokenList t *** 939,952 **** case FFELEX_typeNAME: case FFELEX_typeNAMES: ! fputs (ffelex_token_text (ti->t), stdout); break; case FFELEX_typeASTERISK: ! fputc ('*', stdout); break; default: assert (FALSE); ! fputc ('?', stdout); break; } --- 939,952 ---- case FFELEX_typeNAME: case FFELEX_typeNAMES: ! fputs (ffelex_token_text (ti->t), dmpout); break; case FFELEX_typeASTERISK: ! fputc ('*', dmpout); break; default: assert (FALSE); ! fputc ('?', dmpout); break; } diff -rcp2N g77-0.5.17/f/stu.c g77-0.5.18/f/stu.c *** g77-0.5.17/f/stu.c Wed Aug 30 15:53:33 1995 --- g77-0.5.18/f/stu.c Mon Mar 25 15:09:49 1996 *************** ffestu_sym_end_transition (ffesymbol s) *** 94,104 **** case FFESYMBOL_stateUNCERTAIN: if ((swh == FFEINFO_whereDUMMY) - #if 0 - && (skd == FFEINFO_kindENTITY) - && (sa & (FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsANYSIZE)) - #endif && (ffesymbol_numentries (s) == 0)) { /* Not actually in any dummy list! */ ffesymbol_error (s, ffesta_tokens[0]); } break; --- 94,101 ---- case FFESYMBOL_stateUNCERTAIN: if ((swh == FFEINFO_whereDUMMY) && (ffesymbol_numentries (s) == 0)) { /* Not actually in any dummy list! */ ffesymbol_error (s, ffesta_tokens[0]); + return s; } break; *************** ffestu_sym_end_transition (ffesymbol s) *** 111,121 **** ffesymbol_dummyargs (s)); else if ((swh == FFEINFO_whereDUMMY) - #if 0 - && (skd == FFEINFO_kindENTITY) - && (sa & (FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsANYSIZE)) - #endif && (ffesymbol_numentries (s) == 0)) { /* Not actually in any dummy list! */ ffesymbol_error (s, ffesta_tokens[0]); } --- 108,115 ---- ffesymbol_dummyargs (s)); else if ((swh == FFEINFO_whereDUMMY) && (ffesymbol_numentries (s) == 0)) { /* Not actually in any dummy list! */ ffesymbol_error (s, ffesta_tokens[0]); + return s; } *************** ffestu_sym_end_transition (ffesymbol s) *** 133,136 **** --- 127,131 ---- assert (!(sa & ~(FFESYMBOL_attrsACTUALARG + | FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY *************** ffestu_sym_end_transition (ffesymbol s) *** 199,204 **** --- 194,212 ---- { assert (!(sa & ~(FFESYMBOL_attrsARRAY + | FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsTYPE))); + if (sa & FFESYMBOL_attrsADJUSTABLE) + { /* Not actually in any dummy list! */ + if (ffe_is_pedantic () + && ffebad_start_msg ("Local adjustable symbol `%A' at %0", + FFEBAD_severityPEDANTIC)) + { + ffebad_string (ffesymbol_text (s)); + ffebad_here (0, ffesymbol_where_line (s), + ffesymbol_where_column (s)); + ffebad_finish (); + } + } nwh = FFEINFO_whereLOCAL; } *************** ffestu_sym_end_transition (ffesymbol s) *** 216,225 **** | FFESYMBOL_attrsEXTERNAL | FFESYMBOL_attrsSFARG))); /* Handled above. */ ! assert (!(sa & ~(FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY | FFESYMBOL_attrsDUMMY | FFESYMBOL_attrsEXTERNAL ! | FFESYMBOL_attrsSFARG ! | FFESYMBOL_attrsTYPE))); if (sa & FFESYMBOL_attrsANYLEN) --- 224,234 ---- | FFESYMBOL_attrsEXTERNAL | FFESYMBOL_attrsSFARG))); /* Handled above. */ ! assert (!(sa & ~(FFESYMBOL_attrsTYPE ! | FFESYMBOL_attrsADJUSTABLE ! | FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsARRAY | FFESYMBOL_attrsDUMMY | FFESYMBOL_attrsEXTERNAL ! | FFESYMBOL_attrsSFARG))); if (sa & FFESYMBOL_attrsANYLEN) *************** ffestu_sym_exec_transition (ffesymbol s) *** 588,595 **** | FFESYMBOL_attrsTYPE))); - if (sa & FFESYMBOL_attrsADJUSTABLE) - ffestu_symter_exec_transition_ (ffesymbol_dims (s)); nkd = FFEINFO_kindENTITY; ! nwh = FFEINFO_whereDUMMY; } else if (sa & FFESYMBOL_attrsARRAY) --- 597,612 ---- | FFESYMBOL_attrsTYPE))); nkd = FFEINFO_kindENTITY; ! ! if (sa & FFESYMBOL_attrsADJUSTABLE) ! ffestu_symter_exec_transition_ (ffesymbol_dims (s)); ! ! if (sa & (FFESYMBOL_attrsANYLEN | FFESYMBOL_attrsANYSIZE)) ! nwh = FFEINFO_whereDUMMY; ! else ! { ! nwh = FFEINFO_whereNONE; /* DUMMY, LOCAL. */ ! ns = FFESYMBOL_stateUNCERTAIN; ! } } else if (sa & FFESYMBOL_attrsARRAY) diff -rcp2N g77-0.5.17/f/stw.c g77-0.5.18/f/stw.c *** g77-0.5.17/f/stw.c Wed Aug 30 15:53:32 1995 --- g77-0.5.18/f/stw.c Mon Dec 4 01:10:30 1995 *************** ffestw_display_state () *** 82,266 **** return; ! fprintf (stdout, "; block %lu, state ", ffestw_stack_top_->blocknum_); switch (ffestw_stack_top_->state_) { case FFESTV_stateNIL: ! fputs ("NIL", stdout); break; case FFESTV_statePROGRAM0: ! fputs ("PROGRAM0", stdout); break; case FFESTV_statePROGRAM1: ! fputs ("PROGRAM1", stdout); break; case FFESTV_statePROGRAM2: ! fputs ("PROGRAM2", stdout); break; case FFESTV_statePROGRAM3: ! fputs ("PROGRAM3", stdout); break; case FFESTV_statePROGRAM4: ! fputs ("PROGRAM4", stdout); break; case FFESTV_statePROGRAM5: ! fputs ("PROGRAM5", stdout); break; case FFESTV_stateSUBROUTINE0: ! fputs ("SUBROUTINE0", stdout); break; case FFESTV_stateSUBROUTINE1: ! fputs ("SUBROUTINE1", stdout); break; case FFESTV_stateSUBROUTINE2: ! fputs ("SUBROUTINE2", stdout); break; case FFESTV_stateSUBROUTINE3: ! fputs ("SUBROUTINE3", stdout); break; case FFESTV_stateSUBROUTINE4: ! fputs ("SUBROUTINE4", stdout); break; case FFESTV_stateSUBROUTINE5: ! fputs ("SUBROUTINE5", stdout); break; case FFESTV_stateFUNCTION0: ! fputs ("FUNCTION0", stdout); break; case FFESTV_stateFUNCTION1: ! fputs ("FUNCTION1", stdout); break; case FFESTV_stateFUNCTION2: ! fputs ("FUNCTION2", stdout); break; case FFESTV_stateFUNCTION3: ! fputs ("FUNCTION3", stdout); break; case FFESTV_stateFUNCTION4: ! fputs ("FUNCTION4", stdout); break; case FFESTV_stateFUNCTION5: ! fputs ("FUNCTION5", stdout); break; case FFESTV_stateMODULE0: ! fputs ("MODULE0", stdout); break; case FFESTV_stateMODULE1: ! fputs ("MODULE1", stdout); break; case FFESTV_stateMODULE2: ! fputs ("MODULE2", stdout); break; case FFESTV_stateMODULE3: ! fputs ("MODULE3", stdout); break; case FFESTV_stateMODULE4: ! fputs ("MODULE4", stdout); break; case FFESTV_stateMODULE5: ! fputs ("MODULE5", stdout); break; case FFESTV_stateBLOCKDATA0: ! fputs ("BLOCKDATA0", stdout); break; case FFESTV_stateBLOCKDATA1: ! fputs ("BLOCKDATA1", stdout); break; case FFESTV_stateBLOCKDATA2: ! fputs ("BLOCKDATA2", stdout); break; case FFESTV_stateBLOCKDATA3: ! fputs ("BLOCKDATA3", stdout); break; case FFESTV_stateBLOCKDATA4: ! fputs ("BLOCKDATA4", stdout); break; case FFESTV_stateBLOCKDATA5: ! fputs ("BLOCKDATA5", stdout); break; case FFESTV_stateUSE: ! fputs ("USE", stdout); break; case FFESTV_stateTYPE: ! fputs ("TYPE", stdout); break; case FFESTV_stateINTERFACE0: ! fputs ("INTERFACE0", stdout); break; case FFESTV_stateINTERFACE1: ! fputs ("INTERFACE1", stdout); break; case FFESTV_stateSTRUCTURE: ! fputs ("STRUCTURE", stdout); break; case FFESTV_stateUNION: ! fputs ("UNION", stdout); break; case FFESTV_stateMAP: ! fputs ("MAP", stdout); break; case FFESTV_stateWHERETHEN: ! fputs ("WHERETHEN", stdout); break; case FFESTV_stateWHERE: ! fputs ("WHERE", stdout); break; case FFESTV_stateIFTHEN: ! fputs ("IFTHEN", stdout); break; case FFESTV_stateIF: ! fputs ("IF", stdout); break; case FFESTV_stateDO: ! fputs ("DO", stdout); break; case FFESTV_stateSELECT0: ! fputs ("SELECT0", stdout); break; case FFESTV_stateSELECT1: ! fputs ("SELECT1", stdout); break; --- 82,266 ---- return; ! fprintf (dmpout, "; block %lu, state ", ffestw_stack_top_->blocknum_); switch (ffestw_stack_top_->state_) { case FFESTV_stateNIL: ! fputs ("NIL", dmpout); break; case FFESTV_statePROGRAM0: ! fputs ("PROGRAM0", dmpout); break; case FFESTV_statePROGRAM1: ! fputs ("PROGRAM1", dmpout); break; case FFESTV_statePROGRAM2: ! fputs ("PROGRAM2", dmpout); break; case FFESTV_statePROGRAM3: ! fputs ("PROGRAM3", dmpout); break; case FFESTV_statePROGRAM4: ! fputs ("PROGRAM4", dmpout); break; case FFESTV_statePROGRAM5: ! fputs ("PROGRAM5", dmpout); break; case FFESTV_stateSUBROUTINE0: ! fputs ("SUBROUTINE0", dmpout); break; case FFESTV_stateSUBROUTINE1: ! fputs ("SUBROUTINE1", dmpout); break; case FFESTV_stateSUBROUTINE2: ! fputs ("SUBROUTINE2", dmpout); break; case FFESTV_stateSUBROUTINE3: ! fputs ("SUBROUTINE3", dmpout); break; case FFESTV_stateSUBROUTINE4: ! fputs ("SUBROUTINE4", dmpout); break; case FFESTV_stateSUBROUTINE5: ! fputs ("SUBROUTINE5", dmpout); break; case FFESTV_stateFUNCTION0: ! fputs ("FUNCTION0", dmpout); break; case FFESTV_stateFUNCTION1: ! fputs ("FUNCTION1", dmpout); break; case FFESTV_stateFUNCTION2: ! fputs ("FUNCTION2", dmpout); break; case FFESTV_stateFUNCTION3: ! fputs ("FUNCTION3", dmpout); break; case FFESTV_stateFUNCTION4: ! fputs ("FUNCTION4", dmpout); break; case FFESTV_stateFUNCTION5: ! fputs ("FUNCTION5", dmpout); break; case FFESTV_stateMODULE0: ! fputs ("MODULE0", dmpout); break; case FFESTV_stateMODULE1: ! fputs ("MODULE1", dmpout); break; case FFESTV_stateMODULE2: ! fputs ("MODULE2", dmpout); break; case FFESTV_stateMODULE3: ! fputs ("MODULE3", dmpout); break; case FFESTV_stateMODULE4: ! fputs ("MODULE4", dmpout); break; case FFESTV_stateMODULE5: ! fputs ("MODULE5", dmpout); break; case FFESTV_stateBLOCKDATA0: ! fputs ("BLOCKDATA0", dmpout); break; case FFESTV_stateBLOCKDATA1: ! fputs ("BLOCKDATA1", dmpout); break; case FFESTV_stateBLOCKDATA2: ! fputs ("BLOCKDATA2", dmpout); break; case FFESTV_stateBLOCKDATA3: ! fputs ("BLOCKDATA3", dmpout); break; case FFESTV_stateBLOCKDATA4: ! fputs ("BLOCKDATA4", dmpout); break; case FFESTV_stateBLOCKDATA5: ! fputs ("BLOCKDATA5", dmpout); break; case FFESTV_stateUSE: ! fputs ("USE", dmpout); break; case FFESTV_stateTYPE: ! fputs ("TYPE", dmpout); break; case FFESTV_stateINTERFACE0: ! fputs ("INTERFACE0", dmpout); break; case FFESTV_stateINTERFACE1: ! fputs ("INTERFACE1", dmpout); break; case FFESTV_stateSTRUCTURE: ! fputs ("STRUCTURE", dmpout); break; case FFESTV_stateUNION: ! fputs ("UNION", dmpout); break; case FFESTV_stateMAP: ! fputs ("MAP", dmpout); break; case FFESTV_stateWHERETHEN: ! fputs ("WHERETHEN", dmpout); break; case FFESTV_stateWHERE: ! fputs ("WHERE", dmpout); break; case FFESTV_stateIFTHEN: ! fputs ("IFTHEN", dmpout); break; case FFESTV_stateIF: ! fputs ("IF", dmpout); break; case FFESTV_stateDO: ! fputs ("DO", dmpout); break; case FFESTV_stateSELECT0: ! fputs ("SELECT0", dmpout); break; case FFESTV_stateSELECT1: ! fputs ("SELECT1", dmpout); break; *************** ffestw_display_state () *** 270,275 **** } if (ffestw_stack_top_->top_do_ != NULL) ! fputs (" (within DO)", stdout); ! fputc ('\n', stdout); } --- 270,275 ---- } if (ffestw_stack_top_->top_do_ != NULL) ! fputs (" (within DO)", dmpout); ! fputc ('\n', dmpout); } diff -rcp2N g77-0.5.17/f/symbol.c g77-0.5.18/f/symbol.c *** g77-0.5.17/f/symbol.c Wed Aug 30 15:53:32 1995 --- g77-0.5.18/f/symbol.c Mon Mar 18 18:27:40 1996 *************** ffesymbol_new_ (ffename n) *** 248,252 **** s->specific = FFEINTRIN_specNONE; s->implementation = FFEINTRIN_impNONE; ! s->save = FALSE; s->do_iter = FALSE; s->reported = FALSE; --- 248,253 ---- s->specific = FFEINTRIN_specNONE; s->implementation = FFEINTRIN_impNONE; ! s->is_save = FALSE; ! s->is_init = FALSE; s->do_iter = FALSE; s->reported = FALSE; *************** ffesymbol_dump (ffesymbol s) *** 802,806 **** if (ffeinfo_size (s->info) != FFETARGET_charactersizeNONE) ! fprintf (stdout, "%s:%d%s%s*%" ffetargetCharacterSize_f "u", ffesymbol_text (s), (int) ffeinfo_rank (s->info), --- 803,807 ---- if (ffeinfo_size (s->info) != FFETARGET_charactersizeNONE) ! fprintf (dmpout, "%s:%d%s%s*%" ffetargetCharacterSize_f "u", ffesymbol_text (s), (int) ffeinfo_rank (s->info), *************** ffesymbol_dump (ffesymbol s) *** 809,813 **** ffeinfo_size (s->info)); else ! fprintf (stdout, "%s:%d%s%s", ffesymbol_text (s), (int) ffeinfo_rank (s->info), --- 810,814 ---- ffeinfo_size (s->info)); else ! fprintf (dmpout, "%s:%d%s%s", ffesymbol_text (s), (int) ffeinfo_rank (s->info), *************** ffesymbol_dump (ffesymbol s) *** 815,826 **** ffeinfo_kindtype_string (ffeinfo_kindtype (s->info))); if ((k = ffeinfo_kind (s->info)) != FFEINFO_kindNONE) ! fprintf (stdout, "/%s", ffeinfo_kind_string (k)); if ((w = ffeinfo_where (s->info)) != FFEINFO_whereNONE) ! fprintf (stdout, "@%s", ffeinfo_where_string (w)); if ((s->generic != FFEINTRIN_genNONE) || (s->specific != FFEINTRIN_specNONE) || (s->implementation != FFEINTRIN_impNONE)) ! fprintf (stdout, "{%s:%s:%s}", ffeintrin_name_generic (s->generic), ffeintrin_name_specific (s->specific), --- 816,827 ---- ffeinfo_kindtype_string (ffeinfo_kindtype (s->info))); if ((k = ffeinfo_kind (s->info)) != FFEINFO_kindNONE) ! fprintf (dmpout, "/%s", ffeinfo_kind_string (k)); if ((w = ffeinfo_where (s->info)) != FFEINFO_whereNONE) ! fprintf (dmpout, "@%s", ffeinfo_where_string (w)); if ((s->generic != FFEINTRIN_genNONE) || (s->specific != FFEINTRIN_specNONE) || (s->implementation != FFEINTRIN_impNONE)) ! fprintf (dmpout, "{%s:%s:%s}", ffeintrin_name_generic (s->generic), ffeintrin_name_specific (s->specific), *************** ffesymbol_report (ffesymbol s) *** 939,943 **** if (ffeinfo_size (s->info) != FFETARGET_charactersizeNONE) ! fprintf (stdout, "\"%s\": %s %s %d%s%s*%" ffetargetCharacterSize_f "u", ffesymbol_text (s), ffesymbol_state_string (s->state), --- 940,944 ---- if (ffeinfo_size (s->info) != FFETARGET_charactersizeNONE) ! fprintf (dmpout, "\"%s\": %s %s %d%s%s*%" ffetargetCharacterSize_f "u", ffesymbol_text (s), ffesymbol_state_string (s->state), *************** ffesymbol_report (ffesymbol s) *** 948,952 **** ffeinfo_size (s->info)); else ! fprintf (stdout, "\"%s\": %s %s %d%s%s", ffesymbol_text (s), ffesymbol_state_string (s->state), --- 949,953 ---- ffeinfo_size (s->info)); else ! fprintf (dmpout, "\"%s\": %s %s %d%s%s", ffesymbol_text (s), ffesymbol_state_string (s->state), *************** ffesymbol_report (ffesymbol s) *** 956,1001 **** ffeinfo_kindtype_string (ffeinfo_kindtype (s->info))); if ((k = ffeinfo_kind (s->info)) != FFEINFO_kindNONE) ! fprintf (stdout, "/%s", ffeinfo_kind_string (k)); if ((w = ffeinfo_where (s->info)) != FFEINFO_whereNONE) ! fprintf (stdout, "@%s", ffeinfo_where_string (w)); ! fputc ('\n', stdout); if (s->dims != NULL) { ! fprintf (stdout, " dims: "); ffebld_dump (s->dims); ! fputs ("\n", stdout); } if (s->extents != NULL) { ! fprintf (stdout, " extents: "); ffebld_dump (s->extents); ! fputs ("\n", stdout); } if (s->dim_syms != NULL) { ! fprintf (stdout, " dim syms: "); ffebld_dump (s->dim_syms); ! fputs ("\n", stdout); } if (s->array_size != NULL) { ! fprintf (stdout, " array size: "); ffebld_dump (s->array_size); ! fputs ("\n", stdout); } if (s->init != NULL) { ! fprintf (stdout, " init-value: "); if (ffebld_op (s->init) == FFEBLD_opANY) ! fputs ("\n", stdout); else { ffebld_dump (s->init); ! fputs ("\n", stdout); } } --- 957,1002 ---- ffeinfo_kindtype_string (ffeinfo_kindtype (s->info))); if ((k = ffeinfo_kind (s->info)) != FFEINFO_kindNONE) ! fprintf (dmpout, "/%s", ffeinfo_kind_string (k)); if ((w = ffeinfo_where (s->info)) != FFEINFO_whereNONE) ! fprintf (dmpout, "@%s", ffeinfo_where_string (w)); ! fputc ('\n', dmpout); if (s->dims != NULL) { ! fprintf (dmpout, " dims: "); ffebld_dump (s->dims); ! fputs ("\n", dmpout); } if (s->extents != NULL) { ! fprintf (dmpout, " extents: "); ffebld_dump (s->extents); ! fputs ("\n", dmpout); } if (s->dim_syms != NULL) { ! fprintf (dmpout, " dim syms: "); ffebld_dump (s->dim_syms); ! fputs ("\n", dmpout); } if (s->array_size != NULL) { ! fprintf (dmpout, " array size: "); ffebld_dump (s->array_size); ! fputs ("\n", dmpout); } if (s->init != NULL) { ! fprintf (dmpout, " init-value: "); if (ffebld_op (s->init) == FFEBLD_opANY) ! fputs ("\n", dmpout); else { ffebld_dump (s->init); ! fputs ("\n", dmpout); } } *************** ffesymbol_report (ffesymbol s) *** 1003,1080 **** if (s->accretion != NULL) { ! fprintf (stdout, " accretion (%" ffetargetOffset_f "u left): ", s->accretes); ffebld_dump (s->accretion); ! fputs ("\n", stdout); } else if (s->accretes != 0) ! fprintf (stdout, " accretes!! = %" ffetargetOffset_f "u left\n", s->accretes); if (s->dummy_args != NULL) { ! fprintf (stdout, " dummies: "); ffebld_dump (s->dummy_args); ! fputs ("\n", stdout); } if (s->namelist != NULL) { ! fprintf (stdout, " namelist: "); ffebld_dump (s->namelist); ! fputs ("\n", stdout); } if (s->common_list != NULL) { ! fprintf (stdout, " common-list: "); ffebld_dump (s->common_list); ! fputs ("\n", stdout); } if (s->sfunc_expr != NULL) { ! fprintf (stdout, " sfunc expression: "); ffebld_dump (s->sfunc_expr); ! fputs ("\n", stdout); } ! if (s->save) { ! fprintf (stdout, " SAVEd\n"); } if (s->do_iter) { ! fprintf (stdout, " DO-loop iteration variable (currently)\n"); } if (s->explicit_where) { ! fprintf (stdout, " Explicit INTRINSIC/EXTERNAL\n"); } if (s->namelisted) { ! fprintf (stdout, " Namelisted\n"); } if (s->common != NULL) { ! fprintf (stdout, " COMMON area: %s\n", ffesymbol_text (s->common)); } if (s->equiv != NULL) { ! fprintf (stdout, " EQUIVALENCE information: "); ffeequiv_dump (s->equiv); ! fputs ("\n", stdout); } if (s->storage != NULL) { ! fprintf (stdout, " Storage: "); ffestorag_dump (s->storage); ! fputs ("\n", stdout); } --- 1004,1086 ---- if (s->accretion != NULL) { ! fprintf (dmpout, " accretion (%" ffetargetOffset_f "u left): ", s->accretes); ffebld_dump (s->accretion); ! fputs ("\n", dmpout); } else if (s->accretes != 0) ! fprintf (dmpout, " accretes!! = %" ffetargetOffset_f "u left\n", s->accretes); if (s->dummy_args != NULL) { ! fprintf (dmpout, " dummies: "); ffebld_dump (s->dummy_args); ! fputs ("\n", dmpout); } if (s->namelist != NULL) { ! fprintf (dmpout, " namelist: "); ffebld_dump (s->namelist); ! fputs ("\n", dmpout); } if (s->common_list != NULL) { ! fprintf (dmpout, " common-list: "); ffebld_dump (s->common_list); ! fputs ("\n", dmpout); } if (s->sfunc_expr != NULL) { ! fprintf (dmpout, " sfunc expression: "); ffebld_dump (s->sfunc_expr); ! fputs ("\n", dmpout); } ! if (s->is_save) { ! fprintf (dmpout, " SAVEd\n"); ! } ! ! if (s->is_init) ! { ! fprintf (dmpout, " initialized\n"); } if (s->do_iter) { ! fprintf (dmpout, " DO-loop iteration variable (currently)\n"); } if (s->explicit_where) { ! fprintf (dmpout, " Explicit INTRINSIC/EXTERNAL\n"); } if (s->namelisted) { ! fprintf (dmpout, " Namelisted\n"); } if (s->common != NULL) { ! fprintf (dmpout, " COMMON area: %s\n", ffesymbol_text (s->common)); } if (s->equiv != NULL) { ! fprintf (dmpout, " EQUIVALENCE information: "); ffeequiv_dump (s->equiv); ! fputs ("\n", dmpout); } if (s->storage != NULL) { ! fprintf (dmpout, " Storage: "); ffestorag_dump (s->storage); ! fputs ("\n", dmpout); } *************** ffesymbol_terminate_4 () *** 1307,1310 **** --- 1313,1352 ---- } + /* Update INIT info to TRUE and all equiv/storage too. + + If INIT flag is TRUE, does nothing. Else sets it to TRUE and calls + on the ffeequiv and ffestorag modules to update their INIT flags if + the symbol has those objects, and also updates the common area if + it exists. */ + + void + ffesymbol_update_init (ffesymbol s) + { + ffebld item; + + if (s->is_init) + return; + + s->is_init = TRUE; + + if ((s->equiv != NULL) + && !ffeequiv_is_init (s->equiv)) + ffeequiv_update_init (s->equiv); + + if ((s->storage != NULL) + && !ffestorag_is_init (s->storage)) + ffestorag_update_init (s->storage); + + if ((s->common != NULL) + && (!ffesymbol_is_init (s->common))) + ffesymbol_update_init (s->common); + + for (item = s->common_list; item != NULL; item = ffebld_trail (item)) + { + if (!ffesymbol_is_init (ffebld_symter (ffebld_head (item)))) + ffesymbol_update_init (ffebld_symter (ffebld_head (item))); + } + } + /* Update SAVE info to TRUE and all equiv/storage too. *************** ffesymbol_update_save (ffesymbol s) *** 1319,1337 **** ffebld item; ! if (s->save) return; ! s->save = TRUE; ! if (s->equiv != NULL) ffeequiv_update_save (s->equiv); ! if (s->storage != NULL) ffestorag_update_save (s->storage); ! if (s->common != NULL) ffesymbol_update_save (s->common); for (item = s->common_list; item != NULL; item = ffebld_trail (item)) ! ffesymbol_update_save (ffebld_symter (ffebld_head (item))); } --- 1361,1385 ---- ffebld item; ! if (s->is_save) return; ! s->is_save = TRUE; ! if ((s->equiv != NULL) ! && !ffeequiv_is_save (s->equiv)) ffeequiv_update_save (s->equiv); ! if ((s->storage != NULL) ! && !ffestorag_is_save (s->storage)) ffestorag_update_save (s->storage); ! if ((s->common != NULL) ! && (!ffesymbol_is_save (s->common))) ffesymbol_update_save (s->common); for (item = s->common_list; item != NULL; item = ffebld_trail (item)) ! { ! if (!ffesymbol_is_save (ffebld_symter (ffebld_head (item)))) ! ffesymbol_update_save (ffebld_symter (ffebld_head (item))); ! } } diff -rcp2N g77-0.5.17/f/symbol.def g77-0.5.18/f/symbol.def *** g77-0.5.17/f/symbol.def Wed Aug 30 15:53:32 1995 --- g77-0.5.18/f/symbol.def Fri Mar 15 14:50:02 1996 *************** the Free Software Foundation, 59 Temple *** 43,48 **** If UNCERTAIN, the permitted combinations of attributes and info are ! listed below. Only the attributes ACTUALARG, ANYLEN, ARRAY, DUMMY, ! EXTERNAL, SFARG, and TYPE are permitted. (All these attributes are contrasted to each attribute below, even though some combinations wouldn't be permitted in SEEN state either.) Note that DUMMY and --- 43,48 ---- If UNCERTAIN, the permitted combinations of attributes and info are ! listed below. Only the attributes ACTUALARG, ADJUSTABLE, ANYLEN, ARRAY, ! DUMMY, EXTERNAL, SFARG, and TYPE are permitted. (All these attributes are contrasted to each attribute below, even though some combinations wouldn't be permitted in SEEN state either.) Note that DUMMY and *************** the Free Software Foundation, 59 Temple *** 51,89 **** but UNDERSTOOD). ! ANYLEN + TYPE & ~(ACTUALARG + ARRAY + DUMMY + EXTERNAL + SFARG): ENTITY/DUMMY, ENTITY/RESULT, FUNCTION/INTRINSIC. ! ARRAY & ~(ACTUALARG + ANYLEN + DUMMY + EXTERNAL + SFARG + TYPE): ENTITY/DUMMY, ENTITY/LOCAL. ! ARRAY + TYPE & ~(ACTUALARG + ANYLEN + DUMMY + EXTERNAL + SFARG): ENTITY/DUMMY, ENTITY/LOCAL. ! DUMMY & ~(ACTUALARG + ANYLEN + ARRAY + EXTERNAL + SFARG + TYPE): ENTITY/DUMMY, FUNCTION/DUMMY, SUBROUTINE/DUMMY. ! DUMMY + TYPE & ~(ACTUALARG + ANYLEN + ARRAY + EXTERNAL + SFARG): ENTITY/DUMMY, FUNCTION/DUMMY. ! EXTERNAL & ~(ACTUALARG + ANYLEN + ARRAY + DUMMY + SFARG + TYPE): FUNCTION/DUMMY, FUNCTION/GLOBAL, SUBROUTINE/DUMMY, SUBROUTINE/GLOBAL, BLOCKDATA/GLOBAL. ! EXTERNAL + ACTUALARG & ~(ANYLEN + ARRAY + DUMMY + SFARG + TYPE): FUNCTION/GLOBAL, SUBROUTINE/GLOBAL. ! EXTERNAL + DUMMY & ~(ACTUALARG + ANYLEN + ARRAY + SFARG + TYPE): FUNCTION/DUMMY, SUBROUTINE/DUMMY. ! EXTERNAL + TYPE & ~(ACTUALARG + ANYLEN + ARRAY + DUMMY + SFARG): FUNCTION/DUMMY, FUNCTION/GLOBAL. ! SFARG & ~(ACTUALARG + ANYLEN + ARRAY + DUMMY + EXTERNAL + TYPE): ENTITY/DUMMY, ENTITY/LOCAL. ! SFARG + TYPE & ~(ACTUALARG + ANYLEN + ARRAY + DUMMY + EXTERNAL): ENTITY/DUMMY, ENTITY/LOCAL. ! TYPE & ~(ACTUALARG + ANYLEN + ARRAY + DUMMY + EXTERNAL + SFARG): ENTITY/DUMMY, ENTITY/LOCAL, ENTITY/RESULT, FUNCTION/DUMMY, FUNCTION/GLOBAL, FUNCTION/INTRINSIC. --- 51,89 ---- but UNDERSTOOD). ! ANYLEN|TYPE & ~(ACTUALARG|ADJUSTABLE|ARRAY|DUMMY|EXTERNAL|SFARG): ENTITY/DUMMY, ENTITY/RESULT, FUNCTION/INTRINSIC. ! ARRAY & ~(ACTUALARG|ANYLEN|DUMMY|EXTERNAL|SFARG|TYPE): ENTITY/DUMMY, ENTITY/LOCAL. ! ARRAY|TYPE & ~(ACTUALARG|ANYLEN|DUMMY|EXTERNAL|SFARG): ENTITY/DUMMY, ENTITY/LOCAL. ! DUMMY & ~(ACTUALARG|ADJUSTABLE|ANYLEN|ARRAY|EXTERNAL|SFARG|TYPE): ENTITY/DUMMY, FUNCTION/DUMMY, SUBROUTINE/DUMMY. ! DUMMY|TYPE & ~(ACTUALARG|ADJUSTABLE|ANYLEN|ARRAY|EXTERNAL|SFARG): ENTITY/DUMMY, FUNCTION/DUMMY. ! EXTERNAL & ~(ACTUALARG|ADJUSTABLE|ANYLEN|ARRAY|DUMMY|SFARG|TYPE): FUNCTION/DUMMY, FUNCTION/GLOBAL, SUBROUTINE/DUMMY, SUBROUTINE/GLOBAL, BLOCKDATA/GLOBAL. ! EXTERNAL|ACTUALARG & ~(ADJUSTABLE|ANYLEN|ARRAY|DUMMY|SFARG|TYPE): FUNCTION/GLOBAL, SUBROUTINE/GLOBAL. ! EXTERNAL|DUMMY & ~(ACTUALARG|ADJUSTABLE|ANYLEN|ARRAY|SFARG|TYPE): FUNCTION/DUMMY, SUBROUTINE/DUMMY. ! EXTERNAL|TYPE & ~(ACTUALARG|ADJUSTABLE|ANYLEN|ARRAY|DUMMY|SFARG): FUNCTION/DUMMY, FUNCTION/GLOBAL. ! SFARG & ~(ACTUALARG|ADJUSTABLE|ANYLEN|ARRAY|DUMMY|EXTERNAL|TYPE): ENTITY/DUMMY, ENTITY/LOCAL. ! SFARG|TYPE & ~(ACTUALARG|ADJUSTABLE|ANYLEN|ARRAY|DUMMY|EXTERNAL): ENTITY/DUMMY, ENTITY/LOCAL. ! TYPE & ~(ACTUALARG|ANYLEN|ARRAY|DUMMY|EXTERNAL|SFARG): ENTITY/DUMMY, ENTITY/LOCAL, ENTITY/RESULT, FUNCTION/DUMMY, FUNCTION/GLOBAL, FUNCTION/INTRINSIC. diff -rcp2N g77-0.5.17/f/symbol.h g77-0.5.18/f/symbol.h *** g77-0.5.17/f/symbol.h Wed Aug 30 15:53:32 1995 --- g77-0.5.18/f/symbol.h Mon Mar 18 18:35:37 1996 *************** struct _ffesymbol_ *** 142,147 **** ffeintrinSpec specific; /* Specific intrinsic id, if any. */ ffeintrinImp implementation;/* Implementation id, if any. */ ! bool save; /* SAVE flag set for this symbol (see also ffe_is_saveall()). */ bool do_iter; /* Is currently a DO-loop iter (can't be changed in loop). */ --- 142,148 ---- ffeintrinSpec specific; /* Specific intrinsic id, if any. */ ffeintrinImp implementation;/* Implementation id, if any. */ ! bool is_save; /* SAVE flag set for this symbol (see also ffe_is_saveall()). */ + bool is_init; /* INIT flag set for this symbol. */ bool do_iter; /* Is currently a DO-loop iter (can't be changed in loop). */ *************** void ffesymbol_init_4 (void); *** 203,208 **** #define ffesymbol_is_dualspace(s) ((s)->other_space_name != NULL) #define ffesymbol_is_f2c(s) (ffe_is_f2c()) ! #define ffesymbol_is_specable(s) ffesymbol_state_is_specable(s->state) #define ffesymbol_is_reported(s) ((s)->reported) #define ffesymbol_kindtype(s) ffeinfo_kindtype((s)->info) #define ffesymbol_kind(s) ffeinfo_kind((s)->info) --- 204,211 ---- #define ffesymbol_is_dualspace(s) ((s)->other_space_name != NULL) #define ffesymbol_is_f2c(s) (ffe_is_f2c()) ! #define ffesymbol_is_init(s) ((s)->is_init) #define ffesymbol_is_reported(s) ((s)->reported) + #define ffesymbol_is_save(s) ((s)->is_save) + #define ffesymbol_is_specable(s) ffesymbol_state_is_specable(s->state) #define ffesymbol_kindtype(s) ffeinfo_kindtype((s)->info) #define ffesymbol_kind(s) ffeinfo_kind((s)->info) *************** void ffesymbol_resolve_intrin (ffesymbol *** 221,225 **** void ffesymbol_retract (bool retract); bool ffesymbol_retractable (void); - #define ffesymbol_save(s) ((s)->save) #define ffesymbol_set_accretes(s,a) ((s)->accretes = (a)) #define ffesymbol_set_accretion(s,a) ((s)->accretion = (a)) --- 224,227 ---- *************** bool ffesymbol_retractable (void); *** 243,246 **** --- 245,250 ---- #define ffesymbol_set_info(s,i) ((s)->info = (i)) #define ffesymbol_set_is_doiter(s,f) ((s)->do_iter = (f)) + #define ffesymbol_set_is_init(s,in) ((s)->is_init = (in)) + #define ffesymbol_set_is_save(s,sa) ((s)->is_save = (sa)) #define ffesymbol_set_maxentrynum(s,m) ((s)->max_entry_num = (m)) #define ffesymbol_set_namelist(s,n) ((s)->namelist = (n)) *************** bool ffesymbol_retractable (void); *** 248,252 **** #define ffesymbol_set_numentries(s,n) ((s)->num_entries = (n)) void ffesymbol_set_retractable (mallocPool pool); - #define ffesymbol_set_save(s,sa) ((s)->save = (sa)) #define ffesymbol_set_sfexpr(s,e) ((s)->sfunc_expr = (e)) #define ffesymbol_set_specific(s,sp) ((s)->specific = (sp)) --- 252,255 ---- *************** void ffesymbol_terminate_3 (void); *** 270,273 **** --- 273,277 ---- void ffesymbol_terminate_4 (void); #define ffesymbol_text(s) (((s)->name == NULL) ? "<->" : ffename_text((s)->name)) + void ffesymbol_update_init (ffesymbol s); void ffesymbol_update_save (ffesymbol s); #define ffesymbol_value(s) ((s)->value) diff -rcp2N g77-0.5.17/f/target.c g77-0.5.18/f/target.c *** g77-0.5.17/f/target.c Wed Aug 30 15:53:32 1995 --- g77-0.5.18/f/target.c Mon Mar 18 16:20:36 1996 *************** ffetarget_gt_character1 (bool *res, ffet *** 416,421 **** --- 416,445 ---- return FFEBAD; } + #endif + + #if FFETARGET_okCHARACTER1 + bool + ffetarget_iszero_character1 (ffetargetCharacter1 constant) + { + ffetargetCharacterSize i; + for (i = 0; i < constant.length; ++i) + if (constant.text[i] != 0) + return FALSE; + return TRUE; + } #endif + + bool + ffetarget_iszero_hollerith (ffetargetHollerith constant) + { + ffetargetHollerithSize i; + + for (i = 0; i < constant.length; ++i) + if (constant.text[i] != 0) + return FALSE; + return TRUE; + } + /* ffetarget_layout -- Do storage requirement analysis for entity *************** ffetarget_convert_character1_hollerith ( *** 708,714 **** #if FFETARGET_okCHARACTER1 ffebad ! ffetarget_convert_character1_integer1 (ffetargetCharacter1 *res, ffetargetCharacterSize size, ! ffetargetInteger1 l, mallocPool pool) { long long int l1; --- 732,738 ---- #if FFETARGET_okCHARACTER1 ffebad ! ffetarget_convert_character1_integer4 (ffetargetCharacter1 *res, ffetargetCharacterSize size, ! ffetargetInteger4 l, mallocPool pool) { long long int l1; *************** ffetarget_convert_character1_integer1 (f *** 794,800 **** #if FFETARGET_okCHARACTER1 ffebad ! ffetarget_convert_character1_logical1 (ffetargetCharacter1 *res, ffetargetCharacterSize size, ! ffetargetLogical1 l, mallocPool pool) { long long int l1; --- 818,824 ---- #if FFETARGET_okCHARACTER1 ffebad ! ffetarget_convert_character1_logical4 (ffetargetCharacter1 *res, ffetargetCharacterSize size, ! ffetargetLogical4 l, mallocPool pool) { long long int l1; *************** ffetarget_power_complexdefault_integerde *** 1398,1402 **** ffetarget_real1_zero (&res->real); ffetarget_real1_zero (&res->imaginary); ! return FFEBAD_BAD_POWER; } --- 1422,1426 ---- ffetarget_real1_zero (&res->real); ffetarget_real1_zero (&res->imaginary); ! return FFEBAD; } *************** ffetarget_power_complexdouble_integerdef *** 1524,1528 **** ffetarget_real2_zero (&res->real); ffetarget_real2_zero (&res->imaginary); ! return FFEBAD_BAD_POWER; } --- 1548,1552 ---- ffetarget_real2_zero (&res->real); ffetarget_real2_zero (&res->imaginary); ! return FFEBAD; } *************** ffetarget_power_integerdefault_integerde *** 1642,1646 **** { *res = 0; ! return FFEBAD_BAD_POWER; } --- 1666,1670 ---- { *res = 0; ! return FFEBAD; } *************** ffetarget_power_integerdefault_integerde *** 1653,1657 **** if (r < 0) { ! *res = (l == 1) ? 1 : 0; return FFEBAD; } --- 1677,1688 ---- if (r < 0) { ! if (l == 1) ! *res = 1; ! else if (l == 0) ! *res = 1; ! else if (l == -1) ! *res = ((-r) & 1) == 0 ? 1 : -1; ! else ! *res = 0; return FFEBAD; } *************** ffetarget_power_realdefault_integerdefau *** 1690,1694 **** { ffetarget_real1_zero (res); ! return FFEBAD_BAD_POWER; } --- 1721,1725 ---- { ffetarget_real1_zero (res); ! return FFEBAD; } *************** ffetarget_power_realdouble_integerdefaul *** 1752,1756 **** { ffetarget_real2_zero (res); ! return FFEBAD_BAD_POWER; } --- 1783,1787 ---- { ffetarget_real2_zero (res); ! return FFEBAD; } *************** ffetarget_power_realdouble_integerdefaul *** 1803,1807 **** ffetargetTypeless val; ! ffetarget_typeless_binary(stdout,val); */ void --- 1834,1838 ---- ffetargetTypeless val; ! ffetarget_typeless_binary(dmpout,val); */ void *************** ffetarget_print_binary (FILE *f, ffetarg *** 1812,1816 **** if (f == NULL) ! f = stdout; p = &digits[ARRAY_SIZE (digits) - 1]; --- 1843,1847 ---- if (f == NULL) ! f = dmpout; p = &digits[ARRAY_SIZE (digits) - 1]; *************** ffetarget_print_binary (FILE *f, ffetarg *** 1828,1832 **** ffetargetCharacter1 val; ! ffetarget_print_character1(stdout,val); */ void --- 1859,1863 ---- ffetargetCharacter1 val; ! ffetarget_print_character1(dmpout,val); */ void *************** ffetarget_print_character1 (FILE *f, ffe *** 1836,1843 **** ffetargetCharacterSize i; ! fputc ('\'', stdout); for (i = 0, p = value.text; i < value.length; ++i, ++p) ffetarget_print_char_ (f, *p); ! fputc ('\'', stdout); } --- 1867,1874 ---- ffetargetCharacterSize i; ! fputc ('\'', dmpout); for (i = 0, p = value.text; i < value.length; ++i, ++p) ffetarget_print_char_ (f, *p); ! fputc ('\'', dmpout); } *************** ffetarget_print_character1 (FILE *f, ffe *** 1845,1849 **** ffetargetHollerith val; ! ffetarget_print_hollerith(stdout,val); */ void --- 1876,1880 ---- ffetargetHollerith val; ! ffetarget_print_hollerith(dmpout,val); */ void *************** ffetarget_print_hollerith (FILE *f, ffet *** 1853,1860 **** ffetargetHollerithSize i; ! fputc ('\'', stdout); for (i = 0, p = value.text; i < value.length; ++i, ++p) ffetarget_print_char_ (f, *p); ! fputc ('\'', stdout); } --- 1884,1891 ---- ffetargetHollerithSize i; ! fputc ('\'', dmpout); for (i = 0, p = value.text; i < value.length; ++i, ++p) ffetarget_print_char_ (f, *p); ! fputc ('\'', dmpout); } *************** ffetarget_print_hollerith (FILE *f, ffet *** 1862,1866 **** ffetargetTypeless val; ! ffetarget_print_octal(stdout,val); */ void --- 1893,1897 ---- ffetargetTypeless val; ! ffetarget_print_octal(dmpout,val); */ void *************** ffetarget_print_octal (FILE *f, ffetarge *** 1871,1875 **** if (f == NULL) ! f = stdout; p = &digits[ARRAY_SIZE (digits) - 3]; --- 1902,1906 ---- if (f == NULL) ! f = dmpout; p = &digits[ARRAY_SIZE (digits) - 3]; *************** ffetarget_print_octal (FILE *f, ffetarge *** 1887,1891 **** ffetargetTypeless val; ! ffetarget_print_hex(stdout,val); */ void --- 1918,1922 ---- ffetargetTypeless val; ! ffetarget_print_hex(dmpout,val); */ void *************** ffetarget_print_hex (FILE *f, ffetargetT *** 1897,1901 **** if (f == NULL) ! f = stdout; p = &digits[ARRAY_SIZE (digits) - 3]; --- 1928,1932 ---- if (f == NULL) ! f = dmpout; p = &digits[ARRAY_SIZE (digits) - 3]; diff -rcp2N g77-0.5.17/f/target.h g77-0.5.18/f/target.h *** g77-0.5.17/f/target.h Thu Nov 2 07:58:35 1995 --- g77-0.5.18/f/target.h Mon Mar 18 16:47:45 1996 *************** the Free Software Foundation, 59 Temple *** 142,150 **** /* 1 if external Fortran names with underscores already in them should have an extra underscore appended (in addition to the one they ! might already have appened if FFETARGET_defaultEXTERNAL_UNDERSCORED). ! NOTE: See gcc/f/com.c for other changes that need to be made ! if this is not #define'd to be 1, but underscoring is turned on. ! Right now there's only the option to disable underscoring in general, ! not to change just this setting. */ #ifndef FFETARGET_defaultUNDERSCORED_EXTERNAL_UNDERSCORED --- 142,146 ---- /* 1 if external Fortran names with underscores already in them should have an extra underscore appended (in addition to the one they ! might already have appened if FFETARGET_defaultEXTERNAL_UNDERSCORED). */ #ifndef FFETARGET_defaultUNDERSCORED_EXTERNAL_UNDERSCORED *************** the Free Software Foundation, 59 Temple *** 223,233 **** #define FFETARGET_okINTEGER1 1 ! #define FFETARGET_okINTEGER2 0 ! #define FFETARGET_okINTEGER3 0 ! #define FFETARGET_okINTEGER4 0 #define FFETARGET_okLOGICAL1 1 ! #define FFETARGET_okLOGICAL2 0 ! #define FFETARGET_okLOGICAL3 0 ! #define FFETARGET_okLOGICAL4 0 #define FFETARGET_okREAL1 1 #define FFETARGET_okREAL2 1 --- 219,229 ---- #define FFETARGET_okINTEGER1 1 ! #define FFETARGET_okINTEGER2 1 ! #define FFETARGET_okINTEGER3 1 ! #define FFETARGET_okINTEGER4 1 #define FFETARGET_okLOGICAL1 1 ! #define FFETARGET_okLOGICAL2 1 ! #define FFETARGET_okLOGICAL3 1 ! #define FFETARGET_okLOGICAL4 1 #define FFETARGET_okREAL1 1 #define FFETARGET_okREAL2 1 *************** typedef short int ffetargetInteger3; *** 283,288 **** #if FFETARGET_okINTEGER4 typedef long long int ffetargetInteger4; ! #define ffetargetInteger4_f ! ? #endif #if FFETARGET_okINTEGER5 --- 279,283 ---- #if FFETARGET_okINTEGER4 typedef long long int ffetargetInteger4; ! #define ffetargetInteger4_f "ll" #endif #if FFETARGET_okINTEGER5 *************** typedef short int ffetargetLogical3; *** 320,325 **** #if FFETARGET_okLOGICAL4 typedef long long int ffetargetLogical4; ! #define ffetargetLogical4_f ! ? #endif #if FFETARGET_okLOGICAL5 --- 315,319 ---- #if FFETARGET_okLOGICAL4 typedef long long int ffetargetLogical4; ! #define ffetargetLogical4_f "ll" #endif #if FFETARGET_okLOGICAL5 *************** ffebad ffetarget_convert_character1_holl *** 592,602 **** ffetargetHollerith l, mallocPool pool); ! ffebad ffetarget_convert_character1_integer1 (ffetargetCharacter1 *res, ffetargetCharacterSize res_size, ! ffetargetInteger1 l, mallocPool pool); ! ffebad ffetarget_convert_character1_logical1 (ffetargetCharacter1 *res, ffetargetCharacterSize res_size, ! ffetargetLogical1 l, mallocPool pool); ffebad ffetarget_convert_character1_typeless (ffetargetCharacter1 *res, --- 586,596 ---- ffetargetHollerith l, mallocPool pool); ! ffebad ffetarget_convert_character1_integer4 (ffetargetCharacter1 *res, ffetargetCharacterSize res_size, ! ffetargetInteger4 l, mallocPool pool); ! ffebad ffetarget_convert_character1_logical4 (ffetargetCharacter1 *res, ffetargetCharacterSize res_size, ! ffetargetLogical4 l, mallocPool pool); ffebad ffetarget_convert_character1_typeless (ffetargetCharacter1 *res, *************** void ffetarget_integer_bad_magical_prece *** 699,702 **** --- 693,700 ---- ffelexToken minus, ffelexToken higher_op); + #if FFETARGET_okCHARACTER1 + bool ffetarget_iszero_character1 (ffetargetCharacter1 constant); + #endif + bool ffetarget_iszero_hollerith (ffetargetHollerith constant); void ffetarget_layout (char *error_text, ffetargetAlign *alignment, ffetargetAlign *modulo, ffetargetOffset *size, *************** void *ffetarget_memcpy_ (void *dst, void *** 857,860 **** --- 855,859 ---- #define ffetarget_add_integer2(res,l,r) (*(res) = (l) + (r), FFEBAD) #define ffetarget_add_integer3(res,l,r) (*(res) = (l) + (r), FFEBAD) + #define ffetarget_add_integer4(res,l,r) (*(res) = (l) + (r), FFEBAD) #ifdef REAL_ARITHMETIC #define ffetarget_add_real1(res,l,r) \ *************** void *ffetarget_memcpy_ (void *dst, void *** 881,887 **** --- 880,888 ---- #define ffetarget_and_integer2(res,l,r) (*(res) = (l) & (r), FFEBAD) #define ffetarget_and_integer3(res,l,r) (*(res) = (l) & (r), FFEBAD) + #define ffetarget_and_integer4(res,l,r) (*(res) = (l) & (r), FFEBAD) #define ffetarget_and_logical1(res,l,r) (*(res) = (l) && (r), FFEBAD) #define ffetarget_and_logical2(res,l,r) (*(res) = (l) && (r), FFEBAD) #define ffetarget_and_logical3(res,l,r) (*(res) = (l) && (r), FFEBAD) + #define ffetarget_and_logical4(res,l,r) (*(res) = (l) && (r), FFEBAD) #define ffetarget_binarymil(v,t) ffetarget_typeless_binary (v, t) #define ffetarget_binaryvxt(v,t) ffetarget_typeless_binary (v, t) *************** void *ffetarget_memcpy_ (void *dst, void *** 889,895 **** --- 890,898 ---- #define ffetarget_cmp_integer2(l,r) ((l) == (r) ? 0 : ((l) < (r) ? -1 : 1)) #define ffetarget_cmp_integer3(l,r) ((l) == (r) ? 0 : ((l) < (r) ? -1 : 1)) + #define ffetarget_cmp_integer4(l,r) ((l) == (r) ? 0 : ((l) < (r) ? -1 : 1)) #define ffetarget_cmp_logical1(l,r) ((l) == (r) ? 0 : ((l) < (r) ? -1 : 1)) #define ffetarget_cmp_logical2(l,r) ((l) == (r) ? 0 : ((l) < (r) ? -1 : 1)) #define ffetarget_cmp_logical3(l,r) ((l) == (r) ? 0 : ((l) < (r) ? -1 : 1)) + #define ffetarget_cmp_logical4(l,r) ((l) == (r) ? 0 : ((l) < (r) ? -1 : 1)) #define ffetarget_cmp_real1(l,r) memcmp (&(l), &(r), sizeof(l)) #define ffetarget_cmp_real2(l,r) memcmp (&(l), &(r), sizeof(l)) *************** void *ffetarget_memcpy_ (void *dst, void *** 897,900 **** --- 900,915 ---- #define ffetarget_cmp_typeless(l,r) \ memcmp (&(l), &(r), sizeof ((l))) + #define ffetarget_convert_character1_integer1(res,res_size,l,pool) \ + ffetarget_convert_character1_integer4(res,res_size,(ffetargetInteger4)l,pool) + #define ffetarget_convert_character1_integer2(res,res_size,l,pool) \ + ffetarget_convert_character1_integer4(res,res_size,(ffetargetInteger4)l,pool) + #define ffetarget_convert_character1_integer3(res,res_size,l,pool) \ + ffetarget_convert_character1_integer4(res,res_size,(ffetargetInteger4)l,pool) + #define ffetarget_convert_character1_logical1(res,res_size,l,pool) \ + ffetarget_convert_character1_logical4(res,res_size,(ffetargetLogical4)l,pool) + #define ffetarget_convert_character1_logical2(res,res_size,l,pool) \ + ffetarget_convert_character1_logical4(res,res_size,(ffetargetLogical4)l,pool) + #define ffetarget_convert_character1_logical3(res,res_size,l,pool) \ + ffetarget_convert_character1_logical4(res,res_size,(ffetargetLogical4)l,pool) #define ffetarget_convert_complex1_character1(res,l) \ ffetarget_convert_any_character1_ ((char *) (res), sizeof(*(res)), l) *************** void *ffetarget_memcpy_ (void *dst, void *** 929,932 **** --- 944,950 ---- #endif #define ffetarget_convert_complex1_integer1 ffetarget_convert_complex1_integer + #define ffetarget_convert_complex1_integer2 ffetarget_convert_complex1_integer + #define ffetarget_convert_complex1_integer3 ffetarget_convert_complex1_integer + #define ffetarget_convert_complex1_integer4 ffetarget_convert_complex1_integer #ifdef REAL_ARITHMETIC #define ffetarget_convert_complex1_real1(res,l) \ *************** void *ffetarget_memcpy_ (void *dst, void *** 978,981 **** --- 996,1002 ---- #endif #define ffetarget_convert_complex2_integer1 ffetarget_convert_complex2_integer + #define ffetarget_convert_complex2_integer2 ffetarget_convert_complex2_integer + #define ffetarget_convert_complex2_integer3 ffetarget_convert_complex2_integer + #define ffetarget_convert_complex2_integer4 ffetarget_convert_complex2_integer #ifdef REAL_ARITHMETIC #define ffetarget_convert_complex2_real1(res,l) \ *************** void *ffetarget_memcpy_ (void *dst, void *** 995,998 **** --- 1016,1094 ---- ((res)->real = (l), (res)->imaginary = 0, FFEBAD) #endif + #define ffetarget_convert_integer2_character1(res,l) \ + ffetarget_convert_integer1_character1(res,l) + #define ffetarget_convert_integer2_complex1(res,l) \ + ffetarget_convert_integer1_complex1(res,l) + #define ffetarget_convert_integer2_complex2(res,l) \ + ffetarget_convert_integer1_complex2(res,l) + #define ffetarget_convert_integer2_hollerith(res,l) \ + ffetarget_convert_integer1_hollerith(res,l) + #define ffetarget_convert_integer2_integer1(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_integer2_integer3(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_integer2_integer4(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_integer2_logical1(res,l) \ + ffetarget_convert_integer1_logical1(res,l) + #define ffetarget_convert_integer2_logical2(res,l) \ + ffetarget_convert_integer2_logical1(res,l) + #define ffetarget_convert_integer2_logical3(res,l) \ + ffetarget_convert_integer2_logical1(res,l) + #define ffetarget_convert_integer2_logical4(res,l) \ + ffetarget_convert_integer2_logical1(res,l) + #define ffetarget_convert_integer2_real1(res,l) \ + ffetarget_convert_integer1_real1(res,l) + #define ffetarget_convert_integer2_real2(res,l) \ + ffetarget_convert_integer1_real2(res,l) + #define ffetarget_convert_integer2_typeless(res,l) \ + ffetarget_convert_integer1_typeless(res,l) + #define ffetarget_convert_integer3_character1(res,l) \ + ffetarget_convert_integer1_character1(res,l) + #define ffetarget_convert_integer3_complex1(res,l) \ + ffetarget_convert_integer1_complex1(res,l) + #define ffetarget_convert_integer3_complex2(res,l) \ + ffetarget_convert_integer1_complex2(res,l) + #define ffetarget_convert_integer3_hollerith(res,l) \ + ffetarget_convert_integer1_hollerith(res,l) + #define ffetarget_convert_integer3_integer1(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_integer3_integer2(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_integer3_integer4(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_integer3_logical1(res,l) \ + ffetarget_convert_integer1_logical1(res,l) + #define ffetarget_convert_integer3_logical2(res,l) \ + ffetarget_convert_integer3_logical1(res,l) + #define ffetarget_convert_integer3_logical3(res,l) \ + ffetarget_convert_integer3_logical1(res,l) + #define ffetarget_convert_integer3_logical4(res,l) \ + ffetarget_convert_integer3_logical1(res,l) + #define ffetarget_convert_integer3_real1(res,l) \ + ffetarget_convert_integer1_real1(res,l) + #define ffetarget_convert_integer3_real2(res,l) \ + ffetarget_convert_integer1_real2(res,l) + #define ffetarget_convert_integer3_typeless(res,l) \ + ffetarget_convert_integer1_typeless(res,l) + #define ffetarget_convert_integer4_character1(res,l) \ + ffetarget_convert_integer1_character1(res,l) + #define ffetarget_convert_integer4_complex1(res,l) \ + ffetarget_convert_integer1_complex1(res,l) + #define ffetarget_convert_integer4_complex2(res,l) \ + ffetarget_convert_integer1_complex2(res,l) + #define ffetarget_convert_integer4_hollerith(res,l) \ + ffetarget_convert_integer1_hollerith(res,l) + #define ffetarget_convert_integer4_integer1(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_integer4_integer2(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_integer4_integer3(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_integer4_logical1(res,l) \ + ffetarget_convert_integer1_logical1(res,l) + #define ffetarget_convert_integer4_logical2(res,l) \ + ffetarget_convert_integer1_logical1(res,l) + #define ffetarget_convert_integer4_logical3(res,l) \ + ffetarget_convert_integer1_logical1(res,l) + #define ffetarget_convert_integer4_logical4(res,l) \ + ffetarget_convert_integer1_logical1(res,l) + #define ffetarget_convert_integer4_real1(res,l) \ + ffetarget_convert_integer1_real1(res,l) + #define ffetarget_convert_integer4_real2(res,l) \ + ffetarget_convert_integer1_real2(res,l) + #define ffetarget_convert_integer4_typeless(res,l) \ + ffetarget_convert_integer1_typeless(res,l) #define ffetarget_convert_logical1_character1(res,l) \ ffetarget_convert_any_character1_ ((char *) (res), sizeof(*(res)), l) *************** void *ffetarget_memcpy_ (void *dst, void *** 1003,1009 **** --- 1099,1107 ---- #define ffetarget_convert_logical1_logical2(res,l) (*(res) = (l), FFEBAD) #define ffetarget_convert_logical1_logical3(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_logical1_logical4(res,l) (*(res) = (l), FFEBAD) #define ffetarget_convert_logical1_integer1(res,l) (*(res) = (l), FFEBAD) #define ffetarget_convert_logical1_integer2(res,l) (*(res) = (l), FFEBAD) #define ffetarget_convert_logical1_integer3(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_logical1_integer4(res,l) (*(res) = (l), FFEBAD) #define ffetarget_convert_logical2_character1(res,l) \ ffetarget_convert_any_character1_ ((char *) (res), sizeof(*(res)), l) *************** void *ffetarget_memcpy_ (void *dst, void *** 1014,1020 **** --- 1112,1120 ---- #define ffetarget_convert_logical2_logical1(res,l) (*(res) = (l), FFEBAD) #define ffetarget_convert_logical2_logical3(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_logical2_logical4(res,l) (*(res) = (l), FFEBAD) #define ffetarget_convert_logical2_integer1(res,l) (*(res) = (l), FFEBAD) #define ffetarget_convert_logical2_integer2(res,l) (*(res) = (l), FFEBAD) #define ffetarget_convert_logical2_integer3(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_logical2_integer4(res,l) (*(res) = (l), FFEBAD) #define ffetarget_convert_logical3_character1(res,l) \ ffetarget_convert_any_character1_ ((char *) (res), sizeof(*(res)), l) *************** void *ffetarget_memcpy_ (void *dst, void *** 1025,1031 **** --- 1125,1146 ---- #define ffetarget_convert_logical3_logical1(res,l) (*(res) = (l), FFEBAD) #define ffetarget_convert_logical3_logical2(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_logical3_logical4(res,l) (*(res) = (l), FFEBAD) #define ffetarget_convert_logical3_integer1(res,l) (*(res) = (l), FFEBAD) #define ffetarget_convert_logical3_integer2(res,l) (*(res) = (l), FFEBAD) #define ffetarget_convert_logical3_integer3(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_logical3_integer4(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_logical4_character1(res,l) \ + ffetarget_convert_any_character1_ ((char *) (res), sizeof(*(res)), l) + #define ffetarget_convert_logical4_hollerith(res,l) \ + ffetarget_convert_any_hollerith_ ((char *) (res), sizeof(*(res)), l) + #define ffetarget_convert_logical4_typeless(res,l) \ + ffetarget_convert_any_typeless_ ((char *) (res), sizeof(*(res)), l) + #define ffetarget_convert_logical4_logical1(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_logical4_logical2(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_logical4_logical3(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_logical4_integer1(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_logical4_integer2(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_logical4_integer3(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_logical4_integer4(res,l) (*(res) = (l), FFEBAD) #define ffetarget_convert_integer1_character1(res,l) \ ffetarget_convert_any_character1_ ((char *) (res), sizeof(*(res)), l) *************** void *ffetarget_memcpy_ (void *dst, void *** 1036,1042 **** --- 1151,1159 ---- #define ffetarget_convert_integer1_integer2(res,l) (*(res) = (l), FFEBAD) #define ffetarget_convert_integer1_integer3(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_integer1_integer4(res,l) (*(res) = (l), FFEBAD) #define ffetarget_convert_integer1_logical1(res,l) (*(res) = (l), FFEBAD) #define ffetarget_convert_integer1_logical2(res,l) (*(res) = (l), FFEBAD) #define ffetarget_convert_integer1_logical3(res,l) (*(res) = (l), FFEBAD) + #define ffetarget_convert_integer1_logical4(res,l) (*(res) = (l), FFEBAD) #ifdef REAL_ARITHMETIC #define ffetarget_convert_integer1_real1(res,l) \ *************** void *ffetarget_memcpy_ (void *dst, void *** 1074,1077 **** --- 1191,1200 ---- #define ffetarget_convert_real1_hollerith(res,l) \ ffetarget_convert_any_hollerith_ ((char *) (res), sizeof(*(res)), l) + #define ffetarget_convert_real1_integer2(res,l) \ + ffetarget_convert_real1_integer1(res,l) + #define ffetarget_convert_real1_integer3(res,l) \ + ffetarget_convert_real1_integer1(res,l) + #define ffetarget_convert_real1_integer4(res,l) \ + ffetarget_convert_real1_integer1(res,l) #define ffetarget_convert_real1_typeless(res,l) \ ffetarget_convert_any_typeless_ ((char *) (res), sizeof(*(res)), l) *************** void *ffetarget_memcpy_ (void *dst, void *** 1102,1105 **** --- 1225,1234 ---- #define ffetarget_convert_real2_hollerith(res,l) \ ffetarget_convert_any_hollerith_ ((char *) (res), sizeof(*(res)), l) + #define ffetarget_convert_real2_integer2(res,l) \ + ffetarget_convert_real2_integer1(res,l) + #define ffetarget_convert_real2_integer3(res,l) \ + ffetarget_convert_real2_integer1(res,l) + #define ffetarget_convert_real2_integer4(res,l) \ + ffetarget_convert_real2_integer1(res,l) #define ffetarget_convert_real2_typeless(res,l) \ ffetarget_convert_any_typeless_ ((char *) (res), sizeof(*(res)), l) *************** void *ffetarget_memcpy_ (void *dst, void *** 1130,1133 **** --- 1259,1268 ---- (((r) == 0) ? (*(res) = 0, FFEBAD_DIV_BY_ZERO) \ : (*(res) = (l) / (r), FFEBAD)) + #define ffetarget_divide_integer2(res,l,r) \ + ffetarget_divide_integer1(res,l,r) + #define ffetarget_divide_integer3(res,l,r) \ + ffetarget_divide_integer1(res,l,r) + #define ffetarget_divide_integer4(res,l,r) \ + ffetarget_divide_integer1(res,l,r) #ifdef REAL_ARITHMETIC #define ffetarget_divide_real1(res,l,r) \ *************** void *ffetarget_memcpy_ (void *dst, void *** 1198,1201 **** --- 1333,1338 ---- #define ffetarget_eq_integer3(res,l,r) \ (*(res) = ((l) == (r)) ? TRUE : FALSE, FFEBAD) + #define ffetarget_eq_integer4(res,l,r) \ + (*(res) = ((l) == (r)) ? TRUE : FALSE, FFEBAD) #ifdef REAL_ARITHMETIC #define ffetarget_eq_real1(res,l,r) \ *************** void *ffetarget_memcpy_ (void *dst, void *** 1220,1226 **** --- 1357,1365 ---- #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_integer4(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_eqv_logical4(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 *** 1229,1232 **** --- 1368,1373 ---- #define ffetarget_ge_integer3(res,l,r) \ (*(res) = ((l) >= (r)) ? TRUE : FALSE, FFEBAD) + #define ffetarget_ge_integer4(res,l,r) \ + (*(res) = ((l) >= (r)) ? TRUE : FALSE, FFEBAD) #ifdef REAL_ARITHMETIC #define ffetarget_ge_real1(res,l,r) \ *************** void *ffetarget_memcpy_ (void *dst, void *** 1254,1257 **** --- 1395,1400 ---- #define ffetarget_gt_integer3(res,l,r) \ (*(res) = ((l) > (r)) ? TRUE : FALSE, FFEBAD) + #define ffetarget_gt_integer4(res,l,r) \ + (*(res) = ((l) > (r)) ? TRUE : FALSE, FFEBAD) #ifdef REAL_ARITHMETIC #define ffetarget_gt_real1(res,l,r) \ *************** void *ffetarget_memcpy_ (void *dst, void *** 1301,1304 **** --- 1444,1448 ---- #define ffetarget_iszero_real2(l) ((l) == 0.) #endif + #define ffetarget_iszero_typeless(l) ((l) == 0) #define ffetarget_logical1(v,truth) (*(v) = truth ? 1 : 0) #define ffetarget_le_integer1(res,l,r) \ *************** void *ffetarget_memcpy_ (void *dst, void *** 1308,1311 **** --- 1452,1457 ---- #define ffetarget_le_integer3(res,l,r) \ (*(res) = ((l) <= (r)) ? TRUE : FALSE, FFEBAD) + #define ffetarget_le_integer4(res,l,r) \ + (*(res) = ((l) <= (r)) ? TRUE : FALSE, FFEBAD) #ifdef REAL_ARITHMETIC #define ffetarget_le_real1(res,l,r) \ *************** void *ffetarget_memcpy_ (void *dst, void *** 1335,1338 **** --- 1481,1486 ---- #define ffetarget_lt_integer3(res,l,r) \ (*(res) = ((l) < (r)) ? TRUE : FALSE, FFEBAD) + #define ffetarget_lt_integer4(res,l,r) \ + (*(res) = ((l) < (r)) ? TRUE : FALSE, FFEBAD) #ifdef REAL_ARITHMETIC #define ffetarget_lt_real1(res,l,r) \ *************** void *ffetarget_memcpy_ (void *dst, void *** 1368,1371 **** --- 1516,1520 ---- #define ffetarget_multiply_integer2(res,l,r) (*(res) = (l) * (r), FFEBAD) #define ffetarget_multiply_integer3(res,l,r) (*(res) = (l) * (r), FFEBAD) + #define ffetarget_multiply_integer4(res,l,r) (*(res) = (l) * (r), FFEBAD) #ifdef REAL_ARITHMETIC #define ffetarget_multiply_real1(res,l,r) \ *************** void *ffetarget_memcpy_ (void *dst, void *** 1420,1423 **** --- 1569,1574 ---- #define ffetarget_ne_integer3(res,l,r) \ (*(res) = ((l) != (r)) ? TRUE : FALSE, FFEBAD) + #define ffetarget_ne_integer4(res,l,r) \ + (*(res) = ((l) != (r)) ? TRUE : FALSE, FFEBAD) #ifdef REAL_ARITHMETIC #define ffetarget_ne_real1(res,l,r) \ *************** void *ffetarget_memcpy_ (void *dst, void *** 1442,1454 **** --- 1593,1609 ---- #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_integer4(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_neqv_logical4(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) #define ffetarget_not_integer3(res,l) (*(res) = ~(l), FFEBAD) + #define ffetarget_not_integer4(res,l) (*(res) = ~(l), FFEBAD) #define ffetarget_not_logical1(res,l) (*(res) = !(l), FFEBAD) #define ffetarget_not_logical2(res,l) (*(res) = !(l), FFEBAD) #define ffetarget_not_logical3(res,l) (*(res) = !(l), FFEBAD) + #define ffetarget_not_logical4(res,l) (*(res) = !(l), FFEBAD) #define ffetarget_octalmil(v,t) ffetarget_typeless_octal (v, t) #define ffetarget_octalvxt(v,t) ffetarget_typeless_octal (v, t) *************** void *ffetarget_memcpy_ (void *dst, void *** 1461,1467 **** --- 1616,1624 ---- #define ffetarget_or_integer2(res,l,r) (*(res) = (l) | (r), FFEBAD) #define ffetarget_or_integer3(res,l,r) (*(res) = (l) | (r), FFEBAD) + #define ffetarget_or_integer4(res,l,r) (*(res) = (l) | (r), FFEBAD) #define ffetarget_or_logical1(res,l,r) (*(res) = (l) || (r), FFEBAD) #define ffetarget_or_logical2(res,l,r) (*(res) = (l) || (r), FFEBAD) #define ffetarget_or_logical3(res,l,r) (*(res) = (l) || (r), FFEBAD) + #define ffetarget_or_logical4(res,l,r) (*(res) = (l) || (r), FFEBAD) #define ffetarget_print_binarymil(f,v) ffetarget_print_binary (f, v) #define ffetarget_print_binaryvxt(f,v) ffetarget_print_binary (f, v) *************** void *ffetarget_memcpy_ (void *dst, void *** 1476,1479 **** --- 1633,1638 ---- #define ffetarget_print_integer3(f,v) \ fprintf ((f), "%" ffetargetInteger3_f "d", (v)) + #define ffetarget_print_integer4(f,v) \ + fprintf ((f), "%" ffetargetInteger4_f "d", (v)) #define ffetarget_print_logical1(f,v) \ fprintf ((f), "%" ffetargetLogical1_f "d", (v)) *************** void *ffetarget_memcpy_ (void *dst, void *** 1482,1485 **** --- 1641,1646 ---- #define ffetarget_print_logical3(f,v) \ fprintf ((f), "%" ffetargetLogical3_f "d", (v)) + #define ffetarget_print_logical4(f,v) \ + fprintf ((f), "%" ffetargetLogical4_f "d", (v)) #define ffetarget_print_octalmil(f,v) ffetarget_print_octal(f,v) #define ffetarget_print_octalvxt(f,v) ffetarget_print_octal(f,v) *************** void *ffetarget_memcpy_ (void *dst, void *** 1562,1565 **** --- 1723,1727 ---- #define ffetarget_subtract_integer2(res,l,r) (*(res) = (l) - (r), FFEBAD) #define ffetarget_subtract_integer3(res,l,r) (*(res) = (l) - (r), FFEBAD) + #define ffetarget_subtract_integer4(res,l,r) (*(res) = (l) - (r), FFEBAD) #ifdef REAL_ARITHMETIC #define ffetarget_subtract_real1(res,l,r) \ *************** void *ffetarget_memcpy_ (void *dst, void *** 1616,1619 **** --- 1778,1782 ---- #define ffetarget_uminus_integer2(res,l) (*(res) = -(l), FFEBAD) #define ffetarget_uminus_integer3(res,l) (*(res) = -(l), FFEBAD) + #define ffetarget_uminus_integer4(res,l) (*(res) = -(l), FFEBAD) #ifdef REAL_ARITHMETIC #define ffetarget_uminus_real1(res,l) \ *************** void *ffetarget_memcpy_ (void *dst, void *** 1643,1649 **** --- 1806,1814 ---- #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_integer4(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) + #define ffetarget_xor_logical4(res,l,r) (*(res) = (l) != (r), FFEBAD) /* End of #include file. */ diff -rcp2N g77-0.5.17/f/top.c g77-0.5.18/f/top.c *** g77-0.5.17/f/top.c Thu Oct 26 17:23:32 1995 --- g77-0.5.18/f/top.c Mon Mar 18 20:46:01 1996 *************** the Free Software Foundation, 59 Temple *** 62,65 **** --- 62,66 ---- int flag_traditional; /* Shouldn't need this (C front end only)! */ + bool ffe_is_do_internal_checks_ = TRUE; bool ffe_is_90_ = FFETARGET_defaultIS_90; bool ffe_is_automatic_ = FFETARGET_defaultIS_AUTOMATIC; *************** bool ffe_is_backslash_ = FFETARGET_defau *** 67,70 **** --- 68,72 ---- bool ffe_is_underscoring_ = FFETARGET_defaultEXTERNAL_UNDERSCORED || FFETARGET_defaultUNDERSCORED_EXTERNAL_UNDERSCORED; + bool ffe_is_second_underscore_ = FFETARGET_defaultUNDERSCORED_EXTERNAL_UNDERSCORED; bool ffe_is_dollar_ok_ = FFETARGET_defaultIS_DOLLAR_OK; bool ffe_is_f2c_ = FFETARGET_defaultIS_F2C; *************** bool ffe_is_vxt_not_90_ = FFETARGET_defa *** 85,88 **** --- 87,91 ---- bool ffe_is_warn_implicit_ = FALSE; bool ffe_is_warn_surprising_ = FALSE; + bool ffe_is_zeros_ = FALSE; ffeCase ffe_case_intrin_ = FFETARGET_defaultCASE_INTRIN; ffeCase ffe_case_match_ = FFETARGET_defaultCASE_MATCH; *************** ffe_decode_option (char *opt) *** 157,160 **** --- 160,170 ---- ; /* Someday generate program to print version info. */ + else if (strcmp (&opt[2], "set-g77-defaults") == 0) + { + ffe_is_do_internal_checks_ = 0; + flag_move_all_movables = 1; + flag_reduce_all_givs = 1; + flag_rerun_loop_opt = 1; + } else if (strcmp (&opt[2], "ident") == 0) ffe_set_is_ident (TRUE); *************** ffe_decode_option (char *opt) *** 233,236 **** --- 243,250 ---- else if (strcmp (&opt[2], "no-underscoring") == 0) ffe_set_is_underscoring (FALSE); + else if (strcmp (&opt[2], "second-underscore") == 0) + ffe_set_is_second_underscore (TRUE); + else if (strcmp (&opt[2], "no-second-underscore") == 0) + ffe_set_is_second_underscore (FALSE); else if (strcmp (&opt[2], "intrin-case-initcap") == 0) ffe_set_case_intrin (FFE_caseINITCAP); *************** ffe_decode_option (char *opt) *** 353,356 **** --- 367,374 ---- else if (strcmp (&opt[2], "vxt-intrinsics-enable") == 0) ffe_set_intrinsic_state_vxt (FFE_intrinsicstateENABLED); + else if (strcmp (&opt[2], "zeros") == 0) + ffe_set_is_zeros (TRUE); + else if (strcmp (&opt[2], "no-zeros") == 0) + ffe_set_is_zeros (FALSE); else if (strncmp (&opt[2], "fixed-line-length-", strlen ("fixed-line-length-")) == 0) diff -rcp2N g77-0.5.17/f/top.h g77-0.5.18/f/top.h *** g77-0.5.17/f/top.h Thu Oct 26 17:24:17 1995 --- g77-0.5.18/f/top.h Mon Mar 18 16:56:33 1996 *************** typedef void *ffeUnionLongPtr; /* unused *** 79,86 **** --- 79,88 ---- /* Global objects accessed by users of this module. */ + extern bool ffe_is_do_internal_checks_; extern bool ffe_is_90_; extern bool ffe_is_automatic_; extern bool ffe_is_backslash_; extern bool ffe_is_underscoring_; + extern bool ffe_is_second_underscore_; extern bool ffe_is_dollar_ok_; extern bool ffe_is_f2c_; *************** extern bool ffe_is_vxt_not_90_; *** 100,103 **** --- 102,106 ---- extern bool ffe_is_warn_implicit_; extern bool ffe_is_warn_surprising_; + extern bool ffe_is_zeros_; extern ffeCase ffe_case_intrin_; extern ffeCase ffe_case_match_; *************** void ffe_terminate_4 (void); *** 155,158 **** --- 158,162 ---- #define ffe_is_automatic() ffe_is_automatic_ #define ffe_is_backslash() ffe_is_backslash_ + #define ffe_is_do_internal_checks() ffe_is_do_internal_checks_ #define ffe_is_dollar_ok() ffe_is_dollar_ok_ #define ffe_is_f2c() ffe_is_f2c_ *************** void ffe_terminate_4 (void); *** 166,169 **** --- 170,174 ---- #define ffe_is_pedantic_not_90() (ffe_is_pedantic_ && !ffe_is_90_) #define ffe_is_saveall() ffe_is_saveall_ + #define ffe_is_second_underscore() ffe_is_second_underscore_ #define ffe_is_ugly() ffe_is_ugly_ #define ffe_is_ugly_args() ffe_is_ugly_args_ *************** void ffe_terminate_4 (void); *** 174,177 **** --- 179,183 ---- #define ffe_is_warn_implicit() ffe_is_warn_implicit_ #define ffe_is_warn_surprising() ffe_is_warn_surprising_ + #define ffe_is_zeros() ffe_is_zeros_ #define ffe_fixed_line_length() ffe_fixed_line_length_ #define ffe_pool_file() (ffe_file_pool_) *************** void ffe_terminate_4 (void); *** 191,194 **** --- 197,201 ---- #define ffe_set_is_automatic(f) (ffe_is_automatic_ = (f)) #define ffe_set_is_backslash(f) (ffe_is_backslash_ = (f)) + #define ffe_set_is_do_internal_checks(f) (ffe_set_is_do_internal_checks_ = (f)) #define ffe_set_is_dollar_ok(f) (ffe_is_dollar_ok_ = (f)) #define ffe_set_is_f2c(f) (ffe_is_f2c_ = (f)) *************** void ffe_terminate_4 (void); *** 201,204 **** --- 208,212 ---- #define ffe_set_is_pedantic(f) (ffe_is_pedantic_ = (f)) #define ffe_set_is_saveall(f) (ffe_is_saveall_ = (f)) + #define ffe_set_is_second_underscore(f) (ffe_is_second_underscore_ = (f)) #define ffe_set_is_ugly(f) (ffe_is_ugly_ = (f)) #define ffe_set_is_ugly_args(f) (ffe_is_ugly_args_ = (f)) *************** void ffe_terminate_4 (void); *** 209,212 **** --- 217,221 ---- #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_is_zeros(f) (ffe_is_zeros_ = (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.17/f/where.c g77-0.5.18/f/where.c *** g77-0.5.17/f/where.c Wed Aug 30 15:53:32 1995 --- g77-0.5.18/f/where.c Mon Dec 4 01:10:30 1995 *************** ffewhere_line_kill (ffewhereLine wl) *** 229,233 **** #if 0 if (!ffewhere_line_is_unknown (wl)) ! fprintf (stdout, "; ffewhere_line_kill %" ffewhereLineNumber_f "u, uses=%" ffewhereUses_f_ "u\n", wl->line_num, wl->uses); --- 229,233 ---- #if 0 if (!ffewhere_line_is_unknown (wl)) ! fprintf (dmpout, "; ffewhere_line_kill %" ffewhereLineNumber_f "u, uses=%" ffewhereUses_f_ "u\n", wl->line_num, wl->uses); *************** ffewhere_line_new (ffewhereLineNumber ln *** 265,269 **** { #if 0 ! fprintf (stdout, "; ffewhere_line_new %" ffewhereLineNumber_f "u, lexer\n", ln); --- 265,269 ---- { #if 0 ! fprintf (dmpout, "; ffewhere_line_new %" ffewhereLineNumber_f "u, lexer\n", ln); *************** ffewhere_line_new (ffewhereLineNumber ln *** 293,297 **** { #if 0 ! fprintf (stdout, "; ffewhere_line_new %" ffewhereLineNumber_f "u, uses=%" ffewhereUses_f_ "u\n", ln, wl->uses); --- 293,297 ---- { #if 0 ! fprintf (dmpout, "; ffewhere_line_new %" ffewhereLineNumber_f "u, uses=%" ffewhereUses_f_ "u\n", ln, wl->uses); *************** ffewhere_line_use (ffewhereLine wl) *** 328,332 **** { #if 0 ! fprintf (stdout, "; ffewhere_line_use %" ffewhereLineNumber_f "u, uses=%" ffewhereUses_f_ "u\n", wl->line_num, wl->uses); #endif --- 328,332 ---- { #if 0 ! fprintf (dmpout, "; ffewhere_line_use %" ffewhereLineNumber_f "u, uses=%" ffewhereUses_f_ "u\n", wl->line_num, wl->uses); #endif diff -rcp2N g77-0.5.17/f/zzz.c g77-0.5.18/f/zzz.c *** g77-0.5.17/f/zzz.c Sat Nov 18 19:44:20 1995 --- g77-0.5.18/f/zzz.c Mon Apr 1 10:14:31 1996 *************** the Free Software Foundation, 59 Temple *** 44,48 **** #endif ! char *ffezzz_version_string = "0.5.17"; char *ffezzz_date = FFEZZZ_DATE; char *ffezzz_time = FFEZZZ_TIME; --- 44,48 ---- #endif ! char *ffezzz_version_string = "0.5.18"; char *ffezzz_date = FFEZZZ_DATE; char *ffezzz_time = FFEZZZ_TIME;