From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36626 invoked by alias); 21 Feb 2018 13:33:20 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 36588 invoked by uid 89); 21 Feb 2018 13:33:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=BAYES_20,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*RU:sk:mail.lo, Hx-spam-relays-external:sk:mail.lo, H*c:alternative, HX-Priority:Normal X-HELO: isc-mx.mymailwall.com Received: from isc-mx.mymailwall.com (HELO isc-mx.mymailwall.com) (91.212.136.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 21 Feb 2018 13:33:15 +0000 X-MyMailWallStatus: Email scanned(1114186729) Received: from mail.logicals.com (EHLO mail.logicals.com) [195.202.147.34] by mx.mymailwall.com with ESMTP TLS id 19561; Wed, 21 Feb 2018 14:33:12 +0100 Received: from v-srvkopano.ow.ks (localhost [127.0.0.1]) by v-srvkopano.ow.ks (Postfix) with ESMTP id 7E6BF37DE26 for ; Wed, 21 Feb 2018 14:33:12 +0100 (CET) Received: by v-srvkopano (kopano-spooler) with MAPI; Wed, 21 Feb 2018 14:33:12 +0100 Subject: Problem using gcov From: =?windows-1252?Q?Alexander_Fichtinger?= To: =?windows-1252?Q?gcc=40gcc=2Egnu=2Eorg?= Date: Wed, 21 Feb 2018 13:33:00 -0000 Mime-Version: 1.0 Message-Id: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg00159.txt.bz2 Hi guys, =A0 we have faced an error while using the gcov tool. We have the following C-code: =A0=A0=A0 LC_TD_DINT caseSelector; =A0=A0=A0 caseSelector =3D LC_this->LC_VD_X; =A0=A0=A0 if ((caseSelector=3D=3D(LC_TD_DINT)1L)||(caseSelector=3D=3D(LC_TD= _DINT)2L)||((caseSelector>=3D(LC_TD_DINT)33L) && (caseSelector<=3D(LC_TD_DI= NT)44L))) =A0=A0=A0 { =A0=A0=A0=A0=A0 LC_this->LC_VD_X =3D (LC_TD_INT)3; =A0=A0=A0=A0=A0 if ((LC_TD_BOOL)(LC_this->LC_VD_INPUT_VAR =3D=3D (LC_TD_INT= )2)) =A0=A0=A0=A0=A0 { =A0=A0=A0=A0=A0=A0=A0 LC_this->LC_VD_Y =3D (LC_TD_INT)666; =A0=A0=A0=A0=A0 } =A0=A0=A0 } =A0=A0=A0 else =A0=A0=A0 { =A0=A0=A0=A0=A0 LC_this->LC_VD_X =3D (LC_TD_INT)4; =A0=A0=A0 } =A0 =A0 =A0 =A0 =A0 When we use gcov (with options =96bcfu) we got the following result (in the= c.gcov file): =A0 =A0 -:=A0=A0 19:=A0=A0=A0 LC_TD_DINT caseSelector; =A0=A0=A0=A0=A0=A0=A0 1:=A0=A0 20:=A0=A0=A0 caseSelector =3D LC_this->LC_VD= _X; =A0=A0=A0=A0=A0=A0=A0 1:=A0=A0 21:=A0=A0=A0 if ((caseSelector=3D=3D(LC_TD_D= INT)1L)||(caseSelector=3D=3D(LC_TD_DINT)2L)||((caseSelector>=3D(LC_TD_DINT)= 33L) && (caseSelector<=3D(LC_TD_DINT)44L))) branch=A0 0 taken 1 (fallthrough) branch=A0 1 taken 0 branch=A0 2 taken 0 (fallthrough) branch=A0 3 taken 1 branch=A0 4 never executed branch=A0 5 never executed branch=A0 6 never executed branch=A0 7 never executed =A0=A0=A0=A0=A0=A0=A0 -:=A0=A0 22:=A0=A0=A0 { =A0=A0=A0=A0=A0=A0=A0 1:=A0=A0 23:=A0=A0=A0=A0=A0 LC_this->LC_VD_X =3D (LC_= TD_INT)3; =A0=A0=A0=A0=A0=A0=A0 2:=A0=A0 24:=A0=A0=A0=A0=A0 if ((LC_TD_BOOL)(LC_this-= >LC_VD_INPUT_VAR =3D=3D (LC_TD_INT)2)) branch=A0 0 taken 1 (fallthrough) branch=A0 1 taken 0 unconditional=A0 2 taken 1 =A0=A0=A0=A0=A0=A0=A0 -:=A0=A0 25:=A0=A0=A0=A0=A0 { =A0=A0=A0=A0=A0=A0=A0 1:=A0=A0 26:=A0=A0=A0 =A0=A0=A0=A0LC_this->LC_VD_Y = =3D (LC_TD_INT)666; unconditional=A0 0 taken 1 =A0=A0=A0=A0=A0=A0=A0 -:=A0=A0 27:=A0=A0=A0=A0=A0 } =A0=A0=A0=A0=A0=A0=A0 -:=A0=A0 28:=A0=A0=A0 } =A0=A0=A0=A0=A0=A0=A0 -:=A0=A0 29:=A0=A0=A0 else =A0=A0=A0=A0=A0=A0=A0 -:=A0=A0 30:=A0=A0=A0 { =A0=A0=A0 #####:=A0=A0 31:=A0=A0=A0=A0=A0 LC_this->LC_VD_X =3D (LC_TD_INT)4; unconditional=A0 0 never executed =A0=A0=A0=A0=A0=A0=A0 -:=A0 =A032:=A0=A0=A0 } =A0 =A0 =A0 =A0 =A0 When you look at line 23 it is called 1 time. Line 24 is called 2 times (th= e bold one). We already looked in the disassembly but did not see a reason why the line = should be executed 2 times. Can anyone help here, please? Kind regards, Alex =A0