<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 - Wrong line table information at -Og"
href="https://bugs.llvm.org/show_bug.cgi?id=45820">45820</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Wrong line table information at -Og
</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>All
</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>ditaliano@apple.com
</td>
</tr>
<tr>
<th>CC</th>
<td>jdevlieghere@apple.com, keith.walker@arm.com, llvm-bugs@lists.llvm.org, paul_robinson@playstation.sony.com
</td>
</tr></table>
<p>
<div>
<pre>short a, b;
void(c)(d) {}
short(e)(d) { return d; }
static short(f)(d) {}
short g() {
int l_284[2][3][6];
for (; a >= 0;) {
if (e(0 <= 0))
return 1;
for (;;) {
l_284[1][2][5] = 0;
break;
}
c(f);
f(l_284);
b = l_284[1][1][4];
}
}
int main() { g(); }
####
Process 16744 stopped
* thread #1: tid = 16744, 0x0000000000401181 drama.out`main + 1 at a.c:19, name
= 'drama.out', stop reason = breakpoint 1.1
frame #0: 0x0000000000401181 drama.out`main + 1 at a.c:19
16 b = l_284[1][1][4];
17 }
18 }
-> 19 int main() { g(); }
(lldb) s
Process 16744 stopped
* thread #1: tid = 16744, 0x0000000000401137 drama.out`g + 7 at a.c:7, name =
'drama.out', stop reason = step in
frame #0: 0x0000000000401137 drama.out`g + 7 at a.c:7
4 static short(f)(d) {}
5 short g() {
6 int l_284[2][3][6];
-> 7 for (; a >= 0 {
8 if (e(0 <= 0))
9 return 1;
10 for (; {
(lldb) s
Process 16744 stopped
* thread #1: tid = 16744, 0x0000000000401122 drama.out`e(d=1) + 2 at a.c:3,
name = 'drama.out', stop reason = step in
frame #0: 0x0000000000401122 drama.out`e(d=1) + 2 at a.c:3
1 short a, b;
2 void(c)(d) {}
-> 3 short(e)(d) { return d; }
4 static short(f)(d) {}
5 short g() {
6 int l_284[2][3][6];
7 for (; a >= 0 {
(lldb) s
Process 16744 stopped
* thread #1: tid = 16744, 0x0000000000401150 drama.out`g + 32 at a.c:11, name =
'drama.out', stop reason = step in
frame #0: 0x0000000000401150 drama.out`g + 32 at a.c:11
8 if (e(0 <= 0))
9 return 1;
10 for (; {
-> 11 l_284[1][2][5] = 0;
12 break;
13 }
14 c(f);
The line 9 should be always hit and the program should exit never executing
lines [10:12], however we see that line 11 is hit after returning from function
e. For some reason it only reproduces on Linux, I haven't investigated yet.</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>