Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ic4f9b178d918b2c7c9dd27bc6a30c1798a171727
bracket_node != NULL;
bracket_node = bracket_node->u.expression.next_bracket) {
prev_op = load_exp_op;
+ if (bracket_node->type != NODE_EXPRESSION ||
+ bracket_node->u.expression.type != AST_EXP_CONSTANT) {
+ fprintf(stderr, "[error] Expecting constant index in array expression\n");
+ goto error;
+ }
load_exp_op = calloc(sizeof(struct ir_load_expression_op), 1);
if (!load_exp_op)
goto error;