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

Previous Next

Package: guile;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Thu, 23 Jan 2020 09:52:02 UTC

Severity: normal

Merged with 39997

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: bug-Guix <at> gnu.org
Subject: [3.0.0] At -O2, top-level definitions not evaluated in order?
Date: Thu, 23 Jan 2020 10:51:20 +0100
Hello!

Guile-Lib’s 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: ‘f-ash’ is an alias for
(@ (guile) ash).

However, at -O2 and above, ‘f-ash’ is eq? to the ‘ash’ defined right
below it.

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

Thoughts?

Ludo’.




This bug report was last modified 5 years and 95 days ago.

Previous Next


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