diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-15 16:41:53 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-15 16:41:53 +0000 |
commit | 6b66af1727d09fb9889253a844f0fb19f8fd63e9 (patch) | |
tree | a14be121c3a2388c5d932f95e2499b55ece2977c /t | |
parent | 0994714a4e4e0304c91b2fa0c73d50669931b7e2 (diff) | |
download | perl-6b66af1727d09fb9889253a844f0fb19f8fd63e9.tar.gz |
fix misoptimization of C<my($x,$y); $x = $y = 1 + $z;> (from
Ilya Zakharevich)
p4raw-id: //depot/perl@5100
Diffstat (limited to 't')
-rwxr-xr-x | t/op/lex_assign.t | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/t/op/lex_assign.t b/t/op/lex_assign.t index 56ddfff866..2fb059d8d8 100755 --- a/t/op/lex_assign.t +++ b/t/op/lex_assign.t @@ -24,7 +24,7 @@ sub subb {"in s"} @INPUT = <DATA>; @simple_input = grep /^\s*\w+\s*\$\w+\s*[#\n]/, @INPUT; -print "1..", (9 + @INPUT + @simple_input), "\n"; +print "1..", (10 + @INPUT + @simple_input), "\n"; $ord = 0; sub wrn {"@_"} @@ -96,6 +96,18 @@ print "ok $ord\n"; } +# Chains of assignments + +my ($l1, $l2, $l3, $l4); +my $zzzz = 12; +$zzz1 = $l1 = $l2 = $zzz2 = $l3 = $l4 = 1 + $zzzz; + +$ord++; +print "# $zzz1 = $l1 = $l2 = $zzz2 = $l3 = $l4 = 13\nnot " + unless $zzz1 == 13 and $zzz2 == 13 and $l1 == 13 + and $l2 == 13 and $l3 == 13 and $l4 == 13; +print "ok $ord\n"; + for (@INPUT) { $ord++; ($op, undef, $comment) = /^([^\#]+)(\#\s+(.*))?/; |