> On Oct 29, 2018, at 10:54 AM, Martin Sebor <mse...@gmail.com> wrote: > > On 10/29/2018 07:45 AM, Paul Koning wrote: >> I noticed an inconsistency in the handling of the aligned attribute. When >> applied to variables, I get an error message if the alignment is too large >> for the platform. But when applied to functions, there is no error check. >> The same applies to label alignment (from the -falign-labels switch). >> >> The result is an ICE in my target code because it is asked to output >> assembly language for an alignment not supported by the target. >> >> Should these cases also produce error messages? Or should the back end >> ignore attempts to align too much? > > check_user_alignment() in c-attribs.c rejects excessive alignments > the same for functions and variables: > > else if (i >= HOST_BITS_PER_INT - LOG2_BITS_PER_UNIT) > { > error ("requested alignment is too large"); > return -1; > } > > so I don't immediately see where this inconsistency comes from > Is there different/more restrictive handling for variables in > the back end? (a test case would be great).
I forgot to attach it. Here it is. paul
testalign.c
Description: Binary data