[patch, committed] Fix simplify modulo.
Feng Wang
wf_cs@yahoo.com
Fri Jun 24 03:24:00 GMT 2005
This patch fixed gfc_simplify_modulo. We should not clear mpfr before get
result. Committed as obvious.
2005-06-24 Feng Wang <fengwang@nudt.edu.cn>
* simplify.c (gfc_simplify_modulo): Don't clear before get result.
2005-06-24 Feng Wang <fengwang@nudt.edu.cn>
* gfortran.dg/simplify_modulo.f90: New.
Index: fortran/simplify.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/simplify.c,v
retrieving revision 1.26
diff -u -r1.26 simplify.c
--- fortran/simplify.c 1 Jun 2005 19:17:32 -0000 1.26
+++ fortran/simplify.c 24 Jun 2005 03:20:23 -0000
@@ -2231,12 +2231,11 @@
mpfr_div (quot, a->value.real, p->value.real, GFC_RND_MODE);
mpfr_floor (iquot, quot);
mpfr_mul (term, iquot, p->value.real, GFC_RND_MODE);
+ mpfr_sub (result->value.real, a->value.real, term, GFC_RND_MODE);
mpfr_clear (quot);
mpfr_clear (iquot);
mpfr_clear (term);
-
- mpfr_sub (result->value.real, a->value.real, term, GFC_RND_MODE);
break;
default:
Best Regards,
Feng Wang
--
Creative Compiler Research Group,
National University of Defense Technology, China.
___________________________________________________________
ÃÃ
ȢÃâ·ÃGÃÃÃä£ÂÃùúµÃû¾øÃÃì»øÃüþçÃÃ
³¬´óÃÃÃä
http://cn.mail.yahoo.com/?id=77071
More information about the Gcc-patches
mailing list