add test for global and static ptrs