unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* [bug #34300] Misplaced tail call optimization [2.0.2+]
@ 2011-09-15 21:17 Ludovic Courtès
  2011-10-20 22:32 ` bug#9816: " Andy Wingo
  0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Courtès @ 2011-09-15 21:17 UTC (permalink / raw)
  To: Ludovic Courtès, bug-guile

URL:
  <http://savannah.gnu.org/bugs/?34300>

                 Summary: Misplaced tail call optimization [2.0.2+]
                 Project: Guile
            Submitted by: civodul
            Submitted on: Thu 15 Sep 2011 09:17:38 PM GMT
                Category: None
                Severity: 4 - Important
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Consider this example:

#v+
(define bar
  (lambda ()
    (let ((fail (lambda () 'fail)))
      (let loop ((a (iota 3)))
        (if (pair? a)
            (loop (cdr a))
            (fail)))
      (pk 'done))))
#v-

This function should return 'done but it instead returns 'fail, because both
the call to `loop' and the call to `fail' are compiled as if they were tail
calls.

To reproduce the test, turn partial evaluation off---otherwise the call to
`fail' is inlined and the problem doesn't show up.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?34300>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#9816: [bug #34300] Misplaced tail call optimization [2.0.2+]
  2011-09-15 21:17 [bug #34300] Misplaced tail call optimization [2.0.2+] Ludovic Courtès
@ 2011-10-20 22:32 ` Andy Wingo
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Wingo @ 2011-10-20 22:32 UTC (permalink / raw)
  To: ludo, wingo, 9816

Update of bug #34300 (project guile):

                  Status:                    None => Fixed                  
             Open/Closed:                    Open => Closed                 


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?34300>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-20 22:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-15 21:17 [bug #34300] Misplaced tail call optimization [2.0.2+] Ludovic Courtès
2011-10-20 22:32 ` bug#9816: " Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).