[Bug fortran/37930] gfortran error and ICE at automatic type conversion with transfer intrinsic

dominiq at lps dot ens dot fr gcc-bugzilla@gcc.gnu.org
Fri Oct 31 12:54:00 GMT 2008



------- Comment #22 from dominiq at lps dot ens dot fr  2008-10-31 12:52 -------
> One can argue that a NaN real(4)->real(8) conversion is OK or that it is
> invalid - I think one can find arguments for both; in any case NaN can be
> unambiguously converted from one real/complex to another real/complex kind.

I disagree with the last sentence since there in not a single (or dual if you
take into account signaling NaN's) NaN entity, but a whole class of them. So if
you accept the conversion, it should be defined: for instance, for
REAL(4)->REAL(8) copy the mantissa to the upper/lower bits of the mantissa, or
fold all of them to a zero mantissa but for the LSB, ... .

I have never read anything about the reasons for having such a wide class of
NaN's nor seen any use of it (even the use of quiet/signaling NaN's is quite
fuzzy in most compiler implementation).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37930



More information about the Gcc-bugs mailing list