From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93264 invoked by alias); 24 Apr 2015 08:13:41 -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 93251 invoked by uid 89); 24 Apr 2015 08:13:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f41.google.com Received: from mail-oi0-f41.google.com (HELO mail-oi0-f41.google.com) (209.85.218.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 24 Apr 2015 08:13:40 +0000 Received: by oign205 with SMTP id n205so34723576oig.2 for ; Fri, 24 Apr 2015 01:13:38 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.147.165 with SMTP id tl5mr6169466oeb.81.1429863218229; Fri, 24 Apr 2015 01:13:38 -0700 (PDT) Received: by 10.76.115.167 with HTTP; Fri, 24 Apr 2015 01:13:38 -0700 (PDT) In-Reply-To: <55391495.8040103@redhat.com> References: <55391495.8040103@redhat.com> Date: Fri, 24 Apr 2015 08:13:00 -0000 Message-ID: Subject: Re: RFA (tree.c): PATCH for may_alias vs. TYPE_CANONICAL, related to c++/50800 From: Richard Biener To: Jason Merrill Cc: gcc-patches List Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg01493.txt.bz2 On Thu, Apr 23, 2015 at 5:49 PM, Jason Merrill wrote: > In general, TYPE_CANONICAL of a type strips all attributes. An exception to > this seems to be that TYPE_REF_CAN_ALIAS_ALL remains set on the > TYPE_CANONICAL of a pointer/reference type even though its TREE_TYPE no > longer has the may_alias attribute, and is inconsistent with > "affects_type_identity" being false for may_alias. This seems to have been > a mistake in the patch that first introduced TYPE_CANONICAL, rather than a > deliberate choice. > > I'm also planning to fix 50800 in the front end, but this patch still seems > like an improvement. > > Tested x86-64-pc-linux-gnu, OK for trunk? Looks good to me. We eventually were confused by alias.c get_alias_set dropping to TYPE_CANONICAL (TYPE_MAIN_VARIANT (T)) before determining the alias set of a type T. But of course ref-all is only relevant for the alias-set of type *T. Richard.