[Bug target/83334] __builtin_ms_va_copy used in function with sysv_abi is broken

zenith432 at users dot sourceforge.net gcc-bugzilla@gcc.gnu.org
Tue Dec 12 19:56:00 GMT 2017


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

--- Comment #5 from zenith432 at users dot sourceforge.net ---
I looked at the source a bit, and I see what's going on.
__builtin_ms_va_copy and __builtin_sysv_va_copy are treated both the same as
__builtin_va_copy, which is implemented in gcc/builtins.s by
expand_builtin_va_copy
This function then calls
targetm.fn_abi_va_list (cfun->decl)
to get the type of va_list associated to the containing function.
this leads to ix86_fn_abi_va_list which identifies it as either an
ms_va_list_type_node or sysv_va_list_type_node based on the abi of the
containing function.


More information about the Gcc-bugs mailing list