[LLVMdev] BasicAliasAnalysis and out-of-bound GEP indices

Owen Anderson resistor at mac.com
Thu Nov 15 11:49:46 PST 2007


On Nov 15, 2007, at 11:56 AM, Daniel Berlin wrote:
> Then the original reported code is fine, and the bug is in llvm or
> llvm-gc (IE Owen is wrong)
> Note:
>
>
> struct device;
>
> struct usb_bus {
> struct device *controller;
> };
>
> struct usb_hcd {
> struct usb_bus self;
>
> unsigned long hcd_priv[0];
> };

You'll notice that the LLVM assembly example he gave is NOT equivalent  
to the C code.  The LLVM assembly uses arrays of declared sized,  
whereas a correct translation of the above C code into LLVM assembly  
would not.

--Owen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2555 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20071115/d5bd9d85/attachment.bin>


More information about the llvm-dev mailing list