From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#39947: [3.0.0] Compiler mishandles literal bignums passed to =?UTF-8?Q?=E2=80=98ash=E2=80=99?= Date: Fri, 06 Mar 2020 15:00:29 +0100 Message-ID: <8736aloa6a.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="90324"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) To: 39947@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Fri Mar 06 15:01:14 2020 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jADXO-000NJT-CZ for guile-bugs@m.gmane-mx.org; Fri, 06 Mar 2020 15:01:14 +0100 Original-Received: from localhost ([::1]:37184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jADXN-0001G8-C1 for guile-bugs@m.gmane-mx.org; Fri, 06 Mar 2020 09:01:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38955) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jADXE-0001Fj-7i for bug-guile@gnu.org; Fri, 06 Mar 2020 09:01:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jADXD-0002mV-5U for bug-guile@gnu.org; Fri, 06 Mar 2020 09:01:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38279) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jADXD-0002iV-1u for bug-guile@gnu.org; Fri, 06 Mar 2020 09:01:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jADXB-0007n8-VV for bug-guile@gnu.org; Fri, 06 Mar 2020 09:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 06 Mar 2020 14:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39947 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.158350323729909 (code B ref -1); Fri, 06 Mar 2020 14:01:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Mar 2020 14:00:37 +0000 Original-Received: from localhost ([127.0.0.1]:44252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jADWn-0007mL-D1 for submit@debbugs.gnu.org; Fri, 06 Mar 2020 09:00:37 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:44791) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jADWl-0007mD-Bc for submit@debbugs.gnu.org; Fri, 06 Mar 2020 09:00:36 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38563) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jADWj-00013l-Tk for bug-guile@gnu.org; Fri, 06 Mar 2020 09:00:35 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jADWj-0001S6-Q6 for bug-guile@gnu.org; Fri, 06 Mar 2020 09:00:33 -0500 Original-Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=60256 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jADWh-0005MA-FV for bug-guile@gnu.org; Fri, 06 Mar 2020 09:00:32 -0500 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 17 =?UTF-8?Q?Vent=C3=B4se?= an 228 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9610 Archived-At: Hello, Consider this: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (compile `(ash 1 ,(expt 2 64)) #:to 'value) ice-9/boot-9.scm:1669:16: In procedure raise-exception: In procedure bytevector-u32-native-set!: Argument 3 out of range: 4294967296 Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user) [1]> ,bt In system/base/compile.scm: 255:6 8 (compile _ #:from _ #:to _ #:env _ #:opts _) 183:32 7 (compile-fold _ _ # ()) In language/cps/compile-bytecode.scm: 50:2 6 (emit-bytecode # # ()) 686:23 5 (_ _ _ _) In language/cps/intmap.scm: 519:5 4 (visit-branch #(# # # =E2=80=A6) =E2=80=A6) In language/cps/compile-bytecode.scm: 50:34 3 (_ 3 # _) 232:9 2 (compile-cont _ _) In system/vm/assembler.scm: 800:0 1 (encode-X8_S24-AU32-BU32 #< buf: #u32(1 0 1048845 393528 = 62 2020111201 1835364909 560297583 1=E2=80=A6> =E2=80=A6) In ice-9/boot-9.scm: 1669:16 0 (raise-exception _ #:continuable? _) scheme@(guile-user) [1]> %host-type $2 =3D "x86_64-unknown-linux-gnu" scheme@(guile-user) [1]> (version) $3 =3D "3.0.0" --8<---------------cut here---------------end--------------->8--- It seems to me that the problem is that the compiler emits =E2=80=98lsh/immediate=E2=80=99 (which expects a u64) instead of =E2=80=98l= sh=E2=80=99. Ludo=E2=80=99.