Commit 25a050a
committed
Simplify inequality over pointers
When using pointers as iterators we may see less-than (or less-or-equal)
comparison of pointers with some offsets. When the base pointers point
to the same root object we can safely simplify this.
Also avoid undefined behaviour (pointer below object bounds) in
regression test.1 parent f39a5c1 commit 25a050a
File tree
4 files changed
+37
-20
lines changed- regression
- cbmc-incr-smt2/pointers-relational-operators
- cbmc/Pointer_comparison4
- src/util
4 files changed
+37
-20
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1587 | 1587 | | |
1588 | 1588 | | |
1589 | 1589 | | |
1590 | | - | |
1591 | | - | |
1592 | | - | |
1593 | | - | |
| 1590 | + | |
1594 | 1591 | | |
1595 | | - | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
1596 | 1608 | | |
1597 | 1609 | | |
1598 | 1610 | | |
| |||
1651 | 1663 | | |
1652 | 1664 | | |
1653 | 1665 | | |
1654 | | - | |
1655 | | - | |
1656 | | - | |
1657 | | - | |
1658 | | - | |
1659 | | - | |
1660 | | - | |
1661 | | - | |
1662 | | - | |
1663 | | - | |
1664 | | - | |
1665 | | - | |
1666 | | - | |
1667 | 1666 | | |
1668 | 1667 | | |
1669 | 1668 | | |
| |||
0 commit comments