From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22858 invoked by alias); 29 Jul 2002 12:26:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 22831 invoked by uid 71); 29 Jul 2002 12:26:01 -0000 Resent-Date: 29 Jul 2002 12:26:01 -0000 Resent-Message-ID: <20020729122601.22830.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, grigory@stl.sarov.ru Received: (qmail 22623 invoked by uid 61); 29 Jul 2002 12:24:33 -0000 Message-Id: <20020729122433.22622.qmail@sources.redhat.com> Date: Mon, 29 Jul 2002 05:26:00 -0000 From: grigory@stl.sarov.ru Reply-To: grigory@stl.sarov.ru To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/7432: Changed bitfield allocation strategy in g++ 3.1.1 X-SW-Source: 2002-07/txt/msg00763.txt.bz2 List-Id: >Number: 7432 >Category: c++ >Synopsis: Changed bitfield allocation strategy in g++ 3.1.1 >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Mon Jul 29 05:26:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Grigory Zagorodnev >Release: 3.1.1 >Organization: >Environment: host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ./configure --enable-threads >Description: Attached test case expecting the size of complete structure C to be 16 bytes. struct C { char c; int i : 67; char d; }; This is what been offered by GNU compiler for a long time. GCC 3.1.1 compiler gives another size of the structure (24 bytes). I do not see any reason to enlarge space taken by the structure C, moreover I do not see any ABI acknowledgment for this. So, the bitfield allocation strategy looks to be erroneously changed. >How-To-Repeat: $g++ foo.cpp $a.out Actuall results (output): sizeof(C) = 24 offsetof(C, d) = 17 Expected results (output): sizeof(C) = 16 offsetof(C, d) = 13 >Fix: >Release-Note: >Audit-Trail: >Unformatted: