// RUN: %clang_cc1 -fsyntax-only -verify %s
// PR 1603
void func()
{
   const int *arr;
   arr[0] = 1;  // expected-error {{read-only variable is not assignable}}
}

struct foo {
  int bar;
};
struct foo sfoo = { 0 };

int func2()
{
  const struct foo *fp;
  fp = &sfoo;
  fp[0].bar = 1;  // expected-error {{read-only variable is not assignable}}
  return sfoo.bar;
}

// RUN: not %clang_cc1_only -c %s -o - > /dev/null
// PR 1603
void func()
{
   const int *arr;
   arr[0] = 1;  // expected-error {{assignment of read-only location}}
}

struct foo {
  int bar;
};
struct foo sfoo = { 0 };

int func2()
{
  const struct foo *fp;
  fp = &sfoo;
  fp[0].bar = 1;  // expected-error {{ assignment of read-only member}}
  return sfoo.bar;
}

--- 
+++ 
@@ -1,9 +1,9 @@
-// RUN: not %clang_cc1_only -c %s -o - > /dev/null
+// RUN: %clang_cc1 -fsyntax-only -verify %s
 // PR 1603
 void func()
 {
    const int *arr;
-   arr[0] = 1;  // expected-error {{assignment of read-only location}}
+   arr[0] = 1;  // expected-error {{read-only variable is not assignable}}
 }
 
 struct foo {
@@ -15,6 +15,6 @@
 {
   const struct foo *fp;
   fp = &sfoo;
-  fp[0].bar = 1;  // expected-error {{ assignment of read-only member}}
+  fp[0].bar = 1;  // expected-error {{read-only variable is not assignable}}
   return sfoo.bar;
 }
Fix a test that hasn't worked since 2007

Due to a missing -verify, 2007-10-01-BuildArrayRef.c was a no-op.

The message was changed 5 years ago so also update the test to reflect the new wording.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@196729 91177308-0d34-0410-b5e6-96231b3b80d8
