Looking up the exact syntax for the IEEE inquiry functions (in particular ieee_is_nan) I came across the following fragment:
USE, INTRINSIC :: IEEE_ARITHMETIC
...
IF IEEE_SUPPORT_DATATYPE(X) THEN
IF IEEE_IS_NORMAL(X) THEN
PRINT *, ' X is a 'normal''
ELSE
PRINT *, ' X is not 'normal''
ELSE
PRINT *, ' X is not a supported IEEE type '
ENDIF
...
(The page is "IEEE Intrinsic Modules and Procedures")
Of course this is just a sketch, but it does not constitute a well-formed fragment. This was in the documentation to Intel Fortran 15.