aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/array-struct.c
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-06-28 13:59:24 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-06-28 13:59:24 +0000
commit6bd8a521aa0ed803b8f1b0aea8ea61460285fa0b (patch)
treee5de52cfc6394f6fb9d0287f6d2f224ab9bddde8 /test/Analysis/array-struct.c
parent87453d1c39df791fb98618f6ba34b2edaae880e1 (diff)
Invalidate a field of struct type by setting its default value to conjured
symbol. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74408 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 438e1ccf47..4e888c82a2 100644
--- a/test/Analysis/array-struct.c
+++ b/test/Analysis/array-struct.c
@@ -157,3 +157,14 @@ struct s3 p[1];
void f16(struct s3 *p) {
struct s3 a = *((struct s3*) ((char*) &p[0]));
}
+
+void inv(struct s1 *);
+
+// Invalidate the struct field.
+void f17() {
+ struct s1 t;
+ int x;
+ inv(&t);
+ if (t.e.d)
+ x = 1;
+}