]> granicus.if.org Git - clang/commitdiff
add test case.
authorZhongxing Xu <xuzhongxing@gmail.com>
Wed, 18 Mar 2009 02:07:30 +0000 (02:07 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Wed, 18 Mar 2009 02:07:30 +0000 (02:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67154 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/array-struct.c

index 86858d7bd2c70401fe8034fcc1111fddb63f6fa4..60a3d3118d73a328174c5c9e93af2987beff66e8 100644 (file)
@@ -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;
+}