misc-ps-region-store-i386.m revision a6275a534da701f37d19a068e6361e5f10f983a1
1// RUN: clang-cc -triple i386-apple-darwin9 -analyze -checker-cfref --analyzer-store=region --verify -fblocks %s
2
3// Here is a case where a pointer is treated as integer, invalidated as an
4// integer, and then used again as a pointer.   This test just makes sure
5// we don't crash.
6typedef unsigned uintptr_t;
7void test_pointer_invalidated_as_int_aux(uintptr_t* ptr);
8void test_pointer_invalidated_as_int() {
9  void *x;
10  test_pointer_invalidated_as_int_aux((uintptr_t*) &x);
11  // Here we have a pointer to integer cast.
12  uintptr_t y = (uintptr_t) x;
13}
14
15