https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119365
Bug ID: 119365 Summary: -fprofile-correction not covered by test suite Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: gcov-profile Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- According to https://gcc.opensuse.org/gcc-lcov/gcc/mcf.cc.gcov.html mcf.cc is not executed at all in standard test suite runs. This is called through -fprofile-correction but only if the input profile is inconsistent: /* Check for inconsistent basic block counts */ inconsistent = is_inconsistent (); if (inconsistent) { if (flag_profile_correction) { /* Inconsistency detected. Make it flow-consistent. */ static int informed = 0; if (dump_enabled_p () && informed == 0) { informed = 1; dump_printf_loc (MSG_NOTE, dump_user_location_t::from_location_t (input_location), "correcting inconsistent profile data\n"); } correct_negative_edge_counts (); /* Set bb counts to the sum of the outgoing edge counts */ set_bb_counts (); if (dump_file) fprintf (dump_file, "\nCalling mcf_smooth_cfg\n"); mcf_smooth_cfg (); } Even though there are two test cases that use -fprofile-correction: testsuite/gcc.dg/tree-prof/indir-call-prof-malloc.c testsuite/gcc.dg/tree-prof/pr97461.c they don't actually seem to have inconsistent profile input, so mcf.cc is never executed