aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSpacetown <michael.foerderer@gmx.de>2022-12-04 21:03:34 +0100
committerMartin Liska <mliska@suse.cz>2022-12-15 11:58:29 +0100
commitc263c3eba8953c341cd8ac2d0a5f2b8f38623016 (patch)
treebaf412aaf2282216fec6514d9481a53ceab8deb0 /gcc
parent930b3d6948f2cddc6a7fc4b35bafda1deabcd0c9 (diff)
downloadgcc-c263c3eba8953c341cd8ac2d0a5f2b8f38623016.zip
gcc-c263c3eba8953c341cd8ac2d0a5f2b8f38623016.tar.gz
gcc-c263c3eba8953c341cd8ac2d0a5f2b8f38623016.tar.bz2
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 <michael.foerderer@gmx.de>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/gcov.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/gcov.cc b/gcc/gcov.cc
index 9cf1071..fa1ef76 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);