This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]