File tree 1 file changed +16
-2
lines changed
1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 20
20
21
21
#include < util/invariant.h>
22
22
#include < util/namespace.h>
23
- #include < util/symbol_table.h>
24
23
#include < util/source_location.h>
25
- #include < util/std_expr.h>
26
24
#include < util/std_code.h>
25
+ #include < util/std_expr.h>
26
+ #include < util/symbol_table.h>
27
+ #include < util/validate.h>
27
28
28
29
// / The type of an instruction in a GOTO program.
29
30
enum goto_program_instruction_typet
@@ -407,6 +408,19 @@ class goto_programt
407
408
{
408
409
validate_code_full_pick (code, ns, vm);
409
410
validate_expr_full_pick (guard, ns, vm);
411
+
412
+ switch (type)
413
+ {
414
+ case ASSIGN:
415
+ DATA_CHECK (
416
+ code.id () == ID_assign,
417
+ " assign instruction should contain an assign statement" );
418
+ DATA_CHECK (
419
+ targets.empty (), " assign instruction should not have a target" );
420
+ break ;
421
+ default :
422
+ break ;
423
+ }
410
424
}
411
425
};
412
426
You can’t perform that action at this time.
0 commit comments