aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/misc-ps-basic-store.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/misc-ps-basic-store.m')
-rw-r--r--test/Analysis/misc-ps-basic-store.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Analysis/misc-ps-basic-store.m b/test/Analysis/misc-ps-basic-store.m
index 1207f8663e90..c6ae20c86a36 100644
--- a/test/Analysis/misc-ps-basic-store.m
+++ b/test/Analysis/misc-ps-basic-store.m
@@ -19,3 +19,17 @@ void checkaccess_union() {
).__i))) & 0xff00) >> 8) == 1)
ret = 1;
}
+
+// BasicStore handles this case incorrectly because it doesn't reason about
+// the value pointed to by 'x' and thus creates different symbolic values
+// at the declarations of 'a' and 'b' respectively. See the companion test
+// in 'misc-ps-region-store.m'.
+void test_trivial_symbolic_comparison_pointer_parameter(int *x) {
+ int a = *x;
+ int b = *x;
+ if (a != b) {
+ int *p = 0;
+ *p = 0xDEADBEEF; // expected-warning{{null}}
+ }
+}
+