For the following example:
typedef unsigned long size_t;
_Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);
struct foo {
int *f;
int n;
};
void bar(struct foo *p) {
int arr[100];
p->f = arr;
p->f[0] = 0;
p->n = 100;
}
As of now, we fail to find bound for f.
Expected output:
typedef unsigned long size_t;
_Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);
struct foo {
_Array_ptr<int> f : count(n);
int n;
};
void bar(_Ptr<struct foo> p) {
int arr _Checked[100];
p->f = arr;
p->f[0] = 0;
p->n = 100;
}
For the following example:
As of now, we fail to find bound for
f.Expected output: