From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32046 invoked by alias); 8 Jul 2004 08:44:50 -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 31983 invoked by alias); 8 Jul 2004 08:44:44 -0000 Date: Thu, 08 Jul 2004 08:44:00 -0000 Message-ID: <20040708084444.31981.qmail@sourceware.org> From: "cvs-commit at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20010621060602.3325.andreas.krakowczyk@fujitsu-siemens.com> References: <20010621060602.3325.andreas.krakowczyk@fujitsu-siemens.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/3325] cast of bit-field to same type gets discarded X-Bugzilla-Reason: CC X-SW-Source: 2004-07/txt/msg00772.txt.bz2 List-Id: ------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-07-08 08:44 ------- Subject: Bug 3325 CVSROOT: /cvs/gcc Module name: gcc Changes by: jsm28@gcc.gnu.org 2004-07-08 08:44:24 Modified files: gcc : c-common.c c-decl.c c-lang.c expr.c langhooks-def.h langhooks.h tree-ssa.c tree.c tree.h gcc/objc : objc-act.c objc-lang.c gcc/testsuite : ChangeLog gcc/testsuite/gcc.dg: bitfld-2.c Added files: gcc/testsuite/gcc.c-torture/execute: bitfld-3.c Removed files: gcc/testsuite/gcc.c-torture/execute: bitfld-1.x Log message: 2004-07-08 Joseph S. Myers Neil Booth PR c/2511 PR c/3325 * c-decl.c (finish_struct): Ensure bit-fields are given the correct type. * c-common.c (c_common_signed_or_unsigned_type): For C, require the precision to match as well as the mode. * expr.c (reduce_to_bit_field_precision): New function. (expand_expr_real_1): Reduce expressions of bit-field type to proper precision. * langhooks.h (reduce_bit_field_operations): New hook. * langhooks-def.h (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define. * c-lang.c, objc/objc-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define. * objc/objc-act.c (check_ivars): Convert types to bit-field types before checking. * tree.c (build_nonstandard_integer_type): New function. * tree.h (build_nonstandard_integer_type): New prototype. * tree-ssa.c (tree_ssa_useless_type_conversion_1): Don't treat conversions between integer and boolean types as useless. testsuite: * gcc.c-torture/execute/bitfld-1.x: Remove. * gcc.c-torture/execute/bitfld-3.c: New test. * gcc.dg/bitfld-2.c: Remove XFAILs. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.c.diff?cvsroot=gcc&r1=1.527&r2=1.528 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&r1=1.528&r2=1.529 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-lang.c.diff?cvsroot=gcc&r1=1.129&r2=1.130 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/expr.c.diff?cvsroot=gcc&r1=1.673&r2=1.674 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks-def.h.diff?cvsroot=gcc&r1=1.83&r2=1.84 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks.h.diff?cvsroot=gcc&r1=1.89&r2=1.90 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa.c.diff?cvsroot=gcc&r1=2.19&r2=2.20 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.c.diff?cvsroot=gcc&r1=1.391&r2=1.392 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.h.diff?cvsroot=gcc&r1=1.546&r2=1.547 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/objc/objc-act.c.diff?cvsroot=gcc&r1=1.229&r2=1.230 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/objc/objc-lang.c.diff?cvsroot=gcc&r1=1.47&r2=1.48 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3950&r2=1.3951 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/bitfld-3.c.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/bitfld-1.x.diff?cvsroot=gcc&r1=1.1&r2=NONE http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/bitfld-2.c.diff?cvsroot=gcc&r1=1.2&r2=1.3 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3325