f77.f90.difs(5)
f77.f90.difs - Describes differences between the MIPSpro Fortran 77 compiler and the MIPSpro Fortran 90 compiler
Showing IRIX 6.5.30 (default release). Added in IRIX 6.5.19.
NAME f77.f90.difs - Describes differences between the MIPSpro Fortran 77 compiler and the MIPSpro Fortran 90 compiler DESCRIPTION This man page describes the major differences between versions of the Fortran compilers supported at SGI: the MIPSpro Fortran 77 compiler and the MIPSpro Fortran 90 compiler. This man page is divided into several sections: * Command line differences: this section summarizes the differences in command line options between the 2 compilers. * Access methods: this section summarizes differences in keyed access, sequential access and direct access in the compilers. * Data statement initializations: this section summarizes differences in type arguments, constants and expressions, and initializations. * Changes affecting intrinsics and libraries: this section summarizes the differences in the intrinsic and library routines. * Changes affecting I/O: this section summarizes differences that affect input and output. For information about the differences between the MIPSpro 7 Fortran 90 compiler and the Fortran 90/95 standard, see the MIPSpro Fortran Language Reference Manual, Volume 3. COMMAND LINE DIFFERENCES The following table summarizes the differences in command line options between the MIPSpro Fortran 77 compiler and the MIPSpro Fortran 90 compiler. For details about these options, see f77(1) and f90(1). Available on compiler option f77 f90 --------------------------------------------------------- align x x --------------------------------------------------------- ansi x x --------------------------------------------------------- apo x x --------------------------------------------------------- apokeep x x --------------------------------------------------------- apolist x x --------------------------------------------------------- auto_use x --------------------------------------------------------- avoid_gp_overflow x --------------------------------------------------------- backslash x --------------------------------------------------------- bigp_off x x --------------------------------------------------------- bigp_on x x --------------------------------------------------------- c x x --------------------------------------------------------- C x x --------------------------------------------------------- chararg1 x --------------------------------------------------------- check_bounds x x --------------------------------------------------------- chunk x x --------------------------------------------------------- cif x --------------------------------------------------------- col x x --------------------------------------------------------- cord x x --------------------------------------------------------- cpp x x --------------------------------------------------------- craylibs x --------------------------------------------------------- cray_mp x --------------------------------------------------------- d x x --------------------------------------------------------- D x x --------------------------------------------------------- DEBUG x x --------------------------------------------------------- d_lines x --------------------------------------------------------- default64 x --------------------------------------------------------- dump_input x --------------------------------------------------------- E x x --------------------------------------------------------- expand_include x --------------------------------------------------------- extend_source x x --------------------------------------------------------- fb x x ---------------------------------------------------------- fb_create x x ---------------------------------------------------------- fb_opt x x ---------------------------------------------------------- fe x ---------------------------------------------------------- feedback x ---------------------------------------------------------- fixedform x ---------------------------------------------------------- flist x ---------------------------------------------------------- FLIST x x ---------------------------------------------------------- freeform x ---------------------------------------------------------- ftpp x ---------------------------------------------------------- fullwarn x ---------------------------------------------------------- g x x ---------------------------------------------------------- G x x ---------------------------------------------------------- help x x ---------------------------------------------------------- i x x ---------------------------------------------------------- I x x ----------------------------------------------------------- ignore_suffix x x ----------------------------------------------------------- ipa x x ----------------------------------------------------------- INLINE x x ----------------------------------------------------------- IPA x x ----------------------------------------------------------- keep x x ----------------------------------------------------------- keepdollar x ----------------------------------------------------------- KPIC x x ----------------------------------------------------------- l x x ----------------------------------------------------------- listing x x ----------------------------------------------------------- lscs x x ----------------------------------------------------------- lscs_mp x x ----------------------------------------------------------- L x x ----------------------------------------------------------- LANG x x ----------------------------------------------------------- LIST x x ----------------------------------------------------------- LNO x x ----------------------------------------------------------- macro_expand x ----------------------------------------------------------- mips x x ----------------------------------------------------------- mp x x ----------------------------------------------------------- mp_keep x ----------------------------------------------------------- mp_list x ----------------------------------------------------------- mpio x ----------------------------------------------------------- mpschedtype x x ----------------------------------------------------------- M x ----------------------------------------------------------- MDupdate x x ----------------------------------------------------------- MP x x ----------------------------------------------------------- noappend x x ----------------------------------------------------------- nocpp x x ----------------------------------------------------------- noexpopt x ----------------------------------------------------------- noextend_source x x ----------------------------------------------------------- nof77 x ----------------------------------------------------------- noi4 x ----------------------------------------------------------- nonshared x ----------------------------------------------------------- nostdinc x x ----------------------------------------------------------- onetrip x ----------------------------------------------------------- o x x ----------------------------------------------------------- O x x ----------------------------------------------------------- OPT x x ----------------------------------------------------------- pad_char_literals x x ----------------------------------------------------------- pfa x ----------------------------------------------------------- pfakeep x ----------------------------------------------------------- pfalist x ----------------------------------------------------------- pfaprepass x ----------------------------------------------------------- P x x ----------------------------------------------------------- r x real_spec x ----------------------------------------------------------- r x r5000, r8000, r10000 x ----------------------------------------------------------- show x x ----------------------------------------------------------- show_defaults x x ----------------------------------------------------------- static x x ----------------------------------------------------------- static_threadprivate x ----------------------------------------------------------- S x x ----------------------------------------------------------- TARG x x ----------------------------------------------------------- TENV x x ----------------------------------------------------------- u x x ----------------------------------------------------------- use_readwrite_const|use_readonly_const x ----------------------------------------------------------- U x x ----------------------------------------------------------- version x x ----------------------------------------------------------- w x ----------------------------------------------------------- Wl x ----------------------------------------------------------- woff x x ----------------------------------------------------------- x x ----------------------------------------------------------- xgot x ----------------------------------------------------------- 64 x x ----------------------------------------------------------- n32 x ----------------------------------------------------------- -- x x ----------------------------------------------------------- Compiler options notes * In the MIPSpro Fortran 77 compiler, the -r option was used to define the real specification; -r5000, -r8000, and -r10000 were used to define the processor. In the MIPSpro Fortran 90 compiler the -real_spec option defined the real values; the -rprocessor option specified the processor. * DEBUG: The conform_check suboption is not available with the MIPspro Fortran 77 compiler. * LANG: The heap_allocation_threshold and IEEE_minus_zero suboptions are not available with the MIPSpro Fortran 77 compiler. * LNO: The pure suboption is not available with the MIPSpro Fortran 77 compiler; the pwr2 suboption is available only with the MIPSpro Fortran 77 compiler. All other options are available on all compilers. ACCESS METHODS The following items are included with the MIPSpro Fortran 77 compiler, but are not included in the MIPSpro Fortran 90 compiler: Keyed access (ACCESS='KEYED') * OPEN statement extensions: ACCESS='KEYED' KEY= specifier RECORDSIZE=specifier * INQUIRE statement extension: KEYED=specifier * READ statement extensions: KEY=specifier KEYID=specifier * DELETE statement * REWRITE statement * UNLOCK statement Direct access (ACCESS='DIRECT') * OPEN statement extension: ASSOCIATEVARIABLE=specifier MAXREC=specifier RECORDSIZE=specifier * DEFINE FILE statement * FIND statement Sequential access (ACCESS='SEQUENTIAL') Extension for ENDFILE to allow multifile by using a tab character rather than an EOF. stdin, stdout, and stderr I/O * ACCEPT statement on stdin only. Same as a READ statement with an asterisk (*) as the unit. * OPEN statement extensions: FILE='SYS$INPUT', 'SYS$OUTPUT', 'SYS$ERROR' * TYPE statement on stdout only; same as a PRINT statement * Allow the double asterisk (**) to indicate stderr unit * Special compile time option to allow reread from stdin after EOF ACCESS=APPEND in MIPSpro Fortran 77 is the same as POSITION=APPEND in the MIPSpro Fortran 90 compiler. DATA STATEMENT INITIALIZATIONS Some codes initialize the same local variable or part of a variable in a DATA statement. Some codes initialize data in COMMON blocks more than once, either in the same or in different program units. The MIPSpro Fortran 90 compiler allows COMMON blocks to be initialized in program units other than BLOCKDATA subprograms. Multiple initializations are not detected by the system. As a result, different processors may exhibit different behavior in cases of multiple initializations. For example, one processor may use the last value seen as the value of the initialized variable, while another may use the first value seen. Porting a code from one of these processors to another may result in differing results due to this difference. Permitting multiple initializations of the same or part of a variable is not an extension to the compiler standard. It is a user error that cannot be detected, in all cases, by the compiler. Behavior of multiple initializations is different across different OS platforms. For the program to be a standard conforming program with predictable results, you must remove multiple initializations. DATA statements are limited to integer or character types. Differences in type arguments * There is support in the MIPSpro Fortran 90 compiler for integer*8 i, but no support for integer i*8. * Array subscripts are limited to integer only -- for example, array (r) is now equivalent to array(int(r)). * The MIPSpro Fortran 90 compiler does not allow a quad type in a do-loop expression. * An entry must match the program unit; the entry in a subroutine cannot return a value. * Variable names are limited to 31 characters. * The MIPSpro Fortran 90 compiler does not support integer*8 as an imply-do-loop variable. Differences in constants, expressions, and interpretation * There is a difference in interpretation at runtime which may be difficult to identify in source code: for example, the following number in the MIPSpro Fortran 77 compiler: .1234567891234E+1 is equivalent to the following in the MIPSpro Fortran 90 compiler: .1234567891234D+1 * 2**31-1 (of integer*4 overflow in f90) is now huge()-1 * The complex expression (a,b) is supported, but (a+b, a-b) is not supported. * The following expression in the MIPSpro Fortran 77 compiler: a + -2.0 is not allowed with the MIPSpro Fortran 90 compiler. To port this expression to the MIPSpro compiler, change the expression as follows: a + (-2.0) This often happens in machine generated codes. * The MIPSpro Fortran 77 compiler supports the following forms of parameter statements: parameter int = 12 parameter (int = 12) The first example is not interpreted in the MIPSpro Fortran 90 compiler and must be changed to the following: parameter (int = 12) CHANGES AFFECTING INTRINSICS and LIBRARIES * The MIPSpro Fortran 90 compiler provides keyword=form for the new intrinsics. This allows optional arguments to be specified in any order or to be skipped if not needed. The MIPSpro Fortran 77 compiler does not accept keyword=form. * The MIPSpro Fortran 77 compiler supports the TIME intrinsic function and the MIPSpro Fortran 90 compiler does not. The Fortran 90/95 standard defines the DATE_AND_TIME function, and its use is recommended when using the MIPSpro Fortran 90 compiler. * Built-in functions no longer accepted: - %loc not supported in MIPSpro 7 Fortran 90; use LOC(3i). - %ref not supported - second, not srcndr, is used with MIPSpro 7 Fortran 90 * The DBLE(3i) intrinsic is used with the MIPSpro Fortran 90 compiler, and the DFLOAT intrinsic is used with the MIPSpro Fortran 77 compiler. CHANGES AFFECTING I/O This section describes differences between the compilers that affect input and output. I/O Record length differences The MIPSpro Fortran 90 compiler specifies record lengths in I/O statements in bytes. The MIPSpro Fortran 77 compiler specifies the record length in words. The bytereclen option to the f77 command causes the MIPSpro Fortran 77 compiler to interpret all record lengths in bytes. Namelist I/O NAMELIST is accepted as an extension in the MIPSpro Fortran 90 compiler. It skips unmatched namelist groups on input without error. It also accepts either an ampersand (&) or dollar sign ($) as a prefix to the namelist group name on input. The slash (/) or $END statement can be used to terminate the namelist group. Unformatted I/O Specify FORM='SYSTEM' to ensure that no record headers exist in the file. This is available on all systems, but is only necessary if the f77 layer is the default for an unformatted file. Specify FORM='BINARY' to ensure that no record headers exist in the file. The MIPSpro Fortran 90 compiler does not allow unformatted I/O on an INTERNAL file; this is allowed in the MIPSpro Fortran 77 compiler. The MIPSpro Fortran 90 compiler does not allow nonstandard aggregate reference in an I/O list to be restricted to unformatted I/O; this is allowed in the MIPSpro Fortran 77 compiler. Internal and Auxiliary I/O extensions The ENCODE and DECODE statements are provided as extensions to internal I/O. The ACCESS=APPEND and FORM=SYSTEM statements are provided as extensions for auxiliary I/O. Changes to formatted I/O The following extensions to the MIPSpro Fortran 90 compiler affect formatted I/O: * The Q edit descriptor returns the number of characters remaining in the record. * The dollar sign and backslash edit descriptors suppress the newline character at the end of a record. * The field width of a data edit descriptor other than the A format cannot be present. The data edit descriptors are B, D, E, F, G, I, L, O, and Z. The field width will default to a size chosen by the I/O library. The Fortran 95 standard allows a zero for the field width for the I, B, O, and Z data edit descriptors. * Preconnected files: with MIPSpro Fortran 77 programs that read formatted data from unit=5 (a preconnected file), it is assumed that all non-leading blanks in a numeric field are treated as zeroes. With the MIPSpro Fortran 90 compiler, however, all blanks are treated as null characters. Therefore, for a real value with an F format specifier (F3.1, for example), an error is issued for a field of " . ". The following items are not allowed with the MIPSpro Fortran 90 compiler but were allowed with the MIPSpro Fortran 77 compiler: * Carriage control with an ASCII NUL to cause overprint with no advance. * Variable format in which the width can be an expression that is evaluated at execution. * The INQUIRE statement extension: CARRIAGECONTROL=specifier * Special compile time option to interpret the carriage control character and replace it with the proper character in stdout. List-directed I/O The MIPSpro Fortran 90 compiler adds the ability to write delimited character strings during list-directed output. The MIPSpro Fortran 77 compiler supported only delimited character string input to a list- directed item that is stored to a list item of type CHARACTER. The MIPSpro Fortran 77 compiler writes only undelimited character strings from a list-directed output list item of type CHARACTER. The MIPSpro Fortran 90 compiler allows list-directed character input to a character item to be either delimited or undelimited. The DELIM specifier on the OPEN statement allows a choice of QUOTE, APOSTROPHE, or NONE for a delimeter on output. The MIPSpro Fortran 90 compiler also supports list-directed I/O on an internal file. The MIPSpro Fortran 77 compiler does not support this. An internal file in a Fortran 90 list-directed I/O statement can be a character array section. The internal file can be a zero-length character variable or array. The following items are not allowed by the MIPSpro Fortran 90 compiler but were allowed by the MIPSpro Fortran 77 compiler: * The MIPSpro Fortran 77 compiler allowed the use of the letter Q for an exponent letter on input for a floating-point value. * No repeat counts are generated for list-directed output List-directed I/O and floating point zero The MIPSpro Fortran 90 compiler specifies a different form of output constant for a floating-point zero in list-directed output records. In the following program: PRINT *,0.0 PRINT 1, 0.0 1 FORMAT(1X,G12.2) END the following output is generated: % f90 tt.f % a.out 0.E+0 0.0 List-directed I/O and Hollerith constants The MIPSpro Fortran 90 compiler does not support Hollerith constants in list-directed input files, but this is provided as a compiler extension. OPEN statement There are several new specifiers for the OPEN statement with the MIPSpro Fortran 90 compiler, including POSITION, PAD, and ACTION. In addition, there are additional values available for the RECL, STATUS, and DELIM specifiers. The following specifiers were extensions provided with the MIPSpro Fortran 77 compiler and are no longer available or have changed with the MIPSpro Fortran 90 compiler: * DISP=specifier; this is another form of the STATUS specifier on the CLOSE statement for the Fortran 95 compilers. * FORM='BINARY' to indicate a formatted read with the A format on binary data. * READONLY specifier inciates the file is read only when using the MIPSpro Fortran 77 compiler; the MIPSpro Fortran 90 compiler provides the ACTION=specifier with more options. * INDEXED-ACCESS-FILE=specifier (not available). * RECORDTYPE=specifier (not available). * DEFAULTFILE=specifier (not available). * SHARED=specifier (not available). * TYPE=specifier is the same as the Fortran 95 STATUS=specifier. INQUIRE statement There are new specifiers for the INQUIRE statement: IOLENGTH, POSITION, ACTION, READ, WRITE, READWRITE, DELIM, and PAD. In addition, the NUMBER, RECL, and BLANK specifiers have additional values. The ORGANIZATION=specifier is not allowed with the MIPSpro Fortran 90 compiler. READ and WRITE statement There are several functional differences between the MIPSpro Fortran 77 compiler and the MIPSpro Fortran 90 compiler in the use of the READ and WRITE statements: * The SIZE= and EOR= specifiers are allowed only with nonadvancing READ or WRITE statements when using the Fortran 90/95 compilers. * MIPSpro Fortran 77 does not accept structures. Structures and derived types are part of the Fortran 90 standard. * The MIPSpro Fortran 90 compiler provides zero-sized arrays, while the MIPSpro Fortran 77 compiler does not accept zero-sized arrays. If these appear in an input/output list of a formatted I/O statement, an edit descriptor is not used for the item. * When using the MIPSpro Fortran 90 compiler the G edit descriptor is a general edit descriptor that can read or write any data type including character, integer, and logical data. MIPSpro Fortran 77 allows only floating-point data types. The MIPSpro Fortran 90 compiler is specific about the rounding of floating point values with the G format. This change may cause asterisks in the output field for some floating-point values. Other values will be written an an Fw.d-formatted value in the MIPSpro Fortran 77 compiler and as an Ew.d-formatted value when using the MIPSpro Fortran 90 compiler. * The B, O, and Z edit descriptors are available with the Fortran 90/95 compilers and are limited to integer I/O list items. The MIPSpro Fortran 77 compiler allows real and other data types to be described with these edit descriptors. Signed octal and hexadecimal values are not allowed with the MIPSpro Fortran 90 compiler. The compilers allow signed input values, but they write only unsigned values. If the size of the value is less than w in Ow or Zw on output, the MIPSpro Fortran 90 compiler requires blank padding on the left. If the edit descriptor Ow.m or Zw.m is used, the field must contain at least m digits. The .m form is a way to get leading zeros with the Fortran 90/95 compilers. If the size of the value is greater than w in Ow or Zw on output, the compiler fills the field with asterisks. * The ENw.d and ENw.dEe edit descriptors produce an output field in the form of a real number in engineering notation such that the decimal exponent is divisible by three and the absolute value of the mantissa is greater than or equal to 1 and less than 1000, except when the output is 0. * The ES edit descriptor produces an output field in the form of a real number in scientific notation such that the absolute value of the mantissa is greater than or equal to 1 and less than 10, except when the output value is 0. * Fortran 90 pointers are allowed in an input/output list with the target as the actual list item. If a derived type contains a pointer component, an object of this type must not appear as an input item nor as the result of the evaluation of an output list. The MIPSpro Fortran 77 compiler does not accept Fortran 90/95 pointers.