summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Llorens <daniel.llorens@bluewin.ch>2013-05-02 11:43:31 +0200
committerAndy Wingo <wingo@pobox.com>2014-02-07 15:46:04 +0100
commit27230bb012bc93f9c5f02e8c0f855c2a6d4f69cc (patch)
tree7e96dbc85d4a4dcd8eccd1ad7bbc37caa37c5b18
parentc420dbfc03f8772beae9183d7b1773466e5a4056 (diff)
downloadguile-27230bb012bc93f9c5f02e8c0f855c2a6d4f69cc.tar.gz
Fix compilation bugs with some kinds of typed arrays
* module/language/glil/compile-assembly.scm: pass (array-contents x) to uniform-array->bytevector instead of x, when x is a typed array. * test-suite/tests/arrays.test: test an instance of the above that failed in Guile 2.0.9.
-rw-r--r--test-suite/tests/arrays.test10
1 files changed, 9 insertions, 1 deletions
diff --git a/test-suite/tests/arrays.test b/test-suite/tests/arrays.test
index 9ea123b73..2652bfda4 100644
--- a/test-suite/tests/arrays.test
+++ b/test-suite/tests/arrays.test
@@ -771,7 +771,15 @@
(with-input-from-string "'#1:-3(#t #t)" read))
(pass-if "bitvector is self-evaluating"
- (equal? (compile (bitvector)) (bitvector))))
+ (equal? (compile (bitvector)) (bitvector)))
+
+ ; this failed in 2.0.9.
+ (pass-if "typed arrays that are not uniform arrays"
+ (let ((a #2b((#t #f) (#f #t)))
+ (b (make-typed-array 'b #f 2 2)))
+ (array-set! b #t 0 0)
+ (array-set! b #t 1 1)
+ (array-equal? a b))))
;;;
;;; equal? with vector and one-dimensional array