From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8445 invoked by alias); 28 Mar 2011 12:27:27 -0000 Received: (qmail 8435 invoked by uid 22791); 28 Mar 2011 12:27:25 -0000 X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 28 Mar 2011 12:27:19 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 5BFE986391; Mon, 28 Mar 2011 14:27:18 +0200 (CEST) Date: Mon, 28 Mar 2011 13:37:00 -0000 From: Michael Matz To: Paolo Bonzini Cc: Richard Guenther , Ian Lance Taylor , Nathan Boley , gcc@gcc.gnu.org Subject: Re: Possible Bug In-Reply-To: <4D9072B3.708@gnu.org> Message-ID: References: <4D9065FD.6060100@gnu.org> <4D9072B3.708@gnu.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-03/txt/msg00447.txt.bz2 Hi, On Mon, 28 Mar 2011, Paolo Bonzini wrote: > > At expansion time we have the following for the call argument: > > > > > type > size > > unit size > > align 8 symtab 0 alias set -1 canonical type 0x7ffff5b29540 > > > > which looks ok to me. > > It already isn't, why is the alignment 8 if __alignof__ > (GENOME_LOC_TYPE_2) is 1? The aligns are printed in bits. It really is okay, as is the MEM. > The other question is a layout question, should the packed attribute > affect the removal of padding from the last bitfield element? A hypothetical question because we can't change this behaviour after about 15 years. Even if we could I'd argue that the current behaviour is correct (because we lack another attribute that would say 'and please also pack arrays of this type tightly', which then would finally imply that final padding is also removed, and hence we'd then hit this very same bug with testcases using _that_ attribute instead of packed). As some digging shows, already GCC 1.35 had effectively the same code. As soon as parameters are passed in registers GCC loads the parts fitting into registers as full words. We could simply sorry() for these cases, as they never worked correctly. Though I suppose that's quite unforgiving, as most of the time (struct in question not passing page border) it works fine. Ciao, Michael.