This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/37930] gfortran error and ICE at automatic type conversion with transfer intrinsic
- From: "sgk at troutmask dot apl dot washington dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Oct 2008 15:03:13 -0000
- Subject: [Bug fortran/37930] gfortran error and ICE at automatic type conversion with transfer intrinsic
- References: <bug-37930-8911@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from sgk at troutmask dot apl dot washington dot edu 2008-10-28 15:03 -------
Subject: Re: gfortran error and ICE at automatic type conversion with transfer
intrinsic
On Tue, Oct 28, 2008 at 02:36:07PM -0000, dominiq at lps dot ens dot fr wrote:
>
> > What does ... print?
>
> NaN on both ppc/intel-Darwin9.
>
> > My patch simply fixes the ICE in gfortran.
>
> I think the conversion of NaN to int is buggy since the behavior
> is platform/option dependent. Your patch just prevents to reach
> the bug. It always make me nervous when a bug is hidden without
> being understood.
i = NaN is an assignment not a bitwise copy. This isn't platform
dependent nor option dependent. You simply can't assign a NaN to
an INTEGER.
In thinking about transfer(-1,1.0), this may also be invalid
because the standard forbids calling an intrinsic procedure
if it will return a result outside the representable range of
the return type. There is probably some argument on whether
NaN is this range.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37930