Re: [ID 20010825.006] -DCRIPPLED_CC is broken
[p5sagit/p5-mst-13.2.git] / t / run / kill_perl.t
CommitLineData
a0d0e21e 1#!./perl
2
c9beb3f5 3# This is for tests that will normally cause segfaults, and other nasty
4# errors that might kill the interpreter and for some reason you can't
5# use an eval().
6#
7# New tests are added to the bottom. For example.
8#
9# ######## perlbug ID 20020831.001
10# ($a, b) = (1,2)
11# EXPECT
12# Can't modify constant item in list assignment - at line 1
13#
14# to test that the code "($a, b) = (1,2)" causes the appropriate syntax
15# error, rather than just segfaulting as reported in perlbug ID
16# 20020831.001
17#
18#
19# NOTE: Please don't add tests to this file unless they *need* to be
20# run in separate executable and can't simply use eval.
fb73857a 21
c9beb3f5 22BEGIN {
23 chdir 't' if -d 't';
24 @INC = '../lib';
25}
26
27use strict;
a0d0e21e 28
29$|=1;
30
c9beb3f5 31my @prgs = ();
32while(<DATA>) {
33 if(m/^#{8,}\s*(.*)/) {
34 push @prgs, ['', $1];
35 }
36 else {
37 $prgs[-1][0] .= $_;
38 }
39}
a0d0e21e 40print "1..", scalar @prgs, "\n";
41
c9beb3f5 42my $tmpfile = "misctmp000";
a0d0e21e 431 while -f ++$tmpfile;
ed6b3797 44END { while($tmpfile && unlink $tmpfile){} }
a0d0e21e 45
c9beb3f5 46my $test = 1;
47foreach my $prog (@prgs) {
48 my($raw_prog, $name) = @$prog;
68dc0745 49
a0d0e21e 50 my $switch;
c9beb3f5 51 if ($raw_prog =~ s/^\s*(-\w.*)//){
fb73857a 52 $switch = $1;
a0d0e21e 53 }
c9beb3f5 54
55 my($prog,$expected) = split(/\nEXPECT\n/, $raw_prog);
56
648cac19 57 open TEST, ">$tmpfile" or die "Cannot open $tmpfile: $!";
c9beb3f5 58
59 # VMS adjustments
60 if( $^O eq 'VMS' ) {
61 $prog =~ s#/dev/null#NL:#;
62
63 # VMS file locking
64 $prog =~ s{if \(-e _ and -f _ and -r _\)}
65 {if (-e _ and -f _)}
66 }
ed6b3797 67
648cac19 68 print TEST $prog, "\n";
69 close TEST or die "Cannot close $tmpfile: $!";
70
c9beb3f5 71 my $results;
68dc0745 72 if ($^O eq 'MSWin32') {
c9beb3f5 73 $results = `.\\perl -I../lib $switch $tmpfile 2>&1`;
68dc0745 74 }
c9beb3f5 75 elsif ($^O eq 'NetWare') {
76 $results = `perl -I../lib $switch $tmpfile 2>&1`;
2986a63f 77 }
68dc0745 78 else {
c9beb3f5 79 $results = `./perl -I../lib $switch $tmpfile 2>&1`;
68dc0745 80 }
c9beb3f5 81 my $status = $?;
82
83 # Clean up the results into something a bit more predictable.
a0d0e21e 84 $results =~ s/\n+$//;
648cac19 85 $results =~ s/at\s+misctmp\d+\s+line/at - line/g;
86 $results =~ s/of\s+misctmp\d+\s+aborted/of - aborted/g;
c9beb3f5 87
88 # bison says 'parse error' instead of 'syntax error',
89 # various yaccs may or may not capitalize 'syntax'.
2a8ee232 90 $results =~ s/^(syntax|parse) error/syntax error/mig;
c9beb3f5 91
c2f0b9b9 92 $results =~ s/\n\n/\n/ if $^O eq 'VMS'; # pipes double these sometimes
c9beb3f5 93
a0d0e21e 94 $expected =~ s/\n+$//;
c9beb3f5 95 my $ok = $results eq $expected;
96
97 unless( $ok ) {
98 print STDERR "# PROG: $switch\n$prog\n";
99 print STDERR "# EXPECTED:\n$expected\n";
100 print STDERR "# GOT:\n$results\n";
a0d0e21e 101 }
c9beb3f5 102 printf "%sok %d%s\n", ($ok ? '' : "not "), $test,
103 length $name ? " - $name" : $name;
104 $test++;
a0d0e21e 105}
106
107__END__
2ace3117 108########
44a8e56a 109$a = ":="; split /($a)/o, "a:=b:=c"; print "@_"
110EXPECT
111a := b := c
112########
36477c24 113$cusp = ~0 ^ (~0 >> 1);
85e0ebd8 114use integer;
36477c24 115$, = " ";
85e0ebd8 116print +($cusp - 1) % 8, $cusp % 8, -$cusp % 8, 8 | (($cusp + 1) % 8 + 7), "!\n";
36477c24 117EXPECT
85e0ebd8 1187 0 0 8 !
36477c24 119########
a0d0e21e 120$foo=undef; $foo->go;
121EXPECT
72b5445b 122Can't call method "go" on an undefined value at - line 1.
a0d0e21e 123########
124BEGIN
125 {
126 "foo";
127 }
128########
a0d0e21e 129$array[128]=1
130########
131$x=0x0eabcd; print $x->ref;
132EXPECT
133Can't call method "ref" without a package or object reference at - line 1.
134########
648cac19 135chop ($str .= <DATA>);
a0d0e21e 136########
137close ($banana);
138########
139$x=2;$y=3;$x<$y ? $x : $y += 23;print $x;
140EXPECT
14125
142########
143eval {sub bar {print "In bar";}}
144########
68dc0745 145system './perl -ne "print if eof" /dev/null'
a0d0e21e 146########
648cac19 147chop($file = <DATA>);
a0d0e21e 148########
149package N;
150sub new {my ($obj,$n)=@_; bless \$n}
151$aa=new N 1;
152$aa=12345;
153print $aa;
154EXPECT
15512345
156########
157%@x=0;
158EXPECT
f1612b5c 159Can't modify hash dereference in repeat (x) at - line 1, near "0;"
3fe9a6f1 160Execution of - aborted due to compilation errors.
a0d0e21e 161########
162$_="foo";
163printf(STDOUT "%s\n", $_);
164EXPECT
165foo
166########
167push(@a, 1, 2, 3,)
168########
169quotemeta ""
170########
171for ("ABCDE") {
172 &sub;
173s/./&sub($&)/eg;
174print;}
175sub sub {local($_) = @_;
176$_ x 4;}
177EXPECT
178Modification of a read-only value attempted at - line 3.
179########
180package FOO;sub new {bless {FOO => BAR}};
181package main;
182use strict vars;
183my $self = new FOO;
184print $$self{FOO};
185EXPECT
186BAR
187########
188$_="foo";
189s/.{1}//s;
190print;
191EXPECT
192oo
193########
194print scalar ("foo","bar")
195EXPECT
196bar
197########
198sub by_number { $a <=> $b; };# inline function for sort below
199$as_ary{0}="a0";
200@ordered_array=sort by_number keys(%as_ary);
201########
202sub NewShell
203{
204 local($Host) = @_;
205 my($m2) = $#Shells++;
206 $Shells[$m2]{HOST} = $Host;
207 return $m2;
208}
209
210sub ShowShell
211{
212 local($i) = @_;
213}
214
215&ShowShell(&NewShell(beach,Work,"+0+0"));
216&ShowShell(&NewShell(beach,Work,"+0+0"));
217&ShowShell(&NewShell(beach,Work,"+0+0"));
218########
219 {
220 package FAKEARRAY;
221
222 sub TIEARRAY
223 { print "TIEARRAY @_\n";
224 die "bomb out\n" unless $count ++ ;
225 bless ['foo']
226 }
227 sub FETCH { print "fetch @_\n"; $_[0]->[$_[1]] }
228 sub STORE { print "store @_\n"; $_[0]->[$_[1]] = $_[2] }
229 sub DESTROY { print "DESTROY \n"; undef @{$_[0]}; }
230 }
231
232eval 'tie @h, FAKEARRAY, fred' ;
233tie @h, FAKEARRAY, fred ;
234EXPECT
235TIEARRAY FAKEARRAY fred
236TIEARRAY FAKEARRAY fred
237DESTROY
238########
239BEGIN { die "phooey\n" }
240EXPECT
241phooey
242BEGIN failed--compilation aborted at - line 1.
243########
244BEGIN { 1/$zero }
245EXPECT
246Illegal division by zero at - line 1.
247BEGIN failed--compilation aborted at - line 1.
248########
249BEGIN { undef = 0 }
250EXPECT
251Modification of a read-only value attempted at - line 1.
252BEGIN failed--compilation aborted at - line 1.
a7adf1f0 253########
254{
255 package foo;
256 sub PRINT {
257 shift;
258 print join(' ', reverse @_)."\n";
259 }
46fc3d4c 260 sub PRINTF {
261 shift;
262 my $fmt = shift;
263 print sprintf($fmt, @_)."\n";
264 }
a7adf1f0 265 sub TIEHANDLE {
266 bless {}, shift;
267 }
58f51617 268 sub READLINE {
269 "Out of inspiration";
270 }
a7adf1f0 271 sub DESTROY {
272 print "and destroyed as well\n";
2ae324a7 273 }
274 sub READ {
275 shift;
276 print STDOUT "foo->can(READ)(@_)\n";
277 return 100;
278 }
279 sub GETC {
280 shift;
281 print STDOUT "Don't GETC, Get Perl\n";
282 return "a";
283 }
a7adf1f0 284}
285{
286 local(*FOO);
287 tie(*FOO,'foo');
288 print FOO "sentence.", "reversed", "a", "is", "This";
58f51617 289 print "-- ", <FOO>, " --\n";
2ae324a7 290 my($buf,$len,$offset);
291 $buf = "string";
292 $len = 10; $offset = 1;
293 read(FOO, $buf, $len, $offset) == 100 or die "foo->READ failed";
294 getc(FOO) eq "a" or die "foo->GETC failed";
46fc3d4c 295 printf "%s is number %d\n", "Perl", 1;
a7adf1f0 296}
297EXPECT
298This is a reversed sentence.
58f51617 299-- Out of inspiration --
2ae324a7 300foo->can(READ)(string 10 1)
301Don't GETC, Get Perl
46fc3d4c 302Perl is number 1
a7adf1f0 303and destroyed as well
a6006777 304########
305my @a; $a[2] = 1; for (@a) { $_ = 2 } print "@a\n"
306EXPECT
3072 2 2
308########
8ff950ac 309# used to attach defelem magic to all immortal values,
8b530633 310# which made restore of local $_ fail.
311foo(2>1);
312sub foo { bar() for @_; }
313sub bar { local $_; }
314print "ok\n";
315EXPECT
316ok
317########
a6006777 318@a = ($a, $b, $c, $d) = (5, 6);
319print "ok\n"
320 if ($a[0] == 5 and $a[1] == 6 and !defined $a[2] and !defined $a[3]);
321EXPECT
322ok
323########
324print "ok\n" if (1E2<<1 == 200 and 3E4<<3 == 240000);
325EXPECT
326ok
327########
8ebc5c01 328print "ok\n" if ("\0" lt "\xFF");
a6006777 329EXPECT
330ok
331########
9731f9ce 332open(H,'run/kill_perl.t'); # must be in the 't' directory
a6006777 333stat(H);
334print "ok\n" if (-e _ and -f _ and -r _);
335EXPECT
336ok
337########
338sub thing { 0 || return qw(now is the time) }
339print thing(), "\n";
340EXPECT
341nowisthetime
342########
343$ren = 'joy';
344$stimpy = 'happy';
345{ local $main::{ren} = *stimpy; print $ren, ' ' }
346print $ren, "\n";
347EXPECT
348happy joy
349########
350$stimpy = 'happy';
351{ local $main::{ren} = *stimpy; print ${'ren'}, ' ' }
352print +(defined(${'ren'}) ? 'oops' : 'joy'), "\n";
353EXPECT
354happy joy
355########
356package p;
357sub func { print 'really ' unless wantarray; 'p' }
358sub groovy { 'groovy' }
359package main;
360print p::func()->groovy(), "\n"
361EXPECT
362really groovy
363########
d53f8f1c 364@list = ([ 'one', 1 ], [ 'two', 2 ]);
365sub func { $num = shift; (grep $_->[1] == $num, @list)[0] }
366print scalar(map &func($_), 1 .. 3), " ",
367 scalar(map scalar &func($_), 1 .. 3), "\n";
368EXPECT
3692 3
370########
44a8e56a 371($k, $s) = qw(x 0);
372@{$h{$k}} = qw(1 2 4);
373for (@{$h{$k}}) { $s += $_; delete $h{$k} if ($_ == 2) }
374print "bogus\n" unless $s == 7;
375########
376my $a = 'outer';
377eval q[ my $a = 'inner'; eval q[ print "$a " ] ];
378eval { my $x = 'peace'; eval q[ print "$x\n" ] }
379EXPECT
380inner peace
774d564b 381########
382-w
383$| = 1;
384sub foo {
385 print "In foo1\n";
386 eval 'sub foo { print "In foo2\n" }';
387 print "Exiting foo1\n";
388}
389foo;
390foo;
391EXPECT
392In foo1
393Subroutine foo redefined at (eval 1) line 1.
394Exiting foo1
395In foo2
396########
397$s = 0;
398map {#this newline here tickles the bug
399$s += $_} (1,2,4);
400print "eat flaming death\n" unless ($s == 7);
1ca7b98a 401########
402sub foo { local $_ = shift; split; @_ }
403@x = foo(' x y z ');
404print "you die joe!\n" unless "@x" eq 'x y z';
c277df42 405########
406/(?{"{"})/ # Check it outside of eval too
407EXPECT
2cd61cdb 408Sequence (?{...}) not terminated or not {}-balanced at - line 1, within pattern
7253e4e3 409Sequence (?{...}) not terminated or not {}-balanced in regex; marked by <-- HERE in m/(?{ <-- HERE "{"})/ at - line 1.
c277df42 410########
411/(?{"{"}})/ # Check it outside of eval too
412EXPECT
d98d5fff 413Unmatched right curly bracket at (re_eval 1) line 1, at end of line
c277df42 414syntax error at (re_eval 1) line 1, near ""{"}"
2cd61cdb 415Compilation failed in regexp at - line 1.
0da4822f 416########
ff689196 417BEGIN { @ARGV = qw(a b c d e) }
0da4822f 418BEGIN { print "argv <@ARGV>\nbegin <",shift,">\n" }
419END { print "end <",shift,">\nargv <@ARGV>\n" }
420INIT { print "init <",shift,">\n" }
7d30b5c4 421CHECK { print "check <",shift,">\n" }
0da4822f 422EXPECT
ff689196 423argv <a b c d e>
0da4822f 424begin <a>
7d30b5c4 425check <b>
ff689196 426init <c>
427end <d>
428argv <e>
4599a1de 429########
3500f679 430-l
431# fdopen from a system descriptor to a system descriptor used to close
432# the former.
433open STDERR, '>&=STDOUT' or die $!;
75642110 434select STDOUT; $| = 1; print fileno STDOUT or die $!;
435select STDERR; $| = 1; print fileno STDERR or die $!;
3500f679 436EXPECT
4371
4382
439########
20408e3c 440-w
441sub testme { my $a = "test"; { local $a = "new test"; print $a }}
442EXPECT
443Can't localize lexical variable $a at - line 2.
444########
51ae5c03 445package X;
446sub ascalar { my $r; bless \$r }
447sub DESTROY { print "destroyed\n" };
448package main;
449*s = ascalar X;
450EXPECT
451destroyed
452########
453package X;
454sub anarray { bless [] }
455sub DESTROY { print "destroyed\n" };
456package main;
457*a = anarray X;
458EXPECT
459destroyed
460########
461package X;
462sub ahash { bless {} }
463sub DESTROY { print "destroyed\n" };
464package main;
465*h = ahash X;
466EXPECT
467destroyed
468########
469package X;
470sub aclosure { my $x; bless sub { ++$x } }
471sub DESTROY { print "destroyed\n" };
472package main;
473*c = aclosure X;
474EXPECT
475destroyed
476########
477package X;
478sub any { bless {} }
479my $f = "FH000"; # just to thwart any future optimisations
ded8aa31 480sub afh { select select ++$f; my $r = *{$f}{IO}; delete $X::{$f}; bless $r }
51ae5c03 481sub DESTROY { print "destroyed\n" }
482package main;
483$x = any X; # to bump sv_objcount. IO objs aren't counted??
484*f = afh X;
485EXPECT
486destroyed
487destroyed
488########
ebf99b04 489BEGIN {
490 $| = 1;
491 $SIG{__WARN__} = sub {
492 eval { print $_[0] };
493 die "bar\n";
494 };
495 warn "foo\n";
496}
497EXPECT
498foo
499bar
500BEGIN failed--compilation aborted at - line 8.
8feb4e9f 501########
502package X;
503@ISA='Y';
504sub new {
505 my $class = shift;
506 my $self = { };
507 bless $self, $class;
508 my $init = shift;
509 $self->foo($init);
510 print "new", $init;
511 return $self;
512}
513sub DESTROY {
514 my $self = shift;
515 print "DESTROY", $self->foo;
516}
517package Y;
518sub attribute {
519 my $self = shift;
520 my $var = shift;
521 if (@_ == 0) {
522 return $self->{$var};
523 } elsif (@_ == 1) {
524 $self->{$var} = shift;
525 }
526}
527sub AUTOLOAD {
528 $AUTOLOAD =~ /::([^:]+)$/;
529 my $method = $1;
530 splice @_, 1, 0, $method;
531 goto &attribute;
532}
533package main;
534my $x = X->new(1);
535for (2..3) {
536 my $y = X->new($_);
537 print $y->foo;
538}
539print $x->foo;
540EXPECT
541new1new22DESTROY2new33DESTROY31DESTROY1
dfad63ad 542########
543re();
544sub re {
14455d6c 545 my $re = join '', eval 'qr/(??{ $obj->method })/';
dfad63ad 546 $re;
547}
548EXPECT
1aff0e91 549########
550use strict;
551my $foo = "ZZZ\n";
552END { print $foo }
553EXPECT
554ZZZ
555########
556eval '
557use strict;
558my $foo = "ZZZ\n";
559END { print $foo }
560';
561EXPECT
562ZZZ
7399586d 563########
564-w
565if (@ARGV) { print "" }
566else {
567 if ($x == 0) { print "" } else { print $x }
568}
569EXPECT
b89fed5f 570Use of uninitialized value in numeric eq (==) at - line 4.
1d76a5c3 571########
572$x = sub {};
573foo();
574sub foo { eval { return }; }
575print "ok\n";
576EXPECT
577ok
07447971 578########
b0f2b690 579# moved to op/lc.t
07447971 580EXPECT
92d29cee 581########
582sub f { my $a = 1; my $b = 2; my $c = 3; my $d = 4; next }
583my $x = "foo";
584{ f } continue { print $x, "\n" }
585EXPECT
586foo
6a7129a1 587########
588sub C () { 1 }
589sub M { $_[0] = 2; }
590eval "C";
591M(C);
592EXPECT
593Modification of a read-only value attempted at - line 2.
00c29ff8 594########
595print qw(ab a\b a\\b);
596EXPECT
597aba\ba\b
dd8482fc 598########
c71fccf1 599# lexicals declared after the myeval() definition should not be visible
600# within it
601sub myeval { eval $_[0] }
602my $foo = "ok 2\n";
603myeval('sub foo { local $foo = "ok 1\n"; print $foo; }');
604die $@ if $@;
605foo();
606print $foo;
607EXPECT
608ok 1
609ok 2
610########
2090ab20 611# lexicals outside an eval"" should be visible inside subroutine definitions
612# within it
613eval <<'EOT'; die $@ if $@;
614{
615 my $X = "ok\n";
616 eval 'sub Y { print $X }'; die $@ if $@;
617 Y();
618}
619EOT
620EXPECT
621ok
622########
c975facc 623# test that closures generated by eval"" hold on to the CV of the eval""
624# for their entire lifetime
625$code = eval q[
626 sub { eval '$x = "ok 1\n"'; }
627];
628&{$code}();
629print $x;
630EXPECT
631ok 1
632########
dd8482fc 633# This test is here instead of pragma/locale.t because
634# the bug depends on in the internal state of the locale
635# settings and pragma/locale messes up that state pretty badly.
636# We need a "fresh run".
c9f931b8 637BEGIN {
638 eval { require POSIX };
639 if ($@) {
640 exit(0); # running minitest?
641 }
642}
dd8482fc 643use Config;
644my $have_setlocale = $Config{d_setlocale} eq 'define';
dd8482fc 645$have_setlocale = 0 if $@;
646# Visual C's CRT goes silly on strings of the form "en_US.ISO8859-1"
647# and mingw32 uses said silly CRT
2986a63f 648$have_setlocale = 0 if (($^O eq 'MSWin32' || $^O eq 'NetWare') && $Config{cc} =~ /^(cl|gcc)/i);
dd8482fc 649exit(0) unless $have_setlocale;
650my @locales;
651if (-x "/usr/bin/locale" && open(LOCALES, "/usr/bin/locale -a|")) {
652 while(<LOCALES>) {
653 chomp;
654 push(@locales, $_);
655 }
656 close(LOCALES);
657}
658exit(0) unless @locales;
659for (@locales) {
660 use POSIX qw(locale_h);
661 use locale;
88e7acd2 662 setlocale(LC_NUMERIC, $_) or next;
dd8482fc 663 my $s = sprintf "%g %g", 3.1, 3.1;
664 next if $s eq '3.1 3.1' || $s =~ /^(3.+1) \1$/;
665 print "$_ $s\n";
666}
667EXPECT
b927783e 668########
669die qr(x)
670EXPECT
671(?-xism:x) at - line 1.
672########
7ef822cd 673# 20001210.003 mjd@plover.com
674format REMITOUT_TOP =
675FOO
676.
677
678format REMITOUT =
679BAR
680.
681
682# This loop causes a segv in 5.6.0
683for $lineno (1..61) {
684 write REMITOUT;
685}
686
687print "It's OK!";
688EXPECT
689It's OK!
cb55de95 690########
691# Inaba Hiroto
692reset;
693if (0) {
694 if ("" =~ //) {
695 }
696}
697########
698# Nicholas Clark
699$ENV{TERM} = 0;
700reset;
701// if 0;
702########
703# Vadim Konovalov
704use strict;
705sub new_pmop($) {
706 my $pm = shift;
707 return eval "sub {shift=~/$pm/}";
708}
709new_pmop "abcdef"; reset;
710new_pmop "abcdef"; reset;
711new_pmop "abcdef"; reset;
712new_pmop "abcdef"; reset;
880649cd 713########
714# David Dyck
715# coredump in 5.7.1
716close STDERR; die;
717EXPECT
dba9804b 718########
99799961 719-w
720"x" =~ /(\G?x)?/; # core dump in 20000716.007
721EXPECT
722Quantifier unexpected on zero-length expression in regex; marked by <-- HERE in m/(\G?x)? <-- HERE / at - line 2.
723########
dba9804b 724# Bug 20010515.004
725my @h = 1 .. 10;
726bad(@h);
727sub bad {
728 undef @h;
729 print "O";
730 print for @_;
731 print "K";
732}
733EXPECT
734OK
97b9a4cb 735########
736# Bug 20010506.041
737"abcd\x{1234}" =~ /(a)(b[c])(d+)?/i and print "ok\n";
738EXPECT
739ok
0b490c9c 740########
741# Bug 20010422.005
742{s//${}/; //}
743EXPECT
2172ddaf 744syntax error at - line 2, near "${}"
0b490c9c 745Execution of - aborted due to compilation errors.
585602fa 746########
747# Bug 20010528.007
748"\x{"
749EXPECT
750Missing right brace on \x{} at - line 2, within string
751Execution of - aborted due to compilation errors.
08b362fd 752########
753my $foo = Bar->new();
754my @dst;
755END {
756 ($_ = "@dst") =~ s/\(0x.+?\)/(0x...)/;
757 print $_, "\n";
758}
759package Bar;
760sub new {
761 my Bar $self = bless [], Bar;
762 eval '$self';
763 return $self;
764}
765sub DESTROY {
766 push @dst, "$_[0]";
767}
768EXPECT
769Bar=ARRAY(0x...)
1f96ff2a 770########
6ee35fb7 771# 20010407.008 sprintf removes utf8-ness
772$a = sprintf "\x{1234}";
773printf "%x %d\n", unpack("U*", $a), length($a);
9efebafb 774$a = sprintf "%s", "\x{5678}";
775printf "%x %d\n", unpack("U*", $a), length($a);
6ee35fb7 776$a = sprintf "\x{1234}%s", "\x{5678}";
777printf "%x %x %d\n", unpack("U*", $a), length($a);
778EXPECT
7791234 1
9efebafb 7805678 1
6ee35fb7 7811234 5678 2
7c8c5f1c 782######## found by Markov chain stress testing
1f96ff2a 783eval "a.b.c.d.e.f;sub"
784EXPECT
c9beb3f5 785
786######## perlbug ID 20010831.001
787($a, b) = (1, 2);
788EXPECT
789Can't modify constant item in list assignment at - line 1, near ");"
790Execution of - aborted due to compilation errors.