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:29:26 +0200 Message-ID: <87ziqaczyx.fsf@pobox.com> References: <20151113075736.GJ13455@fysh.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1466786025 31761 80.91.229.3 (24 Jun 2016 16:33:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Jun 2016 16:33:45 +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:33:32 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 1bGU2t-0006lf-D3 for guile-bugs@m.gmane.org; Fri, 24 Jun 2016 18:33:31 +0200 Original-Received: from localhost ([::1]:44879 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGU2s-0001pD-J8 for guile-bugs@m.gmane.org; Fri, 24 Jun 2016 12:33:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGTzb-0007UD-Mk for bug-guile@gnu.org; Fri, 24 Jun 2016 12:30:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGTzX-0008J4-7n for bug-guile@gnu.org; Fri, 24 Jun 2016 12:30:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGTzX-0008Ip-4m for bug-guile@gnu.org; Fri, 24 Jun 2016 12:30:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bGTzW-0007k6-TO for bug-guile@gnu.org; Fri, 24 Jun 2016 12:30: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:30: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.146678578129708 (code B ref 21899); Fri, 24 Jun 2016 16:30:02 +0000 Original-Received: (at 21899) by debbugs.gnu.org; 24 Jun 2016 16:29:41 +0000 Original-Received: from localhost ([127.0.0.1]:54554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGTzB-0007j5-H5 for submit@debbugs.gnu.org; Fri, 24 Jun 2016 12:29:41 -0400 Original-Received: from pb-sasl1.pobox.com ([64.147.108.66]:57613 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGTz9-0007iy-Va for 21899@debbugs.gnu.org; Fri, 24 Jun 2016 12:29:40 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id A90FA1F976; Fri, 24 Jun 2016 12:29:37 -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=qDzf2gCSpW/B53OO87tdpoBN12Y=; b=f5K0AB wBPEdj8wbrCdH+wNiYys83undDGdLU+vJLWHtL73x+BuH041UBsLjm5pnb/qry2j 1vVMSMgTUoXxJL7AMAIXRuZI4h1xAtfjj150C7CIyDpmc3dVBn19Cgts0g5I9v5Q cfO9lUR5RSRtw2/FQqXF38nhTrkstTk+HMPh0= 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=OSCXWWhs2z68Ru47WtldRYSyHX/ZD4kC u/PZulq4iVOwEcmUhbkDncF+/MnYML9aj0h9aNabGvj/PhazfB8y3KlySQuCmeNr JSPxR+MXLN4H/s0YHluqfU0Z4/xz71FEGoVVyFBbtB9pSDFmhOtQ9hawz7K3vfmd Lw/FveslNaI= Original-Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 9171F1F975; Fri, 24 Jun 2016 12:29:37 -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 AECF61F974; Fri, 24 Jun 2016 12:29:36 -0400 (EDT) In-Reply-To: <20151113075736.GJ13455@fysh.org> (zefram@fysh.org's message of "Fri, 13 Nov 2015 07:57:36 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Pobox-Relay-ID: D7746A36-3A28-11E6-8F74-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:8234 Archived-At: 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))))) In master: scheme@(guile-user)> ,optimize (list 'a (let/ec ae (list 'b (let/ec be (ae 2))))) $1 = (list 'a (let ((tag (list 'let/ec))) (call-with-prompt tag (lambda () (list 'b (let ((tag-1 (list 'let/ec))) (call-with-prompt tag-1 (lambda () (apply abort tag 2 '())) (lambda (_ . results) (apply values results)))))) (lambda (_ . results) (apply values results))))) Weird stuff! Andy