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

--- Comment #6 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Alfie Richards from comment #5)
> Relevant LLVM links:
> 
> https://github.com/llvm/llvm-project/pull/99434
> https://github.com/llvm/llvm-project/issues/95093
> 
> Seems this was an intentional choice by Clang to fall back to AAPCS for
> varargs in order to fix a bug.

It seems the key decision was:

"I guess (unlike the x86 va_list, the AAPCS64 va_list doesn't hardcode the
number of registers), but it seems like a lot of complexity for little
benefit."

Do we have a test case that exercises that problematical scenario?

Note, in passing, that the discussion in the clang bug says the x86 might be
broken the same way - but I did not (yet) check whether x86 does have the
divergence (and probably won't have time in the next couple of days)

Reply via email to