<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 - [DWARF] Line 0 should not have is_stmt set"
href="https://bugs.llvm.org/show_bug.cgi?id=34522">34522</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[DWARF] Line 0 should not have is_stmt set
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</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>Common Code Generator Code
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>paul_robinson@playstation.sony.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>I think it does not make sense for a line-0 record to have is_stmt set.
I made a point of turning it off for implicit line-0 records generated
by DwarfDebug, and in real code I don't think we would ever see it.
However, adding an assertion to this effect broke 40 LLVM tests.
In most cases, the problem is merely that the test-input IR does
not specify everything that normal IR input has. In particular, at
some point DISubprogram started making a distinction between Line and
scopeLine, i.e. line of declaration versus where-the-code-starts.
If the scopeLine argument is missing from textual IR, it defaults to
zero, and that gets propagated to the entry point of the subprogram,
which is a stopping point and therefore has is_stmt=1.
Defaulting scopeLine to Line fixed 33 of the tests, and eyeballing
the other 7 suggests that most of them don't set Line either. This
is (IMO) a matter of flawed tests and it should be no sweat to fix.
There is one test related to prologue-end that seems to be testing
that it's okay for prologue-end to be line 0, and I ran out of time
to investigate any further.</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>