https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70955
Bug ID: 70955 Summary: regression in code generation for __builtin_ms_va_list in GCC 6.1 Product: gcc Version: 6.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: zenith432 at users dot sourceforge.net Target Milestone: --- I've tried on GCC 6.1.0 built for OS X, and GCC 6.1.1 on Fedora 23 supplied by their rawhide. Same behavior. - variadic function with x86-64 ms_abi calling convention. - defines local variable of type __builtin_ms_va_list. - iterates with __builtin_va_arg (note: there is no corresponding __builtin_ms_va_arg). - __builtin_va_arg treats the __builtin_ms_va_list variable as a sysv va_list, and goes berserk. I've anaylzed this by looking at the code generated. Same wrong code generated if __builtin_va_list is used inside an ms_abi function instead of __builtin_ms_va_list. This functionality worked on both GCC 5.3 and GCC 4.9, so this is a regression. I've compared the resulting code generated to GCC 5.3. The code generated on GCC 5.3 is good. As mentioned above, there is no __builtin_ms_va_arg, and never was. The function __builtin_va_arg has previously been used to iterate on all types of __builtin_*_va_list.