]> git.ipfire.org Git - thirdparty/gcc.git/commit
libgcov: fix TOPN type casting
authorMartin Liska <mliska@suse.cz>
Mon, 8 Jun 2020 18:07:08 +0000 (20:07 +0200)
committerMartin Liska <mliska@suse.cz>
Tue, 9 Jun 2020 11:07:41 +0000 (13:07 +0200)
commit862b9b225fba6cf3c63234206f2dbc47f1ab5350
tree132a4505a1eab6d808754c7156b80ffdd4ee10d2
parent009668e31f4ee910eae874b24afb8eb6adf65fae
libgcov: fix TOPN type casting

The patch fixes tree-prof.exp tests on solaris11 and i686-linux-gnu,
problem was that sizeof of a pointer is different from sizeof gcov_type.

I'm going to install it if there are no objections.
Thanks,
Martin

libgcc/ChangeLog:

PR gcov-profile/95494
* libgcov-driver.c (write_top_counters): Cast first to
intptr_t as sizeof(*) != sizeof(gcov_type).
* libgcov.h (gcov_counter_set_if_null): Remove.
(gcov_topn_add_value): Cast first to intptr_t and update
linked list directly.
libgcc/libgcov-driver.c
libgcc/libgcov.h