I have some legacy F77 code, that test for NAN and infinite of real*8
I can link the code, using pgf77, if I use isnanf() and isinff() - but these two routines are not documented in the PGI manuals.
The modern routines would be ieee_is_nan() and ieee_is_finite(), but I can’t figure out how to include them in vanilla F77. In short, can I rewrite the F90 code:
program test
use, intrinsic::ieee_arithmetic
real *8 value
logical y
value=1.
y = ieee_is_nan(value)
print *, 'NAN(',v,')=', y
end program test
as something like:
program test
real *8 value
logical y
value=1.
y = ieee_is_nan(value)
print *, 'NAN(',v,')=', y
end
but this gives me:
% pgf77 -c testx.f
% pgf77 -o testx testx.o
testx.o: In function test': /tmp/./testx.f:7: undefined reference to ieee_is_nan_’
pgf77 croakes on a USE statement, like
USE, INTRINSIC :: IEEE_ARITHMETIC
% pgf77 -c testx-ifort.f
PGFTN-S-0034-Syntax error at or near , (testx-ifort.f: 2)
0 inform, 0 warnings, 1 severes, 0 fatal for test
PGFTN/x86-64 Linux 13.9-0: compilation completed with severe errors
while ifort will compile and link
% ifort -c testx-ifort.f
% ifort -o testx-ifort testx-ifort.o
PS: I use pgf77 13.9