http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418

--- Comment #16 from H.J. Lu <hjl.tools at gmail dot com> ---
This patch:

diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c
index 2fc8220..56160bd 100644
--- a/gcc/tree-ssanames.c
+++ b/gcc/tree-ssanames.c
@@ -136,7 +136,7 @@ make_ssa_name_fn (struct function *fn, tree var, gimple
stmt)
           || (TYPE_P (var) && is_gimple_reg_type (var)));

   /* If our free list has an element, then use it.  */
-  if (!vec_safe_is_empty (FREE_SSANAMES (fn)))
+  if (!vec_safe_is_empty (FREE_SSANAMES (fn)) && stmt)
     {
       t = FREE_SSANAMES (fn)->pop ();
       if (GATHER_STATISTICS)

avoids putting temporaries free SSANAMES list so that sort_by_operand_rank
is more stable.

Reply via email to