1.23
2.0
acw/focus-triggers
main
test-branch
| Rev | Line | |
|---|
| [9aaed1f] | 1 | #include <assert.h>
|
|---|
| 2 |
|
|---|
| 3 | /*@ requires \valid(x + (0 .. 3));
|
|---|
| [4e62451] | 4 |
|
|---|
| [9aaed1f] | 5 | @ requires \valid(x[0] + (0 .. 3));
|
|---|
| 6 | @ requires \valid(x[1] + (0 .. 3));
|
|---|
| 7 | @ requires \valid(x[2] + (0 .. 3));
|
|---|
| 8 | */
|
|---|
| 9 | int add(int ** x)
|
|---|
| 10 | {
|
|---|
| 11 | int * y = x[0]+1;
|
|---|
| 12 |
|
|---|
| 13 | x[0][0] = 9;
|
|---|
| 14 | x[0][1] = 8;
|
|---|
| 15 | assert(x[0][0] - x[0][1] == 1);
|
|---|
| 16 | return 0;
|
|---|
| 17 | }
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 | int main() {
|
|---|
| 21 | add((void*)0);
|
|---|
| 22 | return 0;
|
|---|
| 23 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.