Skip to content

Commit c8e0866

Browse files
committed
DEBUGGING
1 parent 43b64a6 commit c8e0866

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

src/util/simplify_expr.cpp

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ Author: Daniel Kroening, [email protected]
2929

3030
// #define DEBUGX
3131

32-
#ifdef DEBUGX
32+
//#ifdef DEBUGX
3333
#include "format_expr.h"
3434
#include <iostream>
35-
#endif
35+
//#endif
3636

3737
#include "simplify_expr_class.h"
3838

@@ -2306,7 +2306,27 @@ bool simplify_exprt::simplify_rec(exprt &expr)
23062306

23072307
if(!result)
23082308
{
2309-
POSTCONDITION(type_eq(tmp.type(), expr.type(), ns));
2309+
#if 0
2310+
if(tmp.type().id() == ID_pointer && expr.type().id() == ID_pointer)
2311+
{
2312+
const pointer_typet &old_type = to_pointer_type(expr.type());
2313+
const pointer_typet &new_type = to_pointer_type(tmp.type());
2314+
POSTCONDITION(old_type.get_width() == new_type.get_width());
2315+
POSTCONDITION(type_eq(old_type.subtype(), new_type.subtype(), ns));
2316+
}
2317+
else
2318+
{
2319+
#endif
2320+
if(tmp.type() != expr.type())
2321+
{
2322+
std::cerr << "expr=" << expr.pretty() << std::endl;
2323+
std::cerr << "tmp=" << tmp.pretty() << std::endl;
2324+
std::cerr << "AFTER SIMP: " << expr.id() << " to " << tmp.id() << std::endl;
2325+
}
2326+
POSTCONDITION(type_eq(tmp.type(), expr.type(), ns));
2327+
POSTCONDITION(tmp.type() == expr.type());
2328+
//}
2329+
//POSTCONDITION(type_eq(tmp.type(), expr.type(), ns));
23102330
expr.swap(tmp);
23112331

23122332
#ifdef USE_CACHE

0 commit comments

Comments
 (0)