From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: bug#21899: let/ec continuations not distinct under compiler Date: Fri, 24 Jun 2016 18:48:26 +0200 Message-ID: <87vb0ycz39.fsf@pobox.com> References: <20151113075736.GJ13455@fysh.org> <87ziqaczyx.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1466787321 20211 80.91.229.3 (24 Jun 2016 16:55:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Jun 2016 16:55:21 +0000 (UTC) Cc: 21899@debbugs.gnu.org To: Zefram Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Fri Jun 24 18:55:11 2016 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bGUNq-0002Sg-GG for guile-bugs@m.gmane.org; Fri, 24 Jun 2016 18:55:10 +0200 Original-Received: from localhost ([::1]:45022 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGUNp-0007YG-Q0 for guile-bugs@m.gmane.org; Fri, 24 Jun 2016 12:55:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45348) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGUHz-0002I3-Ax for bug-guile@gnu.org; Fri, 24 Jun 2016 12:49:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGUHv-0004Tx-6Y for bug-guile@gnu.org; Fri, 24 Jun 2016 12:49:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42239) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGUHu-0004TX-OW for bug-guile@gnu.org; Fri, 24 Jun 2016 12:49:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bGUHu-0001OA-Ec for bug-guile@gnu.org; Fri, 24 Jun 2016 12:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andy Wingo Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 24 Jun 2016 16:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21899 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 21899-submit@debbugs.gnu.org id=B21899.14667869245309 (code B ref 21899); Fri, 24 Jun 2016 16:49:02 +0000 Original-Received: (at 21899) by debbugs.gnu.org; 24 Jun 2016 16:48:44 +0000 Original-Received: from localhost ([127.0.0.1]:54576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGUHc-0001NZ-5n for submit@debbugs.gnu.org; Fri, 24 Jun 2016 12:48:44 -0400 Original-Received: from pb-sasl1.pobox.com ([64.147.108.66]:59253 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGUHa-0001NQ-7A for 21899@debbugs.gnu.org; Fri, 24 Jun 2016 12:48:42 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id E14C11FB63; Fri, 24 Jun 2016 12:48:41 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=YnGE3N5yFDkj4YTfrpDFnuzkn/A=; b=ehZP5a Yi/A6+48DSwMxNd07B8F92ZLFGf5qpsU8Kkp22OE1z6h9Zb+8M1/Hl7lDW6F3wBD wJgVrZajY4SkY8J7kSjhKlBsT0xxThy/n/fKGaokLk0qi/OIEP+Q9QukQV3vzuZR y0FDFHu66omSJVZp/bW+n0JNx4SjW09sM3heU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=wYCDkd9U6gLVJyE4cV5W2ZdVxTt6udm3 W6YWOBIbulGfhd0GBRsUNVoJmYC6qJyU1k9nCX1tC37cJCtHVj+8ZCxVZDyrn5CJ +cyXIdNhTFW2iRtAftKWjgVaXasyM8sz/dDBG2qO1yWweZYTlaxIxWtzZl9Alf+H JHTtbpI2q24= Original-Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id DAD6C1FB61; Fri, 24 Jun 2016 12:48:41 -0400 (EDT) Original-Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id F065D1FB60; Fri, 24 Jun 2016 12:48:40 -0400 (EDT) In-Reply-To: <87ziqaczyx.fsf@pobox.com> (Andy Wingo's message of "Fri, 24 Jun 2016 18:29:26 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Pobox-Relay-ID: 818A261C-3A2B-11E6-9811-C1836462E9F6-02397024!pb-sasl1.pobox.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8237 Archived-At: On Fri 24 Jun 2016 18:29, Andy Wingo writes: > On Fri 13 Nov 2015 08:57, Zefram writes: > >> With guile 2.0.11: >> >> scheme@(guile-user)> (use-modules (ice-9 control)) >> scheme@(guile-user)> (list 'a (let/ec ae (list 'b (let/ec be (be 2))))) >> $1 = (a (b 2)) >> scheme@(guile-user)> (list 'a (let/ec ae (list 'b (let/ec be (ae 2))))) >> $2 = (a (b 2)) >> scheme@(guile-user)> (list 'a (let/ec ae (list 'b (ae 2)))) >> $3 = (a 2) >> >> The middle of these three cases is wrong: it attempts to invoke the outer >> escape continuation, but only goes as far as the target of the inner one, >> which it isn't using. It therefore produces the same result as the first >> case, which invokes the inner escape continuation. It ought to behave >> like the third case, which shows that the outer escape continuation can >> be successfully invoked when the unused inner continuation is not present. > > This is a compiler bug in 2.0: > > scheme@(guile-user)> ,optimize (list 'a (let/ec ae (list 'b (let/ec be (ae 2))))) > $2 = (list 'a > (let ((tag (list 'let/ec))) > (call-with-prompt > tag > (lambda () > (list 'b > (let ((tag-1 tag)) ;; <<<< here is the bug > (call-with-prompt > tag-1 > (lambda () (abort-to-prompt tag 2)) > (lambda (_ . results) (@apply values results)))))) > (lambda (_ . results) (@apply values results))))) Narrowed down: ,opt (let* ((x (list 'a)) (y (list 'a))) (list x y)) ;; -> (let* ((x (list 'a)) (y x)) (list x y)) It's a bug in 2.0's CSE pass somehow. Andy