summaryrefslogtreecommitdiff
path: root/t/op/goto.t
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2003-03-18 21:55:05 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-03-18 21:59:33 +0000
commit5023d17a8090433133a90a5ff33272f2f429614f (patch)
treea98904b930f7eea7d7b53040cfd4c45434716fb1 /t/op/goto.t
parentaaa028762b1d77e102995e3005ce437a64e9d27f (diff)
downloadperl-5023d17a8090433133a90a5ff33272f2f429614f.tar.gz
[perl #9990] avoid goto &tmpsub coredump
Message-ID: <20030318215505.A16787@fdgroup.com> p4raw-id: //depot/perl@19025
Diffstat (limited to 't/op/goto.t')
-rwxr-xr-xt/op/goto.t10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/op/goto.t b/t/op/goto.t
index 122c624324..5b30dc5f41 100755
--- a/t/op/goto.t
+++ b/t/op/goto.t
@@ -2,7 +2,7 @@
# "This IS structured code. It's just randomly structured."
-print "1..27\n";
+print "1..28\n";
while ($?) {
$foo = 1;
@@ -177,6 +177,14 @@ print ($ok ? "ok 22\n" : "not ok 22\n");
print "ok 27 - weird case of goto and for(;;) loop\n";
}
+# bug #9990 - don't prematurely free the CV we're &going to.
+
+sub f1 {
+ my $x;
+ goto sub { $x; print "ok 28 - don't prematurely free CV\n" }
+}
+f1();
+
exit;
bypass: