On Tue, Aug 5, 2008 at 10:08 PM, Daniel Dunbar <[EMAIL PROTECTED]> wrote:
> +  // Fetch the high bits if necessary.
> +  if (LowBits < BitfieldSize) {
> +    unsigned HighBits = BitfieldSize - LowBits;
> +    llvm::Value *HighPtr =
> +      Builder.CreateGEP(Ptr, llvm::ConstantInt::get(llvm::Type::Int32Ty, 1),
> +                        "bf.ptr.hi");
> +    llvm::Value *HighVal = Builder.CreateLoad(HighPtr,
> +                                              LV.isVolatileQualified(),
> +                                              "tmp");

This is incorrect; it assumes that the struct is sufficiently aligned
for the load to succeed.  See
http://llvm.org/bugs/show_bug.cgi?id=2394 for a similar bug in
llvm-gcc.

-Eli
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to