[Bug tree-optimization/22037] [4.1 Regression] internal compiler error: verify_ssa failed

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Jul 1 17:08:00 GMT 2005


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-01 17:08 -------
The bug is really in cleanup_tree_cfg which is doing the merge of the two BBs.
This patch fixes the problem but I have not yet bootstrapped it yet:
Index: tree-cfg.c
===============================================================
====
RCS file: /cvs/gcc/gcc/gcc/tree-cfg.c,v
retrieving revision 2.207
diff -u -p -r2.207 tree-cfg.c
--- tree-cfg.c	28 Jun 2005 19:33:20 -0000	2.207
+++ tree-cfg.c	1 Jul 2005 17:07:35 -0000
@@ -1254,6 +1254,10 @@ replace_uses_by (tree name, tree val)
       tree rhs;
 
       fold_stmt_inplace (stmt);
+      mark_new_vars_to_rename (stmt);
+      
+      if (maybe_clean_or_replace_eh_stmt (stmt, stmt))
+	tree_purge_dead_eh_edges (bb_for_stmt (stmt));
 
       rhs = get_rhs (stmt);
       if (TREE_CODE (rhs) == ADDR_EXPR)
Index: tree-cfgcleanup.c
===============================================================
====
RCS file: /cvs/gcc/gcc/gcc/tree-cfgcleanup.c,v
retrieving revision 2.2
diff -u -p -r2.2 tree-cfgcleanup.c
--- tree-cfgcleanup.c	25 Jun 2005 02:01:15 -0000	2.2
+++ tree-cfgcleanup.c	1 Jul 2005 17:07:36 -0000
@@ -520,7 +520,11 @@ cleanup_tree_cfg (void)
 
   /* Merging the blocks creates no new opportunities for the other
      optimizations, so do it here.  */
-  retval |= merge_seq_blocks ();
+  if (merge_seq_blocks ())
+    {
+      retval = true;
+      update_ssa (TODO_update_ssa_only_virtuals);
+    }
 
   compact_blocks ();
 


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|dnovillo at gcc dot gnu dot |pinskia at gcc dot gnu dot
                   |org                         |org


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



More information about the Gcc-bugs mailing list