<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 - Debug location missing for collapsed returns with opt > 0"
href="https://bugs.llvm.org/show_bug.cgi?id=35619">35619</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Debug location missing for collapsed returns with opt > 0
</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>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>DebugInfo
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>pmatos@linki.tools
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>This is a hard one to solve in the general case.
For example:
#include <stdint.h>
volatile int16_t a_val = 2;
volatile int16_t arr[30];
int16_t __attribute__((noinline)) foo3(int16_t a, int16_t b) {
if(a > b) {
return 10;
}
else if(a + 10 > b) {
return 100;
}
else {
return 70;
}
}
int main() {
arr[6] = foo3(1000, 101);
return (int)(arr[6] & 0xff);
}
If one, compiles with optimization on (like -Os) runs this and sets a
breakpoint in 'return 10;' this breakpoint is not hit even though we do return
10.
I understand the general problem, returns are collapsed and debug locs are
lost. However, I think it might be useful to have a tracking bug for this kind
of thing.</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>