Open
Description
int *foo(int *b, int l);
int *foo(int *a, int j) {
for (int i = 0; i < j; j++)
a[i];
return a;
}
converts to
_Array_ptr<int> foo(_Array_ptr<int> b : count(l), int l) : count(l);
_Array_ptr<int> foo(_Array_ptr<int> a : count(j), int j) : count(l) {
for (int i = 0; i < j; j++)
a[i];
return a;
}
The bound count(l)
on the function definition must instead be count(j)
.
This is one part an issue noticed by @mattmccutchen-cci that applies to 3C before the lower bound inference changes. The other issue existed only after the changes and is fixed on that branch (infer_lower_bound
).