[Bug gcov-profile/115047] Inconsistent MC/DC reported by GCC and LLVM
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115047 --- Comment #4 from Jørgen Kvalsvik --- > 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. There is room for both, e.g. -fcondition-coverage={masking,unique} or similar. I don't think supporting unique cause MC/DC would be too hard in GCC either, using a method similar to GCC's upcoming path coverage and LLVM's MC/DC, if it is desirable.
[Bug gcov-profile/115047] Inconsistent MC/DC reported by GCC and LLVM
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115047 --- Comment #2 from Jørgen Kvalsvik --- > f(1, 0, 0) = false, while f(1, 0, 1) = true Sorry, I meant: f(0, 0, 1) = true f(0, 0, 0) = false and f(1, 0, 1) = true f(1, 0, 0) = false It does not take away from the conclusion when doing masking MC/DC.
[Bug gcov-profile/115047] Inconsistent MC/DC reported by GCC and LLVM
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115047 --- Comment #1 from Jørgen Kvalsvik --- gcc is not wrong here - f(1, 0, 0) = false, while f(1, 0, 1) = true so clearly c has an independent effect on the outcome here, and both its values has been 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 right now, does f(0, 0, 1); f(0, 0, 0); cover c? [1] https://clang.llvm.org/docs/SourceBasedCodeCoverage.html#mc-dc-instrumentation