specify data_type for data global
added test_ptr
fix for dereferencing frame and local pointers