Skip to content

Inserted _Assume_bounds_cast bounds should substitute function call arguments for parameters #524

Open
@mwhicks1

Description

@mwhicks1

This code:

void baz(_Array_ptr<int> p : count(len), int len);
void foo(int *p, int n) {
  p = (int *)1;
  baz(p,n);
}

converts to

void baz(_Array_ptr<int> p : count(len), int len);
void foo(int *p : itype(_Array_ptr<int>) count(n), int n) {
  p = (int *)1;
  baz(_Assume_bounds_cast<_Array_ptr<int>>(p, count(len)),n);
}

The inserted _Assume_bounds_cast is what we want, but the count(len) is wrong -- it should be count(n).

Metadata

Metadata

Assignees

Labels

array boundsbenchmark failureA bug causing a failure in our nightly benchmark testsbugSomething isn't workingcast

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions