Make sure to propagate qualifiers through the member operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46830 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/assign.c b/test/Sema/assign.c
index 43f4ba7..b94d583 100644
--- a/test/Sema/assign.c
+++ b/test/Sema/assign.c
@@ -2,4 +2,6 @@
 
 void *test1(void) { return 0; }
 
-
+void test2 (const struct {int a;} *x) {
+  x->a = 10; // expected-error {{read-only variable is not assignable}}
+}