From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q3GFr0VH010733 for ; Mon, 16 Apr 2012 17:53:00 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiAEAPE/jE/CYk3SgWdsb2JhbABCgyiwHCIBARYmJ4I3EUA9FhgDAgECAVgIAQGIDpw8mHuOJYMkBJtfjSw X-IronPort-AV: E=Sophos;i="4.75,428,1330902000"; d="scan'208";a="140404778" Received: from mel.act-europe.fr ([194.98.77.210]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-CAMELLIA256-SHA; 16 Apr 2012 17:52:54 +0200 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 847EB290069 for ; Mon, 16 Apr 2012 17:52:59 +0200 (CEST) X-Virus-Scanned: amavisd-new at eu.adacore.com Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yUcRtkTr5ZSl for ; Mon, 16 Apr 2012 17:52:59 +0200 (CEST) Received: from [10.10.127.248] (dhcp-guest-248.act-europe.fr [10.10.127.248]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 7272D290068 for ; Mon, 16 Apr 2012 17:52:59 +0200 (CEST) Message-ID: <4F8C4054.6010407@lri.fr> Date: Mon, 16 Apr 2012 17:52:52 +0200 From: Claire Dross User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120313 Thunderbird/3.1.20 MIME-Version: 1.0 To: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Caml-list] Problem with the compiler 3.12.1 Hello, I am new to caml-list, so sorry in advance if it is not the right place to make this post. In a quite important piece of ocaml code, I have a function: let matching_term terms env uf id (pats, subst) (seen, forms) = match pats, subst with | _, [] | [], _ -> seen, forms | t :: pats, _ -> fprintf fmt " %a@." T.print t; let acc = matchpats env terms uf (subst, seen, id+1) t in let acc, seen, _ = List.fold_left (matchpats env env.fils uf) acc pats in seen, List.rev_append acc forms Removing the print in the second case of the match changes the result of the compiled file (compiler 3.12.1) on one of my tests. T.print does not have side effects, it recursively prints a hashconsed term structure. Do you have any idea of what the problem is ? Thanks a lot, Claire Dross