From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id 7EF123948828; Tue, 10 May 2022 08:55:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7EF123948828 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/marxin/heads/PR105535-gcov_info-n_functions)] libgcov: use proper type for n_functions X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/users/marxin/heads/PR105535-gcov_info-n_functions X-Git-Oldrev: 60ab3d0f2d9f95045543fea361e976351e76b5a1 X-Git-Newrev: 469308d2ce8555417776191c1a8a7ddd6c147392 Message-Id: <20220510085508.7EF123948828@sourceware.org> Date: Tue, 10 May 2022 08:55:08 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 May 2022 08:55:08 -0000 https://gcc.gnu.org/g:469308d2ce8555417776191c1a8a7ddd6c147392 commit 469308d2ce8555417776191c1a8a7ddd6c147392 Author: Martin Liska Date: Tue May 10 10:52:19 2022 +0200 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 unsined type. That brings troubled on 16-bit targerts. PR gcov-profile/105535 libgcc/ChangeLog: * libgcov.h (struct gcov_info): Use gcov_unsigned_t for n_functions. Co-Authored-By: Hans-Peter Helfert Diff: --- libgcc/libgcov.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgcc/libgcov.h b/libgcc/libgcov.h index 487bd1464cd..c7545cc746e 100644 --- a/libgcc/libgcov.h +++ b/libgcc/libgcov.h @@ -235,7 +235,7 @@ struct gcov_info gcov_merge_fn merge[GCOV_COUNTERS]; /* merge functions (null for unused) */ - unsigned n_functions; /* number of functions */ + gcov_unsigned_t n_functions; /* number of functions */ #ifndef IN_GCOV_TOOL const struct gcov_fn_info *const *functions; /* pointer to pointers