#2143 Array definition caused error

closed-works-for-me
nobody
z80 port (188)
Z80
5
2013-05-25
2013-03-07
Woody
No

1. Sample code attached in bug.zip.
2. Command used: C:\SDCC\BIN\sdcc bug1.c -mz80 -c --std-c99 --codeseg CODE1
3. Version: SDCC : mcs51/gbz80/z80/z180/r2k/r3ka/ds390/pic16/pic14/TININative/ds400/hc08/s08
3.2.1 #8447 (Mar 6 2013) (MINGW32)
4. Description:
In bug1.c, there are 2 copy of UI_StandbyDisplay() functions. The first (remarked one) will generate error result in line 69 and 71 (itoa function calls). But the second is ok, the only difference is the defintion of array UCHAR pString[64];
The first is compiled correctly with SDCC 3.0.1 #6078 (Dec 7 2010)

Discussion

  • Woody
    Woody
    2013-03-07

     
    Attachments
  • Woody
    Woody
    2013-03-08

    More test about this bug:
    1. It is only sdcc.exe related, sdasz80.exe and sdcpp.exe are all ok.
    2. It is correct if "--oldralloc" option used.

     
  • What exactly is the problem here? Does sdcc report an error? If yes, what is the error message? Does it generate code that behaves wrongly?

    On my Debian GNU/Linux system, both sdcc 3.2.1 #8199 and sdcc 3.2.1 #8448 compile all functions in bug1.c without reporting error. I din't look at the generated asm yet.

    Philipp

     
  • Closing, since information necessary to reproduce the issue is missing.

    Philipp

     
    • status: open --> closed-works-for-me
    • Category: --> Z80