# New Ticket Created by  "Clinton A. Pierce" 
# Please include the string:  [perl #22877]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=22877 >


This bug did not make itself known in a 6/23 checkout, and appeared sometime in the 
last week (I've only now synched my copy with CVS).

I don't have a small test case for this.  I apologize.  To reproduce the bug:

        checkout and build latest parrot tree
        $ cd languages/BASIC/compiler
        $ cat > test.bas
        dim a$()
        for i = 0 to 100 step .5
                for j = 1 to 30
                        a$(j)=" "
                next j
                for j = 1 to 30
                        print " ";
                next j
                print i
        next i
        ^D
        $ perl compile.pl test.bas
        $ ../../imcc/imcc TARG_test.imc

And the apparent symptom is the loop counter (i) only goes up to 2 -- it should have 
gone to 100, by steps of 0.5.   If I alter the BASIC program in any way the bug gets 
delayed a little further or never happens at all.  

Hacking a "sweepoff" and "collectoff" into the PIR (TARG_test.imc) before anything 
else happens makes the bug go away.  I don't think this is a BASIC bug, nor do I think 
it's a register allocation/spilling problem in IMCC.

Placing traces in the PIR code causes the bug to move around also.  Usually only 
delaying the onset of the bug.




Reply via email to