public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-8374] libgcov: use proper type for n_functions
@ 2022-05-13 12:04 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2022-05-13 12:04 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:5176d2755c6f4e348d1da00abfa4ab9f06a35ddd

commit r12-8374-g5176d2755c6f4e348d1da00abfa4ab9f06a35ddd
Author: Martin Liska <mliska@suse.cz>
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
    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)

Diff:
---
 libgcc/libgcov.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libgcc/libgcov.h b/libgcc/libgcov.h
index 40e845ce3ea..c77a74a3e53 100644
--- a/libgcc/libgcov.h
+++ b/libgcc/libgcov.h
@@ -236,7 +236,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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-13 12:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-13 12:04 [gcc r12-8374] libgcov: use proper type for n_functions Martin Liska

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).