From caae4ceee630400519fd47528dadedc62149c00b Mon Sep 17 00:00:00 2001 From: Daniel Kroening Date: Thu, 3 Jan 2019 13:17:42 +0000 Subject: [PATCH] strengthen assignment type consistency The previous check for type consistency of assignments uses base_type_eq, which permits the expansion of tag types. This expansion makes dealing with such types prone to error and costs memory and performance. --- src/util/std_code.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/std_code.h b/src/util/std_code.h index f847bcec8c6..49b1ae8abf1 100644 --- a/src/util/std_code.h +++ b/src/util/std_code.h @@ -303,7 +303,7 @@ class code_assignt:public codet DATA_CHECK( vm, - base_type_eq(code.op0().type(), code.op1().type(), ns), + code.op0().type() == code.op1().type(), "lhs and rhs of assignment must have same type"); }