fortran extensions

Local user would like to know which of the “fortran 2003” extensions are supported in PGI. Of particular interest at the moment are stream-IO and ieee intrinsics.

I don’t need an exhaustive list here! I’m happy to refer him to a manual or online documentation, but a quick search on my part didn’t turn up a good reference. We are up to 7.0-5 on the version available to this user.



Here is a list of what we support:

• Fortran 2003 ISO_C_BINDING – The ISO_C_BINDING module is partially implemented. The BIND attribute is supported for derived types and constant kind definitions are provided that map to C types. For procedures, the VALUE and BIND attributes are supported, as well as the BIND attribute for global data. The procedure C_LOC is supported, which returns the C address of an object. Other procedures in ISO_C_BINDING, such as C_ASSOCIATED, are not yet implemented.

• Fortran 2003 Allocatable Regularization – Fortran 2003 allocatable regularization is implemented in PGF95 and is always enabled. These changes allow allocatable arrays to be passed as dummy arguments, to be returned from functions, and to be components of derived types.

• Fortran 2003 Allocatable Array Assignment – Fortran 2003 allocatable array assignment is available in PGF95. The default is to use the Fortran 95 assignment semantics; however, the option -Mallocatable=03 enables the Fortran 2003 assignment semantics.

• Fortran 2003 Asynchronous Input/Output – Fortran 2003 asynchronous I/O is partially implemented in PGF77 and PGF95 compilers. For external files opened with ASYNCHRONOUS='YES in the OPEN statement, asynchronous I/O is allowed for external files opened with ASYNCHRONOUS=‘YES’ in the OPEN statement. Asynchronous I/O operations are indicated by ASYNCHRONOUS=‘YES’ in READ and WRITE statements. The compilers do not implement the ASYNCHRONOUS attribute or ASYNCHRONOUS statement.

• Fortran 2003 Stream Input/Output – Fortran 2003 Stream access I/O is implemented.

• –Mallocatable=[95|03] – The –Mallocatable option controls how the compiler treats assignment of allocatables. The default behavior is to use Fortran 95 semantics; the 03 option instructs the compiler to use Fortran 2003 semantics.