From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29519 invoked by alias); 1 Dec 2012 09:30:47 -0000 Received: (qmail 29502 invoked by uid 22791); 1 Dec 2012 09:30:45 -0000 X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,KHOP_RCVD_TRUST,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-wi0-f175.google.com (HELO mail-wi0-f175.google.com) (209.85.212.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 01 Dec 2012 09:30:37 +0000 Received: by mail-wi0-f175.google.com with SMTP id hm11so140801wib.8 for ; Sat, 01 Dec 2012 01:30:36 -0800 (PST) Received: by 10.180.74.108 with SMTP id s12mr1543215wiv.12.1354354236445; Sat, 01 Dec 2012 01:30:36 -0800 (PST) Received: from localhost ([2.28.234.219]) by mx.google.com with ESMTPS id i2sm2137473wiw.3.2012.12.01.01.30.34 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 01 Dec 2012 01:30:35 -0800 (PST) From: Richard Sandiford To: Eric Botcazou Mail-Followup-To: Eric Botcazou ,gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com Cc: gcc-patches@gcc.gnu.org Subject: Re: Fix segfault on degenerate bitfield case References: <2334390.fbpLepaxAm@polaris> Date: Sat, 01 Dec 2012 09:30:00 -0000 In-Reply-To: <2334390.fbpLepaxAm@polaris> (Eric Botcazou's message of "Fri, 30 Nov 2012 23:32:15 +0100") Message-ID: <87y5hi6rwm.fsf@talisman.default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-12/txt/msg00012.txt.bz2 Eric Botcazou writes: > This is a segfault on a degenerate bitfield case introduced by the rewrite of > the bitfield machinery. In Ada, we have bitfields of size zero and we ask the > middle-end to generate accesses to them. This doesn't work anymore because > get_best_mode now returns VOIDmode instead of QImode in this case, which > wreaks havoc later. > > The patchlet just restores the previous behaviour. It also makes the comment > describing the computation of bitregion_end_ more explicit, as the original > formulation is a bit terse on second reading, even for the reviewer. :-) > > Bootstrapped/regtested on x86-64/Linux, applied on the mainline as obvious. Thanks! Richard