Fix libgcov-driver-system bootstrap failure (PR bootstrap/86057).
commit5b24ad4b34e8ce2a1be6a7452077ae9941a46f62
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Jun 2018 04:21:35 +0000 (7 04:21 +0000)
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Jun 2018 04:21:35 +0000 (7 04:21 +0000)
treebf1b9fcbe6c7ae18bf10e75a89c7d5437a865a21
parent535bd6e6fa05a97884955d7eef62893d0edbef68
Fix libgcov-driver-system bootstrap failure (PR bootstrap/86057).

2018-06-07  Martin Liska  <mliska@suse.cz>

        PR bootstrap/86057
* libgcov-driver-system.c (replace_filename_variables): Use
        memcpy instead of mempcpy.
(allocate_filename_struct): Do not allocate filename, allocate
        prefix and set it.
(gcov_exit_open_gcda_file): Allocate memory for gf->filename
        here and properly copy content into it.
* libgcov-driver.c (struct gcov_filename): Remove max_length
        field, change prefix from size_t into char *.
(compute_summary): Do not calculate longest filename.
(gcov_do_dump): Release memory of gf.filename after each file.
* libgcov-util.c (compute_summary): Use new signature of
        compute_summary.
(calculate_overlap): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261260 138bc75d-0d04-0410-961f-82ee72b054a4
libgcc/ChangeLog
libgcc/libgcov-driver-system.c
libgcc/libgcov-driver.c
libgcc/libgcov-util.c