Originally posted by: ChristineLi
When compiling with compiler invocations conforming to earlier Fortran standards, you can specify -qxlf2008=checkpresence to check the dummy argument presence according to the Fortran 2008 standard .
The default for the f2008, xlf2008, and xlf2008_r commands is checkpresence, and if you decide that dummy argument presence should be checked according to previous Fortran standards, specify -qxlf2008=nocheckpresence.
The difference is as follows.
According to Fortran 2008 standard, a dummy argument or an entity that is host associated with a dummy argument is absent under one of these conditions:
It does not have the ALLOCATABLE attribute, and corresponds to an actual argument that has the ALLOCATABLE attribute but is not allocated.
It does not have the POINTER attribute, and corresponds to an actual argument that has the POINTER attribute but is not associated.
However, there are also exceptions according to Fortran 2008 standard. Dummy argument is regarded as present when it is optional under the following conditions:
A procedure pointer actual argument is supplied to an optional dummy procedure argument.
A pointer or allocatable actual argument is supplied to an optional dummy argument of an intrinsic procedure.
A pointer or allocatable actual argument is supplied to an optional dummy argument of an elemental procedure.
For more information, see -qxlf2008 and Restrictions on optional dummy arguments not present.