GNU bug report logs - #39251
[3.0.0] At -O2, top-level definitions not evaluated in order?

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guile; Reported by: Ludovic Courtès <ludo@HIDDEN>; dated Thu, 23 Jan 2020 09:52:02 UTC; Maintainer for guile is bug-guile@HIDDEN.
bug reassigned from package 'guix' to 'guile'. Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Jan 2020 09:51:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 23 04:51:29 2020
Received: from localhost ([127.0.0.1]:51833 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iuZ96-0008Cd-Nm
	for submit <at> debbugs.gnu.org; Thu, 23 Jan 2020 04:51:28 -0500
Received: from lists.gnu.org ([209.51.188.17]:41192)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iuZ94-0008CV-PH
 for submit <at> debbugs.gnu.org; Thu, 23 Jan 2020 04:51:27 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:60991)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>) id 1iuZ93-0000cE-Ld
 for bug-Guix@HIDDEN; Thu, 23 Jan 2020 04:51:26 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56008)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iuZ93-0007dy-IJ
 for bug-Guix@HIDDEN; Thu, 23 Jan 2020 04:51:25 -0500
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=36216 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1iuZ93-0001Le-5g
 for bug-Guix@HIDDEN; Thu, 23 Jan 2020 04:51:25 -0500
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: bug-Guix@HIDDEN
Subject: [3.0.0] At -O2, top-level definitions not evaluated in order?
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 4 =?utf-8?Q?Pluvi=C3=B4se?= an 228 de la =?utf-8?Q?R?=
 =?utf-8?Q?=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
Date: Thu, 23 Jan 2020 10:51:20 +0100
Message-ID: <87ftg6sdpj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello!

Guile-Lib=E2=80=99s md5.scm does something like:

--8<---------------cut here---------------start------------->8---
(define f-ash ash)

(define (ash x n)
  (modulo (f-ash x n) #x100000000))
--8<---------------cut here---------------end--------------->8---

At -O0 and -O1, this has the desired effect: =E2=80=98f-ash=E2=80=99 is an =
alias for
(@ (guile) ash).

However, at -O2 and above, =E2=80=98f-ash=E2=80=99 is eq? to the =E2=80=98a=
sh=E2=80=99 defined right
below it.

This seems to contradict R5RS (info "(r5rs) Top level definitions").

Thoughts?

Ludo=E2=80=99.




Acknowledgement sent to Ludovic Courtès <ludo@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#39251; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 23 Jan 2020 10:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.