https://bugs.llvm.org/show_bug.cgi?id=39869
Bug ID: 39869
Summary: Wrong value for array element in the debugger (with
-O1)
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: DebugInfo
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected],
[email protected]
$ cat a.c
short a, c;
long b;
short fun1() { return c; }
char d() {
short l_30[4] = {1};
a = fun1();
l_30[3]++;
return b; // break here
}
int main() { d(); }
Process 24627 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
frame #0: 0x0000000100000f93 a.out`d at a.c:8:10 [opt]
5 short l_30[4] = {1};
6 a = fun1();
7 l_30[3]++;
-> 8 return b;
9 }
10 int main() { d(); }
(lldb) frame var l_30
(short [4]) l_30 = ([0] = 0, [1] = 0, [2] = 0, [3] = 1)
The first element should be 1, i.e. the array should look like:
(short [4]) l_30 = ([0] = 1, [1] = 0, [2] = 0, [3] = 1)
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs