https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65818

--- Comment #9 from dave.anglin at bell dot net ---
On 2015-04-22, at 12:40 PM, vries at gcc dot gnu.org wrote:

> this patch is more conservative:
> ...
> diff --git a/gcc/gimplify.c b/gcc/gimplify.c
> index 7786e16..e23f510 100644
> --- a/gcc/gimplify.c
> +++ b/gcc/gimplify.c
> @@ -9336,7 +9336,12 @@ gimplify_va_arg_internal (tree valist, tree type,
> location_t loc,
>   else
>     gimplify_expr (&valist, pre_p, post_p, is_gimple_min_lval, fb_lvalue);
> 
> -  return targetm.gimplify_va_arg_expr (valist, type, pre_p, post_p);
> +  tree expr = targetm.gimplify_va_arg_expr (valist, type, pre_p, post_p);
> +  gcc_assert (TREE_CODE (expr) == MEM_REF);
> +  if (!is_gimple_mem_ref_addr (TREE_OPERAND (expr, 0)))
> +    gimplify_expr (&TREE_OPERAND (expr, 0), pre_p, post_p,
> +                  is_gimple_mem_ref_addr, fb_rvalue);
> +  return expr;
> }
> 
> /* Gimplify __builtin_va_arg, aka VA_ARG_EXPR, which is not really a

This patch has the following new failure:

/test/gnu/gcc/gcc/gcc/testsuite/g++.dg/pr65802.C: In function 'void fn1()':
/test/gnu/gcc/gcc/gcc/testsuite/g++.dg/pr65802.C:20:23: error: impossible
constraint in 'asm'

FAIL: g++.dg/pr65802.C  -std=gnu++98 (test for excess errors)
FAIL: g++.dg/pr65802.C  -std=gnu++11 (test for excess errors)
FAIL: g++.dg/pr65802.C  -std=gnu++14 (test for excess errors)

--
John David Anglin    dave.ang...@bell.net

Reply via email to