From 3a050b22f37f3c79a10a8ebae3d292fa77e91b76 Mon Sep 17 00:00:00 2001 From: xleroy Date: Sun, 23 May 2010 15:26:33 +0000 Subject: More faithful semantics for volatile reads and writes. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1346 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- cfrontend/Ctyping.v | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cfrontend/Ctyping.v') diff --git a/cfrontend/Ctyping.v b/cfrontend/Ctyping.v index 2bb9a9d4..b147fbda 100644 --- a/cfrontend/Ctyping.v +++ b/cfrontend/Ctyping.v @@ -159,11 +159,11 @@ Inductive wt_fundef: typenv -> fundef -> Prop := wt_fundef env (External id args res). Definition add_global_var - (env: typenv) (id_ty_init: ident * list init_data * type) : typenv := - match id_ty_init with (id, init, ty) => PTree.set id ty env end. + (env: typenv) (id_v: ident * globvar type) : typenv := + PTree.set (fst id_v) (gvar_info (snd id_v)) env. Definition add_global_vars - (env: typenv) (vars: list(ident * list init_data * type)) : typenv := + (env: typenv) (vars: list(ident * globvar type)) : typenv := List.fold_left add_global_var vars env. Definition add_global_fun -- cgit