[Bug tree-optimization/18746] [4.0 Regression] segfault with cc1 compiled with checking disabled

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Dec 1 02:46:00 GMT 2004


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-01 02:46 -------
The problem is really in fab.

Question is how should modify_stmt work because that is what is causing the problem.
This patch fix the problem:
Index: tree-ssa-ccp.c
===============================================================
====
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-ccp.c,v
retrieving revision 2.53
diff -u -p -r2.53 tree-ssa-ccp.c
--- tree-ssa-ccp.c	29 Nov 2004 01:15:39 -0000	2.53
+++ tree-ssa-ccp.c	1 Dec 2004 02:45:17 -0000
@@ -2196,7 +2180,7 @@ execute_fold_all_builtins (void)
 	      if (result && !set_rhs (stmtp, result))
 		abort ();
 	    }
-	  modify_stmt (*stmtp);
+	  mark_new_vars_to_rename (*stmtp, vars_to_rename);
 	  if (maybe_clean_eh_stmt (*stmtp)
 	      && tree_purge_dead_eh_edges (bb))
 	    cfg_changed = true;


-- 


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



More information about the Gcc-bugs mailing list