From: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
To: Christophe Taillan <taillanchristophe@gmail.com>,
ltp-list@lists.sourceforge.net
Subject: Re: [LTP] Questions about gcov/lcov and Fortran 90
Date: Tue, 16 Sep 2014 16:35:58 +0200 [thread overview]
Message-ID: <54184ACE.3080200@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAOi2z=xF76SVQZ+-pGJevr8BiSXVh4O9jVYGnfJ2kOU-Gne6HA@mail.gmail.com>
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
prev parent reply other threads:[~2014-09-16 14:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAOi2z=w4wLnZ_8Uf9226G5n_nXwE4DQKgd=BKqn1PWSnWgdMOg@mail.gmail.com>
2014-09-14 12:27 ` [LTP] Questions about gcov/lcov and Fortran 90 Christophe Taillan
2014-09-16 14:35 ` Peter Oberparleiter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54184ACE.3080200@linux.vnet.ibm.com \
--to=oberpar@linux.vnet.ibm.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=taillanchristophe@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox