File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed
regression/cbmc/Pointer_comparison3 Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 1+ #include <assert.h>
2+ #include <stdlib.h>
3+
4+ int main ()
5+ {
6+ int * p1 = malloc (sizeof (int ));
7+
8+ assert (p1 < p1 + 1 );
9+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+
4+ ^VERIFICATION SUCCESSFUL$
5+ ^EXIT=0$
6+ ^SIGNAL=0$
7+ --
8+ ^warning: ignoring
Original file line number Diff line number Diff line change @@ -1242,7 +1242,8 @@ simplify_exprt::simplify_inequality(const binary_relation_exprt &expr)
12421242 // see if we are comparing pointers that are address_of
12431243 if (
12441244 skip_typecast (tmp0).id () == ID_address_of &&
1245- skip_typecast (tmp1).id () == ID_address_of)
1245+ skip_typecast (tmp1).id () == ID_address_of &&
1246+ (expr.id () == ID_equal || expr.id () == ID_notequal))
12461247 {
12471248 return simplify_inequality_address_of (expr);
12481249 }
You can’t perform that action at this time.
0 commit comments