On 05/29/2018 06:08 AM, Martin Liška wrote:
libgcc/ChangeLog:

2018-05-18  Martin Liska  <mli...@suse.cz>

        * libgcov-driver.c (gcov_compute_histogram): Remove usage
        of gcov_ctr_summary.
        (compute_summary): Do it just for a single summary.
        (merge_one_data): Likewise.
        (merge_summary): Simplify as we read just single summary.
        (dump_one_gcov): Pass proper argument.
        * libgcov-util.c (compute_one_gcov): Simplify as we have just
        single summary.
        (gcov_info_count_all_cold): Likewise.
        (calculate_overlap): Likewise.

This patch breaks embedded target builds. Specifically, targets that don't define TARGET_POSIX_IO, which causes GCOV_LOCKED to be defined to 0.

In merge_summary, in libgcov-driver.c, there are a number of obvious errors in the !GCOV_LOCKED code. There is a variable cs_all declared but not used. There is a variable all used by not defined (maybe the same var). There is a variable t_ix used but not defined. There is a reference to a ctrs field in a struct that has no such field. Looks like this section of code was missed when the rest of the stuff was rewritten.

Jim

Reply via email to