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]

[PATCH]: Fix PR tree-optimization/22280


We can't iterate through the referenced_vars as if they were in a
contiguous sequence anymore.

Luckily, we don't need to to fix this bug.

find_new_referenced_vars automatically marks syms for renaming for us,
so the loop that is broken is not necessary.

I'll apply as obvious as soon as bootstrap and regtest finishes.

Index: tree-sra.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-sra.c,v
retrieving revision 2.65
diff -u -p -r2.65 tree-sra.c
--- tree-sra.c	30 Jun 2005 22:18:32 -0000	2.65
+++ tree-sra.c	2 Jul 2005 19:31:40 -0000
@@ -1729,16 +1729,9 @@ generate_element_init (struct sra_elt *e
   if (ret && *list_p)
     {
       tree_stmt_iterator i;
-      size_t old, new, j;
-
-      old = num_referenced_vars;
 
       for (i = tsi_start (*list_p); !tsi_end_p (i); tsi_next (&i))
 	find_new_referenced_vars (tsi_stmt_ptr (i));
-
-      new = num_referenced_vars;
-      for (j = old; j < new; ++j)
-	mark_sym_for_renaming (referenced_var (j));
     }
 
   return ret;

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