summaryrefslogtreecommitdiff
path: root/t/comp
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-02-24 22:34:06 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-02-24 22:34:06 +0000
commite1548254d1365ef0342d5b64bb1fd1d996c1f70f (patch)
treed5d389ad50c88418da2a8908a3068665540eafac /t/comp
parent1a55ae8d1f46d27f1b3a1abdec128eebcc247c7f (diff)
downloadperl-e1548254d1365ef0342d5b64bb1fd1d996c1f70f.tar.gz
Fix a segfault during optree construction. (bug #27024)
p4raw-id: //depot/perl@22371
Diffstat (limited to 't/comp')
-rw-r--r--t/comp/parser.t10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/comp/parser.t b/t/comp/parser.t
index e59fec6622..2c25807021 100644
--- a/t/comp/parser.t
+++ b/t/comp/parser.t
@@ -9,7 +9,7 @@ BEGIN {
}
require "./test.pl";
-plan( tests => 43 );
+plan( tests => 44 );
eval '%@x=0;';
like( $@, qr/^Can't modify hash dereference in repeat \(x\)/, '%@x=0' );
@@ -147,3 +147,11 @@ EOF
eval q{ sub f { @a=@b=@c; {use} } };
like( $@, qr/syntax error/, "use without body" );
}
+
+# Bug #27024
+{
+ # this used to segfault (because $[=1 is optimized away to a null block)
+ my $x;
+ $[ = 1 while $x;
+ pass();
+}