Menu

#1348 Array initialization makes compiler crash.

closed-fixed
z80 port (189)
5
2013-05-25
2007-06-26
No

Compiling the attached source containing two loops the compiler crashes.

I compile using
sdcc -c -mz80 --srd-c99

Compiler version:
2.7.2 #4861

Philipp

Discussion

  • Philipp Klaus Krause

    sdcc crashes compiling this

     
  • Philipp Klaus Krause

    • summary: Nested ifs make compiler crash --> Nested loops make compiler crash
     
  • Philipp Klaus Krause

    • summary: Nested loops make compiler crash --> Array initialization makes compiler crash.
     
  • Philipp Klaus Krause

    Logged In: YES
    user_id=564030
    Originator: YES

    It seems it's not the loops, but the array initialization in the outer loops that makes sdcc crash.

     
  • Philipp Klaus Krause

    Logged In: YES
    user_id=564030
    Originator: YES

    I'm not sure this is a Z80 problem even though I see it only when targeting Z80 port.
    Here's a gdb backtrace, using #5027:

    #0 0x0000000000476490 in findPrevUse (ebp=0x91b540, ic=0x916b20, op=0x9167c0, ebbs=0x91c7c0, count=9, emitWarnings=1) at SDCClrange.c:465
    #1 0x0000000000476e00 in rlivePoint (ebbs=0x91c7c0, count=9, emitWarnings=1) at SDCClrange.c:583
    #2 0x0000000000477ebb in computeLiveRanges (ebbs=0x91c7c0, count=9, emitWarnings=1) at SDCClrange.c:857
    #3 0x0000000000424af8 in eBBlockFromiCode (ic=0x9151e0) at SDCCopt.c:1596
    #4 0x000000000043e576 in createFunction (name=0x909d20, body=0x910a00) at SDCCast.c:6518
    #5 0x0000000000404050 in yyparse () at SDCC.y:189
    #6 0x000000000040ffe7 in main (argc=4, argv=0x7fffed122648, envp=0x7fffed122670) at SDCCmain.c:2395

     
  • Maarten Brock

    Maarten Brock - 2008-02-20

    Logged In: YES
    user_id=888171
    Originator: NO

    This seems to be the same bug as 1888147. It is now fixed in SDCC 2.7.5 #5029.

     
  • Maarten Brock

    Maarten Brock - 2008-02-20
    • milestone: --> fixed
    • assigned_to: nobody --> maartenbrock
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB