Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
When two different member of one structure accessed with a pointer are set to the same value the offset of the second member is wrong because is not calculated from the beginning of the structure but from the address of the previous accessed member.
Source , makefile, listing and sdcc version.
Philipp Klaus Krause
I cannot reproduce this bug: The following code id generated for me:
;bug1.c:29: ptr->rd =
ld c,4 (ix)
ld b,5 (ix)
;bug1.c:32: ptr->wr = 0;
ptr is stored into bc. ptr + 3 is stored into de, ptr + 4 is stored into hl, then 0 is assigned to (hl) and (de).
P.S.: --stack auto doesn't do anything int the z80 port.
P.P.S.: I used sdcc 3.0.4 #6622 for testing, which version did you use? Please check with current sdcc and reopen the bug if you can reproduce the problem.
The string id of SDCC is attached in the file named sdcc and reported below. Now i try to use version 3.04