This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Remove useless build_variant_type call from create_tmp_var_raw
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 5 May 2011 11:44:14 +0200
- Subject: Re: [PATCH] Remove useless build_variant_type call from create_tmp_var_raw
- References: <20110505092527.GK17079@tyan-ft48-01.lab.bos.redhat.com>
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
>