public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* qcov questions
@ 2018-08-08 13:09 daro_ox
  0 siblings, 0 replies; only message in thread
From: daro_ox @ 2018-08-08 13:09 UTC (permalink / raw)
  To: gcc-help

Hello,   I wanted to ask what model for branch coverage does gcov use? Would it be branch, decision, condition coverage or some modification like branch condition, branch condition combination or modified condition decision coverage (MCDC)?   Also for a simple example as below:   uint8 Func(uint8 a, uint8 b, uint8 c)  {      return ((a > 5u) && (b < 15u) && (c == 0u));  }   I get 6 branches. The total number of possibilities is 8:   F F F  T F F  F T F  F F T  T T F  F T T  T F T  T T T   where T is true and F is false. Which branches are taken into account? Why does executing function with parameters Func(6u, 14u, 0u) results in 3 branches out of 6 being covered? I could understand that due to short-circuit evaluation more branches could be covered when some condition is false but not when all of them are true. What combination of conditions is needed for full coverage in this case?   Thank you for your help.  Best regards  Darius

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-08-08 13:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08 13:09 qcov questions daro_ox

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).