public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/53414] New: gcov does not generate 'Lines' record for final block of functions
@ 2012-05-18 22:04 myron.walker at gmail dot com
  2012-05-22  7:19 ` [Bug gcov-profile/53414] " pinskia at gcc dot gnu.org
  2013-07-05 10:10 ` siddharoodh.d at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: myron.walker at gmail dot com @ 2012-05-18 22:04 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53414

             Bug #: 53414
           Summary: gcov does not generate 'Lines' record for final block
                    of functions
    Classification: Unclassified
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: gcov-profile
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: myron.walker@gmail.com


GCC does not add a Lines record for the final line of code in functions with a
return with if statements having multiple branches.  Examples

This code has a lines marking the end of the function:

01: int global_value = 0;
02:
03: void graph_simplebranch(int taken)
04: {
05:     if(taken > 0)
06:     {
07:         global_value = global_value + 1;
08:     }
09: }

This code does not get a lines record generated for the block that is the end
of the function.

01: int global_value = 0;
02: 
03: void graph_multiplebranches(int pathSelect)
04: {
05:     if(pathSelect == 0)
06:     {
07:         global_value = global_value + 1;
08:     }
09:     else if(pathSelect == 1)
10:     {
11:         global_value = global_value + 2;
12:     }
13:     else
14:     {
15:         global_value = global_value + 3;
16:     }
17: 
18:     return;
19: }


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug gcov-profile/53414] gcov does not generate 'Lines' record for final block of functions
  2012-05-18 22:04 [Bug gcov-profile/53414] New: gcov does not generate 'Lines' record for final block of functions myron.walker at gmail dot com
@ 2012-05-22  7:19 ` pinskia at gcc dot gnu.org
  2013-07-05 10:10 ` siddharoodh.d at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-05-22  7:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53414

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2012-05-22
     Ever Confirmed|0                           |1
           Severity|major                       |normal

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-05-22 05:59:35 UTC ---
Can you provide a full testcase that is runnable?

Also does this happen with newer versions of GCC?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug gcov-profile/53414] gcov does not generate 'Lines' record for final block of functions
  2012-05-18 22:04 [Bug gcov-profile/53414] New: gcov does not generate 'Lines' record for final block of functions myron.walker at gmail dot com
  2012-05-22  7:19 ` [Bug gcov-profile/53414] " pinskia at gcc dot gnu.org
@ 2013-07-05 10:10 ` siddharoodh.d at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: siddharoodh.d at gmail dot com @ 2013-07-05 10:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53414

roodh <siddharoodh.d at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |siddharoodh.d at gmail dot com

--- Comment #2 from roodh <siddharoodh.d at gmail dot com> ---
Are you checking in *.c.cov file ?.
Or using lcov tool to check this descripencies  ?

Mostly u face these issue when u running test with GCC optimization option.

Try running test with no-optimiation and lcov generate correct results.


Thanks
roodh


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-05 10:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-18 22:04 [Bug gcov-profile/53414] New: gcov does not generate 'Lines' record for final block of functions myron.walker at gmail dot com
2012-05-22  7:19 ` [Bug gcov-profile/53414] " pinskia at gcc dot gnu.org
2013-07-05 10:10 ` siddharoodh.d at gmail dot com

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