[Bug middle-end/86505] [6/7 Regression] __builtin_va_arg_pack_len() computes the number of arguments wrongly

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 5 10:05:00 GMT 2018


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

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to rpirrera from comment #9)
> The patch cannot be applied to the compiler we are using (GCC 5), we get a
> function not defined error.
> Is it possible to have a patch for GCC 5 too?
> 
> Thank you.

you should be able to replace

+                 tree newlhs = create_tmp_reg_or_ssa_name (integer_type_node);

with inlining the implementation that is in newer GCC:

tree
create_tmp_reg_or_ssa_name (tree type, gimple *stmt)
{
  if (gimple_in_ssa_p (cfun))
    return make_ssa_name (type, stmt);
  else
    return create_tmp_reg (type);
}


Note that GCC 5 is out of support.


More information about the Gcc-bugs mailing list