Subject: bug#10482: error in output of arrays with rank != 1

From: Daniel Llorens <[email-masked]>
Date: Wed, 11 Jan 2012 18:53:06 +0100

I've found an bug in array output. It's peculiar. I haven't tried to debug it or bisect it, hopefully it rings a bell somewhere. It only happens when the rank of the array is not 1. This was tested in the last stable-2.0 (bbe34).

scheme@(guile-user)> (define c (make-array 0 2 2))
scheme@(guile-user)> c
$1 = #2((0 0) (0 0))
scheme@(guile-user)> c
$2 = #0#

c itself is fine, e.g. (array-dimensions c) gives 2, etc.

Here is a standalone test. 

(let ((c (make-array 0 2 2)))
  (equal?
    c
    (call-with-input-string
      (begin
        (format #f "~a" c) ; works without this
        (format #f "~a" c))
      read)))

Regards,

	Daniel