libgcov: use proper type for n_functions
authorMartin Liska <mliska@suse.cz>
Tue, 10 May 2022 08:52:19 +0000 (10:52 +0200)
committerMartin Liska <mliska@suse.cz>
Fri, 13 May 2022 12:04:27 +0000 (14:04 +0200)
commit5176d2755c6f4e348d1da00abfa4ab9f06a35ddd
treedcf244b7879025727cc302514cf691e6b543b22c
parentf8598704c0bc75a98e0b4a66ebd36f72bfa75334
libgcov: use proper type for n_functions

gcov_info::n_functions type is initialized by generated
code in build_info_type:

/* n_functions */
field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE,
    get_gcov_unsigned_t ());

It uses gcov_unsigned_t, but the struct definition in libgcov.h uses
unsigned type. That brings troubled on 16-bit targets.

PR gcov-profile/105535

libgcc/ChangeLog:

* libgcov.h (struct gcov_info): Use gcov_unsigned_t for
n_functions.

Co-Authored-By: Hans-Peter Helfert <peter-helfert@t-online.de>
(cherry picked from commit eaf359ed04e7169f740dade548965c757f4c1e0a)
libgcc/libgcov.h