source:
CIVL/mods/dev.civl.com/examples/languageFeatures/arbitrary_pointer.cvl@
cb4d4f4
| Last change on this file since cb4d4f4 was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 150 bytes | |
| Line | |
|---|---|
| 1 | int main() { |
| 2 | int * ap; |
| 3 | int x[100]; |
| 4 | |
| 5 | $havoc(&ap); |
| 6 | $assume(x == ap); |
| 7 | for (int i = 0; i < 99; i++) |
| 8 | ap += 1; |
| 9 | $assert((*ap) == x[99]); |
| 10 | } |
Note:
See TracBrowser
for help on using the repository browser.
