PR middle-end/40023
* builtins.c (gimplify_va_arg_expr): Properly build the
address.
* gcc.c-torture/compile/pr40023.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147127
138bc75d-0d04-0410-961f-
82ee72b054a4
+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.
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.
--- /dev/null
+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);
+}
+