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]

A prototype patch for c-iterate.c


I will submit another patch for Makefile.in to include dependency
for c-iterate.o on expr.h after this patch is installed.

-- 
H.J. Lu (hjl@gnu.org)
---
Fri Jun 19 18:42:05 1998  H.J. Lu  (hjl@gnu.org)

	* c-iterate.c: Include "expr.h".
	(expand_expr): Use proper values when calling the function.

Index: c-iterate.c
===================================================================
RCS file: /home/work/cvs/gnu/egcs/gcc/c-iterate.c,v
retrieving revision 1.1.1.4
diff -u -p -r1.1.1.4 c-iterate.c
--- c-iterate.c	1998/05/06 20:57:48	1.1.1.4
+++ c-iterate.c	1998/05/06 21:16:27
@@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA.  */
 #include "obstack.h"
 #include "rtl.h"
 #include "toplev.h"
+#include "expr.h"
 
 /*
 		KEEPING TRACK OF EXPANSIONS
@@ -287,7 +288,8 @@ iterator_loop_prologue (idecl, start_not
 
   /* Force the save_expr in DECL_INITIAL to be calculated
      if it hasn't been calculated yet.  */
-  expand_expr (DECL_INITIAL (idecl), const0_rtx, VOIDmode, 0);
+  expand_expr (DECL_INITIAL (idecl), const0_rtx, VOIDmode,
+	       EXPAND_NORMAL);
 
   if (DECL_RTL (idecl) == 0)
     expand_decl (idecl);
@@ -298,7 +300,7 @@ iterator_loop_prologue (idecl, start_not
   /* Initialize counter.  */
   expr = build (MODIFY_EXPR, TREE_TYPE (idecl), idecl, integer_zero_node);
   TREE_SIDE_EFFECTS (expr) = 1;
-  expand_expr (expr, const0_rtx, VOIDmode, 0);
+  expand_expr (expr, const0_rtx, VOIDmode, EXPAND_NORMAL);
 
   expand_start_loop_continue_elsewhere (1);
 
@@ -339,7 +341,7 @@ iterator_loop_epilogue (idecl, start_not
   incr = build_binary_op (PLUS_EXPR, idecl, integer_one_node, 0);
   incr = build (MODIFY_EXPR, TREE_TYPE (idecl), idecl, incr);
   TREE_SIDE_EFFECTS (incr) = 1;
-  expand_expr (incr, const0_rtx, VOIDmode, 0);
+  expand_expr (incr, const0_rtx, VOIDmode, EXPAND_NORMAL);
   test = build_binary_op (LT_EXPR, idecl, DECL_INITIAL (idecl), 0);
   expand_exit_loop_if_false (0, test);
   expand_end_loop ();


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