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: Tue, 30 Mar 2010 19:08:45 +0300 Organization: JURTA Message-ID: <871vf2jayi.fsf@mail.jurta.org> References: <87ocifjx74.fsf@mail.jurta.org> <87k4t027r0.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 1269966429 32416 80.91.229.12 (30 Mar 2010 16:27:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 30 Mar 2010 16:27:09 +0000 (UTC) Cc: Shigeru Fukaya To: 5754@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 30 18:27:05 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 1NweHQ-0002ce-5Z for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Mar 2010 18:27:04 +0200 Original-Received: from localhost ([127.0.0.1]:44661 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NweHP-0000Se-HY for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Mar 2010 12:27:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NweGA-0008Pz-9k for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2010 12:25:46 -0400 Original-Received: from [140.186.70.92] (port=50298 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NweG8-0008PB-II for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2010 12:25:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NweG3-000342-Iw for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2010 12:25:44 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55822) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NweG3-00033x-Gn for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2010 12:25:39 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NweBa-0002Iu-CB; Tue, 30 Mar 2010 12:21:02 -0400 X-Loop: help-debbugs@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: Tue, 30 Mar 2010 16:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@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.12699660438850 (code B ref 5754); Tue, 30 Mar 2010 16:21:02 +0000 Original-Received: (at 5754) by debbugs.gnu.org; 30 Mar 2010 16:20:43 +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 1NweBG-0002Ih-OD for submit@debbugs.gnu.org; Tue, 30 Mar 2010 12:20:42 -0400 Original-Received: from smtp-out1.starman.ee ([85.253.0.3] helo=mx1.starman.ee) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NweBE-0002Ia-4A for 5754@debbugs.gnu.org; Tue, 30 Mar 2010 12:20:40 -0400 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.68.10.cable.starman.ee [82.131.68.10]) by mx1.starman.ee (Postfix) with ESMTP id C7E663F4080; Tue, 30 Mar 2010 19:20:30 +0300 (EEST) In-Reply-To: <87k4t027r0.fsf@mail.jurta.org> (Juri Linkov's message of "Thu, 25 Mar 2010 09:19:11 +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: Tue, 30 Mar 2010 12:21: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:35815 Archived-At: I see that this was extensively discussed in bug#1334, so I Cc:ed Shigeru Fukaya. Shigeru, are you interested in looking at the test failure reported by bytecomp-testsuite.el? >> 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 >> >> In GNU Emacs 24.0.50 (x86_64-pc-linux-gnu) of 2010-03-23 > > 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/