From 4d9d0bdc7d9f29d0c7179a1b7d28b0f3336f0303 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Wed, 14 Nov 2007 19:26:28 +0000 Subject: [PATCH] Handle empty step in for statements when building IR. [r18396] --- ast2firm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ast2firm.c b/ast2firm.c index 999e75a..dc5d02f 100644 --- a/ast2firm.c +++ b/ast2firm.c @@ -1471,7 +1471,9 @@ static void for_statement_to_firm(for_statement_t *statement) /* create the step block */ ir_node *const step_block = new_immBlock(); - expression_to_firm(statement->step); + if (statement->step != NULL) { + expression_to_firm(statement->step); + } ir_node *const step_jmp = new_Jmp(); /* create the header block */ -- 2.20.1