This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Gimplify VA_ARG_EXPR
- From: Richard Henderson <rth at redhat dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 9 Jun 2004 13:07:16 -0700
- Subject: Re: PATCH: Gimplify VA_ARG_EXPR
- References: <xypekopz5gh.fsf@miranda.boston.redhat.com>
On Wed, Jun 09, 2004 at 01:05:34AM -0400, Jason Merrill wrote:
> + tree valist = TREE_OPERAND (*expr_p, 0);
...
> + valist = build_fold_indirect_ref (valist);
The argument to va_arg_expr isn't a pointer.
> + addr = create_tmp_var (ptr_type_node, "addr");
> + DECL_POINTER_ALIAS_SET (addr) = get_varargs_alias_set ();
Alias set on the decl and not the type? Isn't this going to be
(potentially) broken by gimplification?
> + tree t = convert (build_pointer_type (type), null_pointer_node);
fold_convert.
> + /* Make it easier for the backends by protecting the valist argument
> + from multiple evaluations. */
> + valist = stabilize_va_list (valist, 0);
Seems like the min_value thing would be better here.
r~