Add test case for bug fix in r76262.

llvm-svn: 76283
This commit is contained in:
Ted Kremenek 2009-07-18 05:02:33 +00:00
parent 090db9b7a9
commit 6ab0a74a25
1 changed files with 14 additions and 0 deletions

View File

@ -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;
}
}