[Openmcl-devel] Problem with array indexing on ARM

Gary Byers gb at clozure.com
Thu Dec 27 21:01:12 PST 2012


Thanks; that should be fixed in r15551.


On Fri, 28 Dec 2012, Waldek Hebisch wrote:

> With the following:
>
> (DEFMACRO |sub_SI| (X Y)
>          `(THE FIXNUM (- (THE FIXNUM ,X) (THE FIXNUM ,Y))))
>
> (defmacro QSETAREF2O (m i j r oi oj)
>    `(setf (aref (the (simple-array T (* *)) ,m)
>                 (|sub_SI| ,i ,oi)
>                 (|sub_SI| ,j ,oj))
>           ,r))
>
> (DEFUN |qsetelt!| (|m| |i| |j| |r|)
>  (QSETAREF2O |m| |i| |j| |r| 1 1))
>
> in file "ts2.lisp" I get:
>
> $ /home/hebisch/lisp/ccl/scripts/ccl
> Welcome to Clozure Common Lisp Version 1.9-dev  (LinuxARM32)!
> ? (compile-file "ts2.lisp")
> #P"/home/hebisch/fricas/axp1/ax-build1/ts2.lafsl"
> NIL
> NIL
> ? (load "ts2.lafsl")
> #P"/home/hebisch/fricas/axp1/ax-build1/ts2.lafsl"
> ? (setf m (make-array '(2 2)))
> #2A((0 0) (0 0))
> ? (|qsetelt!| m 2 2 17)
> 17
> ? m
> #2A((0 17) (0 0))
>
>
> So, an elemnt of the first row is modified instead of element
> of the second row.
>
> This is on Raspberry Pi using recent trunk recompiled to use
> hard float ABI.
>
> --
>                              Waldek Hebisch
> hebisch at math.uni.wroc.pl
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list