07/16/86 new_fortran options This segment describes in detail the new_fortran control arguments used to invoke the optimizer, the %options and %global statements, and the relationship between control arguments and %options or %global keywords. Invoking the optimizer: The optimizing phase of the compiler may be invoked by including either of the control arguments -optimize (-ot) or -safe_optimize (-safe_ot) on the command line used to invoke the compiler. The -full_optimize control argument invokes a phase to perform the following global optimizations: common subexpression removal, removal of invariants from loops, strength reduction, test replacement, constant propagation, and removal of useless assignments. Machine dependant global optimizations such as pulling register loads out of loops and global register allocation are also performed, as well as various local optimizations. The -safe_optimize control argument causes the same optimizations to occur, except that certain invariant operations within a loop that are not always executed when the loop is entered will not be moved out of the loop. (Operations which could cause division by zero or other error conditions are never removed in either mode.) The -full_optimize control argument will give correct results for almost all proper FORTRAN programs. The -safe_optimize control argument should be used only in the very unusual circumstance that a valid program signals the fixedoverflow, underflow, or overflow condition when optimized, when the unoptimized version did not signal such a condition. The -optimize control argument will invoke the default optimizer which will be either of '-full_optimize' or '-safe_optimize'. The default optimizer can be changed by the options: 'default_full' and 'default_safe'. The 'default_full' argument is the default. %global and %options statements: The %global and %options program statements can be used to specify certain optional behavior which is required in a given compilation or individual program unit. The syntax of these statements is: %global keyword,keyword,...; %options keyword,keyword,..., where the keywords may be chosen from the list below. If a %global statement is used, it must appear first in the source segment. %global lines may not be continued, but more than one may be used if needed. Control arguments given on the command line override conflicting options specified on a %global line. A warning message is printed when this happens. If conflicting options appear on the %global line(s), a warning message will be printed, and the last option seen will be used. The %options statement is used to specify specific options for a single compilation unit (program, subroutine, function, or block data). Options specified on a %options statement override those given in a %global statement and control arguments given on the command line. The %options statement must precede all other statements in the compilation unit, including implicit statements, comments, the subroutine, function or block data statement, etc. The options specified in a %options statement are in effect only for the compilation of the single routine within the compilation unit. This feature will, among other things, allow mixing of card and free form input in one source segment. If conflicting options appear on the %options line(s), a warning message will be printed, and the last option seen will be used. List of keywords: Key: A = control argument, G = %global, O = %options (AGO) ansi66 (A ) full_optimize (AGO) ansi77 (AG ) hexadecimal_floating_point (AGO) auto (AG ) la_auto (AG ) auto_zero (AG ) la_static (AG ) binary_floating_point (AG ) large_array (A ) brief (A ) line_numbers (A ) brief_table (A ) list (AGO) card (A ) long (A ) check (A ) long_profile (AGO) check_multiply (A ) map (AGO) default_full (AG ) no_auto_zero (AGO) default_safe (A ) no_check (AGO) fold (AGO) no_check_multiply (AGO) free (AGO) no_fold (AG ) no_large_array (A ) safe_optimize (A ) no_line_numbers (A ) severityN (A ) no_map (AGO) static (A ) no_optimize (AGO) stringrange (AGO) no_stringrange (AGO) subscriptrange (AGO) no_subscriptrange (A ) table (A ) no_table (A ) time (A ) no_version (A ) time_ot (AG ) no_very_large_array (AGO) truncate (AG ) no_vla_parm (A ) version (A ) non_relocatable (AG ) very_large_array (A ) optimize (AG ) very_large_common (A ) profile (AG ) vla_auto (A ) relocatable (AG ) vla_parm (AGO) round (AG ) vla_static Explanation of %global & %options keywords: ansi66 The program is interpreted according to the 1966 standard for FORTRAN, with Multics FORTRAN extensions. This is the default. ansi77 The program is interpreted according to the 1977 standard for FORTRAN, with Multics FORTRAN extensions. auto Makes automatic the default storage class. Ignored if a SAVE or AUTOMATIC statement was used. This is the default. auto_zero Automatic storage should be set to zero when allocated. May not be used in a %options statement. This is the default. binary_floating_point, bfp Floating point numbers are have an internal representation of 2 ** exponent * mantissa. This is the default. card Source is in card image format. Implies fold. check_multiply, ckmpy Add extra code to check to see if integer multiplication has resulted in an overflow. default_full, dff Set the default optimizer to be the 'full_optimizer'. (See '-optimize' and '-full_optimize') default_safe, dfs Set the default optimizer to be the 'safe_optimizer'. (See '-optimize' and '-safe_optimize') fold Upper case letters are mapped to lower case outside of character string constants. free Source is in free form format. Upper and lower case letters are distinct. hexadecimal_floating_point, hfp Floating point numbers have an internal representation of 16 ** exponent * mantissa. la_auto Used when more automatic storage is required by a program than would fit in the linkage section/stack frame. This still restricts individual automatic arrays to 255K words (max segment size). May not be used in %options statements. la_static Used when more static storage is required by a program than would fit in the linkage section/stack frame. This still restricts individual static arrays to 255K words (max segment size). May not be used in %options statements. large_array, la Used when more static or automatic storage is required by a program than would fit in the linkage section/stack frame. This still restricts individual arrays and common blocks to 255K words (max segment size). 'la' (large array) can't be used in %options statements. 'la' implies 'la_auto' and 'la_static'. no_auto_zero Do not zero automatic storage. May not be used in a %options statement. no_check_multiply, nckmpy Do not generate code to check to see if integer multiplication has resulted in an overflow. no_fold Uppercase letters are not mapped into lowercase form. no_large_array, nla Large array support is not needed. May not be used in a %options statement. no_stringrange, nstrg Do not generate range checking code for substrings. no_subscriptrange, nsubrg Do not generate range checking code for subscripts. no_very_large_array, nvla very large array support is not needed. May not be used in a %options statement. no_vla_parm no very large array parameters. May not be used in a %options statement. round Intermediate and final results of floating point calculations should be rounded before storing. This is the default. static Makes static the default storage class for variables in the program. Ignored if a SAVE or AUTOMATIC statment is used in the program. stringrange, strg Code should be generated to perform substring range checking. Ignored if optimization is being done. subscriptrange, subrg Code should be generated to perform subscript range checking. Ignored if optimization is being done. truncate Intermediate and final results of floating point calculations should be truncated before storing. very_large_array, vla Used when arrays and/or common blocks must exceed 255K words (segment size). 'vla' {very large array} may not be used in %options statements. 'vla' also implies 'la', 'vlc', 'vla_auto', 'vla_parm', and 'vla_static'. very_large_common, vlc Used when common blocks must exceed 255K words (segment size). 'vlc' {very large common} may not be used in %options statements. 'vlc' also implies 'vla_parm'. vla_auto Used when automatic arrays must exceed 255K words (segment size). May not be used in %options statements. It implies 'la_auto' and 'vla_parm'. vla_parm Used when a subroutine is passed parameters that might be vla (very large arrays). May not be used in %options statements. vla_static Used when static arrays must exceed 255K words (segment size). May not be used in %options statements. It implies 'la_static' and 'vla_parm'. Notes: For a complete list of control arguments accepted by new_fortran, type "help new_fortran". ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved