From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DBCA238708B5; Mon, 29 Jun 2020 09:57:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DBCA238708B5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1593424669; bh=vrqFuPbieqxAJ9tLhT40RwZHgAREEtsv211hmmyIXCQ=; h=From:To:Subject:Date:From; b=ONzmIOXOG4QVh0RB6V/tZMV3SsWpt28knZ6M+j+DOZeihFuwPWxrIG3r/ytJer36H 1/kAe213lDhR2pRuL+BTWVFdMcbUPBXVxSM7tD6fnjhW8v67nLcHF2m3qJBTbTGvap 19qxWs1OZ2PEUgYZFTh3O590xW3glaCuZyObd33g= From: "loximann at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/95957] New: All lines except for the last one in multiline constructor reported as not run Date: Mon, 29 Jun 2020 09:57:49 +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-Version: 10.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: loximann at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 09:57:50 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95957 Bug ID: 95957 Summary: All lines except for the last one in multiline constructor reported as not run Product: gcc Version: 10.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: gcov-profile Assignee: unassigned at gcc dot gnu.org Reporter: loximann at gmail dot com CC: marxin at gcc dot gnu.org Target Milestone: --- Source code: #include #include #include int main(int argc, char *argv[]) { static const std::vector a{1, 2, 3, 4}; static const std::map b{ {1, "lol"} }; b.at(1); return 0; } Command: g++ --coverage coverage_test.cpp && ./a.out && gcov coverage_test.cpp Gcov output: -: 0:Source:coverage_test.cpp -: 0:Graph:coverage_test.gcno -: 0:Data:coverage_test.gcda -: 0:Runs:1 -: 1:#include -: 2:#include -: 3:#include -: 4: 1: 5:int main(int argc, char *argv[]) -: 6:{ -: 7: static const std::vector a{1, -: 8: 2, -: 9: 3, 2: 10: 4}; -: 11: static const std::map b{ #####: 12: {1, "lol"} 3: 13: }; 1: 14: b.at(1); 1: 15: return 0; -: 16:} Line 12: should be marked as "-", same as 7, 8, 9 and 11 instead of "#####"= .=