From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32533 invoked by alias); 29 Aug 2011 17:41:06 -0000 Received: (qmail 32524 invoked by uid 22791); 29 Aug 2011 17:41:05 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Aug 2011 17:40:52 +0000 From: "gcc.hall at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/50228] New: Incorrect line execution count. Date: Mon, 29 Aug 2011 18:05:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: gcov-profile X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gcc.hall at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-08/txt/msg02331.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50228 Bug #: 50228 Summary: Incorrect line execution count. Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: gcov-profile AssignedTo: unassigned@gcc.gnu.org ReportedBy: gcc.hall@gmail.com Source line 6625 is reported as having been executed more times than is possible. Secondly I saw that all the source lines in the function were executed at least once, but it says "blocks executed 92%" gcov 4.6.1, gcc 4.6.1 (-O0 -ggdb3 --coverage) function Evaluate called 29903918 returned 100% blocks executed 92% 29903918: 6610:Evaluate( TOKEN * const expr, const int result_type ) -: 6611:{ 29903918: 6612: parse( last_result, expr, END_EXP ); call 0 returned 29903918 -: 6613: 29903918: 6614: if( last_result->fp ) branch 0 taken 1799 (fallthrough) branch 1 taken 29902119 -: 6615: { 1799: 6616: if( result_type == INT ) branch 0 taken 1 (fallthrough) branch 1 taken 1798 -: 6617: { 1: 6618: last_result->opval.e = iconv( last_result->opval.r, expr->errp ); call 0 returned 1 1: 6619: last_result->fp = NO; -: 6620: } -: 6621: } -: 6622: else -: 6623: { 29902119: 6624: if( result_type == INT ) branch 0 taken 17342570 (fallthrough) branch 1 taken 12559549 34685140: 6625: last_result->opval.e = itrunc( last_result->opval.i, expr->errp ); 12559549: 6626: elif( result_type == REAL ) branch 0 taken 1 (fallthrough) branch 1 taken 12559548 -: 6627: { 1: 6628: last_result->opval.r = last_result->opval.i; 1: 6629: last_result->fp = YES; -: 6630: } -: 6631: } -: 6632: 29903918: 6633: return last_result; -: 6634:}