https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87794
Bug ID: 87794 Summary: Excessive alignment permitted for functions and labels Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: pkoning at gcc dot gnu.org Target Milestone: --- Created attachment 44922 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44922&action=edit variable and function alignment test case Variable alignment is checked against MAX_OFILE_ALIGNMENT but function and label (-falign-label=n) alignment is not. This causes requests to the target code to generate alignment directives that the output format doesn't support, causing ICE at least in some targets. The attached testalign.c gets an error (on i386) for variable "ag", and on pdp11 also for variable "a4" (since max alignment on pdp11 is 2 bytes). But the corresponding function alignments do not generate error messages. File testalign2.c with -falign-labels=n also passes the requested alignment to the back end without checking it against MAX_OFILE_ALIGNMENT.