#1860 Incorrect function call code generation

closed-fixed
Erik Petrich
5
2013-05-25
2011-10-16
Anonymous
No

I'm compiling the attached source file with:

sdcc -mz80 --data-loc 0xC001 -c funcalltest.c

My SDCC version is:

mcs51/gbz80/z80/z180/ds390/pic16/pic14/TININative/ds400/hc08 3.0.5 #6899
(Oct 2 2011) (MINGW32)

After compiling, look at the generated asm or lst file and see what the compiler did with the first memcpy call. It keeps pushing some args multiple times.

Discussion


  • Anonymous
    2011-10-16

     
    Attachments
  • It seems this is not a z80-specific problem: While the z80 port pushes too much data, other ports, such as mcs51 or hc08 just crash with a SIGSEGV.

    Philipp

     
    • labels: 100692 -->
     
  • Erik Petrich
    Erik Petrich
    2011-10-30

    • labels: --> C-Front End
    • milestone: --> fixed
    • assigned_to: nobody --> epetrich
    • status: open --> closed-fixed
     
  • Erik Petrich
    Erik Petrich
    2011-10-30

    Fixed in SDCC revision #6996