Commit 8d972839 by Richard Guenther Committed by Richard Biener

re PR middle-end/40023 (type mismatch in address expression)

2009-05-05  Richard Guenther  <rguenther@suse.de>

	PR middle-end/40023
	* builtins.c (gimplify_va_arg_expr): Properly build the
	address.

	* gcc.c-torture/compile/pr40023.c: New testcase.

From-SVN: r147127
parent 95e20768
2009-05-05 Richard Guenther <rguenther@suse.de>
PR middle-end/40023
* builtins.c (gimplify_va_arg_expr): Properly build the
address.
2009-05-05 Shujing Zhao <pearly.zhao@oracle.com>
* tree.h (strip_float_extensions): Remove duplicate declaration.
......
......@@ -5033,7 +5033,7 @@ gimplify_va_arg_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
if (TREE_CODE (TREE_TYPE (valist)) == ARRAY_TYPE)
{
tree p1 = build_pointer_type (TREE_TYPE (have_va_type));
valist = build_fold_addr_expr_with_type (valist, p1);
valist = fold_convert (p1, build_fold_addr_expr (valist));
}
gimplify_expr (&valist, pre_p, post_p, is_gimple_val, fb_rvalue);
......
2009-05-05 Richard Guenther <rguenther@suse.de>
PR middle-end/40023
* gcc.c-torture/compile/pr40023.c: New testcase.
2009-05-05 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.other/overload11.C: Adjust expected errors.
......
typedef __builtin_va_list va_list;
typedef struct {
va_list ap;
} ScanfState;
void
GetInt(ScanfState *state, long llval)
{
*__builtin_va_arg(state->ap,long *) = llval;
__builtin_va_end(state->ap);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment