From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20410 invoked by alias); 12 Aug 2003 16:51:27 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 20397 invoked by uid 48); 12 Aug 2003 16:51:27 -0000 Date: Tue, 12 Aug 2003 16:51:00 -0000 Message-ID: <20030812165127.20395.qmail@sources.redhat.com> From: "janis187 at us dot ibm dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20030811210952.11885.stanrost@lcs.mit.edu> References: <20030811210952.11885.stanrost@lcs.mit.edu> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/11885] [3.3 Regression] Problem with bitfields in packed structs X-Bugzilla-Reason: CC X-SW-Source: 2003-08/txt/msg01486.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11885 janis187 at us dot ibm dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at redhat dot com ------- Additional Comments From janis187 at us dot ibm dot com 2003-08-12 16:51 ------- The regression in PR 11885 was introduced or exposed on the 3.3 branch and mainline by this patch: --- gcc/gcc/ChangeLog --- 2003-03-31 Jason Merrill * stor-layout.c (update_alignment_for_field): Respect DECL_USER_ALIGN for zero-length bitfields, too. * c-decl.c (finish_struct): Don't set DECL_ALIGN for normal fields. --- gcc/gcc/cp/ChangeLog --- 2003-03-31 Jason Merrill * class.c (check_field_decl): Don't set DECL_ALIGN. The test case passes for mainline after this large patch: --- gcc/gcc/ChangeLog --- 2003-04-03 Jason Merrill * stor-layout.c (do_type_align): New fn, split out from... (layout_decl): ...here. Do all alignment calculations for FIELD_DECLs here. (update_alignment_for_field): Not here. (start_record_layout, debug_rli): Remove unpadded_align. * tree.h (struct record_layout_info_s): Remove unpadded_align. * c-decl.c (finish_enum): Don't set DECL_SIZE, DECL_ALIGN or DECL_MODE on the CONST_DECLs. (finish_struct): Don't mess with DECL_ALIGN. --- gcc/gcc/cp/ChangeLog --- 2003-04-03 Jason Merrill * class.c (build_vtable): Set DECL_ALIGN here. (get_vtable_decl): Not here. (layout_vtable_decl): Or here. (create_vtable_ptr): Or here. (layout_class_type): Or here. (check_bitfield_decl): Don't mess with field alignment. The hunts took place on i686-pc-linux-gnu using the submitter's test case.