comments for added test case for details.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73189
91177308-0d34-0410-b5e6-
96231b3b80d8
if (V.isUnknown())
return KillStruct(St, R);
+ if (isa<nonloc::SymbolVal>(V))
+ return setDefaultValue(St, R, V);
+
nonloc::CompoundVal& CV = cast<nonloc::CompoundVal>(V);
nonloc::CompoundVal::iterator VI = CV.begin(), VE = CV.end();
RecordDecl::field_iterator FI = RD->field_begin(getContext()),
if (a[1]) // no-warning
1;
}
+
+struct s3 p[1];
+
+// Code from postgresql.
+// Current cast logic of region store mistakenly leaves the final result region
+// an ElementRegion of type 'char'. Then load a nonloc::SymbolVal from it and
+// assigns to 'a'.
+void f16(struct s3 *p) {
+ struct s3 a = *((struct s3*) ((char*) &p[0]));
+}