From 381e4e84f70db27f05335c8c06e199b58eb6d5fe Mon Sep 17 00:00:00 2001 From: Adrien Guatto Date: Sat, 2 Oct 2010 13:22:04 +0200 Subject: [PATCH] Csubst: added missing recursive call for array indexes. --- compiler/obc/c/csubst.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/obc/c/csubst.ml b/compiler/obc/c/csubst.ml index 38a44b7..71829ab 100644 --- a/compiler/obc/c/csubst.ml +++ b/compiler/obc/c/csubst.ml @@ -29,7 +29,7 @@ and subst_lhs map lhs = | Cvar n -> if NamesEnv.mem n map then NamesEnv.find n map else lhs | Cfield (lhs, s) -> Cfield (subst_lhs map lhs, s) - | Carray (lhs, n) -> Carray (subst_lhs map lhs, n) + | Carray (lhs, n) -> Carray (subst_lhs map lhs, subst_exp map n) | Cderef lhs -> Cderef (subst_lhs map lhs) and subst_exp map = function