- ir_node *const body_block = new_immBlock();
-
- ir_node *const old_continue_label = continue_label;
- ir_node *const old_break_label = break_label;
- continue_label = step_block;
- break_label = false_block;
-
- statement_to_firm(statement->body);
-
- assert(continue_label == step_block);
- assert(break_label == false_block);
- continue_label = old_continue_label;
- break_label = old_break_label;
-
- if (get_cur_block() != NULL) {
- ir_node *const jmp = new_Jmp();
- add_immBlock_pred(step_block, jmp);
+ ir_node * body_block;
+ if (statement->body != NULL) {
+ ir_node *const old_continue_label = continue_label;
+ ir_node *const old_break_label = break_label;
+ continue_label = step_block;
+ break_label = false_block;
+
+ body_block = new_immBlock();
+ statement_to_firm(statement->body);
+
+ assert(continue_label == step_block);
+ assert(break_label == false_block);
+ continue_label = old_continue_label;
+ break_label = old_break_label;
+
+ if (get_cur_block() != NULL) {
+ ir_node *const jmp = new_Jmp();
+ add_immBlock_pred(step_block, jmp);
+ }
+ } else {
+ body_block = step_block;