From f43fcb78f685f08cafd0a57b0a0691cb7336fa93 Mon Sep 17 00:00:00 2001 From: Adrien Guatto Date: Wed, 8 Feb 2012 18:31:51 +0100 Subject: [PATCH] Only inline integer extvalues when unrolling --- compiler/obc/c/cgen.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/obc/c/cgen.ml b/compiler/obc/c/cgen.ml index e909d89..31a51fe 100644 --- a/compiler/obc/c/cgen.ml +++ b/compiler/obc/c/cgen.ml @@ -243,7 +243,7 @@ let rec cexpr_of_static_exp se = (List.fold_left (fun cc n -> Carraylit (repeat_list cc (int_of_static_exp n))) (cexpr_of_static_exp c) n_list) | Svar ln -> - if !Compiler_options.unroll_loops + if !Compiler_options.unroll_loops && se.se_ty = Initial.tint then cexpr_of_static_exp (Static.simplify QualEnv.empty (find_const ln).c_value) else Cvar (cname_of_qn ln) | Sop _ ->