From patchwork Thu Feb 4 11:05:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 578831 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CE93140187 for ; Thu, 4 Feb 2016 22:05:37 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=dc6kfLu/; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=ZuFiGPKQa4JYMJkmU aRihrsa33Z5xh7FXUMjFxKGfGgsGZ6UH1hdzP1bsyn+Zb5hLYNrN3431O//ek5ay SEjpEh3o5q70BxUmR7fmj+FSPnb3Nwx/C2BepY1gjrmvlwfzAcB6Gwwh8KGFTevo /K/zwi+9SKipKNBKbelOrm4Qps= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; s=default; bh=/Ue+zYgS64mXR5k6NehWKM8 VE/Y=; b=dc6kfLu/czR+Fp5ulTpJKOEh5Tk5R19YS9YTEZ+6c0t/oXnNkXBmQo1 SbsylRqdA1F1uhIyi5NjsbfuIW1dFBYs3NZxiUVu1RNNmqlvttfUT0Sqt3VrvH0H YBvk+4edHgsGjcjzlXtv6n3odFxlkLzSdRXOYtOmKKFAk79j1ojA= Received: (qmail 102906 invoked by alias); 4 Feb 2016 11:05:23 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 102826 invoked by uid 89); 4 Feb 2016 11:05:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1745 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 04 Feb 2016 11:05:21 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id E251E5275B; Thu, 4 Feb 2016 11:05:19 +0000 (UTC) Received: from tucnak.zalov.cz ([10.3.113.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u14B5IGL026333 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 4 Feb 2016 06:05:19 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id u14B5Gte004704; Thu, 4 Feb 2016 12:05:17 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id u14B5F2r004703; Thu, 4 Feb 2016 12:05:15 +0100 Date: Thu, 4 Feb 2016 12:05:15 +0100 From: Jakub Jelinek To: Martin Sebor Cc: Jason Merrill , Gcc Patch List Subject: Re: [PATCH] fix #69251 - [6 Regression] ICE in unify_array_domain on a flexible array member Message-ID: <20160204110515.GK3017@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <569D9FAB.90705@gmail.com> <56A16774.8040609@redhat.com> <56A16A86.3030102@gmail.com> <56A6538C.9030602@gmail.com> <56B0A0E7.9010606@redhat.com> <56B15600.5070509@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <56B15600.5070509@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes On Tue, Feb 02, 2016 at 06:21:04PM -0700, Martin Sebor wrote: > gcc/cp/ChangeLog: > 2016-02-02 Martin Sebor > > PR c++/69251 > PR c++/69253 > PR c++/69290 > PR c++/69277 > PR c++/69349 > * class.c (walk_subobject_offsets): Avoid testing the upper bound > of a flexible array member for equality to null. > (find_flexarrays): Remove spurious whitespace introduced in r231665. > (diagnose_flexarrays): Avoid checking the upper bound of arrays. > (check_flexarrays): Same. This broke bootstrap, I've committed following fix as obvious: 2016-02-04 Jakub Jelinek * class.c (find_flexarrays): Don't declare dom variable. (diagnose_flexarray): Likewise. Jakub --- gcc/cp/class.c.jj 2016-02-04 10:00:26.000000000 +0100 +++ gcc/cp/class.c 2016-02-04 12:01:38.341794819 +0100 @@ -6683,7 +6683,7 @@ find_flexarrays (tree t, flexmems_t *fme continue; /* Determine the upper bound of the array if it has one. */ - if (tree dom = TYPE_DOMAIN (fldtype)) + if (TYPE_DOMAIN (fldtype)) { if (fmem->array) { @@ -6694,7 +6694,7 @@ find_flexarrays (tree t, flexmems_t *fme if (!fmem->after) fmem->after = fld; } - else if (integer_all_onesp (TYPE_MAX_VALUE (dom))) + else if (integer_all_onesp (TYPE_MAX_VALUE (TYPE_DOMAIN (fldtype)))) /* Remember the first zero-length array unless a flexible array member has already been seen. */ fmem->array = fld; @@ -6732,7 +6732,7 @@ diagnose_flexarrays (tree t, const flexm const char *msg = 0; - if (const_tree dom = TYPE_DOMAIN (TREE_TYPE (fmem->array))) + if (TYPE_DOMAIN (TREE_TYPE (fmem->array))) { if (fmem->after) msg = G_("zero-size array member %qD not at end of %q#T");