[Bug c/87795] New: Excessive alignment permitted for functions and labels

pkoning at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Oct 29 16:47:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87795

            Bug ID: 87795
           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: ---

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.


More information about the Gcc-bugs mailing list