diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-07-18 05:02:33 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-07-18 05:02:33 +0000 |
commit | 386af0a224d8943f0c818d66fabc56642a458c8c (patch) | |
tree | 11f265d33ba288a7b46135b2dbd08196d23eaf06 | |
parent | 13fc08a323b29dd97a46def1e3a15bf082476efa (diff) |
Add test case for bug fix in r76262.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76283 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Analysis/misc-ps-region-store.m | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Analysis/misc-ps-region-store.m b/test/Analysis/misc-ps-region-store.m index c5341a0138..2b0299f23f 100644 --- a/test/Analysis/misc-ps-region-store.m +++ b/test/Analysis/misc-ps-region-store.m @@ -125,3 +125,17 @@ void testB_2(BStruct *b) { if ((int*)~0 != __gruev__) {} } } + +// This test case is a reduced case of a caching bug discovered by an +// assertion failure in RegionStoreManager::BindArray. Essentially the +// DeclStmt is evaluated twice, but on the second loop iteration the +// engine caches out. Previously a false transition would cause UnknownVal +// to bind to the variable, firing an assertion failure. This bug was fixed +// in r76262. +void test_declstmt_caching() { +again: + { + const char a[] = "I like to crash"; + goto again; + } +} |