From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id 084E1384E7BC; Thu, 15 Dec 2022 10:59:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 084E1384E7BC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671101965; bh=abiFnidQb5mGjPFe8lkxKnjjCcQd6PpvvhjLRJ0XTrs=; h=From:To:Subject:Date:From; b=qxsuCTSBqyQRl9ofH6BYWzeFEMTnRtr5A1pgfWRD8bGA3ApUkbr92yw5a2qCnBACU wbZ1w76eJXNLUDxbMWxSaP1HiZL7IGFBSFI3+wRetiiqyY12GGSj8YtHxDSTSP4ICX dNNjwuRwrqEwfoNXa/AfaxrcrmT2ZcB9vOwNyANs= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-4715] gcov: annotate uncovered branches [PR107537] X-Act-Checkin: gcc X-Git-Author: Spacetown X-Git-Refname: refs/heads/master X-Git-Oldrev: 930b3d6948f2cddc6a7fc4b35bafda1deabcd0c9 X-Git-Newrev: c263c3eba8953c341cd8ac2d0a5f2b8f38623016 Message-Id: <20221215105925.084E1384E7BC@sourceware.org> Date: Thu, 15 Dec 2022 10:59:24 +0000 (GMT) List-Id: https://gcc.gnu.org/g:c263c3eba8953c341cd8ac2d0a5f2b8f38623016 commit r13-4715-gc263c3eba8953c341cd8ac2d0a5f2b8f38623016 Author: Spacetown Date: Sun Dec 4 21:03:34 2022 +0100 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: --- gcc/gcov.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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);