Implement codegen of aggregates as lvalues in binary expressions,
e.g. "(a = b).somefield".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55758 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/struct.c b/test/CodeGen/struct.c
index 9af684b..76d9b77 100644
--- a/test/CodeGen/struct.c
+++ b/test/CodeGen/struct.c
@@ -69,7 +69,6 @@
   int location;
   int length;
 } range;
-
 extern range f6();
 void f7()
 {
@@ -166,3 +165,27 @@
 
 struct __attribute__((packed)) SS { long double a; char b; } SS;
 
+
+/* As lvalue */
+
+int f15() {
+  extern range f15_ext();
+  return f15_ext().location;
+}
+
+range f16() {
+  extern rangepair f16_ext();
+  return f16_ext().range1;
+}
+
+int f17() {
+  extern range f17_ext();
+  range r;
+  return (r = f17_ext()).location;
+}
+
+range f18() {
+  extern rangepair f18_ext();
+  rangepair rp;
+  return (rp = f18_ext()).range1;
+}