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]

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

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