mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-28 16:01:00 +08:00
simplify.c (gfc_simplify_rrspacing): Initialize and clear mpfr_t variable.
2006-06-20 Steven G. Kargl <kargls@comcast.net> * simplify.c (gfc_simplify_rrspacing): Initialize and clear mpfr_t variable. * gfortran.dg/rrspacing_1.f90: New test. From-SVN: r114821
This commit is contained in:
parent
971774e438
commit
0ccff66da6
@ -1,3 +1,8 @@
|
||||
2006-06-20 Steven G. Kargl <kargls@comcast.net>
|
||||
|
||||
* simplify.c (gfc_simplify_rrspacing): Initialize and clear mpfr_t
|
||||
variable.
|
||||
|
||||
2006-06-20 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/25049
|
||||
|
@ -3030,6 +3030,7 @@ gfc_simplify_rrspacing (gfc_expr * x)
|
||||
mpfr_init (absv);
|
||||
mpfr_init (frac);
|
||||
mpfr_init (pow2);
|
||||
mpfr_init (exp);
|
||||
|
||||
mpfr_abs (absv, x->value.real, GFC_RND_MODE);
|
||||
mpfr_log2 (log2, absv, GFC_RND_MODE);
|
||||
@ -3046,6 +3047,7 @@ gfc_simplify_rrspacing (gfc_expr * x)
|
||||
mpfr_clear (absv);
|
||||
mpfr_clear (frac);
|
||||
mpfr_clear (pow2);
|
||||
mpfr_clear (exp);
|
||||
|
||||
return range_check (result, "RRSPACING");
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-06-20 Steven G. Kargl <kargls@comcast.net>
|
||||
|
||||
* gfortran.dg/rrspacing_1.f90: New test.
|
||||
|
||||
|
||||
2006-06-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/28052
|
||||
|
8
gcc/testsuite/gfortran.dg/rrspacing_1.f90
Normal file
8
gcc/testsuite/gfortran.dg/rrspacing_1.f90
Normal file
@ -0,0 +1,8 @@
|
||||
! { dg-do run }
|
||||
program m
|
||||
integer i
|
||||
real x,y
|
||||
real, parameter :: a = -3.0
|
||||
i = int(rrspacing(a))
|
||||
if (i /= 12582912) call abort
|
||||
end program m
|
Loading…
x
Reference in New Issue
Block a user