aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/simplify.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/rrspacing_1.f908
4 files changed, 20 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index d872fe7..c4f3d13 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -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
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c
index 7bf79fc..b77537c 100644
--- a/gcc/fortran/simplify.c
+++ b/gcc/fortran/simplify.c
@@ -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");
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 4aa506f..2533199 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
diff --git a/gcc/testsuite/gfortran.dg/rrspacing_1.f90 b/gcc/testsuite/gfortran.dg/rrspacing_1.f90
new file mode 100644
index 0000000..8b866aa
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/rrspacing_1.f90
@@ -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