type: introduce get_final_type()
[smatch.git] / validation / typeof-safe.c
blob614863fba381b6fe420f52482532ae30eaf0563c
1 #define __safe __attribute__((safe))
3 static void test_safe(void)
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;
18 * check-name: typeof-safe
19 * check-known-to-fail
21 * check-error-start
22 * check-error-end