Go to main content
Oracle® Developer Studio 12.6: Fortran User's Guide

Exit Print View

Updated: July 2017
 
 

5.2 Incompatibility Issues

The following lists known incompatibilities that arise when compiling and testing legacy f77 programs with this release of f95. These are due to either missing comparable features in f95, or differences in behavior. These items are non-standard extensions to FORTRAN 77 supported in the legacy Sun WorkShop FORTRAN 77 compiler, but not in the current f95 compiler.

Source Format

  • An ANSI warning is given for names longer than 6 characters when the -f77 option is specified.

I/O:

  • f95 does not allow ENDFILE on a direct-access file.

  • f95 does not recognize the n form for specifying a record number in direct access I/O: READ (2 ’13) X,Y,Z

  • f95 does not recognize the legacy f77R” format edit descriptor.

  • f95 does not allow the DISP= specifier in a CLOSE statement.

  • Bit constants are not allowed on a WRITE statement.

  • Fortran 95 NAMELIST does not allow arrays and character strings with variable lengths.

  • Opening a direct access file with RECL=1 cannot be used as a “stream” file. Use FORMAT=’STREAM’ instead.

  • Fortran 95 reports illegal I/O specifiers as errors. f77 gave only warnings.

Data Types, Declarations, and Usage:

  • f95 allows only 7 array subscripts; f77 allowed 20.

  • f95 does not allow non-constants in PARAMETER statements.

  • Integer values cannot be used in the initializer of a CHARACTER type declaration.

  • The REAL() intrinsic returns the real part of a complex argument instead of converting the argument to REAL*4. This gives different results when the argument is DOUBLE COMPLEX or COMPLEX*32

  • Fortran 95 will not allow array elements in boundary expressions before the array is declared. For example:

    subroutine s(i1,i2)
    integer i1(i2(1):10)
    dimension i2(10)
    ...ERROR: "I2" has been used as a function, 
    therefore it must not be declared with the explicit-shape DIMENSION attribute.
    
    
    end

Programs, Subroutines, Functions, Statements:

  • The maximum length for names is 127 characters.

Command-line Options:

  • f95 does not recognize the f77 compiler options -dbl -oldstruct -i2 -i4 and some sub-options of -vax.

FORTRAN 77 Library Routines Not Supported by f95:

  • The POSIX library.

  • The IOINIT() library routine.

  • The tape I/O routines topen, tclose, twrite, tread, trewin, tskipf, tstate.

  • start_iostats and end_iostats library routines.

  • f77_init() function.

  • f95 does not allow the IEEE_RETROSPECTIVE subroutine to be bypassed by defining the user’s own routine with the same name.