# New Ticket Created by Patrick R. Michaud
# Please include the string: [perl #59538]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=59538 >
The attached hang.pir file causes imcc to freeze while compiling it.
The code itself is derived from code generated by PCT from
RT #59410. There is a runtime logic error in the code -- at runtime
it would be possible for a pop_eh to be executed without
a previous push_eh. Of course, that shouldn't be enough to
cause imcc to hang.
Commenting out any of the lines marked "xxx" allows the
code to compile. It's also interesting that the "myfoo *= $I0"
statement is one of these (and is required to evoke the bug),
even though it's in an entirely different sub.
Pm
.sub 'foo'
.local num myfoo
myfoo = 1.0
$I0 = 5
myfoo *= $I0 ## xxx ?!?
.end
.namespace ["Perl6";"Grammar";"Actions"]
.sub "_block1806" :anon :lexid("139")
get_global $P1808, "$/"
set $P1809, $P1808["post"]
unless_null $P1809, vivify_548 ## xxx
new $P1809, "Undef" ## xxx
vivify_548:
defined $I1811, $P1809
unless $I1811, for_1807_end ## xxx
new $P1812, 'ExceptionHandler'
set_addr $P1812, for_1807_next ## xxx
$P1812.'handle_types'(63) ## xxx
push_eh $P1812
iter $P1810, $P1809
for_1807:
unless $P1810, for_1807_end ## xxx
shift $P1813, $P1810
$P1855 = find_name "_block1814"
$P1855($P1813) ## xxx
goto for_1807 ## xxx
for_1807_next:
goto for_1807 ## xxx
for_1807_end:
pop_eh
.return ($P1810)
.end