: Fix -fbranch-probabilities

Message ID 4E4531A4.8000402@st.com
State New
Headers show

Commit Message

Christian Bruel Aug. 12, 2011, 1:59 p.m.

-fbranch-probabilities fails to find the gcda information, because they 
are initialized only if flag_profile_use.

The problem is easily observable by recompiling with 
-fbranch-probabilities instead of -fprofile-use (after profile 
information generation)
This fails with "xxx.gcda not found, execution counts estimated".

This trivial patch fixes it. testsuite ok.

OK ?



2011-08-12  Christian Bruel  <christian.bruel@st.com>

	* coverage.c (coverage_init): Check flag_branch_probabilities instead of
Index: gcc/coverage.c
--- gcc/coverage.c	(revision 177690)
+++ gcc/coverage.c	(working copy)
@@ -1056,7 +1056,7 @@ 
   strcpy (bbg_file_name, filename);
   strcat (bbg_file_name, GCOV_NOTE_SUFFIX);
-  if (flag_profile_use)
+  if (flag_branch_probabilities)
     read_counts_file ();