From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 005D938708EF; Mon, 13 May 2024 18:51:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 005D938708EF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1715626273; bh=npgmVNR9sTuKoQZnVIlbxzbhqrXgwhcrq8tN1OCjKho=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Ih+Uj910E0j5n06IIE67/sCygTnyAYDhAOx6JOpx1aDkYT0LdZq0kOar2+XbYB5x7 rwlSaxuHec9V27K8ghR2UWS0GPi+8fsGXYpwdDEzowIBzcqfNnTvh0A6jvssrTJuHi RdJOr35yATen7UhbAG/06Kgwp8caQoPO1zSJ5qeY= From: "j at lambda dot is" To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/115047] Inconsistent MC/DC reported by GCC and LLVM Date: Mon, 13 May 2024 18:51:12 +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: j at lambda dot is X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: 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 --- Comment #1 from J=C3=B8rgen Kvalsvik --- gcc is not wrong here - f(1, 0, 0) =3D false, while f(1, 0, 1) =3D true so = clearly c has an independent effect on the outcome here, and both its values has be= en observed. I think clang measures unique-cause and not masking MC/DC which probably explains the difference (at least clang's documentation [1] does not specify which form it measures. Since more than one variable change between the two test vectors I assume that would be it. I don't have clang 19 available rig= ht now, does f(0, 0, 1); f(0, 0, 0); cover c? [1] https://clang.llvm.org/docs/SourceBasedCodeCoverage.html#mc-dc-instrumentat= ion=