Hi list,
the test fjf949.pas from the test suite gpc-test-20041218.tar.gz (beta)
seems to be getting into a endless loop.
with gdb:
#0 $000025a4 in init_pascal_main_program () at fjf949.pas:4
#1 $00002614 in main (argc=1, argv=$bffff01c, envp=$bffff024) at
<implicit code>:10
the line is
4 a: array [Byte] of String (2);
I am running gpc on Mac OS X and it was installed through fink.
There were more test failures in test suite, but this one seems to be
the most critical.
Jan Ruzicka
PS:
Disassembled portion of the code is:
0x0000253c <init_pascal_main_program+0>: mflr r0
0x00002540 <init_pascal_main_program+4>: stmw r30,-8(r1)
0x00002544 <init_pascal_main_program+8>: stw r0,8(r1)
0x00002548 <init_pascal_main_program+12>: stwu r1,-80(r1)
0x0000254c <init_pascal_main_program+16>: mr r30,r1
0x00002550 <init_pascal_main_program+20>: bcl-
20,4*cr7+so,0x2554 <init_pascal_main_program+24>
0x00002554 <init_pascal_main_program+24>: mflr r31
0x00002558 <init_pascal_main_program+28>: addis r9,r31,4
0x0000255c <init_pascal_main_program+32>: addi r9,r9,-22972
0x00002560 <init_pascal_main_program+36>: lbz r0,0(r9)
0x00002564 <init_pascal_main_program+40>: clrlwi r0,r0,24
0x00002568 <init_pascal_main_program+44>: cmpwi r0,0
0x0000256c <init_pascal_main_program+48>: bne- 0x25b8
<init_pascal_main_program+124>
0x00002570 <init_pascal_main_program+52>: addis r9,r31,4
0x00002574 <init_pascal_main_program+56>: addi r9,r9,-22972
0x00002578 <init_pascal_main_program+60>: li r0,1
0x0000257c <init_pascal_main_program+64>: stb r0,0(r9)
0x00002580 <init_pascal_main_program+68>: li r0,0
0x00002584 <init_pascal_main_program+72>: stb r0,56(r30)
;-------------------- here starts the loop
0x00002588 <init_pascal_main_program+76>: addis r9,r31,4
0x0000258c <init_pascal_main_program+80>: addi r9,r9,-26044
0x00002590 <init_pascal_main_program+84>: lbz r0,56(r30)
0x00002594 <init_pascal_main_program+88>: clrlwi r0,r0,24
0x00002598 <init_pascal_main_program+92>: mulli r0,r0,12
0x0000259c <init_pascal_main_program+96>: add r9,r0,r9
0x000025a0 <init_pascal_main_program+100>: li r0,2
0x000025a4 <init_pascal_main_program+104>: stw r0,0(r9)
0x000025a8 <init_pascal_main_program+108>: lbz r9,56(r30)
0x000025ac <init_pascal_main_program+112>: addi r0,r9,1
0x000025b0 <init_pascal_main_program+116>: stb r0,56(r30)
0x000025b4 <init_pascal_main_program+120>: b 0x2588
<init_pascal_main_program+76>
;-------------------- here ends the loop
0x000025b8 <init_pascal_main_program+124>: lwz r1,0(r1)
0x000025bc <init_pascal_main_program+128>: lwz r0,8(r1)
0x000025c0 <init_pascal_main_program+132>: mtlr r0
0x000025c4 <init_pascal_main_program+136>: lmw r30,-8(r1)
0x000025c8 <init_pascal_main_program+140>: blr