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: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Oct 2008 20:15:06 -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 #16 from burnus at gcc dot gnu dot org 2008-10-28 20:15 -------
> Well, I think it may be more complicated. Have I mentioned
> how much I hate TRANSFER. :(
Well, I didn't do much with TRANSFER, but I fully understand you.
> To make matters worse, with trunk I see
> call sub(x,0.)
> i = x
> NaN -2147483648
> FFC00000
Looks OK to me as run-time behaviour. If you want to catch this, simply compile
gfortran with -ffpe-trap=invalid.
> gfc_mpfr_to_mpz but also gfc_real2int and gfc_complex2int.
I don't think so. You have in gfc_real2int the call:
gfc_mpfr_to_mpz (result->value.integer, src->value.real);
and in gfc_complex2int you have
gfc_mpfr_to_mpz (result->value.integer, src->value.complex.r);
Thus you really only need to modify gfc_mpfr_to_mpz.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37930