ilya-biryukov added a subscriber: jyknight. ilya-biryukov added a comment. Sorry, didn't see your comment when submitting mine.
I think the offending code is clearly wrong here and adding the `isLayoutIdentical` seems like the right thing to do. This looks like a small change and I'm happy to LGTM this myself. However, I also have very little experience with codegen, you might want to find someone more experienced with it to have a more informed look. @jyknight maybe? ================ Comment at: clang/lib/CodeGen/CGCall.cpp:1338 + llvm::StructType *STy = dyn_cast<llvm::StructType>(Val->getType()); + if (STy && STy->isLayoutIdentical(cast<llvm::StructType>(Dest.getElementType()))) { for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { ---------------- Is it guaranteed that `Dest.getElementType()` is never something other than `StructType`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141690/new/ https://reviews.llvm.org/D141690 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits