[PATCH] PR fortran/37930 -- updated patch for conversion NaN,Inf to integer
Steve Kargl
sgk@troutmask.apl.washington.edu
Wed Oct 29 21:16:00 GMT 2008
On Wed, Oct 29, 2008 at 02:11:11PM -0700, Steve Kargl wrote:
> Here's an updated patch. It changes the error message to
> in accordance with Tobias comment. The bad <tab> was
> replaced by 4 spaces. Additionally, I've removed an old
> kludge needed for MPFR 2.0.1 and older. The patch has
> passed a regression test on x86_64-*-*freebsd8.0.
>
> 2008-10-27 Steven G. Kargl <kargls@comcast.net>
>
> PR fortran/37930
> * gfortran.dg/int_conv_2.f90: New test.
>
>
> 2008-10-27 Steven G. Kargl <kargls@comcast.net>
>
> PR fortran/37930
> * fortran/arith.c (gfc_mpfr_to_mpz): Test for NaN and Inf values.
> Remove stale comment and kludge code for MPFR 2.0.1 and older.
> (gfc_real2int): Error on conversion of NaN or Inf.
> (gfc_complex2int): Ditto.
> * fortran/arith.h: Update mpfr_to_mpz prototype.
> * fortran/simplify.c (gfc_simplify_ceiling, gfc_simplify_floor,
> gfc_simplify_ifix, gfc_simplify_idint, simplify_nint): Update function
> calls to include locus
>
I forgot to attach the updated testcase. Attached now.
--
Steve
-------------- next part --------------
! { dg-do compile }
! PR fortran/37930
program test
implicit none
integer i
i = transfer(-1,1.0) ! { dg-error "Conversion" }
end program test
More information about the Fortran
mailing list