[Bug c/56337] __attribute__((aligned(N))) breaks for N=1<<28

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 15 09:26:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56337

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-02-15
     Ever Confirmed|0                           |1

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2013-02-15 09:26:16 UTC ---
That's because we record alignment in bits but do not check whether

      DECL_ALIGN (decl) = (1U << i) * BITS_PER_UNIT;

overflows (DECL_ALIGN has unsigned int storage).  Confirmed.

I think too large alignment specifications should saturate to
MAX_OFILE_ALIGNEMNT
(and of course warn).



More information about the Gcc-bugs mailing list