public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-258] libgcov: use proper type for n_functions
Date: Tue, 10 May 2022 10:47:37 +0000 (GMT)	[thread overview]
Message-ID: <20220510104737.8F9893856DD3@sourceware.org> (raw)

https://gcc.gnu.org/g:1bac97ad0436afcbce24c82e6d57f11471cd8f10

commit r13-258-g1bac97ad0436afcbce24c82e6d57f11471cd8f10
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>

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


                 reply	other threads:[~2022-05-10 10:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220510104737.8F9893856DD3@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).