From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10974 invoked by alias); 19 Apr 2010 12:59:31 -0000 Received: (qmail 10909 invoked by uid 48); 19 Apr 2010 12:59:14 -0000 Date: Mon, 19 Apr 2010 12:59:00 -0000 Subject: [Bug c/43798] New: attribute((aligned(x))) not honored for array element types? X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-04/txt/msg01824.txt.bz2 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