This is the mail archive of the gcc-patches@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]

FORTRAN patch: use `dconsthalf' instead of local duplicate


I noticed this while poking around on something else.
Bootstrapped on sparc-sun-solaris2.7, no f77 regressions.

Ok for mainline?

		Thanks!
		--Kaveh


2003-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* com.c (ffecom_init_0): Use `dconsthalf'.

diff -rup orig/egcc-CVS20030729/gcc/f/com.c egcc-CVS20030729/gcc/f/com.c
--- orig/egcc-CVS20030729/gcc/f/com.c	2003-07-19 12:02:21.000000000 -0400
+++ egcc-CVS20030729/gcc/f/com.c	2003-07-30 06:32:59.837471000 -0400
@@ -11818,13 +11818,8 @@ ffecom_init_0 (void)
 
   ffecom_float_zero_ = build_real (float_type_node, dconst0);
   ffecom_double_zero_ = build_real (double_type_node, dconst0);
-  {
-    REAL_VALUE_TYPE point_5;
-
-    REAL_ARITHMETIC (point_5, RDIV_EXPR, dconst1, dconst2);
-    ffecom_float_half_ = build_real (float_type_node, point_5);
-    ffecom_double_half_ = build_real (double_type_node, point_5);
-  }
+  ffecom_float_half_ = build_real (float_type_node, dconsthalf);
+  ffecom_double_half_ = build_real (double_type_node, dconsthalf);
 
   /* Do "extern int xargc;".  */
 


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