[Bug fortran/37930] gfortran error and ICE at automatic type conversion with transfer intrinsic
sgk at troutmask dot apl dot washington dot edu
gcc-bugzilla@gcc.gnu.org
Fri Oct 31 04:57:00 GMT 2008
------- Comment #20 from sgk at troutmask dot apl dot washington dot edu 2008-10-31 04:55 -------
Subject: Re: gfortran error and ICE at automatic type conversion with transfer
intrinsic
On Fri, Oct 31, 2008 at 04:27:23AM -0000, deji_aking at yahoo dot ca wrote:
>
>
>>
>> From comment 1:
>>
>> Adw_xabcd_8(1:n) = transfer(-1,1.0) ! Adw_xabcd_8 is REAL
>>
>> That makes sense: One assigns NaN to a real variable (though a
>> comment would be helpful). However
>>
> Does this mean gfortran shouldn't give an error message on the
> first part (with the real variable) of the bug report? It seems
> the patch to fix this only deals with the integer variable assignment.
>
No. gfortran is giving you an error because you are trying to
convert a NaN for a REAL type to a DOUBLE PRECISION value.
This also makes no sense. If you want a DOUBLE PRECISION
NaN, then use transfer(-1,1.d0).
The conversion code for REAL to DOUBLE PRECISION properly
handled this problem. The patch I submitted for INTEGER
was for a code path into the REAL to INTEGER routine that
no one had ever triggered.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37930
More information about the Gcc-bugs
mailing list