diff mbox

Fix ICE when profiles are mismatched

Message ID 20130801100649.GB3861@kam.mff.cuni.cz
State New
Headers show

Commit Message

Jan Hubicka Aug. 1, 2013, 10:06 a.m. UTC
> Honza,
> 
> After this patch, I see new testsuite failures on PowerPC related to profiling.
> 
> FAIL: gcc.dg/tree-prof/ic-misattribution-1.c scan-ipa-dump profile
> "hist->count 1 hist->all 1"
> FAIL: gcc.dg/tree-prof/indir-call-prof.c scan-ipa-dump profile
> "Indirect call -> direct call.* a1 transformation on insn"

Oops, thanks!
This silly bug took us quite a some time with Martin.  Depending on memory allocator
it depends if aact_count[8] is non-NULL.
diff mbox

Patch

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 201400)
+++ ChangeLog	(working copy)
@@ -1,3 +1,7 @@ 
+2013-08-01  Jan Hubicka  <jh@suse.cz>
+
+	* profile.c (compute_value_histograms): Fix thinko.
+
 2013-08-01  Sofiane Naci  <sofiane.naci@arm.com>
 
 	* config.gcc (aarch64*-*-*): Add aarch-common.o to extra_objs.  Add
Index: profile.c
===================================================================
--- profile.c	(revision 201367)
+++ profile.c	(working copy)
@@ -891,7 +891,7 @@  compute_value_histograms (histogram_valu
       gimple_add_histogram_value (cfun, stmt, hist);
       hist->hvalue.counters =  XNEWVEC (gcov_type, hist->n_counters);
       for (j = 0; j < hist->n_counters; j++)
-        if (aact_count[t])
+        if (aact_count)
 	  hist->hvalue.counters[j] = aact_count[j];
 	else
 	  hist->hvalue.counters[j] = 0;