https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100955
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- There is no reason not to lower __builtin_va_start (&arg, 0) to arg = .VA_START (); for the problematic cases of __builtin_va_list being a struct and add support for expanding both __builtin_va_start (&arg, 0) and arg = .VA_START () using some helper code. We already similarly transform __builtin_va_start (&arg, 0) to arg = __builtin_next_arg (0) if __builtin_va_list is a pointer (e.g. ia32). And for the x86_64 style __builtin_va_list where it is struct [1] we already emit the optimal code. I'm surprised aarch64 uses a struct rather than struct [1], that must be terribly inefficient even if you simply pass down va_list through several functions.