aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/array-struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/array-struct.c')
-rw-r--r--test/Analysis/array-struct.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Analysis/array-struct.c b/test/Analysis/array-struct.c
index 2b1aea75db..318f92f907 100644
--- a/test/Analysis/array-struct.c
+++ b/test/Analysis/array-struct.c
@@ -132,3 +132,13 @@ static struct s3 opt;
void f14() {
struct s3 my_opt = opt;
}
+
+void bar(int*);
+
+// Test if the array is correctly invalidated.
+void f15() {
+ int a[10];
+ bar(a);
+ if (a[1]) // no-warning
+ 1;
+}