This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Remove useless build_variant_type call from create_tmp_var_raw
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 5 May 2011 11:25:27 +0200
- Subject: [PATCH] Remove useless build_variant_type call from create_tmp_var_raw
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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.
--- 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