Steve Ellcey <sell...@marvell.com> writes: > Szabolcs pointed out that my SIMD ABI patches that implement the > aarch64_vector_pcs attribute do not generate a warning or error > when being mixed with functions that do not have the attribute because > the 'affects_type_identity' field was false in the attribute table. > > This patch fixes that. I thought I could just set it to true but it > turned out I also had to implement TARGET_COMP_TYPE_ATTRIBUTES as well.
Yeah, looks like the flag just controls whether the attribute should be printed as part of the type, to give sensible error messages. > This patch does that and adds a test case to check for the error > when assigning a function with the attribute to a pointer type without > the attribute. > > The test checks for an error because the testsuite adds -pedantic- > errors to the compile line. Without this you would just get a warning, > but that is consistent with any mixing of different function types in a > function pointer assignment. > > Tested with a bootstrap build and test run on aarch64. OK for checkin? > > Steve Ellcey > sell...@marvell.com > > > 2018-02-13 Steve Ellcey <sell...@marvell.com> > > * config/aarch64/aarch64.c (aarch64_attribute_table): Change > affects_type_identity to true for aarch64_vector_pcs. > (aarch64_comp_type_attributes): New function. > (TARGET_COMP_TYPE_ATTRIBUTES): New macro. > > 2018-02-13 Steve Ellcey <sell...@marvell.com> > > * gcc.target/aarch64/pcs_attribute.c: New test. OK, thanks. Richard