<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 information at Og"
href="https://bugs.llvm.org/show_bug.cgi?id=51512">51512</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Wrong line 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>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>artuso@diag.uniroma1.it
</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>Comment:
Step at variable declaration (line 6).
Steps to reproduce bug:
root@5cd8c077ddd7:/home/stepping/output# clang -v
clang version 14.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
957334382cd12ec07b46c0ddfdcc220731f6d80f)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Candidate multilib: .;@m64
Selected multilib: .;@m64
root@5cd8c077ddd7:/home/stepping/output# lldb -v
lldb version 14.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a> revision
957334382cd12ec07b46c0ddfdcc220731f6d80f)
clang revision 957334382cd12ec07b46c0ddfdcc220731f6d80f
llvm revision 957334382cd12ec07b46c0ddfdcc220731f6d80f
root@5cd8c077ddd7:/home/stepping/output# cat a.c
int a, c, e, f;
static int *b = &a;
short d = 6;
void func_15() {
for (; c >= 0; c--) {
int i, j;
*b = f;
}
}
int main() {
func_15();
for (; d <= 0;) {
int g[4];
g[e] = &b;
}
}
root@5cd8c077ddd7:/home/stepping/output# cat -n a.c
1 int a, c, e, f;
2 static int *b = &a;
3 short d = 6;
4 void func_15() {
5 for (; c >= 0; c--) {
6 int i, j;
7 *b = f;
8 }
9 }
10 int main() {
11 func_15();
12 for (; d <= 0;) {
13 int g[4];
14 g[e] = &b;
15 }
16 }
root@5cd8c077ddd7:/home/stepping/output# clang -g -Og a.c -o opt
a.c:14:10: warning: incompatible pointer to integer conversion assigning to
'int' from 'int **' [-Wint-conversion]
g[e] = &b;
^ ~~
1 warning generated.
root@5cd8c077ddd7:/home/stepping/output# lldb opt
(lldb) target create "opt"
Current executable set to '/home/stepping/output/opt' (x86_64).
(lldb) b 6
Breakpoint 1: 2 locations.
(lldb) r
Process 38586 launched: '/home/stepping/output/opt' (x86_64)
Process 38586 stopped
* thread #1, name = 'opt', stop reason = breakpoint 1.2
frame #0: 0x00000000004004e0 opt`main [inlined] func_15 at a.c:6:9
3 short d = 6;
4 void func_15() {
5 for (; c >= 0; c--) {
-> 6 int i, j;
7 *b = f;
8 }
9 }
(lldb) di -l
opt`main:
-> 0x4004e0 <+32>: movl %ecx, %edx</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>