1 #define __safe __attribute__((safe)) 2 3 static void test_safe(void) 4 { 5 int __safe obj, *ptr; 6 typeof(obj) var = obj; 7 typeof(ptr) ptr2 = ptr; 8 typeof(*ptr) var2 = obj; 9 typeof(*ptr) *ptr3 = ptr; 10 typeof(obj) *ptr4 = ptr; 11 obj = obj; 12 ptr = ptr; 13 ptr = &obj; 14 obj = *ptr; 15 } 16 17 /* 18 * check-name: typeof-safe 19 * check-known-to-fail 20 * 21 * check-error-start 22 * check-error-end 23 */