On 14.09.2014 14:27, Christophe Taillan wrote: > I am currently using gcov/lcov to study coverage of a large Fortran 90 > code. The goal is to find and erase unused code. > Due to the size of the program, I'm looking for a way to automatize the > process. > > But I've got some trouble : > - with nested "if": if the main condition is not validated, all the > code in the "if" block should be tagged as "####", in fact, it seems > that other "if" lines are not... > - lines read once seems not to be tagged as "1", > - lines like "use some_module" are not tagged either. > > So my question is, is there any existing tools to manage with these > problems or did I miss any option in gcov?
gcov can only report coverage data for lines for which GCC generated actual code. While I don't have any experience with Fortran 90, my guess would be that "use some_module" does not actually generate code. Also turning off all optimization options when compiling the code in question can help improve the accuracy of gcov/lcov. See also: https://gcc.gnu.org/onlinedocs/gcc/Gcov-Intro.html Regards, Peter Oberparleiter -- Peter Oberparleiter Linux on System z Development - IBM Germany ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce. Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list