From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id 5EF423857836 for ; Fri, 8 Apr 2022 07:28:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5EF423857836 Received: by mail-pf1-x436.google.com with SMTP id p25so954608pfn.13 for ; Fri, 08 Apr 2022 00:28:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=EBlUW6RKwju/FUCJQiAvYvZ4gUukeTOTJJdqmK8KXiA=; b=tysKhK6Pr6YrvEXMZ7d4gv/WZdMnjhqqAerIJ4L7iA/IIvFVeSoabG1Hb6Fm0V1hrM dPEdT1BlAAEbKlAIL6eu2c9e+r8Mdv1NO6CW1BtdXuszLMNPk0ELNWjllbmNSPdBnszp 9sw8EVHUNKG5nLrgcg2t3elUTw2q8nx4x5df0PNt+nrTI+l0wem+5nKs8QX86IVIR2CL Ypbm8cenWmkuyi3R1JKxyDAVLyQX39GOEhKNFy5XHgV8bqyz9Uz0/S6W8jFquOhaeKHH Nt45utsnORtT7RZuDi0F6Fjk2WdqskVce9GLvSxkmAD23mcEbcXJpH02BhfAemyMjD26 MAxg== X-Gm-Message-State: AOAM5316jtdY2XGzMw7EUBxdurc0ZzQWfFG7L/k/j7fl7s/jxgQBzwEp Zuyi/Q6ugnrUvsiKCGrBvJpY+QrptQfFthxZ X-Google-Smtp-Source: ABdhPJwdxmHLxCDSiQDtNWuG6RHfYAOFX25H71XKIkNLj053phFqe+eXTmHIAv0PFHwr1MxDf3+tDQ== X-Received: by 2002:a05:6a00:1c9e:b0:4fa:d946:378b with SMTP id y30-20020a056a001c9e00b004fad946378bmr18239688pfw.46.1649402930274; Fri, 08 Apr 2022 00:28:50 -0700 (PDT) Received: from [172.16.185.109] ([103.175.111.222]) by smtp.gmail.com with ESMTPSA id h12-20020a056a00230c00b004faf2563bcasm26020000pfh.114.2022.04.08.00.28.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Apr 2022 00:28:49 -0700 (PDT) Message-ID: <4d385a5b-0b65-6740-b09c-4670801962f4@woven-planet.global> Date: Fri, 8 Apr 2022 09:28:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: [PATCH] Add condition coverage profiling Content-Language: en-US To: Sebastian Huber , gcc-patches@gcc.gnu.org References: <8041d06d-219d-c83a-ff8f-9c75227cb072@woven-planet.global> <8ea26b0e-40e2-9e7c-4470-5add7a02a074@woven-planet.global> <38afdc2a-ed99-be14-969d-81afd64eddfa@embedded-brains.de> From: =?UTF-8?Q?J=c3=b8rgen_Kvalsvik?= In-Reply-To: <38afdc2a-ed99-be14-969d-81afd64eddfa@embedded-brains.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2022 07:28:53 -0000 On 07/04/2022 18:53, Sebastian Huber wrote: > Hello Jørgen, > > there could be an issue with conditions in for loops: > >         3:  189:  for (int a = 0; a <= 1; ++a) { > branch  0 taken 2 > branch  1 taken 1 (fallthrough) > conditions covered 0/2 > condition  0 not covered (true) > condition  0 not covered (false) > Hello, Thanks, I'll have a look at it. There should be a for loop in the test suite, but I'll add this exact example and see if I can reproduce it. This should obviously be 100% covered.