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

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Christophe Lyon from comment #12)
> Following Jakub's recommendation, I applied this:
> 
> diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c
> index 18dd972..edf47d1 100644
> --- a/gcc/tree-stdarg.c
> +++ b/gcc/tree-stdarg.c
> @@ -1061,8 +1061,7 @@ expand_ifn_va_arg_1 (function *fun)
>         else
>           {
>             gimple_seq tmp_seq;
> -           force_gimple_operand (expr, &tmp_seq, false, NULL_TREE);
> -           gimple_seq_add_seq_without_update (&pre, tmp_seq);
> +           gimplify_and_add (expr, &pre);
>           }
>  
>         input_location = saved_location;
> 
> on top of r246319 (that is, before you reverted it).
> 
> and my build now completes. I didn't run make-check though.

That is strange.  I'd expect a warning turned into error about unused tmp_seq.
You want to replace the whole else { ... } with else gimplify_and_add (expr,
&pre);

Reply via email to