Compiler bug involving double-float type
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
An unexpected compilation error occurs with the SBCL version reported
below, obtained today from GitHub, on MacOS 10.15.7. But there is no
such error with SBCL 2.4.6 (released) on my Mac, or with SBCL 2.4.9
(released) on Linux. Perhaps the error is related to recent
improvements to avoid boxing of double-floats.
To see the error, evaluate the following forms.
(declaim (ftype (function (double-float t t t t t) *)
(defun foo (scalar i row xpad xi xrow)
(declare (type double-float scalar)
xrow)
(defun bar (scalar i row xpad xi xrow)
(foo (float scalar 0.0d0) i row xpad xi xrow))
The last of these has produced the following unexpected error.
* (defun bar (scalar i row xpad xi xrow)
(foo (float scalar 0.0d0) i row xpad xi xrow))
debugger invoked on a SIMPLE-ERROR in thread
#<THREAD tid=775 "main thread" RUNNING {1001890003}>:
#<SB-C:TN t1[RCX(d)] :NORMAL> is wired to location 1 in SC #<STORAGE-CLASS
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [ABORT] Exit debugger, returning to top level.
(SB-REGALLOC:
0]
Here is information on version, OS, and *features*.
~/temp/
SBCL 2.4.9.36-465757f12
~/temp/
Darwin Matts-MacBook-
~/temp/
This is SBCL 2.4.9.36-465757f12, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* *features*
(:ARENA-ALLOCATOR :X86-64 :GENCGC :64-BIT :ANSI-CL :BSD :COMMON-LISP :DARWIN
:IEEE-
:SB-PACKAGE-LOCKS :SB-THREAD :SB-UNICODE :SBCL :UNIX)
*
Interestingly, if one argument is omitted as follows, then the error
disappears.
(declaim (ftype (function (double-float t t t t) *)
(defun foo (scalar i row xi xrow)
(declare (type double-float scalar)
xrow)
(defun bar (scalar i row xi xrow)
(foo (float scalar 0.0d0) i row xi xrow))
Changed in sbcl: | |
status: | New → Fix Released |
I should have noted that I always build SBCL from source, as follows:
sh make.sh --without- immobile- space --without- immobile- code --without- compact- instance- header