On 22/01/2019 15:20, Richard Biener wrote: > On Tue, 22 Jan 2019, Richard Earnshaw (lists) wrote: > >> This patch, for gcc 8/9 is a mitigation patch for PR target/88469 where >> gcc-6/7/8 miscompile a structure whose alignment is dominated by a >> 64-bit bitfield member. Since the PCS rules for such a type must ignore >> any overalignment of the base type we cannot address this by simply >> adding a larger alignment to the class. The simplest fix, therefore, is >> to insert a dummy field that has 64-bit alignment. Although that field >> is never used, it does fix the overall alignment of the class at the >> expense of adding an extra dword of data on ARM systems (I've bounded >> the range of GCC versions that will lead to this mitigation, so only a >> stage-1 gcc-9 will see the impact of this change - though gcc-8 will see >> this in full). >> >> OK for trunk/gcc-8? > > Can you place some aligned attribute on the struct instead? > No, the PCS says that overalignment on the struct should be ignored for the purposes of parameter passing, so it has no effect.
R. >> PR target/88469 >> * profile-count.h (profile_count): Add dummy file with 64-bit alignment >> on arm-based systems using gcc-6/7/8. >> >> >