From e313c717efec50676fb101df1cd399b2c376dc2b Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Mon, 19 Nov 2018 16:00:26 +0000 Subject: Ensure sizeof re-writing occurs for configuration registers --- src/rewrites.ml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/rewrites.ml b/src/rewrites.ml index 591b86a7..53a20465 100644 --- a/src/rewrites.ml +++ b/src/rewrites.ml @@ -649,6 +649,9 @@ let rewrite_sizeof (Defs defs) = LB_val (pat, exp') in (params_map, defs @ [DEF_val (LB_aux (lb', annot))]) end + | DEF_reg_dec (DEC_aux (DEC_config (id, typ, exp), annot)) -> + let exp' = fst (fold_exp { copy_exp_alg with e_aux = e_app_aux params_map } exp) in + (params_map, defs @ [DEF_reg_dec (DEC_aux (DEC_config (id, typ, exp'), annot))]) | def -> (params_map, defs @ [def]) in -- cgit v1.2.3