Fix libgcov-driver-system bootstrap failure (PR bootstrap/86057).
authorMartin Liska <mliska@suse.cz>
Thu, 7 Jun 2018 04:21:35 +0000 (06:21 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Thu, 7 Jun 2018 04:21:35 +0000 (04:21 +0000)
commit6c086e8c75deaedb7db807d8008529747b275275
treebf1b9fcbe6c7ae18bf10e75a89c7d5437a865a21
parent37777cd0335f3220e4cbe263099af633f1e1c645
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.

From-SVN: r261260
libgcc/ChangeLog
libgcc/libgcov-driver-system.c
libgcc/libgcov-driver.c
libgcc/libgcov-util.c