This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, PR70955] Tag {ms,sysv}_va_list_type_node with {ms,sysv}_abi attribute


On Wed, 24 Aug 2016, Tom de Vries wrote:

> Hi,
> 
> in PR70955, ix86_canonical_va_list_type fails to recognize a
> __builtin_ms_va_list that was declared in a TU, because its type doesn't have
> the same main variant as the ms_va_list_type_node initialized in lto1.
> 
> This patch fixes the PR by tagging ms_va_list_type_node and
> sysv_va_list_type_node with ms_abi/sysv_abi attributes.
> 
> sysv_va_list_type_node is of type array of length one with elemtype record,
> and I ran into trouble with both adding the attribute to the array type and
> the record type, so I ended up adding it to the first field type.
> 
> Bootstrapped and reg-tested on x86_64.
> 
> OK for trunk, 6 branch?

I miss some comments in the code laying out the scheme to identify
the types.

How did you build the sysv_abi tagged struct / array that ended up
not working?  I suspect that in parameter passing the array somehow
decays to a pointer-to-element type so it is important that the
TYPE_MAIN_VARIANT of the record type already contains the attribute.

We've had a first/second testcase in the PR but you only added one - does
it cover both cases?

Thanks,
Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]