diff mbox

Remove useless build_variant_type call from create_tmp_var_raw

Message ID 20110505092527.GK17079@tyan-ft48-01.lab.bos.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek May 5, 2011, 9:25 a.m. UTC
Hi!

create_tmp_var_raw calls build_type_variant, but doesn't actually use
it in any way (other than set its TYPE_ATTRIBUTES, that's why
-Wunused-but-set-variable hasn't reported it.

2011-05-05  Jakub Jelinek  <jakub@redhat.com>

	* gimplify.c (create_tmp_var_raw): Don't call build_type_variant.


	Jakub

Comments

Richard Biener May 5, 2011, 9:44 a.m. UTC | #1
On Thu, May 5, 2011 at 11:25 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> create_tmp_var_raw calls build_type_variant, but doesn't actually use
> it in any way (other than set its TYPE_ATTRIBUTES, that's why
> -Wunused-but-set-variable hasn't reported it.

Ok.

Thanks,
Richard.

> 2011-05-05  Jakub Jelinek  <jakub@redhat.com>
>
>        * gimplify.c (create_tmp_var_raw): Don't call build_type_variant.
>
> --- gcc/gimplify.c.jj   2011-04-22 16:09:46.000000000 +0200
> +++ gcc/gimplify.c      2011-05-05 09:09:00.714588835 +0200
> @@ -427,11 +427,6 @@ tree
>  create_tmp_var_raw (tree type, const char *prefix)
>  {
>   tree tmp_var;
> -  tree new_type;
> -
> -  /* Make the type of the variable writable.  */
> -  new_type = build_type_variant (type, 0, 0);
> -  TYPE_ATTRIBUTES (new_type) = TYPE_ATTRIBUTES (type);
>
>   tmp_var = build_decl (input_location,
>                        VAR_DECL, prefix ? create_tmp_var_name (prefix) : NULL,
>
>        Jakub
>
diff mbox

Patch

--- gcc/gimplify.c.jj	2011-04-22 16:09:46.000000000 +0200
+++ gcc/gimplify.c	2011-05-05 09:09:00.714588835 +0200
@@ -427,11 +427,6 @@  tree
 create_tmp_var_raw (tree type, const char *prefix)
 {
   tree tmp_var;
-  tree new_type;
-
-  /* Make the type of the variable writable.  */
-  new_type = build_type_variant (type, 0, 0);
-  TYPE_ATTRIBUTES (new_type) = TYPE_ATTRIBUTES (type);
 
   tmp_var = build_decl (input_location,
 			VAR_DECL, prefix ? create_tmp_var_name (prefix) : NULL,