https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80911
--- Comment #11 from Martin Liška <marxin at gcc dot gnu.org> --- Ok, I'm probably starting to know what's wrong. Can you please following patch and provide me output: diff --git a/gcc/gcov.c b/gcc/gcov.c index a5aa4aadcac..b0417165642 100644 --- a/gcc/gcov.c +++ b/gcc/gcov.c @@ -1382,12 +1382,15 @@ read_graph_file (void) else if (fn && tag == GCOV_TAG_ARCS) { unsigned src = gcov_read_unsigned (); + fprintf (stderr, "arc: %d\n", src); fn->blocks[src].id = src; unsigned num_dests = GCOV_TAG_ARCS_NUM (length); block_t *src_blk = &fn->blocks[src]; unsigned mark_catches = 0; struct arc_info *arc; + fprintf (stderr, "fn->blocks.size(): %d, succ: %p\n", + fn->blocks.size (), fn->blocks[src].succ); if (src >= fn->blocks.size () || fn->blocks[src].succ) goto corrupt; @@ -1395,6 +1398,8 @@ read_graph_file (void) { unsigned dest = gcov_read_unsigned (); unsigned flags = gcov_read_unsigned (); + fprintf (stderr, "dest: %d\n", dest); + fprintf (stderr, "flags: %d\n", flags); if (dest >= fn->blocks.size ()) goto corrupt; As block_t does not have a default ctor, blocks.resize() adds new elements that are not cleared. I'm going to prepare a patch.