From: Spacetown Date: Sun, 4 Dec 2022 20:03:34 +0000 (+0100) Subject: gcov: annotate uncovered branches [PR107537] X-Git-Tag: upstream/13.1.0~2529 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c263c3eba8953c341cd8ac2d0a5f2b8f38623016;p=platform%2Fupstream%2Fgcc.git gcov: annotate uncovered branches [PR107537] PR gcov-profile/107537 gcc/ChangeLog: * gcov.cc (output_branch_count): Add annotation '(fallthrough)' or '(throw)' also to uncovered branches. Signed-off-by: Michael Förderer --- diff --git a/gcc/gcov.cc b/gcc/gcov.cc index 9cf1071166f..fa1ef7613ad 100644 --- a/gcc/gcov.cc +++ b/gcc/gcov.cc @@ -2893,7 +2893,9 @@ output_branch_count (FILE *gcov_file, int ix, const arc_info *arc) arc->fall_through ? " (fallthrough)" : arc->is_throw ? " (throw)" : ""); else - fnotice (gcov_file, "branch %2d never executed", ix); + fnotice (gcov_file, "branch %2d never executed%s", ix, + (arc->fall_through ? " (fallthrough)" + : arc->is_throw ? " (throw)" : "")); if (flag_verbose) fnotice (gcov_file, " (BB %d)", arc->dst->id);