Bugzilla – Bug 360
[llvmgcc] Structure field with non-constant offset crashes llvmgcc
Last modified: 2004-11-27 18:43:37
You need to log in before you can comment on or make changes to this bug.
Here's a testcase: --- int sub1(int i, char *pi) { typedef int foo[i]; struct bar {foo f1; int f2;} *p = (struct bar *) pi; return p->f2; } --- I'm not sure exactly what a variable sized array IN a structure means, but we shouldn't segfault in any case. -Chris
Fixed. Testcase here: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041122/021386.html Patch here: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041122/021387.html -Chris