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]

[tree-ssa] PATCH for c++/13033


Thanks to rth for telling me what the problem was; we were failing to wrap
the for increment expression in a CLEANUP_POINT_EXPR, so cleanup
gimplification was falling over.

Tested athlon-pc-linux-gnu, applied to tree-ssa.  Test in
g++.dg/init/cleanup1.C.

2003-11-14  Jason Merrill  <jason@redhat.com>

	PR c++/13033
	* c-simplify.c (gimplify_c_loop): Wrap the increment in a 
	CLEANUP_POINT_EXPR.

*** c-simplify.c.~1~	2003-11-12 11:02:34.000000000 -0500
--- c-simplify.c	2003-11-13 16:06:40.000000000 -0500
*************** gimplify_c_loop (tree cond, tree body, t
*** 672,677 ****
--- 672,679 ----
    cont_block = begin_bc_block (bc_continue);
  
    gimplify_stmt (&body);
+   if (incr && stmts_are_full_exprs_p ())
+     incr = fold (build1 (CLEANUP_POINT_EXPR, void_type_node, incr));
    gimplify_stmt (&incr);
  
    body = finish_bc_block (cont_block, body);

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