This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix bootstrap with gcc 4.3
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 19 Jul 2014 18:27:13 +0100 (BST)
- Subject: Re: [PATCH] Fix bootstrap with gcc 4.3
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1407141518120 dot 19154 at zhemvz dot fhfr dot qr>
On Mon, 14 Jul 2014, Richard Biener wrote:
> 2014-07-14 Richard Biener <rguenther@suse.de>
>
> * libgcov.h (struct gcov_fn_info): Make ctrs size 1.
I actually had the same patch ready and tested already, but realized
this would increase memory consumption (though just a bit) and over-
allocate gcov_fn_info dynamically:
> Index: libgcc/libgcov.h
This now defines struct gcov_fn_info as
{
const struct gcov_info *key; /* comdat key */
gcov_unsigned_t ident; /* unique ident of function */
gcov_unsigned_t lineno_checksum; /* function lineo_checksum */
gcov_unsigned_t cfg_checksum; /* function cfg checksum */
struct gcov_ctr_info ctrs[1]; /* instrumented counters */
};
whereas libgcov-util.c has
curr_fn_info = (struct gcov_fn_info *) xcalloc (sizeof (struct gcov_fn_info)
+ GCOV_COUNTERS * sizeof (struct gcov_ctr_info), 1);
Gerald