fix -da crash involving remove_useless

Geoffrey Keating gkeating@apple.com
Tue May 17 22:43:00 GMT 2005


Recently, using -da with -O would crash GCC.  This fixes it.

I'll commit after a bootstrap & testrun on powerpc-darwin8 finishes.

-- 
- Geoffrey Keating <geoffk@apple.com>

===File ~/patches/gcc-unusedontrees.patch===================
2005-05-17  Geoffrey Keating  <geoffk@apple.com>

	* tree-cfg.c (pass_remove_useless): This pass works on trees.

Index: tree-cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-cfg.c,v
retrieving revision 2.192
diff -u -p -u -p -r2.192 tree-cfg.c
--- tree-cfg.c	17 May 2005 20:28:22 -0000	2.192
+++ tree-cfg.c	17 May 2005 22:26:11 -0000
@@ -1992,8 +1992,8 @@ struct tree_opt_pass pass_remove_useless
   NULL,					/* next */
   0,					/* static_pass_number */
   0,					/* tv_id */
-  PROP_gimple_any,			/* properties_required */
-  0,					/* properties_provided */
+  PROP_gimple_any | PROP_trees,		/* properties_required */
+  PROP_trees,				/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
   TODO_dump_func,			/* todo_flags_finish */
============================================================



More information about the Gcc-patches mailing list