From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3262 invoked by alias); 16 Mar 2010 14:57:41 -0000 Received: (qmail 3213 invoked by uid 48); 16 Mar 2010 14:57:28 -0000 Date: Tue, 16 Mar 2010 14:57:00 -0000 Message-ID: <20100316145728.3212.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/43390] [4.5 Regression] ICE: integral result type precision does not match field size of BIT_FIELD_REF In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-03/txt/msg01490.txt.bz2 ------- Comment #5 from rguenth at gcc dot gnu dot org 2010-03-16 14:57 ------- The issue is that logical(kind=4) seems to have TYPE_PRECISION of 1 (just guessing). But BIT_FIELD_REF extracts 32bits from the vector, failing to truncate the result to 1 bit precision, possibly leading to wrong-code. What the middle-end expects here is integer(kind=4) tmp = But BIT_FIELD_REF ; res = (logical(kind=4))tmp; But I suppose this might turn out to be expensive (thus we could also refuse to build vector types from types whose precision does not match their mode bitsize). -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2010-03-16 14:57:28 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43390