summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/test/Analysis/array-struct.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/Analysis/array-struct.c b/clang/test/Analysis/array-struct.c
new file mode 100644
index 00000000000..5eac795aae2
--- /dev/null
+++ b/clang/test/Analysis/array-struct.c
@@ -0,0 +1,14 @@
+// RUN: clang -checker-simple -verify %s
+
+struct s {};
+
+void f(void) {
+ int a[10];
+ int (*p)[10];
+ p = &a;
+ (*p)[3] = 1;
+
+ struct s d;
+ struct s *q;
+ q = &d;
+}
OpenPOWER on IntegriCloud