[llvm-bugs] [Bug 51512] New: Wrong line information at Og
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Aug 17 08:45:24 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51512
Bug ID: 51512
Summary: Wrong line information at Og
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: DebugInfo
Assignee: unassignedbugs at nondot.org
Reporter: artuso at diag.uniroma1.it
CC: jdevlieghere at apple.com, keith.walker at arm.com,
llvm-bugs at lists.llvm.org,
paul_robinson at playstation.sony.com
Comment:
Step at variable declaration (line 6).
Steps to reproduce bug:
root at 5cd8c077ddd7:/home/stepping/output# clang -v
clang version 14.0.0 (https://github.com/llvm/llvm-project.git
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 at 5cd8c077ddd7:/home/stepping/output# lldb -v
lldb version 14.0.0 (https://github.com/llvm/llvm-project.git revision
957334382cd12ec07b46c0ddfdcc220731f6d80f)
clang revision 957334382cd12ec07b46c0ddfdcc220731f6d80f
llvm revision 957334382cd12ec07b46c0ddfdcc220731f6d80f
root at 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 at 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 at 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 at 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
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210817/92ad8a5c/attachment.html>
More information about the llvm-bugs
mailing list