http://llvm.org/bugs/show_bug.cgi?id=3649
Summary: stack is not saved/restored correctly with multiple VLAs
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: LLVM Codegen
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
The printed addresses below should be constant:
--
ddun...@frank:tmp$ cat t.c
#include <stdio.h>
int f0(int n) {
int arr[n];
for (unsigned i=0; i<n; ++i) {
int arr[n << 10];
printf("%p\n", arr);
}
return 0;
}
int main() {
f0(10);
return 0;
}
ddun...@frank:tmp$ xcc t.c && ./a.out
0xbfe67788
0xbfe5d788
0xbfe53788
0xbfe49788
0xbfe3f788
0xbfe35788
0xbfe2b788
0xbfe21788
0xbfe17788
0xbfe0d788
--
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs