This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, committed] PR target/23983, fix builtin attributes on powerpc


On Tue, Oct 20, 2009 at 12:06:16AM +0200, Jakub Jelinek wrote:
> 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  <jakub@redhat.com>
> 
> 	* config/rs6000/rs6000.c (def_builtin): Set TREE_READONLY instead
> 	of TREE_CONSTANT.

Bootstrapped/regtested fine on powerpc64-linux/trunk (--with-cpu=default32,
-m32/-m64 testing) and in 4.4-RH branch backport (both powerpc64-linux
--with-cpu=default32 and --with-cpu=default64).

Ok for trunk?

> --- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]