File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ std::ostream &goto_programt::output_instruction(
74
74
break ;
75
75
76
76
case GOTO:
77
+ case INCOMPLETE_GOTO:
77
78
if (!instruction.get_condition ().is_true ())
78
79
{
79
80
out << " IF " << from_expr (ns, identifier, instruction.get_condition ())
@@ -82,14 +83,20 @@ std::ostream &goto_programt::output_instruction(
82
83
83
84
out << " GOTO " ;
84
85
85
- for (instructiont::targetst::const_iterator
86
- gt_it=instruction.targets .begin ();
87
- gt_it!=instruction.targets .end ();
88
- gt_it++)
86
+ if (instruction.is_incomplete_goto ())
89
87
{
90
- if (gt_it!=instruction.targets .begin ())
91
- out << " , " ;
92
- out << (*gt_it)->target_number ;
88
+ out << " (incomplete)" ;
89
+ }
90
+ else
91
+ {
92
+ for (auto gt_it = instruction.targets .begin ();
93
+ gt_it != instruction.targets .end ();
94
+ gt_it++)
95
+ {
96
+ if (gt_it != instruction.targets .begin ())
97
+ out << " , " ;
98
+ out << (*gt_it)->target_number ;
99
+ }
93
100
}
94
101
95
102
out << ' \n ' ;
@@ -214,9 +221,6 @@ std::ostream &goto_programt::output_instruction(
214
221
case END_THREAD:
215
222
out << " END THREAD" << ' \n ' ;
216
223
break ;
217
-
218
- case INCOMPLETE_GOTO:
219
- UNREACHABLE;
220
224
}
221
225
222
226
return out;
You can’t perform that action at this time.
0 commit comments