From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2A6773816B1B; Wed, 5 Jun 2024 05:29:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A6773816B1B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1717565377; bh=u8pmsTwjaEJYlZI5HDxe2RtQibrEuxyuVtQGjyuI6+k=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CCsQyi7Dz1Cmc9EBcqsuAswowctxP2fWXx55nK9PGiDU2jai692jqLcLbOWsTncLU A70QrtjIkBE0zQQS00pXTJ/LkTMsgycu+K8Q51DbHzQwAHMF+bt5A6rXgzy0vVEwRB t9SltPOz0EsHlttq6j/dNsPBzHncbo91XHdwJ3po= From: "wentaoz5 at illinois dot edu" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: gcov-profile X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wentaoz5 at illinois dot edu X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D115047 Wentao Zhang changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #3 from Wentao Zhang --- J=C3=B8rgen, 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 confirmatio= n. > 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 =3D F } | 2 { F, -, T =3D 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=