From: <tomas@tuxteam.de>
To: 62053@debbugs.gnu.org
Subject: bug#62053: Guile compiler is unable to compile tiny program
Date: Wed, 8 Mar 2023 17:41:19 +0100 [thread overview]
Message-ID: <ZAi6r0pSjEbrMJiD@tuxteam.de> (raw)
In-Reply-To: <1678273676.721226645@f141.i.mail.ru>
[-- Attachment #1: Type: text/plain, Size: 2176 bytes --]
On Wed, Mar 08, 2023 at 02:07:56PM +0300, var-vniiaes--- via Bug reports for GUILE, GNU's Ubiquitous Extension Language wrote:
>
> Guile compiler is unable to compile tiny program:
>
> (define (fn l)
> (define (ok l)
> (or (and (pair? l) l)
> (error "list is empty")))
> (cons (reverse (car l)) (ok l)))
>
> amaya@picasso:~/tmp/guile-3.0.9
> $ ../prefix/bin/guile ~/tmp/guile-compiler-bug.scm
> ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
> ;;; or pass the --no-auto-compile argument to disable.
> ;;; compiling /home/amaya/tmp/guile-compiler-bug.scm
> ;;; WARNING: compilation of /home/amaya/tmp/guile-compiler-bug.scm failed:
> ;;; not found 22
>
> Compiler reports confusing message here: `not found 22’.
Bizarre. Can confirm
tomas@trotzki:~/foo$ vim buggy.scm
tomas@trotzki:~/foo$ guile buggy.scm
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;; or pass the --no-auto-compile argument to disable.
;;; compiling /home/tomas/foo/buggy.scm
;;; /home/tomas/foo/buggy.scm:2:0: warning: possibly unbound variable `#{ }#'
;;; /home/tomas/foo/buggy.scm:3:0: warning: possibly unbound variable `#{ }#'
;;; /home/tomas/foo/buggy.scm:4:0: warning: possibly unbound variable `#{ }#'
;;; WARNING: compilation of /home/tomas/foo/buggy.scm failed:
;;; not found 25
tomas@trotzki:~/foo$ guile --version
guile (GNU Guile) 3.0.8.57-bc3b1
Copyright (C) 2022 Free Software Foundation, Inc.
License LGPLv3+: GNU LGPL 3 or later <http://gnu.org/licenses/lgpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
(so in my case it's 25 instead of 22). Interestingly, my version also
produces warnings about possibly unbound variables). If I enter the
code line by line into a repl, I also get a "not found 22".
Interestingly, if I add a call to fn to the end of that snippet
(e.g. (fn '(a b))), the "not found" disappears. The unbound var
warnings stay.
Cheers
--
t
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2023-03-08 16:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-08 11:07 bug#62053: Guile compiler is unable to compile tiny program var-vniiaes--- via Bug reports for GUILE, GNU's Ubiquitous Extension Language
2023-03-08 16:41 ` tomas [this message]
2023-03-08 17:38 ` Dr. Arne Babenhauserheide
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZAi6r0pSjEbrMJiD@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=62053@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).