From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30906 invoked by alias); 3 Oct 2011 20:23:02 -0000 Received: (qmail 30894 invoked by uid 22791); 3 Oct 2011 20:23:01 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 03 Oct 2011 20:22:47 +0000 Received: from wpaz37.hot.corp.google.com (wpaz37.hot.corp.google.com [172.24.198.101]) by smtp-out.google.com with ESMTP id p93KMjXb013900 for ; Mon, 3 Oct 2011 13:22:46 -0700 Received: from qyk10 (qyk10.prod.google.com [10.241.83.138]) by wpaz37.hot.corp.google.com with ESMTP id p93KLSod008493 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Mon, 3 Oct 2011 13:22:44 -0700 Received: by qyk10 with SMTP id 10so2345713qyk.20 for ; Mon, 03 Oct 2011 13:22:44 -0700 (PDT) Received: by 10.68.60.37 with SMTP id e5mr3611408pbr.112.1317673364387; Mon, 03 Oct 2011 13:22:44 -0700 (PDT) Received: by 10.68.60.37 with SMTP id e5mr3611392pbr.112.1317673364267; Mon, 03 Oct 2011 13:22:44 -0700 (PDT) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id p4sm22637942pbs.6.2011.10.03.13.22.43 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Oct 2011 13:22:43 -0700 (PDT) From: Ian Lance Taylor To: Ulf Magnusson Cc: gcc@gcc.gnu.org Subject: Re: Suboptimal __restrict optimization? References: Date: Mon, 03 Oct 2011 20:23:00 -0000 In-Reply-To: (Ulf Magnusson's message of "Sun, 2 Oct 2011 02:58:43 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg00018.txt.bz2 Ulf Magnusson writes: > Is there some reason why GCC couldn't generate this code for the first > version of C::f()? Is this a failure of optimization, or am I missing > something in how __restricted works? It's a failure of optimization. Ian