[committed] Fix ICE with -fdump-ipa-all-all

Jakub Jelinek jakub@redhat.com
Mon Nov 30 15:23:00 GMT 2009


Hi!

Running trunk cc1 -O3 -fdump-ipa-all-all pr42231.c
ICEs in ipa-reference.  Apparently
2009-10-24  Jan Hubicka  <jh@suse.cz>

        * ipa-reference.c (check_call): Noreturn notrhow calls do not write
        to memory.
        (analyze_function): When analyzing noreturn nothrow call, do not
        compute written stats; free bitmaps of vars early if possible.
        (generate_summary): Only update bitmaps if computed.
        (propagate): Only dump bitmaps if computed.
        (ipa_reference_read_summary): Fix pasto.
changed only 2 spots in propagate and left untouched other 2 spots in the
following loop.

Committed as obvious.

2009-11-30  Jakub Jelinek  <jakub@redhat.com>

	* ipa-reference.c (propagate): Only dump bitmaps if computed.

--- gcc/ipa-reference.c.jj	2009-11-25 16:47:35.000000000 +0100
+++ gcc/ipa-reference.c	2009-11-30 16:11:31.000000000 +0100
@@ -1389,22 +1389,23 @@ propagate (void)
 	      ipa_reference_local_vars_info_t w_l = w_ri->local;
 	      fprintf (dump_file, "\n  next cycle: %s/%i ",
 		       cgraph_node_name (w), w->uid);
- 	      fprintf (dump_file, "\n    locals read: ");
-	      EXECUTE_IF_SET_IN_BITMAP (w_l->statics_read,
-					0, index, bi)
-		{
-		  fprintf (dump_file, "%s ",
-			   get_static_name (index));
-		}
+	      fprintf (dump_file, "\n    locals read: ");
+	      if (w_l->statics_read)
+		EXECUTE_IF_SET_IN_BITMAP (w_l->statics_read,
+					  0, index, bi)
+		  {
+		    fprintf (dump_file, "%s ",
+			     get_static_name (index));
+		  }
 
 	      fprintf (dump_file, "\n    locals written: ");
-	      EXECUTE_IF_SET_IN_BITMAP (w_l->statics_written,
-					0, index, bi)
-		{
-		  fprintf(dump_file, "%s ",
-			  get_static_name (index));
-		}
-
+	      if (w_l->statics_written)
+		EXECUTE_IF_SET_IN_BITMAP (w_l->statics_written,
+					  0, index, bi)
+		  {
+		    fprintf (dump_file, "%s ",
+			     get_static_name (index));
+		  }
 
 	      w_info = (struct ipa_dfs_info *) w->aux;
 	      w = w_info->next_cycle;


	Jakub



More information about the Gcc-patches mailing list