gcov: annotate uncovered branches [PR107537]
authorSpacetown <michael.foerderer@gmx.de>
Sun, 4 Dec 2022 20:03:34 +0000 (21:03 +0100)
committerMartin Liska <mliska@suse.cz>
Thu, 15 Dec 2022 10:58:29 +0000 (11:58 +0100)
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>
gcc/gcov.cc

index 9cf1071166f16c7c4cc1669099fd7905fc82f535..fa1ef7613ad8c90a097f0a9413c7f3088a48b05f 100644 (file)
@@ -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);