From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2439 invoked by alias); 19 Oct 2009 22:06:24 -0000 Received: (qmail 2430 invoked by uid 22791); 19 Oct 2009 22:06:24 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 19 Oct 2009 22:06:19 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9JM6Ivn024606; Mon, 19 Oct 2009 18:06:18 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9JM6G90000886 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 19 Oct 2009 18:06:17 -0400 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.2/8.14.2/Submit) id n9JM6G06027259; Tue, 20 Oct 2009 00:06:16 +0200 Date: Mon, 19 Oct 2009 22:24:00 -0000 From: Jakub Jelinek To: Michael Meissner , David Edelsohn , gcc-patches@gcc.gnu.org Subject: Re: [PATCH, committed] PR target/23983, fix builtin attributes on powerpc Message-ID: <20091019220616.GC14664@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: <20091001185752.GA28820@hungry-tiger.westford.ibm.com> <303e1d290910130630v33b0fe11sd59a5a806b4eb948@mail.gmail.com> <20091013202500.GA9438@hungry-tiger.westford.ibm.com> <303e1d290910131702r13407263i1b226dcad22dddc7@mail.gmail.com> <20091014151518.GA8113@hungry-tiger.westford.ibm.com> <303e1d290910141258r87d1fcbmf2f80bdabc722f10@mail.gmail.com> <20091015205648.GA32037@hungry-tiger.westford.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091015205648.GA32037@hungry-tiger.westford.ibm.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-IsSubscribed: yes 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: 2009-10/txt/msg01245.txt.bz2 On Thu, Oct 15, 2009 at 04:56:48PM -0400, Michael Meissner wrote: > I just committed the following patch. When I was doing a backport of the vsx > changes to 4.3, I noticed that I had not updated the copyright years for two of > the files I checked in July, so I updated these as well. This sets the wrong bit for RS6000_BTC_CONST - __attribute__((const)) functions have TREE_READONLY set on the decl, instead of TREE_CONSTANT, and that's e.g. what flags_from_decl_or_type is testing. Untested so far... 2009-10-19 Jakub Jelinek * config/rs6000/rs6000.c (def_builtin): Set TREE_READONLY instead of TREE_CONSTANT. --- gcc/config/rs6000/rs6000.c 2009-10-15 23:23:25.000000000 +0200 +++ gcc/config/rs6000/rs6000.c 2009-10-19 23:51:26.000000000 +0200 @@ -8530,7 +8530,7 @@ def_builtin (int mask, const char *name, /* const function, function only depends on the inputs. */ case RS6000_BTC_CONST: - TREE_CONSTANT (t) = 1; + TREE_READONLY (t) = 1; TREE_NOTHROW (t) = 1; break; @@ -8554,7 +8554,7 @@ def_builtin (int mask, const char *name, DECL_IS_NOVOPS (t) = 1; } else - TREE_CONSTANT (t) = 1; + TREE_READONLY (t) = 1; break; } } Jakub