This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
output_func_start_profiler vs __bb_init_func
- From: DJ Delorie <dj at redhat dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 31 May 2002 19:07:24 -0400
- Subject: output_func_start_profiler vs __bb_init_func
It looks like there is an inconsistency in how the call to
__bb_init_func is created in profile.c. Note the return mode as if
the function returned a GCOV_TYPE_SIZE int:
output_func_start_profiler ()
{
enum machine_mode mode = mode_for_size (GCOV_TYPE_SIZE, MODE_INT, 0);
...
emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__bb_init_func"), LCT_NORMAL,
mode, 1, table_address, Pmode);
}
But in libgcc2.c:
void
__bb_init_func (struct bb *blocks)
On targets where 64-bit ints are returned by reference (like big
structs), the call to __bb_init_func will be corrupted by the
unexpected extra (zeroth) parameter.
A simple replacement of mode -> VOIDmode seems to work. Does this
sound right?