Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 9/08/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Obsolescent Language Features in the Fortran Standard

Some language features, considered redundant in older versions of the Fortran Standard, are identified as obsolescent in the current Fortran Standard.

Intel® Fortran flags these features if you specify compiler option stand.

Other methods are suggested to achieve the functionality of the following obsolescent features:

  • Alternate returns (labels in an argument list)

    To replace this functionality, it is recommended that you use an integer variable to return a value to the calling program, and let the calling program use a CASE construct to test the value and perform operations.

  • Assumed-length character functions

    To replace this functionality, it is recommended that you use one of the following:

    • An automatic character-length function, where the length of the function result is declared in a specification expression

    • A subroutine whose arguments correspond to the function result and the function arguments

    Dummy arguments of a function can still have assumed character length; this feature is not obsolescent.

  • BLOCK DATA subprograms

    BLOCK DATA was used to initialize COMMON block variables. This can be achieved with initialization of MODULE data when it is declared. MODULE data is the preferred method of sharing data between compilation units, and for replacing COMMON blocks.

  • CHARACTER*(*) form of CHARACTER declaration

    To replace this functionality, it is recommended that you use the Fortran 90 forms of specifying a length selector in CHARACTER declarations (see Declaration Statements for Character Types).

  • COMMON blocks

    To replace this functionality, it is recommended data specified in COMMON be declared in a MODULE which can be made available through USE association where the data is needed.

  • Computed GO TO statement

    To replace this functionality, it is recommended that you use a CASE construct.

  • DATA statements among executable statements

    This functionality has been included since FORTRAN 66, but is considered to be a potential source of errors.

  • ENTRY statement

    To replace this functionality, it is recommended that you use multiple module procedures that can access shared data in the module.

  • EQUIVALENCE

    The use of storage association thru EQUIVALENCE statements is not recommended.

  • Fixed source form

    Newer methods of entering data have made this source form obsolescent and error-prone.

    The recommended method for coding is to use free source form.

  • FORALL statement and construct

    These were added to the language with the expectation they would result in very efficient and possibly parallel code. The complexity and many restrictions prevented compilers from taking advantage of them.

    The DO CONCURRENT construct makes FORALL redundant. Data manipulations which can be done with FORALL can be done more effectively with pointers using rank remapping. Both the FORALL statement form and the construct became obsolescent in Fortran 2018.

  • Labeled DO loops

    To replace this functionality, it is recommended that you use an END DO statements to terminate loops, and CYCLE statements to branch to the end of the loop to start the next iteration of the loop (or exit the loop, if the last iteration of the loop takes the branch).

  • Statement functions

    To replace this functionality, it is recommended that you use an internal function.

  • Specific names of intrinsic functions that also have generic names

    To replace this functionality, it is recommended that you use the generic names.