From: SourceForge.net <no...@so...> - 2004-02-07 16:51:46
|
Bugs item #892400, was opened at 2004-02-07 16:49 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=892400&group_id=599 Category: C-Front End Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stas Sergeev (stsp) Assigned to: Nobody/Anonymous (nobody) Summary: Assign to bit var doesnt always work Initial Comment: Hi. There is a bug which makes assigning to a bit var to generate a wrong code sometimes. Here is an example: --- volatile bit a; idata unsigned char b; struct { unsigned char c; } tst; char main() { a = b; a = tst.c; return a; } --- Generated asm looks like this: --- ;bit.c:9: a = b; ; genAssign mov r0,#_b mov a,@r0 add a,#0xff mov _a,c [that's correct] ;bit.c:10: a = tst.c; ; genPointerGet ; genNearPointerGet mov r0,#_tst ; genUnpackBits mov a,@r0 anl a,#0x01 <--- BUG! add a,#0xff mov _a,c --- Test-case is attached. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=892400&group_id=599 |