From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jan Nieuwenhuizen Newsgroups: gmane.lisp.guile.bugs Subject: bug#31474: logxor+ash trigger compilation bug? Date: Wed, 16 May 2018 20:16:31 +0200 Message-ID: <87y3gj8o00.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1526494575 14776 195.159.176.226 (16 May 2018 18:16:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 16 May 2018 18:16:15 +0000 (UTC) To: 31474@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed May 16 20:16:11 2018 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fJ0yA-0003mM-RN for guile-bugs@m.gmane.org; Wed, 16 May 2018 20:16:10 +0200 Original-Received: from localhost ([::1]:60886 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJ10I-0005Ju-0s for guile-bugs@m.gmane.org; Wed, 16 May 2018 14:18:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJ0z4-0004mD-70 for bug-guile@gnu.org; Wed, 16 May 2018 14:17:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fJ0z0-000854-30 for bug-guile@gnu.org; Wed, 16 May 2018 14:17:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57936) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fJ0yz-000850-V2 for bug-guile@gnu.org; Wed, 16 May 2018 14:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fJ0yz-0003jE-OO for bug-guile@gnu.org; Wed, 16 May 2018 14:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 16 May 2018 18:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 31474 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.152649461214310 (code B ref -1); Wed, 16 May 2018 18:17:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 May 2018 18:16:52 +0000 Original-Received: from localhost ([127.0.0.1]:37600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fJ0yp-0003ik-Pi for submit@debbugs.gnu.org; Wed, 16 May 2018 14:16:52 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55535) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fJ0yo-0003iW-Ae for submit@debbugs.gnu.org; Wed, 16 May 2018 14:16:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fJ0yi-00082h-5v for submit@debbugs.gnu.org; Wed, 16 May 2018 14:16:45 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:35771) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fJ0yi-00082d-24 for submit@debbugs.gnu.org; Wed, 16 May 2018 14:16:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJ0yg-0004Zm-SX for bug-guile@gnu.org; Wed, 16 May 2018 14:16:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fJ0yf-00081y-MN for bug-guile@gnu.org; Wed, 16 May 2018 14:16:42 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJ0yX-0007zI-Lb; Wed, 16 May 2018 14:16:33 -0400 Original-Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=53332 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fJ0yX-0003As-7l; Wed, 16 May 2018 14:16:33 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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: 208.118.235.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.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:9042 Archived-At: Hi! Trying to implement bit-fields for MesCC, I stumble upon this. I was looking for a bitwise left shift that introduces 1's instead of zeros. This code --8<---------------cut here---------------start------------->8--- ;; foo.scm (let* ((set-mask (pk 'set-mask (ash 3 3))) (clear-mask (pk 'clear-mask (logxor set-mask -1)))) (pk 'expected (logxor 24 -1)) (display clear-mask) (newline) clear-mask) --8<---------------cut here---------------end--------------->8--- behaves as I expect when compilation is turned off (compile or auto-compile behave alike for me) --8<---------------cut here---------------start------------->8--- 19:50:43 janneke@dundal:~/src/mes=20 $ guile --no-auto-compile foo.scm ;;; (set-mask 24) ;;; (clear-mask -25) ;;; (expected -25) -25 --8<---------------cut here---------------end--------------->8--- but when (auto)compiled, look: --8<---------------cut here---------------start------------->8--- 19:50:47 janneke@dundal:~/src/mes=20 $ guile foo.scm ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=3D0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /home/janneke/src/mes/foo.scm ;;; compiled /home/janneke/.cache/guile/ccache/2.2-LE-8-3.A/home/janneke/sr= c/mes/foo.scm.go ;;; (set-mask 24) ;;; (clear-mask -1) ;;; (expected -25) -1 --8<---------------cut here---------------end--------------->8--- I'm using guile-2.2.3 from Guix master. Is this a bug, can you suggest a workaround? Greetings, janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com