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] Avoid ICEs with -dCv


Hi!

If -dXv is used where X != a (i.e. vcg graphs requested, but not
all dump files enabled), GCC ICEs in cleanup_graph_dump_file, as
that function is called even for passes where the dump was not enabled.
Ok for HEAD/4.0?  This is a regression from 3.4.x.

There is another problem, with GCC 4+ print_rtl_graph_with_bb
is never called when -dv is requested, so all the vcg files contain just:
graph: {
port_sharing: no
}

2005-08-11  Jakub Jelinek  <jakub@redhat.com>

	* passes.c (execute_one_pass): Don't call clean_graph_dump_file
	if dump_file_name is NULL.

--- gcc/passes.c.jj	2005-08-06 10:39:59.000000000 +0200
+++ gcc/passes.c	2005-08-11 10:21:01.000000000 +0200
@@ -782,10 +782,11 @@ execute_one_pass (struct tree_opt_pass *
 	}
 
       if (initializing_dump
-          && graph_dump_format != no_graph
+	  && dump_file_name != NULL
+	  && graph_dump_format != no_graph
 	  && (pass->properties_provided & (PROP_cfg | PROP_rtl))
 	      == (PROP_cfg | PROP_rtl))
-        clean_graph_dump_file (dump_file_name);
+	clean_graph_dump_file (dump_file_name);
     }
 
   /* If a timevar is present, start it.  */

	Jakub


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