This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Committed] Fix nested function oversight with vector types
- From: Andrew Pinski <pinskia at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 21 Dec 2006 23:23:25 -0800
- Subject: [Committed] Fix nested function oversight with vector types
When I changed DECL_COMPLEX_GIMPLE_REG_P to DECL_GIMPLE_REG_P, I forgot
to add the check for VECTOR_TYPE to tree-nested.c so in some cases we
could cause invalid gimple to be produced. This patch fixes that
oversight.
Applied as obvious after a bootstrap/test on i686-linux-gnu.
Thanks,
Andrew Pinski
ChangeLog:
* tree-nested.c (create_tmp_var_for): Check for vector type
when setting DECL_GIMPLE_REG_P.
Index: tree-nested.c
===================================================================
--- tree-nested.c (revision 120101)
+++ tree-nested.c (working copy)
@@ -148,7 +148,8 @@ create_tmp_var_for (struct nesting_info
DECL_CONTEXT (tmp_var) = info->context;
TREE_CHAIN (tmp_var) = info->new_local_var_chain;
DECL_SEEN_IN_BIND_EXPR_P (tmp_var) = 1;
- if (TREE_CODE (type) == COMPLEX_TYPE)
+ if (TREE_CODE (type) == COMPLEX_TYPE
+ || TREE_CODE (type) == VECTOR_TYPE)
DECL_GIMPLE_REG_P (tmp_var) = 1;
info->new_local_var_chain = tmp_var;