[LLVMbugs] [Bug 298] NEW: Variable length array indexing miscompiled
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed Mar 17 13:21:37 PST 2004
http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=298
Summary: Variable length array indexing miscompiled
Product: tools
Version: 1.0
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: llvm-gcc
AssignedTo: unassignedbugs at nondot.org
ReportedBy: sabre at nondot.org
It looks like we are miscompiling indexes through C99 VLA's in some cases. File
this into the "wow, I didn't know you could do that" catagory. :)
Testcase:
---
int foo(int len, char arr[][len], int X) {
return arr[X][0];
}
---
The correct addressing arithmetic to generate is "arr + X*len", which we don't
do in this case.
-Chris
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list