while studying the results of code coverage reports of some of our software, I came across code fragments like this:
88) summation = 0.0d0; 89) do i = 1, 10 90) summation = summation + __s(i) ** 2 / i 91) end do__
where the __ means the beginning/end of a light yellow background. I am wondering what is meant by this markup. Is it some implicit branch? I can imagine that with a plain allocate(..) statement, but is this meant to warn about the possibility of a division by zero?
The colors are discussed in the documentation, though, unhelpfully, they are given using hex constants.#FFFF99 is a pale yellow and this "Indicates the basic blocks that were not exercised by any of the tests. However, these blocks were within functions that were executed during the tests."
The code coverage tool doesn't warn you about possibilities - it just tells you which code was executed and which wasn't.
FWIW, I provide the -bcolor red option to the codecov tool when creating the html, because those are the blocks of code that I very much want to stand out when scanning the results, and pale yellow doesn't really do that for me.
The syntax highlighting ate your initial __, but it looks like it may have been before the second term of the summation. I wonder if code has been generated to short circuit that loop in some circumstances.
I should have pressed the small "?" icon - it clearly explains the meaning of the colours: this light-yellow colour is for partially covered code - "More than one basic block was generated for the code at this position. Some of the blocks were covered while some were not." So it is a warning of sorts ;).
The (test) program that led me to this question uses a library of general interest to us and I did not see - I realised - the coverage for the relevant source files, only for the files making up the test program itself. But I solved that riddle: you can specify the "pgopti.spi" file for the library instead of the default file (in my case for the test program). I am just learning to use this tool.