public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/95957] New: All lines except for the last one in multiline constructor reported as not run
@ 2020-06-29  9:57 loximann at gmail dot com
  2020-06-29 11:10 ` [Bug gcov-profile/95957] " marxin at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: loximann at gmail dot com @ 2020-06-29  9:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95957

            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 <map>
#include <string>
#include <vector>

int main(int argc, char *argv[])
{
    static const std::vector<int> a{1,
        2,
        3,
        4};
    static const std::map<int, std::string> 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 <map>
        -:    2:#include <string>
        -:    3:#include <vector>
        -:    4:
        1:    5:int main(int argc, char *argv[])
        -:    6:{
        -:    7:    static const std::vector<int> a{1,
        -:    8:        2,
        -:    9:        3,
        2:   10:        4};
        -:   11:    static const std::map<int, std::string> 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 "#####".

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

* [Bug gcov-profile/95957] All lines except for the last one in multiline constructor reported as not run
  2020-06-29  9:57 [Bug gcov-profile/95957] New: All lines except for the last one in multiline constructor reported as not run loximann at gmail dot com
@ 2020-06-29 11:10 ` marxin at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-06-29 11:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95957

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-06-29
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed.

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

end of thread, other threads:[~2020-06-29 11:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29  9:57 [Bug gcov-profile/95957] New: All lines except for the last one in multiline constructor reported as not run loximann at gmail dot com
2020-06-29 11:10 ` [Bug gcov-profile/95957] " marxin at gcc dot gnu.org

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