From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24277 invoked by alias); 4 Oct 2011 15:08:04 -0000 Received: (qmail 24268 invoked by uid 22791); 4 Oct 2011 15:08:02 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-wy0-f175.google.com (HELO mail-wy0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 04 Oct 2011 15:07:48 +0000 Received: by wyh5 with SMTP id 5so686706wyh.20 for ; Tue, 04 Oct 2011 08:07:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.8.213 with SMTP id i21mr1606795wbi.80.1317740866982; Tue, 04 Oct 2011 08:07:46 -0700 (PDT) Received: by 10.180.106.100 with HTTP; Tue, 4 Oct 2011 08:07:46 -0700 (PDT) In-Reply-To: References: Date: Tue, 04 Oct 2011 15:08:00 -0000 Message-ID: Subject: Re: Suboptimal __restrict optimization? From: Ulf Magnusson To: Ian Lance Taylor Cc: gcc@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 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/msg00045.txt.bz2 On Mon, Oct 3, 2011 at 10:22 PM, Ian Lance Taylor wrote: > 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 > Is this something that has been improved in 4.6.x? (Sorry for the initial non-reply-all.)