rjmccall added a comment.

In D55262#1321641 <https://reviews.llvm.org/D55262#1321641>, @romanovvlad wrote:

> Yes it's 1, but after addrspacecast alignment becomes not struct A but 
> alignment of the pointer


Oh!  Yes, that's even more broken than I thought.



================
Comment at: lib/CodeGen/CGExpr.cpp:4272
         *this, LV.getPointer(), E->getSubExpr()->getType().getAddressSpace(),
         DestTy.getAddressSpace(), ConvertType(DestTy));
+    return MakeAddrLValue(Address(V, LV.getAddress().getAlignment()),
----------------
This call to `getAddressSpace()` doesn't look right: we just constructed 
`DestTy` as an unqualified pointer type.  It needs to be 
`E->getType().getAddressSpace()`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55262/new/

https://reviews.llvm.org/D55262



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to