From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9047 invoked by alias); 6 Nov 2009 09:47:20 -0000 Received: (qmail 9037 invoked by uid 22791); 6 Nov 2009 09:47:19 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 Nov 2009 09:47:09 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 5D6AC29003A; Fri, 6 Nov 2009 10:47:07 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zOaRuzy7y1s3; Fri, 6 Nov 2009 10:47:01 +0100 (CET) Received: from [192.168.1.2] (83-153-87-54.rev.libertysurf.net [83.153.87.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id DC457290065; Fri, 6 Nov 2009 10:46:56 +0100 (CET) From: Eric Botcazou To: Michael Matz Subject: Re: Do BLKmode bit-fields still exist? Date: Fri, 06 Nov 2009 09:47:00 -0000 User-Agent: KMail/1.9.6 (enterprise 20070904.708012) Cc: gcc@gcc.gnu.org References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200911061046.50176.ebotcazou@adacore.com> 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: 2009-11/txt/msg00119.txt.bz2 > In a desparate try to get some testcases which do have BLKmode bit-fields > I bootstrapped and regtested the below patch (as part of a larger patch, > though) on seven architectures with all languages (on two without Ada). Yet it's easy in Ada on platforms with strict alignment, e.g. SPARC: package P is type Rec1 is record I1 : Integer; I2 : Integer; I3 : Integer; end record; type R2 is record B : Boolean; R : Rec1; end record; pragma Pack (R2); end P; (gdb) p debug_tree(0x2aaaaab2bdc0) unit size align 32 symtab 0 alias set -1 canonical type 0x2aaaaabc64d0 fields nonaddressable SI file p.ads line 4 col 5 size unit size align 32 offset_align 64 offset bit offset context chain > Ada size reference_to_this chain > external packed bit-field BLK file p.ads line 11 col 5 size unit size align 8 offset_align 64 offset bit offset constant visited 8> bit_field_type context > We set DECL_BIT_FIELD in the front-end because the field is misaligned. -- Eric Botcazou