From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#5754: Bytecomp Arithmetic test failed Date: Thu, 25 Mar 2010 09:19:11 +0200 Organization: JURTA Message-ID: <87k4t027r0.fsf@mail.jurta.org> References: <87ocifjx74.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1269504512 21508 80.91.229.12 (25 Mar 2010 08:08:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 25 Mar 2010 08:08:32 +0000 (UTC) To: 5754@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 25 09:08:27 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nui79-0002dU-BP for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Mar 2010 09:08:27 +0100 Original-Received: from localhost ([127.0.0.1]:42240 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nui78-0007Zm-DD for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Mar 2010 04:08:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NuhuW-00049c-3x for bug-gnu-emacs@gnu.org; Thu, 25 Mar 2010 03:55:25 -0400 Original-Received: from [140.186.70.92] (port=47488 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuhuT-00048y-FN for bug-gnu-emacs@gnu.org; Thu, 25 Mar 2010 03:55:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NuhuR-0006W0-RC for bug-gnu-emacs@gnu.org; Thu, 25 Mar 2010 03:55:21 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48894) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NuhuR-0006Vu-Ok for bug-gnu-emacs@gnu.org; Thu, 25 Mar 2010 03:55:19 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NuhS6-00009R-FK; Thu, 25 Mar 2010 03:26:02 -0400 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Mar 2010 07:26:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-GNU-PR-Message: followup 5754 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 5754-submit@debbugs.gnu.org id=B5754.1269501922575 (code B ref 5754); Thu, 25 Mar 2010 07:26:02 +0000 Original-Received: (at 5754) by debbugs.gnu.org; 25 Mar 2010 07:25:22 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NuhRR-00009E-IK for submit@debbugs.gnu.org; Thu, 25 Mar 2010 03:25:21 -0400 Original-Received: from smtp-out2.starman.ee ([85.253.0.4] helo=mx2.starman.ee) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NuhRP-000098-Vi for 5754@debbugs.gnu.org; Thu, 25 Mar 2010 03:25:20 -0400 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Original-Received: from mail.starman.ee (82.131.30.101.cable.starman.ee [82.131.30.101]) by mx2.starman.ee (Postfix) with ESMTP id A21A43F40C6 for <5754@debbugs.gnu.org>; Thu, 25 Mar 2010 09:25:09 +0200 (EET) In-Reply-To: <87ocifjx74.fsf@mail.jurta.org> (Juri Linkov's message of "Tue, 23 Mar 2010 09:47:59 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 25 Mar 2010 03:26:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35752 Archived-At: > I tried to run some tests in the `test' subdir, > and `bytecomp-testsuite-run' in `test/bytecomp-testsuite.el' fails > on one test: (let ((a (expt 2 -1074)) (b 0.125)) (* a 8 b)) > returns 5e-324 when evaluated by interpreter, > but after byte-compilation returns 0.0 This bug is caused by optimization in byte-compilation that changes the order of function arguments. It byte-compiles (let ((a (expt 2 -1074)) (b 0.125)) (* a 8 b)) to 0 constant expt 1 constant 2 2 constant -1074 3 call 2 4 constant 0.125 5 varbind b 6 varbind a 7 constant * 8 varref a 9 varref b 10 constant 8 11 call 3 12 unbind 2 13 return where the order of arguments 8-10 is changed from (* a 8 b) to (* a b 8) For this test the different order of arguments changes the returned value: (funcall '* 5e-324 8 0.125) => 5e-324 (funcall '* 5e-324 0.125 8) => 0.0 -- Juri Linkov http://www.jurta.org/emacs/