From 1f415533c733c29d10f379642f8caa2ab995fcc3 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Sat, 7 Mar 2009 20:04:17 +0000 Subject: [PATCH] we have to be able to fold EXPR_INVALID since we report is as constant [r25612] --- ast2firm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ast2firm.c b/ast2firm.c index c17d3a4..f827514 100644 --- a/ast2firm.c +++ b/ast2firm.c @@ -3088,6 +3088,9 @@ static void init_ir_types(void); long fold_constant(const expression_t *expression) { + if (expression->kind == EXPR_INVALID) + return 0; + assert(is_type_valid(skip_typeref(expression->base.type))); bool constant_folding_old = constant_folding; -- 2.20.1