public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/43798]  New: attribute((aligned(x))) not honored for array element types?
@ 2010-04-19 12:59 rguenth at gcc dot gnu dot org
  2010-04-19 13:05 ` [Bug c/43798] " rguenth at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-04-19 12:59 UTC (permalink / raw)
  To: gcc-bugs

in libbid we have

typedef __attribute__((aligned(16)))
struct {
    unsigned long long w[3];
} UINT192;

UINT192 bid_Kx192[32];

thus we request 16-byte alignment for UINT192 (whose elements add
up to a size of 24).  Now the array ends up with elements of size 24
and thus the elements are _not_ aligned to a 16-byte boundary, still
the element type is not adjusted to reflect that leading to inconsistencies
when one for example tries to set operand 3 of an ARRAY_REF
(which is specified in units of the alignment of the element).

This causes PR43783.

This is also at least a documentation bug as I can't find anything
that documents the above behavior.


-- 
           Summary: attribute((aligned(x))) not honored for array element
                    types?
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: wrong-code, documentation
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-04-19 13:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-19 12:59 [Bug c/43798] New: attribute((aligned(x))) not honored for array element types? rguenth at gcc dot gnu dot org
2010-04-19 13:05 ` [Bug c/43798] " rguenth at gcc dot gnu dot org
2010-04-19 13:28 ` schwab at linux-m68k dot org
2010-04-19 13:44 ` jakub at gcc dot gnu dot org
2010-04-19 13:57 ` rguenther at suse dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).