diff options
Diffstat (limited to 'test/Sema/assign.c')
-rw-r--r-- | test/Sema/assign.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/Sema/assign.c b/test/Sema/assign.c index 43f4ba7b9a..b94d5835ee 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}} +} |