petdance/scratch — Issue #596: Bug in subroutine calling conventions
Author: petdance
Created: 2011-11-14 06:11:54+00:00
State: open
Labels: bug, core, Pri-normal, Sev-medium

When running this code with the command 'parrot -':
.sub 'main' :main
'aux'(5, 'hello', "b" => 3.14)
.end

.sub 'aux'
.param int a

.param num b :named("b")

.param string c :optional

.param int has_c :opt_flag

say a

say b

say c
.end

I get this error:

FixedIntegerArray: index out of bounds!

current instr.: 'aux' pc 16 (-:5)

called from Sub 'main' pc 11 (-:2)

Originally http://trac.parrot.org/parrot/ticket/792 by Axle