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]

tweak PATCH to std_gimplify_va_arg_expr


The code to increment the va_ptr can go on the postqueue, allowing the
value of the va_arg to be used immediately; I assume that when rth changed
it to go on the prequeue instead, that was an oversight.  Right?

Booted and tested x86_64-pc-linux-gnu.  Not applied at this time, as I'm
not sure it's suitable for the current branch state.

2004-12-23  Jason Merrill  <jason@redhat.com>

	* builtins.c (std_gimplify_va_arg_expr): Put increment on
	postqueue, not pre.

*** ./gcc/builtins.c.~1~	2004-12-22 14:22:26.000000000 -0500
--- ./gcc/builtins.c	2004-12-17 19:39:26.000000000 -0500
*************** std_gimplify_va_arg_expr (tree valist, t
*** 3952,3958 ****
    t = fold_convert (TREE_TYPE (valist), rounded_size);
    t = build2 (PLUS_EXPR, TREE_TYPE (valist), valist_tmp, t);
    t = build2 (MODIFY_EXPR, TREE_TYPE (valist), valist, t);
!   gimplify_and_add (t, pre_p);
  
    addr = fold_convert (build_pointer_type (type), addr);
  
--- 3952,3958 ----
    t = fold_convert (TREE_TYPE (valist), rounded_size);
    t = build2 (PLUS_EXPR, TREE_TYPE (valist), valist_tmp, t);
    t = build2 (MODIFY_EXPR, TREE_TYPE (valist), valist, t);
!   gimplify_and_add (t, post_p);
  
    addr = fold_convert (build_pointer_type (type), addr);
  

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