[PATCH] D38796: [CodeGen] EmitPointerWithAlignment() to generate TBAA info along with LValue base info
Ivan Kosarev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 15 13:01:35 PDT 2017
kosarev added a comment.
With this patch applied we fail on bootstrapping stages of release builds (meaning enabled TBAA).
The reason is that for some casts we do not generate TBAA info that corresponds to the target type and leave them with TBAA info for the cast's operand expression. This results in invalid TBAA access descriptors. For example, for the following store we generate a TBAA descriptor with ##S## as the base type and ##unsigned## as the access type while the expected descriptor shall have ##V## as the base type and ##unsigned## as the access type.
struct V {
unsigned n;
};
struct S {
char bytes[4];
};
void foo(S *p) {
((V*)p->bytes)->n = 0;
}
Repository:
rL LLVM
https://reviews.llvm.org/D38796
More information about the cfe-commits
mailing list