# New Ticket Created by Leopold Toetsch # Please include the string: [perl #15971] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=15971 >
Hi, when trying to compile a perl6 program to native c, pbc2c fails on the capturecc_p op. $ perl6 -w -C mops.6 ..... Use of uninitialized value at lib/Parrot/OpTrans/Compiled.pm line 94. /home/lt/src/parrot-007/languages/perl6/mops.c: In function `main': /home/lt/src/parrot-007/languages/perl6/mops.c:229: warning: passing arg 3 of `PackFile_unpack' from incompatible pointer type core.ops: In function `run_compiled': core.ops:4292: label `PC_725' used but not defined After applying this patch, the undefined label get's generated: (I don't know, if this is correct) --- pbc2c.pl Mon Apr 22 22:56:23 2002 +++ /home/lt/src/parrot-007/pbc2c.pl Sun Aug 4 17:55:58 2002 @@ -134,6 +134,10 @@ my $offset = $1; $is_branch = 1; } + # -lt capturecc + if ($src =~ /{{\^\+(.*?)}}/g) { + $is_branch = 1; + } # relative branch while($src =~ /{{(\-|\+)=(.*?)}}/g){ my $dir = $1; @@ -232,7 +236,7 @@ } interpreter->code = pf; runops(interpreter, pf, 0); - exit(1); + exit(0); } But the program still doesn't run, now it SIGSEGVs: #0 0x808be70 in runops_fast_core (interpreter=0x814ffe8, pc=0x81661c8) at runops_cores.c:34 34 DO_OP(pc, interpreter); (gdb) bac #0 0x808be70 in runops_fast_core (interpreter=0x814ffe8, pc=0x81661c8) at runops_cores.c:34 I hope, someone can check this. TIA, leo