From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5751 invoked by alias); 15 Jul 2016 07:03:51 -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 5736 invoked by uid 89); 15 Jul 2016 07:03:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1090 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; Fri, 15 Jul 2016 07:03:39 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7E4D611BB50; Fri, 15 Jul 2016 07:03:38 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-204-98.brq.redhat.com [10.40.204.98]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6F73aeG023643 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 15 Jul 2016 03:03:38 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id u6F73Zoa018781; Fri, 15 Jul 2016 09:03:35 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id u6F73VBX018779; Fri, 15 Jul 2016 09:03:31 +0200 Date: Fri, 15 Jul 2016 07:03:00 -0000 From: Jakub Jelinek To: Andrew Pinski Cc: kugan , "gcc-patches@gcc.gnu.org" , Richard Biener , Jan Hubicka , Martin Jambor Subject: Re: [RFC][IPA-VRP] Check for POINTER_TYPE_P before accessing SSA_NAME_PTR_INFO in tree-inline Message-ID: <20160715070331.GP7387@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <57886949.8010300@linaro.org> <578869F9.5040606@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2016-07/txt/msg00898.txt.bz2 On Thu, Jul 14, 2016 at 09:47:03PM -0700, Andrew Pinski wrote: > On Thu, Jul 14, 2016 at 9:43 PM, kugan > wrote: > > This patch adds check for POINTER_TYPE_P before accessing SSA_NAME_PTR_INFO > > in remap_ssa_name in gcc/tree-inline.c. This is not related to IPA_VRP but > > was exposed by that. > > SSA_NAME_PTR_INFO should be NULL for non POINTER_TYPE ssa names? Why > is it not null in your case? ?? /* Value range information. */ union ssa_name_info_type { /* Pointer attributes used for alias analysis. */ struct GTY ((tag ("0"))) ptr_info_def *ptr_info; /* Value range attributes used for zero/sign extension elimination. */ struct GTY ((tag ("1"))) range_info_def *range_info; } GTY ((desc ("%1.typed.type ?" \ "!POINTER_TYPE_P (TREE_TYPE ((tree)&%1)) : 2"))) info; SSA_NAME_PTR_INFO and SSA_NAME_RANGE_INFO share space, so all uses of SSA_NAME_PTR_INFO should be only used for pointer types and SSA_NAME_RANGE_INFO only for integral types. Jakub