gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gcl-devel] (random tester) Another compiler side effects bug


From: Camm Maguire
Subject: Re: [Gcl-devel] (random tester) Another compiler side effects bug
Date: 30 Oct 2003 08:59:16 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Thanks Paul, I'll take a look at this.

Just for my information, about how many iterations passed before this
turned up? 

Take care,

"Paul F. Dietz" <address@hidden> writes:

> Here's another order-of-evaluation problem related to side
> effects in local functions, found by the random tester.  The tests
> are from ansi-tests/misc.lsp.  Both fail in gcl (current cvs,
> configured with --enable-ansi).
> 
> (deftest misc.123
>    (let* ((fn1 '(lambda (b)
>                (declare (optimize (safety 1)))
>                (labels ((%f7 (f7-1 f7-2)
>                              (let ((v2 (setq b 723149855)))
>                                25620)))
>                  (max b
>                       (multiple-value-call #'%f7 (values b 2))))))
>        (fn2 '(lambda (b)
>                (labels ((%f7 (f7-1 f7-2)
>                              (let ((v2 (setq b 723149855)))
>                                25620)))
>                  (max b
>                       (multiple-value-call #'%f7 (values b 2))))))
>        (vals '(1439719153))
>        (v1 (apply (compile nil fn1) vals))
>        (v2 (apply (compile nil fn2) vals)))
>      (if (eql v1 v2) :good (list v1 v2)))
>    :good)
> 
> (deftest misc.124
>    (let* ((fn1 '(lambda (b)
>                (declare (optimize (safety 1)))
>                (labels ((%f7 (f7-1 f7-2)
>                              (let ((v2 (setq b 723149855)))
>                                25620)))
>                  (max b
>                       (funcall #'%f7 b 2)))))
>        (fn2 '(lambda (b)
>                (labels ((%f7 (f7-1 f7-2)
>                              (let ((v2 (setq b 723149855)))
>                                25620)))
>                  (max b
>                       (funcall #'%f7 b 2)))))
>        (vals '(1439719153))
>        (v1 (apply (compile nil fn1) vals))
>        (v2 (apply (compile nil fn2) vals)))
>      (if (eql v1 v2) :good (list v1 v2)))
>    :good)
> 
> 
> The same test with just a straight call of %f7 doesn't fail.
> 
>       Paul
> 
> 
> 
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/gcl-devel
> 
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]