Hi Evan, > Can you get me a test case? I need to see what gcc is doing. Thanks,
Sure. Zero sized fields in structs may not be very useful, but it is still legal to use them, in particular you can take their address, like this: struct Z {}; struct Y { int i; struct Z z; }; void *f(struct Y *y) { return &y->z; } This used to work before your patch. For that matter, llvm-gcc-4.2 itself fails to build here (linux x86-32; crashes compiling libgcov.c) for what looks to be the same reason. Also, don't forget that Ada can have fields of variable size in various places in a struct, and these can be represented by zero-size LLVM fields (this kind of struct doesn't get passed to functions by copy though). Can you please explain why you made this change (a testcase would be good). Best wishes, Duncan. _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits