Make gcno more precise about BBs really belonging to a line (PR gcov-profile/79891).
authorMartin Liska <mliska@suse.cz>
Fri, 28 Apr 2017 12:51:05 +0000 (14:51 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Fri, 28 Apr 2017 12:51:05 +0000 (12:51 +0000)
commit6e49961ce47b8c554ff6081ef95a68a0616f0a93
tree581504fe21555bdbe3723111eb739d6cdc3e53ce
parent9b9d6370d48146a0dd8ed327ecdbfc9273abf91a
Make gcno more precise about BBs really belonging to a line (PR gcov-profile/79891).

2017-04-28  Martin Liska  <mliska@suse.cz>

PR gcov-profile/79891
* gcov.c (add_line_counts): Assign BBs to lines just if the BB
is marked by compiler as living on a line.
(get_cycles_count): Remove usage of the union.
(output_intermediate_file): Likewise.
(find_source): Fix GNU coding style.
(accumulate_line_counts): Remove old non-all block mode.
(output_lines): Remove usage of the union.
* profile.c (output_location): Include all BBs, even if
belonging to a same line (and file) as a previous BB.
2017-04-28  Martin Liska  <mliska@suse.cz>

PR gcov-profile/79891
* gcc.misc-tests/gcov-17.c: New test.
* gcc.misc-tests/gcov-18.c: New test.

From-SVN: r247374
gcc/ChangeLog
gcc/gcov.c
gcc/profile.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.misc-tests/gcov-17.c [new file with mode: 0644]
gcc/testsuite/gcc.misc-tests/gcov-18.c [new file with mode: 0644]