public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/20565] New: gcov default behaviour changed
@ 2005-03-20 13:01 chris at bubblescope dot net
  2005-03-20 13:03 ` [Bug other/20565] " chris at bubblescope dot net
  0 siblings, 1 reply; 2+ messages in thread
From: chris at bubblescope dot net @ 2005-03-20 13:01 UTC (permalink / raw)
  To: gcc-bugs

In gcov/g++ 3.3, if I compile with "g++ test.cc -ftest-coverage -fprofile-arcs",
and then run "gcov test.cc", "test.cc.gcov" contains 2 lines of preamble, and
then 1 line for each line of test.cc

in gcov/g++ 4.1, Extra lines are added. I can't seem to disable these, and I'm
not positive why they are there. In particular they confuse programs which use
the output of "gcov"..

Specific example:
Given temp.cc:
template <typename T>
int
foo(T t)
{
  if(t==1)
    return 1;
  else
    return 0;
}


int main(void)
{ foo(1); }

Then "g++-3.3 temp.cc -ftest-coverage -fprofile-arcs; ./a.out ; gcov-3.3
temp.cc" gives

        -:    0:Source:temp.cc
        -:    0:Object:temp.bb
        -:    1:template <typename T>
        -:    2:int
        -:    3:foo(T t)
        -:    4:{
        1:    5:  if(t==1)
        1:    6:    return 1;
        -:    7:  else
    #####:    8:    return 0;
        -:    9:}
        -:   10:
        -:   11:
        -:   12:int main(void)
        2:   13:{ foo(1); }


Whereas "g++-cvs temp.cc -ftest-coverage -fprofile-arcs ; ./a.out ; gcov-cvs
temp.cc" gives

        -:    0:Source:temp.cc
        -:    0:Graph:temp.gcno
        -:    0:Data:temp.gcda
        -:    0:Runs:1
        -:    0:Programs:1
        -:    1:template <typename T>
        -:    2:int
function _Z3fooIiEiT_ called 1 returned 100% blocks executed 75%
        1:    3:foo(T t)
        -:    4:{
        1:    5:  if(t==1)
        1:    6:    return 1;
        -:    7:  else
    #####:    8:    return 0;
        -:    9:}
        -:   10:
        -:   11:
function main called 1 returned 100% blocks executed 100%
        1:   12:int main(void)
        1:   13:{ foo(1); }


Is it possible to turn this off? Is it a regression?

-- 
           Summary: gcov default behaviour changed
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: chris at bubblescope dot net
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug other/20565] gcov default behaviour changed
  2005-03-20 13:01 [Bug other/20565] New: gcov default behaviour changed chris at bubblescope dot net
@ 2005-03-20 13:03 ` chris at bubblescope dot net
  0 siblings, 0 replies; 2+ messages in thread
From: chris at bubblescope dot net @ 2005-03-20 13:03 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 478 bytes --]


------- Additional Comments From chris at bubblescope dot net  2005-03-20 13:02 -------
Stupid webbrowser ¬_¬

*** This bug has been marked as a duplicate of 20564 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2005-03-20 13:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-20 13:01 [Bug other/20565] New: gcov default behaviour changed chris at bubblescope dot net
2005-03-20 13:03 ` [Bug other/20565] " chris at bubblescope dot net

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