diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-03-18 02:07:30 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-03-18 02:07:30 +0000 |
commit | c57bc595cf7d4e3a5219d30fc20653d595e16ffe (patch) | |
tree | ab468ac3046d157b765fa32865a9d692dffdfafb /test/Analysis/array-struct.c | |
parent | 5796bf4913832bd1165c3ff5e04838d150de1c4c (diff) |
add test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67154 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/array-struct.c')
-rw-r--r-- | test/Analysis/array-struct.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Analysis/array-struct.c b/test/Analysis/array-struct.c index 86858d7bd2..60a3d3118d 100644 --- a/test/Analysis/array-struct.c +++ b/test/Analysis/array-struct.c @@ -104,3 +104,18 @@ void f12(int *list) { unsigned i = 0; list[i] = 1; } + +struct s1 { + struct s2 { + int d; + } e; +}; + +// The binding of a.e.d should not be removed. Test recursive subregion map +// building: a->e, e->d. Only then 'a' could be added to live region roots. +void f13(double timeout) { + struct s1 a; + a.e.d = (long) timeout; + if (a.e.d == 10) + a.e.d = 4; +} |