GNU bug report logs - #15533
optimizing away noticeable effects

Previous Next

Package: guile;

Reported by: Ian Price <ianprice90 <at> googlemail.com>

Date: Sat, 5 Oct 2013 19:29:01 UTC

Severity: normal

Done: Ian Price <ianprice90 <at> googlemail.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 15533 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Ian Price <ianprice90 <at> googlemail.com>
Cc: 15533 <at> debbugs.gnu.org
Subject: Re: bug#15533: optimizing away noticeable effects
Date: Sat, 05 Oct 2013 16:45:59 -0400
Mark H Weaver <mhw <at> netris.org> writes:

> Ian Price <ianprice90 <at> googlemail.com> writes:
>
>> scheme@(guile-user)> ,optimize (define (foo f arg)
>>   (let* ((l '())
>>          (m (if (pair? arg)
>>                 (begin
>>                   (set! l (cdr arg))
>>                   (car arg))
>>                 arg)))
>>     (lambda () (apply f m l))))
>> $14 = (define (foo f arg)
>>   (let ((m (if (pair? arg)
>>              (begin (begin (cdr arg) (if #f #f)) (car arg))
>>              arg)))
>>     (lambda () (f m))))
>
> I can confirm that the same thing happens on the stable-2.0 branch.

Further investigation has revealed that 'peval' incorrectly removes the
'l' from the call to 'apply'.

     Mark




This bug report was last modified 11 years and 142 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.