https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70955
--- Comment #23 from Tom de Vries <vries at gcc dot gnu.org> --- (In reply to Richard Biener from comment #22) > (In reply to vries from comment #18) > > Created attachment 39484 [details] > > Tentative patch using attributes ms_abi/sysv_abi > > > > not build or regression tested yet, but at least makes test-case pass. > > LGTM. Just realized, there's a potential problem with the patch and sysv_va_list_type_node. sysv_va_list_type_node is an array type (array with length 1 and a struct as element type). grokdeclarator (in c-decl.c, see comment 'A parameter declared as an array of T is really a pointer to T') converts that type into a pointer to array element type (as explained in more detail in build_va_arg) and drops the attributes. Perhaps we should mark the underlying element type with the attribute (as well/instead? I'm not sure yet).