From 2594c23c95d22f838952b0b335231ba81a657b0d Mon Sep 17 00:00:00 2001 From: xleroy Date: Tue, 7 Feb 2012 13:38:31 +0000 Subject: Initializers: handle By_copy accesses (e.g. for &(glob.field)) C2C: insert the correct Evalof for structs; clean up unused memcpy stuff test/regression: run with interpreter test/regression: add test cas &(glob.field) to initializers.c git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1815 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- cfrontend/Initializers.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cfrontend/Initializers.v') diff --git a/cfrontend/Initializers.v b/cfrontend/Initializers.v index e9c40a21..9690ba8d 100644 --- a/cfrontend/Initializers.v +++ b/cfrontend/Initializers.v @@ -58,8 +58,8 @@ Fixpoint constval (a: expr) : res val := end | Evalof l ty => match access_mode ty with - | By_reference => constval l - | _ => Error(msg "dereference operation") + | By_reference | By_copy => constval l + | _ => Error(msg "dereferencing of an l-value") end | Eaddrof l ty => constval l -- cgit