aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/array-struct.c
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-05-03 00:27:40 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-05-03 00:27:40 +0000
commit3e001f393d112a50e13c9a8f9a4c0d97f3f51cf4 (patch)
tree34cf9fc0608ba3d039a8c20862f1e2590c08fb39 /test/Analysis/array-struct.c
parent45d604e039e94532f5a78d15df94e71b4aa2ba49 (diff)
region store: make Retrieve() can retrieve embedded array correctly. Also
simplify the retrieve logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70651 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/array-struct.c')
-rw-r--r--test/Analysis/array-struct.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Analysis/array-struct.c b/test/Analysis/array-struct.c
index 7e5e6243c6..0ce6afcc0c 100644
--- a/test/Analysis/array-struct.c
+++ b/test/Analysis/array-struct.c
@@ -119,3 +119,14 @@ void f13(double timeout) {
if (a.e.d == 10)
a.e.d = 4;
}
+
+struct s3 {
+ int a[2];
+};
+
+static struct s3 opt;
+
+// Test if the embedded array is retrieved correctly.
+void f14() {
+ struct s3 my_opt = opt;
+}