public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "wentaoz5 at illinois dot edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug gcov-profile/115047] Inconsistent MC/DC reported by GCC and LLVM
Date: Wed, 05 Jun 2024 05:29:36 +0000 [thread overview]
Message-ID: <bug-115047-4-yJHTxpvTj9@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-115047-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115047
Wentao Zhang <wentaoz5 at illinois dot edu> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|UNCONFIRMED |RESOLVED
--- Comment #3 from Wentao Zhang <wentaoz5 at illinois dot edu> ---
Jørgen, thank you for the info! I just realized this had been somewhat
discussed
between you and Alan on LLVM discourse [2]. From Alan's description I think
LLVM
is adopting unique-cause MC/DC. I might explicitly ask them for confirmation.
> does f(0, 0, 1); f(0, 0, 0); cover c?
Yes
1| 2|void f(int a, int b, int c) { a && b || c; }
------------------
|---> MC/DC Decision Region (1:31) to (1:42)
|
| Number of Conditions: 3
| Condition C1 --> (1:31)
| Condition C2 --> (1:36)
| Condition C3 --> (1:41)
|
| Executed MC/DC Test Vectors:
|
| C1, C2, C3 Result
| 1 { F, -, F = F }
| 2 { F, -, T = T }
|
| C1-Pair: not covered
| C2-Pair: not covered
| C3-Pair: covered: (1,2)
| MC/DC Coverage for Decision: 33.33%
|
------------------
2| 1|int main(void) {
3| 1| f(0,0,1);
4| 1| f(0,0,0);
5| 1| return 0;
6| 1|}
7| |
I guess it would be desirable to (1) let LLVM support masking MC/DC and (2) let
gcov support unique-cause MC/DC. The first seems easier and I might try
implementing a prototype.
[2] https://discourse.llvm.org/t/rfc-source-based-mc-dc-code-coverage/59244/9
Thanks,
Wentao
prev parent reply other threads:[~2024-06-05 5:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-12 7:44 [Bug gcov-profile/115047] New: " wentaoz5 at illinois dot edu
2024-05-13 18:51 ` [Bug gcov-profile/115047] " j at lambda dot is
2024-05-13 19:10 ` j at lambda dot is
2024-06-05 5:29 ` wentaoz5 at illinois dot edu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-115047-4-yJHTxpvTj9@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).