[llvm-bugs] [Bug 51943] New: Variable's value late availability after Instruction Selection at Oz
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Sep 22 13:07:19 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51943
Bug ID: 51943
Summary: Variable's value late availability after Instruction
Selection at Oz
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: DebugInfo
Assignee: unassignedbugs at nondot.org
Reporter: cristianassaiante at outlook.com
CC: jdevlieghere at apple.com, keith.walker at arm.com,
llvm-bugs at lists.llvm.org,
paul_robinson at playstation.sony.com
A variable (l_33) value is visile after its declarations, then its not visible
anymore after a step command and it becomes available at line 7.
>From opt-bisect, it seems that the pass after which this behaviour occurs is:
DAG->DAG Instruction Selection on function (main)
$ cat a.c
volatile int a, b;
int c;
int main() {
int l_194 = 0;
for (; c >= 0; --c) {
l_194 = a;
b = 0;
}
}
$ clang -v
clang version 13.0.0
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
$ lldb -v
lldb version 13.0.0
$ clang -g -Oz -o opt a.c
$ lldb opt
(lldb) target create "opt"
Current executable set to
'/home/stepping/debuginfo-analysis/issues/issue16/opt' (x86_64).
(lldb) b main
Breakpoint 1: where = opt`main at a.c:5:10, address = 0x0000000000400478
(lldb) r
Process 27 launched: '/home/stepping/debuginfo-analysis/issues/issue16/opt'
(x86_64)
Process 27 stopped
* thread #1, name = 'opt', stop reason = breakpoint 1.1
frame #0: 0x0000000000400478 opt`main at a.c:5:10
2 int c;
3 int main() {
4 int l_194 = 0;
-> 5 for (; c >= 0; --c) {
6 l_194 = a;
7 b = 0;
8 }
(lldb) frame var
(int) l_194 = 0
(lldb) n
Process 27 stopped
* thread #1, name = 'opt', stop reason = step over
frame #0: 0x0000000000400482 opt`main at a.c:6:13
3 int main() {
4 int l_194 = 0;
5 for (; c >= 0; --c) {
-> 6 l_194 = a;
7 b = 0;
8 }
9 }
(lldb) frame var
(int) l_194 = <variable not available>
(lldb) n
Process 27 stopped
* thread #1, name = 'opt', stop reason = step over
frame #0: 0x0000000000400488 opt`main at a.c:7:7
4 int l_194 = 0;
5 for (; c >= 0; --c) {
6 l_194 = a;
-> 7 b = 0;
8 }
9 }
(lldb) frame var
(int) l_194 = 0
--
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/20210922/41949d01/attachment.html>
More information about the llvm-bugs
mailing list