From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Zefram Newsgroups: gmane.lisp.guile.bugs Subject: bug#21899: let/ec continuations not distinct under compiler Date: Fri, 13 Nov 2015 07:57:36 +0000 Message-ID: <20151113075736.GJ13455@fysh.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1447401564 16550 80.91.229.3 (13 Nov 2015 07:59:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Nov 2015 07:59:24 +0000 (UTC) To: 21899@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Fri Nov 13 08:59:15 2015 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 1Zx9GK-00030E-6x for guile-bugs@m.gmane.org; Fri, 13 Nov 2015 08:59:12 +0100 Original-Received: from localhost ([::1]:51500 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zx9GJ-0005n6-NN for guile-bugs@m.gmane.org; Fri, 13 Nov 2015 02:59:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zx9GB-0005gy-TT for bug-guile@gnu.org; Fri, 13 Nov 2015 02:59:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zx9GB-0007ru-0L for bug-guile@gnu.org; Fri, 13 Nov 2015 02:59:03 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46828) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zx9GA-0007rq-Sj for bug-guile@gnu.org; Fri, 13 Nov 2015 02:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zx9GA-0008L0-Jz for bug-guile@gnu.org; Fri, 13 Nov 2015 02:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Zefram Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 13 Nov 2015 07:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21899 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.144740148931967 (code B ref -1); Fri, 13 Nov 2015 07:59:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Nov 2015 07:58:09 +0000 Original-Received: from localhost ([127.0.0.1]:36534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zx9F0-0008Ig-CS for submit@debbugs.gnu.org; Fri, 13 Nov 2015 02:58:08 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45581) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zx9Ex-0008IW-8K for submit@debbugs.gnu.org; Fri, 13 Nov 2015 02:57:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zx9Ev-00079H-RG for submit@debbugs.gnu.org; Fri, 13 Nov 2015 02:57:46 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:43383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zx9Ev-00079D-O6 for submit@debbugs.gnu.org; Fri, 13 Nov 2015 02:57:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zx9Eu-0005BX-Tp for bug-guile@gnu.org; Fri, 13 Nov 2015 02:57:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zx9Eu-00077y-0L for bug-guile@gnu.org; Fri, 13 Nov 2015 02:57:44 -0500 Original-Received: from river6.fysh.org ([2001:41d0:d:20da::2]:58795 helo=river.fysh.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zx9Et-00077o-Qw for bug-guile@gnu.org; Fri, 13 Nov 2015 02:57:43 -0500 Original-Received: from zefram by river.fysh.org with local (Exim 4.80 #2 (Debian)) id 1Zx9Em-0004Il-7M; Fri, 13 Nov 2015 07:57:36 +0000 Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7894 Archived-At: 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. The problem only affects let/ec, *not* call/ec: scheme@(guile-user)> (list 'a (call/ec (lambda (ae) (list 'b (call/ec (lambda (be) (be 2))))))) $4 = (a (b 2)) scheme@(guile-user)> (list 'a (call/ec (lambda (ae) (list 'b (call/ec (lambda (be) (ae 2))))))) $5 = (a 2) scheme@(guile-user)> (list 'a (call/ec (lambda (ae) (list 'b (ae 2))))) $6 = (a 2) It also only happens when compiling, not when interpreting: scheme@(guile-user)> ,o interp #t scheme@(guile-user)> (list 'a (let/ec ae (list 'b (let/ec be (be 2))))) $7 = (a (b 2)) scheme@(guile-user)> (list 'a (let/ec ae (list 'b (let/ec be (ae 2))))) $8 = (a 2) scheme@(guile-user)> (list 'a (let/ec ae (list 'b (ae 2)))) $9 = (a 2) -zefram