From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1194 invoked by alias); 23 Aug 2019 19:19:14 -0000 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 Received: (qmail 859 invoked by uid 89); 23 Aug 2019 19:19:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=sk:ao_ref_, H*f:sk:RoRjOg3, Arggh, UD:b.c 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 ESMTP; Fri, 23 Aug 2019 19:19:13 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 15FAF89ACA; Fri, 23 Aug 2019 19:19:12 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-44.rdu2.redhat.com [10.10.112.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 674E85D6B2; Fri, 23 Aug 2019 19:19:11 +0000 (UTC) Subject: Re: [RFA] [tree-optimization/80576] Handle non-constant sizes in DSE To: Richard Biener Cc: gcc-patches References: <8b836cef-7aa1-fd3d-5585-c2a6fe74bed6@redhat.com> <72ac1813-0ca3-6798-a77b-7f1ab914d91c@redhat.com> From: Jeff Law Openpgp: preference=signencrypt Message-ID: Date: Fri, 23 Aug 2019 20:27:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg01676.txt.bz2 On 8/22/19 4:46 AM, Richard Biener wrote: >>> Also you seem to use this info to constrain optimization when you >>> might remember that types of addresses do not carry such information... >>> Thus it should be "trivially" possible to write a testcase that is miscompiled >>> after your patch. I also don't see this really exercised in the >>> testcases you add? >> Arggh. You're absolutely correct. I must be blocking out that entire >> discussion from last summer due to the trama :-) >> >> If the destination is the address of a _DECL node, can we use the size >> of the _DECL? > > Yes, but this should already happen for both invariant ones like &a.b.c > and variant ones like &a.b[i].c in ao_ref_init_from_ptr_and_size. I don't see that in ao_ref_init_from_ptr_and_size. AFAICT if you don't know the size when you call that routine (size == NULL), then you end up with the ref->size and ref->max_size set to -1. Am I missing something here? Jeff