From: SourceForge.net <no...@so...> - 2008-09-08 21:43:16
|
Bugs item #1962613, was opened at 2008-05-12 22:11 Message generated for change (Comment added) made by maartenbrock You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1962613&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Philipp Krause (spth) Assigned to: Nobody/Anonymous (nobody) Summary: Array of pointers in struct code generation error Initial Comment: This bug might be the same as #1812570. A small sample is attached. On gcc f() return 1. On sdcc ---------------------------------------------------------------------- >Comment By: Maarten Brock (maartenbrock) Date: 2008-09-08 23:43 Message: I can confirm this bug is present for mcs51 too. ---------------------------------------------------------------------- Comment By: Philipp Krause (spth) Date: 2008-05-12 22:16 Message: Logged In: YES user_id=564030 Originator: YES Sorry, I accidently hit the submit button. On sdcc there's an additional indirection. Instead of returning the expected value sdcc treats the expected value and whatever byte might be next as a pointer and the value it points to. Here's the generated asm (using sdcc -mz80 --fverbose-asm test.c): ; genPointerGet ld hl,#_x ld c,(hl) inc hl ld b,(hl) ; genPointerGet ld l,c ld h,b #_y NOW IN HL ld c,(hl) 1 NOW IN C inc hl ld b,(hl) ; genPointerGet ld a,(bc) _f_end:: _y: .db #0x01 _x: .dw _y .area _CODE .area _CABS While I use the Z80 port this probably affects all ports. Philipp File Added: test.asm ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1962613&group_id=599 |