From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13489 invoked by alias); 22 Nov 2007 00:58:45 -0000 Received: (qmail 13481 invoked by uid 22791); 22 Nov 2007 00:58:45 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 22 Nov 2007 00:58:40 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.1) with ESMTP id lAM0wc0e014620; Wed, 21 Nov 2007 19:58:38 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lAM0wc6c030236; Wed, 21 Nov 2007 19:58:38 -0500 Received: from pantani.quesejoda.com (sebastian-int.corp.redhat.com [172.16.52.221]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lAM0wcOA028343; Wed, 21 Nov 2007 19:58:38 -0500 Received: by pantani.quesejoda.com (Postfix, from userid 500) id DF7B511A0347; Wed, 21 Nov 2007 20:58:37 -0400 (AST) Date: Thu, 22 Nov 2007 11:32:00 -0000 From: Aldy Hernandez To: Richard Guenther Cc: Diego Novillo , gcc-patches@gcc.gnu.org Subject: Re: [tuples] dereference POINTER_PLUS_EXPR check Message-ID: <20071122005837.GA7171@redhat.com> References: <20071121204635.GA7204@redhat.com> <4744A197.1060701@google.com> <20071121215235.GA11077@redhat.com> <84fc9c000711211357w7a2587d2n663dd561845e4e1c@mail.gmail.com> <20071121225800.GA5508@redhat.com> <84fc9c000711211525h37554477yf567a8265f09d59@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <84fc9c000711211525h37554477yf567a8265f09d59@mail.gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) 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: 2007-11/txt/msg01151.txt.bz2 > now due to the transitiveness of u_t_c, we now simply need to check > > useless_type_conversion (lhs, op0) > > which in your notation is lhs and rhs1. Which is exactly what the code did > before your patch. ... > Why are the pointed-to types relevant at all? Type relations for the > pointed-to types don't necessary translate to the relations of the > pointer types. > For example useless_type_conversion (void *, int *) == true but > useless_type_conversion (void, int) is certainly not true. This is the failed testcase that prompted the patch: (gdb) ptt lhs_type