reason that this should be limited to simple lvalues.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111331
91177308-0d34-0410-b5e6-
96231b3b80d8
if (!hasAggregateLLVMType(E->getType())) {
// Emit the LHS as an l-value.
LValue LV = EmitLValue(E->getLHS());
-
- llvm::Value *RHS = EmitScalarExpr(E->getRHS());
- EmitStoreOfScalar(RHS, LV.getAddress(), LV.isVolatileQualified(),
- E->getType());
+ // Sore the value through the l-value.
+ EmitStoreThroughLValue(EmitAnyExpr(E->getRHS()), LV, E->getType());
return LV;
}
// PR7892
int test3(const char*);
int test3g = test3(__PRETTY_FUNCTION__);
+
+
+// PR7889
+struct test4A {
+ int j : 2;
+};
+int test4() {
+ test4A a;
+ (a.j = 2) = 3;
+}