summaryrefslogtreecommitdiffstats
path: root/test/FrontendC/2007-10-01-BuildArrayRef.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/FrontendC/2007-10-01-BuildArrayRef.c')
-rw-r--r--test/FrontendC/2007-10-01-BuildArrayRef.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/test/FrontendC/2007-10-01-BuildArrayRef.c b/test/FrontendC/2007-10-01-BuildArrayRef.c
deleted file mode 100644
index e87a5b6..0000000
--- a/test/FrontendC/2007-10-01-BuildArrayRef.c
+++ /dev/null
@@ -1,20 +0,0 @@
-// RUN: not %llvmgcc_only -c %s -o /dev/null |& FileCheck %s
-// PR 1603
-void func()
-{
- const int *arr;
- arr[0] = 1; // CHECK: 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; // CHECK: error: assignment of read-only member 'bar'
- return sfoo.bar;
-}
OpenPOWER on IntegriCloud