Provides options to accommodate other Fortran language extensions when porting programs to XL Fortran.
A particular -qport suboption will always function independently of other -qport and compiler options.
.-noport-------------------------------. >>- -q--+-port--+----------------------------+-+--------------->< | .-:-------------------. | | | .-notyplssarg-. | | | | +-notypestmt--+ | | | | +-nosce-------+ | | | | +-nonullarg---+ | | | | +-nomod-------+ | | | | +-nohexint----+ | | | V +-noclogicals-+ | | '-=------+-clogicals---+---+-' +-hexint------+ +-mod---------+ +-nullarg-----+ +-sce---------+ +-typestmt----+ '-typlssarg---'
@PROCESS:
@PROCESS PORT[(suboptions)]| NOPORT
-qnoport
The -qport=clogicals option is useful when porting applications from other Fortran compilers that expect this behavior. However, it is unsafe to mix programs that use different settings for non-zero integers if they share or pass logical data between them. Data files already written with the default -qintlog setting will produce unexpected behavior if read with the -qport=clogicals option active.
call foo(,,z)
call foo(x,,z)
call foo(x,y,)
Fortran program:
program nularg
real(4) res/0.0/
integer(4) rc
integer(4), external :: add
rc = add(%val(2), res, 3.14, 2.18,) ! The last argument is a
! null argument.
if (rc == 0) then
print *, "res = ", res
else
print *, "number of arguments is invalid."
endif
end program
C program:
int add(int a, float *res, float *b, float *c, float *d)
{
int ret = 0;
if (a == 2)
*res = *b + *c;
else if (a == 3)
*res = (*b + *c + *d);
else
ret = 1;
return (ret);
}
Using this option may cause some intrinsic procedures to become mismatched in kinds. Specify -qxlf77=intarg to convert the kind to that of the longest argument.