<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Some lines are considered as uncoverable when using __gcov_flush"
   href="https://bugs.llvm.org/show_bug.cgi?id=38067">38067</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Some lines are considered as uncoverable when using __gcov_flush
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>compiler-rt
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>profile
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mcastelluccio@mozilla.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>-:    0:Source:main.c
        -:    0:Graph:main.gcno
        -:    0:Data:main.gcda
        -:    0:Runs:1
        -:    0:Programs:1
        -:    1:extern void __gcov_flush(void);
        -:    2:
        1:    3:void f(int c) {}
        -:    4:
        -:    5:int main(int argc, char *argv[]) {
        1:    6:  f(1);
        -:    7:
        1:    8:  __gcov_flush();
        -:    9:
        1:   10:  f(2);
        -:   11:
        1:   12:  _exit(0);
        -:   13:
        -:   14:  f(3);
        -:   15:
        -:   16:  return 0;
    #####:   17:}
        -:   18:

Lines 14 and 16 are coverable, they should be shown as uncovered.
GCC suffers from a similar bug:
<a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86411">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86411</a>.

Lines 10 and 12 should probably not be considered as covered, as we are
flushing the counters at line 8 and _exit is quitting the program without
writing out the counters. So anything that happens after line 8 should not be
counted.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>