aboutsummaryrefslogtreecommitdiffstats
path: root/backend/RTLtypingaux.ml
diff options
context:
space:
mode:
authorxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2011-06-13 18:11:19 +0000
committerxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2011-06-13 18:11:19 +0000
commita5ffc59246b09a389e5f8cbc2f217e323e76990f (patch)
treee1bc7cc54518aad7c20645f187cee8110de8cff9 /backend/RTLtypingaux.ml
parent4daccd62b92b23016d3f343d5691f9c164a8a951 (diff)
downloadcompcert-a5ffc59246b09a389e5f8cbc2f217e323e76990f.tar.gz
compcert-a5ffc59246b09a389e5f8cbc2f217e323e76990f.zip
Revised handling of annotation statements, and more generally built-in functions, and more generally external functions
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1672 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'backend/RTLtypingaux.ml')
-rw-r--r--backend/RTLtypingaux.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/backend/RTLtypingaux.ml b/backend/RTLtypingaux.ml
index 7549ff49..17acbc6e 100644
--- a/backend/RTLtypingaux.ml
+++ b/backend/RTLtypingaux.ml
@@ -20,6 +20,7 @@ open Memdata
open Op
open Registers
open RTL
+open PrintAST
exception Type_error of string
@@ -93,11 +94,11 @@ let type_instr retty (Coq_pair(pc, i)) =
let sg = ef_sig ef in
set_types args sg.sig_args;
set_type res (match sg.sig_res with None -> Tint | Some ty -> ty);
- if not (Conventions.arity_ok sg.sig_args) then
+ if ef_reloads ef && not (Conventions.arity_ok sg.sig_args) then
raise(Type_error "wrong arity")
with Type_error msg ->
raise(Type_error (Printf.sprintf "type mismatch in Ibuiltin(%s): %s"
- (extern_atom ef.ef_id) msg))
+ (name_of_external ef) msg))
end
| Icond(cond, args, _, _) ->
set_types args (type_of_condition cond)