From 5fccbcb628c5282cf1b13077d5eeccf497d58c38 Mon Sep 17 00:00:00 2001 From: xleroy Date: Thu, 14 Jul 2011 14:00:57 +0000 Subject: Fix treatment of function pointers at function calls in the CompCert C and Clight semantics git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1680 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- cfrontend/Csem.v | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cfrontend/Csem.v') diff --git a/cfrontend/Csem.v b/cfrontend/Csem.v index 3a3ba3b0..33d8e534 100644 --- a/cfrontend/Csem.v +++ b/cfrontend/Csem.v @@ -722,11 +722,12 @@ Inductive cast_arguments: exprlist -> typelist -> list val -> Prop := cast_arguments (Econs (Eval v ty) el) (Tcons targ1 targs) (v1 :: vl). Inductive callred: expr -> fundef -> list val -> type -> Prop := - | red_Ecall: forall vf tyargs tyres el ty fd vargs, + | red_Ecall: forall vf tyf tyargs tyres el ty fd vargs, Genv.find_funct ge vf = Some fd -> cast_arguments el tyargs vargs -> type_of_fundef fd = Tfunction tyargs tyres -> - callred (Ecall (Eval vf (Tfunction tyargs tyres)) el ty) + classify_fun tyf = fun_case_f tyargs tyres -> + callred (Ecall (Eval vf tyf) el ty) fd vargs ty. (** Reduction contexts. In accordance with C's nondeterministic semantics, -- cgit