From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115260 invoked by alias); 22 Sep 2015 07:49:18 -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 115250 invoked by uid 89); 22 Sep 2015 07:49:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: fencepost.gnu.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (208.118.235.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 22 Sep 2015 07:49:16 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53327) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ZeIKA-0005No-7I for gcc-patches@gnu.org; Tue, 22 Sep 2015 03:49:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeIK6-0004GL-Go for gcc-patches@gnu.org; Tue, 22 Sep 2015 03:49:13 -0400 Received: from mx2.suse.de ([195.135.220.15]:47606) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeIK6-0004G2-Au for gcc-patches@gnu.org; Tue, 22 Sep 2015 03:49:10 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 1C50EAAAD; Tue, 22 Sep 2015 07:49:08 +0000 (UTC) Date: Tue, 22 Sep 2015 08:13:00 -0000 From: Richard Biener To: Tom de Vries cc: "gcc-patches@gnu.org" Subject: Re: [PATCH][PR67666] Handle single restrict pointer in struct in create_variable_info_for_1 In-Reply-To: <5600FBFA.2090300@mentor.com> Message-ID: References: <5600FBFA.2090300@mentor.com> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 X-SW-Source: 2015-09/txt/msg01628.txt.bz2 On Tue, 22 Sep 2015, Tom de Vries wrote: > Hi, > > Consider this test-case: > > struct ps > { > int *__restrict__ p; > }; > > void > f (struct ps &__restrict__ ps1) > { > *(ps1.p) = 1; > } > > > Atm, the restrict on p has no effect. Now, say we add a field to the struct: > > struct ps > { > int *__restrict__ p; > int a; > }; > > > Then the restrict on p does have the desired effect. > > > This patch fixes the handling of structs with a single field in alias > analysis. > > Bootstrapped and reg-tested on x86_64. > > OK for trunk? Ok. Thanks, Richard.