[Perl/perl5] 54e8d7: Add a test for GH#4693, fixed at some point in the...

[email protected] (Richard Leach via perl5-changes) Wed, 15 Jul 2026 17:16:02 -0700
Newsgroups perl.perl5.changes
Message-ID <Perl/perl5/push/refs/heads/blead/[email protected]>
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 54e8d7f81d44acc28508644831db8a3517ffe45b
      https://github.com/Perl/perl5/commit/54e8d7f81d44acc28508644831db8a3517ffe45b
  Author: Richard Leach <[email protected]>
  Date:   2026-07-15 (Wed, 15 Jul 2026)

  Changed paths:
    M t/op/runlevel.t

  Log Message:
  -----------
  Add a test for GH#4693, fixed at some point in the past

This old ticket pertains to incorrect line numbers when a LOGOP condition
can be evaluated at compile time.

```
if (0) {print "aa";}
elsif (1) {print "bb";}
```

The condition and untaken branch are freed during compilation. At some point,
the surviving optree did not include a COP containing an accurate line number.

It does nowadays, but there doesn't seem to be a dedicated test for it. This
commit adds one, plus tests for `if()` and `else()` variants.



To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications